diff --git a/dist/netjsongraph.min.js b/dist/netjsongraph.min.js index fd2f51bf..406baac5 100644 --- a/dist/netjsongraph.min.js +++ b/dist/netjsongraph.min.js @@ -1,9 +1,9 @@ -(()=>{var t={3721:(t,e,n)=>{var i;self,t.exports=(i=n(125),(()=>{"use strict";var t={468:(t,e,n)=>{n.r(e);var i=n(83);function r(t,e,n){"object"==typeof e&&(n=e,e=null);var i,r=this;if(!(t instanceof Function))for(var s in i=[],t)t.hasOwnProperty(s)&&i.push(s);var l=function(e){if(r.apply(this,arguments),t instanceof Function?o(this,t.call(this,e)):a(this,t,i),this.constructor===l)for(var n=l.__initializers__,s=0;s=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}};var z,B={supportWebGL:function(){if(null==z)try{var t=document.createElement("canvas");if(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))throw new Error}catch(t){z=!1}return z}};B.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,B.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,B.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,B.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,B.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,B.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,B.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var Z={};"undefined"!=typeof window?Z=window:void 0!==n.g&&(Z=n.g),B.requestAnimationFrame=Z.requestAnimationFrame||Z.msRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},B.createCanvas=function(){return document.createElement("canvas")},B.createImage=function(){return new Z.Image},B.request={get:R.get},B.addEventListener=function(t,e,n,i){t.addEventListener(e,n,i)},B.removeEventListener=function(t,e,n){t.removeEventListener(e,n)};const F=B;var V=function(){this.head=null,this.tail=null,this._length=0};V.prototype.insert=function(t){var e=new V.Entry(t);return this.insertEntry(e),e},V.prototype.insertAt=function(t,e){if(!(t<0)){for(var n=this.head,i=0;n&&i!=t;)n=n.next,i++;if(n){var r=new V.Entry(e),o=n.prev;o?(o.next=r,r.prev=o):this.head=r,r.next=n,n.prev=r}else this.insert(e)}},V.prototype.insertBeforeEntry=function(t,e){var n=new V.Entry(t),i=e.prev;i?(i.next=n,n.prev=i):this.head=n,n.next=e,e.prev=n,this._length++},V.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},V.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._length--},V.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e?(this.remove(e),e.value):void 0}},V.prototype.getHead=function(){if(this.head)return this.head.value},V.prototype.getTail=function(){if(this.tail)return this.tail.value},V.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e.value}},V.prototype.indexOf=function(t){for(var e=this.head,n=0;e;){if(e.value===t)return n;e=e.next,n++}},V.prototype.length=function(){return this._length},V.prototype.isEmpty=function(){return 0===this._length},V.prototype.forEach=function(t,e){for(var n=this.head,i=0,r=void 0!==e;n;)r?t.call(e,n.value,i):t(n.value,i),n=n.next,i++},V.prototype.clear=function(){this.tail=this.head=null,this._length=0},V.Entry=function(t){this.value=t,this.next=null,this.prev=null};const G=V;var H=function(t){this._list=new G,this._map={},this._maxSize=t||10};H.prototype.setMaxSize=function(t){this._maxSize=t},H.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var n=this._list.length();if(n>=this._maxSize&&n>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},H.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},H.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},H.prototype.clear=function(){this._list.clear(),this._map={}};const U=H;var W={},j={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 X(t){return(t=Math.round(t))<0?0:t>255?255:t}function Y(t){return t<0?0:t>1?1:t}function q(t){return t.length&&"%"===t.charAt(t.length-1)?X(parseFloat(t)/100*255):X(parseInt(t,10))}function K(t){return t.length&&"%"===t.charAt(t.length-1)?Y(parseFloat(t)/100):Y(parseFloat(t))}function J(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Q(t,e,n){return t+(e-t)*n}function $(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function tt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var et=new U(20),nt=null;function it(t,e){nt&&tt(nt,e),nt=et.put(t,nt||e.slice())}function rt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=K(t[1]),r=K(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return $(e=e||[],X(255*J(a,o,n+1/3)),X(255*J(a,o,n)),X(255*J(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}W.parse=function(t,e){if(t){e=e||[];var n=et.get(t);if(n)return tt(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in j)return tt(e,j[r]),it(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?($(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),it(t,e),e):void $(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?($(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),it(t,e),e):void $(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void $(e,0,0,0,1);u=K(l.pop());case"rgb":return 3!==l.length?void $(e,0,0,0,1):($(e,q(l[0]),q(l[1]),q(l[2]),u),it(t,e),e);case"hsla":return 4!==l.length?void $(e,0,0,0,1):(l[3]=K(l[3]),rt(l,e),it(t,e),e);case"hsl":return 3!==l.length?void $(e,0,0,0,1):(rt(l,e),it(t,e),e);default:return}}$(e,0,0,0,1)}},W.parseToFloat=function(t,e){if(e=W.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},W.lift=function(t,e){var n=W.parse(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return W.stringify(n,4===n.length?"rgba":"rgb")}},W.toHex=function(t){var e=W.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},W.fastLerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=X(Q(a[0],s[0],l)),n[1]=X(Q(a[1],s[1],l)),n[2]=X(Q(a[2],s[2],l)),n[3]=Y(Q(a[3],s[3],l)),n}},W.fastMapToColor=W.fastLerp,W.lerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=W.parse(e[r]),s=W.parse(e[o]),l=i-r,u=W.stringify([X(Q(a[0],s[0],l)),X(Q(a[1],s[1],l)),X(Q(a[2],s[2],l)),Y(Q(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}},W.mapToColor=W.lerp,W.modifyHSL=function(t,e,n,i){if(t=W.parse(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(t[1]=K(n)),null!=i&&(t[2]=K(i)),W.stringify(rt(t),"rgba");var r},W.modifyAlpha=function(t,e){if((t=W.parse(t))&&null!=e)return t[3]=Y(e),W.stringify(t,"rgba")},W.stringify=function(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}};var ot=W.parseToFloat,at={};function st(t){var e=Object.keys(t);e.sort();for(var n=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var n in t){var i=t[n];this.setUniform(n,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var n=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var r=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=p.clone(t.vertexDefines),this.fragmentDefines=p.clone(t.fragmentDefines),e){for(var a in n)i[a]&&(i[a].value=n[a].value);p.defaults(this.vertexDefines,r),p.defaults(this.fragmentDefines,o)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:!(!e||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=p.clone(this.vertexDefines),t.fragmentDefines=p.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,n){var i=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(n=e,e=t,t="both"),n=null!=n?n:null,"vertex"!==t&&"both"!==t||i[e]!==n&&(i[e]=n,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==n&&(r[e]=n,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},pt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},pt.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},pt.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},pt.random=function(t,e){e=e||1;var n=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},pt.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},pt.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},pt.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},pt.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},pt.forEach=(ut=pt.create(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0&&i.push("#define "+r.toUpperCase()+"_COUNT "+o)}if(n)for(var a=0;al.getMaxJointNumber()&&(d.USE_SKIN_MATRICES_TEXTURE=null),c+="\n"+Mt(d)+"\n"}o&&(c+="\n#define INSTANCING\n");var p=c+Mt(e.vertexDefines,s,h),f=c+Mt(e.fragmentDefines,s,h),g=p+"\n"+e.shader.vertex,m=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=l.getGLExtension(t)}));m.indexOf("EXT_shader_texture_lod")>=0&&(f+="\n#define SUPPORT_TEXTURE_LOD"),m.indexOf("OES_standard_derivatives")>=0&&(f+="\n#define SUPPORT_STANDARD_DERIVATIVES");var v,y,_=function(t){for(var e=[],n=0;n=0){if(1!==s&&4!==s){Vt();break}s=2,u=[]}else if(1!==s)if(4!==s)h(c),s=0;else{var d=c;Nt.indexOf(d)>=0||kt.indexOf(d)>=0||Rt.indexOf(d)>=0?l[a].semantic=d:"ignore"===d||"unconfigurable"===d?l[a].ignore=!0:l[a].value="bool"===t?"true"===d:parseFloat(d)}else l[a].value="bool"===t?"true"===c:parseFloat(c),u=null;else{if(2!==s){Vt();break}if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else l[a].value=new F.Float32Array(u),u=null,s=5;else if(2===s){if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else s=5;else s=4;else{if(0!==s&&3!==s){Vt();break}s=1}}return l}function Ht(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=Ft(t),e=Ft(e),this._shaderID=function(t,e){var n="vertex:"+t+"fragment:"+e;if(Bt[n])return Bt[n];var i=p.genGUID();return Bt[n]=i,Zt[i]={vertex:t,fragment:e},i}(t,e),this._vertexCode=Ht.parseImport(t),this._fragmentCode=Ht.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}Ht.prototype={constructor:Ht,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var n=this.uniformTemplates[e];t[e]={type:n.type,value:n.value()}}return t},_parseImport:function(){this._vertexCode=Ht.parseImport(this.vertex),this._fragmentCode=Ht.parseImport(this.fragment)},_addSemanticUniform:function(t,e,n){if(Nt.indexOf(n)>=0)this.attributeSemantics[n]={symbol:t,type:e};else if(Rt.indexOf(n)>=0){var i=!1,r=n;n.match(/TRANSPOSE$/)&&(i=!0,r=n.slice(0,-9)),this.matrixSemantics[n]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:r}}else kt.indexOf(n)>=0&&(this.uniformSemantics[n]={symbol:t,type:e})},_addMaterialUniform:function(t,e,n,i,r,o){o[t]={type:n,value:r?Et.array:i||Et[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function n(t){return null!=t?function(){return t}:null}function i(i,r,o){var a=Gt(r,o),s=[];for(var l in a){var u=a[l],h=u.semantic,c=l,d=Pt[r],p=n(a[l].value);a[l].isArray&&(c+="["+a[l].arraySize+"]",d+="v"),s.push(c),e._uniformList.push(l),u.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[l]={shaderType:"fragment",type:r}),h?e._addSemanticUniform(l,d,h):e._addMaterialUniform(l,r,d,p,a[l].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(Dt,i),this._fragmentCode=this._fragmentCode.replace(Dt,i),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(It,(function(n,i,r){var o=Gt(i,r),a=zt[i]||1,s=[];for(var l in o){var u=o[l].semantic;if(t[l]={type:"float",size:a,semantic:u||null},u){if(Nt.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:i}}s.push(l)}return"attribute "+i+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,n,i){var r=t.fragmentDefines;return r[n]||(r[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}this._vertexCode=this._vertexCode.replace(Lt,e),this._fragmentCode=this._fragmentCode.replace(Lt,e)},clone:function(){var t=Zt[this._shaderID];return new Ht(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(Ht.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(Ht.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(Ht.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(Ht.prototype,"uniforms",{get:function(){return this._uniformList}}));var Ut=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;Ht.parseImport=function(t){return t.replace(Ut,(function(t,e,n){return(t=Ht.source(n))?Ht.parseImport(t):(console.error('Shader chunk "'+n+'" not existed in library'),"")}))};var Wt=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;Ht.import=function(t){t.replace(Wt,(function(t,e,n,i){if(i=i.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,o=n.split("."),a=Ht.codes,s=0;s 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n}\n@end";var Yt={create:function(){var t=new ct(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},clone:function(t){var e=new ct(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},transpose:function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15],y=n*s-i*a,_=n*l-r*a,x=n*u-o*a,b=i*l-r*s,w=i*u-o*s,S=r*u-o*l,T=h*g-c*f,M=h*m-d*f,A=h*v-p*f,C=c*m-d*g,D=c*v-p*g,I=d*v-p*m,L=y*I-_*D+x*C+b*A-w*M+S*T;return L?(L=1/L,t[0]=(s*I-l*D+u*C)*L,t[1]=(r*D-i*I-o*C)*L,t[2]=(g*S-m*w+v*b)*L,t[3]=(d*w-c*S-p*b)*L,t[4]=(l*A-a*I-u*M)*L,t[5]=(n*I-r*A+o*M)*L,t[6]=(m*x-f*S-v*_)*L,t[7]=(h*S-d*x+p*_)*L,t[8]=(a*D-s*A+u*T)*L,t[9]=(i*A-n*D-o*T)*L,t[10]=(f*w-g*x+v*y)*L,t[11]=(c*x-h*w-p*y)*L,t[12]=(s*M-a*C-l*T)*L,t[13]=(n*C-i*M+r*T)*L,t[14]=(g*_-f*b-m*y)*L,t[15]=(h*b-c*_+d*y)*L,t):null},adjoint:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15];return t[0]=s*(d*v-p*m)-c*(l*v-u*m)+g*(l*p-u*d),t[1]=-(i*(d*v-p*m)-c*(r*v-o*m)+g*(r*p-o*d)),t[2]=i*(l*v-u*m)-s*(r*v-o*m)+g*(r*u-o*l),t[3]=-(i*(l*p-u*d)-s*(r*p-o*d)+c*(r*u-o*l)),t[4]=-(a*(d*v-p*m)-h*(l*v-u*m)+f*(l*p-u*d)),t[5]=n*(d*v-p*m)-h*(r*v-o*m)+f*(r*p-o*d),t[6]=-(n*(l*v-u*m)-a*(r*v-o*m)+f*(r*u-o*l)),t[7]=n*(l*p-u*d)-a*(r*p-o*d)+h*(r*u-o*l),t[8]=a*(c*v-p*g)-h*(s*v-u*g)+f*(s*p-u*c),t[9]=-(n*(c*v-p*g)-h*(i*v-o*g)+f*(i*p-o*c)),t[10]=n*(s*v-u*g)-a*(i*v-o*g)+f*(i*u-o*s),t[11]=-(n*(s*p-u*c)-a*(i*p-o*c)+h*(i*u-o*s)),t[12]=-(a*(c*m-d*g)-h*(s*m-l*g)+f*(s*d-l*c)),t[13]=n*(c*m-d*g)-h*(i*m-r*g)+f*(i*d-r*c),t[14]=-(n*(s*m-l*g)-a*(i*m-r*g)+f*(i*l-r*s)),t[15]=n*(s*d-l*c)-a*(i*d-r*c)+h*(i*l-r*s),t},determinant:function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],m=t[15];return(e*a-n*o)*(c*m-d*g)-(e*s-i*o)*(h*m-d*f)+(e*l-r*o)*(h*g-c*f)+(n*s-i*a)*(u*m-d*p)-(n*l-r*a)*(u*g-c*p)+(i*l-r*s)*(u*f-h*p)},multiply:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],g=e[12],m=e[13],v=e[14],y=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*i+x*s+b*c+w*g,t[1]=_*r+x*l+b*d+w*m,t[2]=_*o+x*u+b*p+w*v,t[3]=_*a+x*h+b*f+w*y,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*i+x*s+b*c+w*g,t[5]=_*r+x*l+b*d+w*m,t[6]=_*o+x*u+b*p+w*v,t[7]=_*a+x*h+b*f+w*y,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*i+x*s+b*c+w*g,t[9]=_*r+x*l+b*d+w*m,t[10]=_*o+x*u+b*p+w*v,t[11]=_*a+x*h+b*f+w*y,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*i+x*s+b*c+w*g,t[13]=_*r+x*l+b*d+w*m,t[14]=_*o+x*u+b*p+w*v,t[15]=_*a+x*h+b*f+w*y,t},multiplyAffine:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],h=e[9],c=e[10],d=e[12],p=e[13],f=e[14],g=n[0],m=n[1],v=n[2];return t[0]=g*i+m*a+v*u,t[1]=g*r+m*s+v*h,t[2]=g*o+m*l+v*c,g=n[4],m=n[5],v=n[6],t[4]=g*i+m*a+v*u,t[5]=g*r+m*s+v*h,t[6]=g*o+m*l+v*c,g=n[8],m=n[9],v=n[10],t[8]=g*i+m*a+v*u,t[9]=g*r+m*s+v*h,t[10]=g*o+m*l+v*c,g=n[12],m=n[13],v=n[14],t[12]=g*i+m*a+v*u+d,t[13]=g*r+m*s+v*h+p,t[14]=g*o+m*l+v*c+f,t}};Yt.mul=Yt.multiply,Yt.mulAffine=Yt.multiplyAffine,Yt.translate=function(t,e,n){var i,r,o,a,s,l,u,h,c,d,p,f,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=h,t[8]=c,t[9]=d,t[10]=p,t[11]=f,t[12]=i*g+s*m+c*v+e[12],t[13]=r*g+l*m+d*v+e[13],t[14]=o*g+u*m+p*v+e[14],t[15]=a*g+h*m+f*v+e[15]),t},Yt.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},Yt.rotate=function(t,e,n,i){var r,o,a,s,l,u,h,c,d,p,f,g,m,v,y,_,x,b,w,S,T,M,A,C,D=i[0],I=i[1],L=i[2],P=Math.sqrt(D*D+I*I+L*L);return Math.abs(P)0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},Kt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},Kt.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},Kt.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},Kt.random=function(t,e){e=e||1;var n=2*dt()*Math.PI,i=2*dt()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t},Kt.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},Kt.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},Kt.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Kt.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.forEach=function(){var t=Kt.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=3),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s1?0:Math.acos(r)};const Jt=Kt;jt.import(Xt);var Qt=qt.create,$t={};function te(t){return t.material}function ee(t,e,n){return e.uniforms[n].value}function ne(t,e,n,i){return n!==i}function ie(t){return!0}function re(){}var oe={float:T,byte:5120,ubyte:S,short:5122,ushort:5123};function ae(t,e,n){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=n,this.vao=null}function se(t){var e,n;this.bind=function(t){e||((e=F.createCanvas()).width=e.height=1,e.getContext("2d"));var i=t.gl,r=!n;r&&(n=i.createTexture()),i.bindTexture(i.TEXTURE_2D,n),r&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var le=g.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=F.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new y(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new Ct(this),this._placeholderTexture=new se(this)}),{resize:function(t,e){var n=this.canvas,i=this.devicePixelRatio;null!=t?(n.style&&(n.style.width=t+"px",n.style.height=e+"px"),n.width=t*i,n.height=e*i,this._width=t,this._height=e):(this._width=n.width/i,this._height=n.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,n,i,r){if("object"==typeof t){var o=t;t=o.x,e=o.y,n=o.width,i=o.height,r=o.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,n*r,i*r),this.viewport={x:t,y:e,width:n,height:i,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,n,i){var r=this.gl,o=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var a=this.viewport,s=!1,l=a.devicePixelRatio;(a.width!==this._width||a.height!==this._height||l&&l!==this.devicePixelRatio||a.x||a.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(a.x*l,a.y*l,a.width*l,a.height*l)),r.clearColor(o[0],o[1],o[2],o[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(n||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,d=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var p=Qt(),f=Jt.create(),g=0;g0){var s=t[r-1],l=s.joints?s.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===s.material&&o.lightGroup===s.lightGroup){o.__program=s.__program;continue}}var u=this._programMgr.getProgram(o,a,e);this.validateProgram(u),o.__program=u}},renderPass:function(t,e,n){this.trigger("beforerenderpass",this,t,e,n),(n=n||{}).getMaterial=n.getMaterial||te,n.getUniform=n.getUniform||ee,n.isMaterialChanged=n.isMaterialChanged||ne,n.beforeRender=n.beforeRender||re,n.afterRender=n.afterRender||re;var i=n.ifRender||ie;this.updatePrograms(t,this._sceneRendering,n),n.sortCompare&&t.sort(n.sortCompare);var r=this.viewport,o=r.devicePixelRatio,a=[r.x*o,r.y*o,r.width*o,r.height*o],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[a[2],a[3]],h=Date.now();e?(qt.copy(ue.VIEW,e.viewMatrix.array),qt.copy(ue.PROJECTION,e.projectionMatrix.array),qt.copy(ue.VIEWINVERSE,e.worldTransform.array)):(qt.identity(ue.VIEW),qt.identity(ue.PROJECTION),qt.identity(ue.VIEWINVERSE)),qt.multiply(ue.VIEWPROJECTION,ue.PROJECTION,ue.VIEW),qt.invert(ue.PROJECTIONINVERSE,ue.PROJECTION),qt.invert(ue.VIEWPROJECTIONINVERSE,ue.VIEWPROJECTION);for(var c,d,p,f,g,m,v,y,_,x,b,w,S=this.gl,T=this._sceneRendering,M=0;Mthis.getMaxJointNumber()){var o=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,o,n),e.setUniform(i,"1i","skinMatricesTexture",n),e.setUniform(i,"1f","skinMatricesTextureSize",o.width)}else{var a=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",a)}},_renderObject:function(t,e,n){var i=this.gl,r=t.geometry,o=t.mode;null==o&&(o=4);var a=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(!s||(a=this.getGLExtension("ANGLE_instanced_arrays"))){var l;if(s&&(l=this._bindInstancedAttributes(t,n,a)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint")&&r.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?a.drawElementsInstancedANGLE(o,e.indicesBuffer.count,u,0,t.getInstanceCount()):i.drawElements(o,e.indicesBuffer.count,u,0)}else s?a.drawArraysInstancedANGLE(o,0,r.vertexCount,t.getInstanceCount()):i.drawArrays(o,0,r.vertexCount);if(s)for(var h=0;hn?n:t}ce.add=function(t,e,n){return Jt.add(t.array,e.array,n.array),t._dirty=!0,t},ce.set=function(t,e,n,i){Jt.set(t.array,e,n,i),t._dirty=!0},ce.copy=function(t,e){return Jt.copy(t.array,e.array),t._dirty=!0,t},ce.cross=function(t,e,n){return Jt.cross(t.array,e.array,n.array),t._dirty=!0,t},ce.distance=ce.dist=function(t,e){return Jt.distance(t.array,e.array)},ce.divide=ce.div=function(t,e,n){return Jt.divide(t.array,e.array,n.array),t._dirty=!0,t},ce.dot=function(t,e){return Jt.dot(t.array,e.array)},ce.len=function(t){return Jt.length(t.array)},ce.lerp=function(t,e,n,i){return Jt.lerp(t.array,e.array,n.array,i),t._dirty=!0,t},ce.min=function(t,e,n){return Jt.min(t.array,e.array,n.array),t._dirty=!0,t},ce.max=function(t,e,n){return Jt.max(t.array,e.array,n.array),t._dirty=!0,t},ce.multiply=ce.mul=function(t,e,n){return Jt.multiply(t.array,e.array,n.array),t._dirty=!0,t},ce.negate=function(t,e){return Jt.negate(t.array,e.array),t._dirty=!0,t},ce.normalize=function(t,e){return Jt.normalize(t.array,e.array),t._dirty=!0,t},ce.random=function(t,e){return Jt.random(t.array,e),t._dirty=!0,t},ce.scale=function(t,e,n){return Jt.scale(t.array,e.array,n),t._dirty=!0,t},ce.scaleAndAdd=function(t,e,n,i){return Jt.scaleAndAdd(t.array,e.array,n.array,i),t._dirty=!0,t},ce.squaredDistance=ce.sqrDist=function(t,e){return Jt.sqrDist(t.array,e.array)},ce.squaredLength=ce.sqrLen=function(t){return Jt.sqrLen(t.array)},ce.subtract=ce.sub=function(t,e,n){return Jt.subtract(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat3=function(t,e,n){return Jt.transformMat3(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat4=function(t,e,n){return Jt.transformMat4(t.array,e.array,n.array),t._dirty=!0,t},ce.transformQuat=function(t,e,n){return Jt.transformQuat(t.array,e.array,n.array),t._dirty=!0,t};var ge=Math.atan2,me=Math.asin,ve=Math.abs;ce.eulerFromQuat=function(t,e,n){t._dirty=!0,e=e.array;var i=t.array,r=e[0],o=e[1],a=e[2],s=e[3],l=r*r,u=o*o,h=a*a,c=s*s;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":i[0]=ge(2*(r*s-o*a),c-l-u+h),i[1]=me(fe(2*(r*a+o*s),-1,1)),i[2]=ge(2*(a*s-r*o),c+l-u-h);break;case"YXZ":i[0]=me(fe(2*(r*s-o*a),-1,1)),i[1]=ge(2*(r*a+o*s),c-l-u+h),i[2]=ge(2*(r*o+a*s),c-l+u-h);break;case"ZXY":i[0]=me(fe(2*(r*s+o*a),-1,1)),i[1]=ge(2*(o*s-a*r),c-l-u+h),i[2]=ge(2*(a*s-r*o),c-l+u-h);break;case"ZYX":i[0]=ge(2*(r*s+a*o),c-l-u+h),i[1]=me(fe(2*(o*s-r*a),-1,1)),i[2]=ge(2*(r*o+a*s),c+l-u-h);break;case"YZX":i[0]=ge(2*(r*s-a*o),c-l+u-h),i[1]=ge(2*(o*s-r*a),c+l-u-h),i[2]=me(fe(2*(r*o+a*s),-1,1));break;case"XZY":i[0]=ge(2*(r*s+o*a),c-l+u-h),i[1]=ge(2*(r*a+o*s),c+l-u-h),i[2]=me(fe(2*(a*s-r*o),-1,1));break;default:console.warn("Unkown order: "+n)}return t},ce.eulerFromMat3=function(t,e,n){var i=e.array,r=i[0],o=i[3],a=i[6],s=i[1],l=i[4],u=i[7],h=i[2],c=i[5],d=i[8],p=t.array;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":p[1]=me(fe(a,-1,1)),ve(a)<.99999?(p[0]=ge(-u,d),p[2]=ge(-o,r)):(p[0]=ge(c,l),p[2]=0);break;case"YXZ":p[0]=me(-fe(u,-1,1)),ve(u)<.99999?(p[1]=ge(a,d),p[2]=ge(s,l)):(p[1]=ge(-h,r),p[2]=0);break;case"ZXY":p[0]=me(fe(c,-1,1)),ve(c)<.99999?(p[1]=ge(-h,d),p[2]=ge(-o,l)):(p[1]=0,p[2]=ge(s,r));break;case"ZYX":p[1]=me(-fe(h,-1,1)),ve(h)<.99999?(p[0]=ge(c,d),p[2]=ge(s,r)):(p[0]=0,p[2]=ge(-o,l));break;case"YZX":p[2]=me(fe(s,-1,1)),ve(s)<.99999?(p[0]=ge(-u,l),p[1]=ge(-h,r)):(p[0]=0,p[1]=ge(a,d));break;case"XZY":p[2]=me(-fe(o,-1,1)),ve(o)<.99999?(p[0]=ge(c,l),p[1]=ge(a,r)):(p[0]=ge(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+n)}return t._dirty=!0,t},Object.defineProperties(ce,{POSITIVE_X:{get:function(){return new ce(1,0,0)}},NEGATIVE_X:{get:function(){return new ce(-1,0,0)}},POSITIVE_Y:{get:function(){return new ce(0,1,0)}},NEGATIVE_Y:{get:function(){return new ce(0,-1,0)}},POSITIVE_Z:{get:function(){return new ce(0,0,1)}},NEGATIVE_Z:{get:function(){return new ce(0,0,-1)}},UP:{get:function(){return new ce(0,1,0)}},ZERO:{get:function(){return new ce}}});const ye=ce;var _e,xe,be,we,Se,Te=function(t,e){this.origin=t||new ye,this.direction=e||new ye};Te.prototype={constructor:Te,intersectPlane:function(t,e){var n=t.normal.array,i=t.distance,r=this.origin.array,o=this.direction.array,a=Jt.dot(n,o);if(0===a)return null;e||(e=new ye);var s=(Jt.dot(n,r)-i)/a;return Jt.scaleAndAdd(e.array,r,o,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=Jt.dot(t.normal.array,this.direction.array);Jt.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,2*-e),this.direction._dirty=!0},distanceToPoint:(Se=Jt.create(),function(t){Jt.sub(Se,t,this.origin.array);var e=Jt.dot(Se,this.direction.array);if(e<0)return Jt.distance(this.origin.array,t);var n=Jt.lenSquared(Se);return Math.sqrt(n-e*e)}),intersectSphere:function(){var t=Jt.create();return function(e,n,i){var r=this.origin.array,o=this.direction.array;e=e.array,Jt.sub(t,e,r);var a=Jt.dot(t,o),s=Jt.squaredLength(t)-a*a,l=n*n;if(!(s>l)){var u=Math.sqrt(l-s),h=a-u,c=a+u;return i||(i=new ye),h<0?c<0?null:(Jt.scaleAndAdd(i.array,r,o,c),i):(Jt.scaleAndAdd(i.array,r,o,h),i)}}}(),intersectBoundingBox:function(t,e){var n,i,r,o,a,s,l=this.direction.array,u=this.origin.array,h=t.min.array,c=t.max.array,d=1/l[0],p=1/l[1],f=1/l[2];if(d>=0?(n=(h[0]-u[0])*d,i=(c[0]-u[0])*d):(i=(h[0]-u[0])*d,n=(c[0]-u[0])*d),p>=0?(r=(h[1]-u[1])*p,o=(c[1]-u[1])*p):(o=(h[1]-u[1])*p,r=(c[1]-u[1])*p),n>o||r>i)return null;if((r>n||n!=n)&&(n=r),(o=0?(a=(h[2]-u[2])*f,s=(c[2]-u[2])*f):(s=(h[2]-u[2])*f,a=(c[2]-u[2])*f),n>s||a>i)return null;if((a>n||n!=n)&&(n=a),(s=0?n:i;return e||(e=new ye),Jt.scaleAndAdd(e.array,u,l,g),e},intersectTriangle:(_e=Jt.create(),xe=Jt.create(),be=Jt.create(),we=Jt.create(),function(t,e,n,i,r,o){var a=this.direction.array,s=this.origin.array;t=t.array,e=e.array,n=n.array,Jt.sub(_e,e,t),Jt.sub(xe,n,t),Jt.cross(we,xe,a);var l=Jt.dot(_e,we);if(i){if(l>-1e-5)return null}else if(l>-1e-5&&l<1e-5)return null;Jt.sub(be,s,t);var u=Jt.dot(we,be)/l;if(u<0||u>1)return null;Jt.cross(we,_e,be);var h=Jt.dot(a,we)/l;if(h<0||h>1||u+h>1)return null;Jt.cross(we,_e,xe);var c=-Jt.dot(be,we)/l;return c<0?null:(r||(r=new ye),o&&ye.set(o,1-u-h,u,h),Jt.scaleAndAdd(r.array,s,a,c),r)}),applyTransform:function(t){ye.add(this.direction,this.direction,this.origin),ye.transformMat4(this.origin,this.origin,t),ye.transformMat4(this.direction,this.direction,t),ye.sub(this.direction,this.direction,this.origin),ye.normalize(this.direction,this.direction)},copy:function(t){ye.copy(this.origin,t.origin),ye.copy(this.direction,t.direction)},clone:function(){var t=new Te;return t.copy(this),t}};const Me=Te;var Ae={create:function(){var t=new ct(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var e=new ct(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},fromValues:function(t,e,n,i){var r=new ct(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},set:function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},subtract:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}};Ae.sub=Ae.subtract,Ae.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},Ae.mul=Ae.multiply,Ae.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},Ae.div=Ae.divide,Ae.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},Ae.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},Ae.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},Ae.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},Ae.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},Ae.dist=Ae.distance,Ae.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},Ae.sqrDist=Ae.squaredDistance,Ae.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},Ae.len=Ae.length,Ae.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},Ae.sqrLen=Ae.squaredLength,Ae.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Ae.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},Ae.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},Ae.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Ae.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},Ae.random=function(t,e){return e=e||1,t[0]=dt(),t[1]=dt(),t[2]=dt(),t[3]=dt(),Ae.normalize(t,t),Ae.scale(t,t,e),t},Ae.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},Ae.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Ae.forEach=function(){var t=Ae.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=4),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Jt.cross(Le,e,n),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=1+i,Ne.normalize(t,t))}),Ne.setAxes=(Ee=Ie.create(),function(t,e,n,i){return Ee[0]=n[0],Ee[3]=n[1],Ee[6]=n[2],Ee[1]=i[0],Ee[4]=i[1],Ee[7]=i[2],Ee[2]=-e[0],Ee[5]=-e[1],Ee[8]=-e[2],Ne.normalize(t,Ne.fromMat3(t,Ee))}),Ne.clone=Ce.clone,Ne.fromValues=Ce.fromValues,Ne.copy=Ce.copy,Ne.set=Ce.set,Ne.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},Ne.setAxisAngle=function(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},Ne.add=Ce.add,Ne.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],h=n[3];return t[0]=i*h+a*s+r*u-o*l,t[1]=r*h+a*l+o*s-i*u,t[2]=o*h+a*u+i*l-r*s,t[3]=a*h-i*s-r*l-o*u,t},Ne.mul=Ne.multiply,Ne.scale=Ce.scale,Ne.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+a*s,t[1]=r*l+o*s,t[2]=o*l-r*s,t[3]=a*l-i*s,t},Ne.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*s,t[1]=r*l+a*s,t[2]=o*l+i*s,t[3]=a*l-r*s,t},Ne.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*s,t[1]=r*l-i*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},Ne.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},Ne.dot=Ce.dot,Ne.lerp=Ce.lerp,Ne.slerp=function(t,e,n,i){var r,o,a,s,l,u=e[0],h=e[1],c=e[2],d=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return(o=u*p+h*f+c*g+d*m)<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,l=Math.sin(i*r)/a):(s=1-i,l=i),t[0]=s*u+l*p,t[1]=s*h+l*f,t[2]=s*c+l*g,t[3]=s*d+l*m,t},Ne.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},Ne.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},Ne.length=Ce.length,Ne.len=Ne.length,Ne.squaredLength=Ce.squaredLength,Ne.sqrLen=Ne.squaredLength,Ne.normalize=Ce.normalize,Ne.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t};const ke=Ne;var Re,ze,Be,Ze,Fe=function(){this._axisX=new ye,this._axisY=new ye,this._axisZ=new ye,this.array=qt.create(),this._dirty=!0};Fe.prototype={constructor:Fe,setArray:function(t){for(var e=0;e0){var e=this.min,n=this.max,i=e.array,r=n.array;en(i,t[0]),en(r,t[0]);for(var o=1;or[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1]),a[2]>r[2]&&(r[2]=a[2])}e._dirty=!0,n._dirty=!0}},union:function(t){var e=this.min,n=this.max;return Jt.min(e.array,e.array,t.min.array),Jt.max(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersection:function(t){var e=this.min,n=this.max;return Jt.max(e.array,e.array,t.min.array),Jt.min(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,n=this.max.array,i=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||n[0]=r[0]&&n[1]>=r[1]&&n[2]>=r[2]},containPoint:function(t){var e=this.min.array,n=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&n[0]>=i[0]&&n[1]>=i[1]&&n[2]>=i[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(Ye=Jt.create(),qe=Jt.create(),Ke=Jt.create(),Je=Jt.create(),Qe=Jt.create(),$e=Jt.create(),function(t,e){var n=t.min.array,i=t.max.array,r=e.array;return Ye[0]=r[0]*n[0],Ye[1]=r[1]*n[0],Ye[2]=r[2]*n[0],qe[0]=r[0]*i[0],qe[1]=r[1]*i[0],qe[2]=r[2]*i[0],Ke[0]=r[4]*n[1],Ke[1]=r[5]*n[1],Ke[2]=r[6]*n[1],Je[0]=r[4]*i[1],Je[1]=r[5]*i[1],Je[2]=r[6]*i[1],Qe[0]=r[8]*n[2],Qe[1]=r[9]*n[2],Qe[2]=r[10]*n[2],$e[0]=r[8]*i[2],$e[1]=r[9]*i[2],$e[2]=r[10]*i[2],n=this.min.array,i=this.max.array,n[0]=Math.min(Ye[0],qe[0])+Math.min(Ke[0],Je[0])+Math.min(Qe[0],$e[0])+r[12],n[1]=Math.min(Ye[1],qe[1])+Math.min(Ke[1],Je[1])+Math.min(Qe[1],$e[1])+r[13],n[2]=Math.min(Ye[2],qe[2])+Math.min(Ke[2],Je[2])+Math.min(Qe[2],$e[2])+r[14],i[0]=Math.max(Ye[0],qe[0])+Math.max(Ke[0],Je[0])+Math.max(Qe[0],$e[0])+r[12],i[1]=Math.max(Ye[1],qe[1])+Math.max(Ke[1],Je[1])+Math.max(Qe[1],$e[1])+r[13],i[2]=Math.max(Ye[2],qe[2])+Math.max(Ke[2],Je[2])+Math.max(Qe[2],$e[2])+r[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,n=this.max.array,i=t.array,r=e[0],o=e[1],a=e[2],s=n[0],l=n[1],u=e[2],h=n[0],c=n[1],d=n[2];if(1===i[15])e[0]=i[0]*r+i[12],e[1]=i[5]*o+i[13],n[2]=i[10]*a+i[14],n[0]=i[0]*h+i[12],n[1]=i[5]*c+i[13],e[2]=i[10]*d+i[14];else{var p=-1/a;e[0]=i[0]*r*p,e[1]=i[5]*o*p,n[2]=(i[10]*a+i[14])*p,p=-1/u,n[0]=i[0]*s*p,n[1]=i[5]*l*p,p=-1/d,e[2]=(i[10]*d+i[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=Jt.fromValues(0,0,0);this.vertices=t}var n=this.min.array,i=this.max.array;return tn(t[0],n[0],n[1],n[2]),tn(t[1],n[0],i[1],n[2]),tn(t[2],i[0],n[1],n[2]),tn(t[3],i[0],i[1],n[2]),tn(t[4],n[0],n[1],i[2]),tn(t[5],n[0],i[1],i[2]),tn(t[6],i[0],n[1],i[2]),tn(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,n=this.max;return en(e.array,t.min.array),en(n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},clone:function(){var t=new nn;return t.copy(this),t}};const rn=nn;var on,an,sn=0;const ln=g.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},(function(){this.name||(this.name=(this.type||"NODE")+"_"+sn++),this.position||(this.position=new ye),this.rotation||(this.rotation=new Xe),this.scale||(this.scale=new ye(1,1,1)),this.worldTransform=new He,this.localTransform=new He,this._children=[]}),{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var n=e._nodeRepository;delete n[this.name],n[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var n=this._scene;n&&n!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,n=e.indexOf(t);n<0||(e.splice(n,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=ln.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(un=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=ln.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e=0&&m[f]>1e-4&&(Jt.transformMat4(S,g,d[v[f]]),Jt.scaleAndAdd(y,y,S,m[f]));T.set(p,y)}}for(p=0;p>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var n=e.get("webgl_texture");n&&t.gl.deleteTexture(n),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(wn.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(wn.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),wn.BYTE=5120,wn.UNSIGNED_BYTE=S,wn.SHORT=5122,wn.UNSIGNED_SHORT=5123,wn.INT=5124,wn.UNSIGNED_INT=5125,wn.FLOAT=T,wn.HALF_FLOAT=36193,wn.UNSIGNED_INT_24_8_WEBGL=34042,wn.DEPTH_COMPONENT=M,wn.DEPTH_STENCIL=34041,wn.ALPHA=6406,wn.RGB=6407,wn.RGBA=A,wn.LUMINANCE=6409,wn.LUMINANCE_ALPHA=6410,wn.SRGB=35904,wn.SRGB_ALPHA=35906,wn.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,wn.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,wn.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,wn.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,wn.NEAREST=C,wn.LINEAR=D,wn.NEAREST_MIPMAP_NEAREST=I,wn.LINEAR_MIPMAP_NEAREST=L,wn.NEAREST_MIPMAP_LINEAR=P,wn.LINEAR_MIPMAP_LINEAR=O,wn.REPEAT=E,wn.CLAMP_TO_EDGE=N,wn.MIRRORED_REPEAT=33648;const Sn=wn;var Tn=cn.extend({skeleton:null,joints:null},(function(){this.joints||(this.joints=[])}),{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=cn.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});Tn.POINTS=0,Tn.LINES=1,Tn.LINE_LOOP=2,Tn.LINE_STRIP=3,Tn.TRIANGLES=4,Tn.TRIANGLE_STRIP=5,Tn.TRIANGLE_FAN=6,Tn.BACK=x,Tn.FRONT=_,Tn.FRONT_AND_BACK=1032,Tn.CW=b,Tn.CCW=w;const Mn=Tn,An={isPowerOfTwo:function(t){return 0==(t&t-1)},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};var Cn=An.isPowerOfTwo;function Dn(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var In=Sn.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type,r=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==Sn.REPEAT&&this.wrapT!==Sn.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r?this.minFilter:this.getAvailableMinFilter());var o=t.getGLExtension("EXT_texture_filter_anisotropic");if(o&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,o.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var a=this.width,s=this.height,l=0;l=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,n,o,i,r,0,e.pixels):t.texImage2D(t.TEXTURE_2D,n,o,i,r,0,o,a,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return Cn(this.width)&&Cn(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var n=F.createImage();e&&(n.crossOrigin=e);var i=this;return n.onload=function(){i.dirty(),i.trigger("success",i)},n.onerror=function(){i.trigger("error",i)},n.src=t,this.image=n,this}});Object.defineProperty(In.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(In.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ln=In;function Pn(t){return{byte:F.Int8Array,ubyte:F.Uint8Array,short:F.Int16Array,ushort:F.Uint16Array}[t]||F.Float32Array}function On(t){return"attr_"+t}function En(t,e,n,i){switch(this.name=t,this.type=e,this.size=n,this.semantic=i||"",this.value=null,n){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var n=this.value;return e[0]=n[2*t],e[1]=n[2*t+1],e},this.set=function(t,e){var n=this.value;n[2*t]=e[0],n[2*t+1]=e[1]},this.copy=function(t,e){var n=this.value;e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]};break;case 3:this.get=function(t,e){var n=3*t,i=this.value;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e},this.set=function(t,e){var n=3*t,i=this.value;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2]},this.copy=function(t,e){var n=this.value;e*=3,n[t*=3]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2]};break;case 4:this.get=function(t,e){var n=this.value,i=4*t;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e[3]=n[i+3],e},this.set=function(t,e){var n=this.value,i=4*t;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3]},this.copy=function(t,e){var n=this.value;e*=4,n[t*=4]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2],n[t+3]=n[e+3]}}}function Nn(t,e,n,i,r){this.name=t,this.type=e,this.buffer=n,this.size=i,this.semantic=r,this.symbol="",this.needsRemove=!1}function kn(t){this.buffer=t,this.count=0}En.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=Pn(this.type);this.value=new e(t*this.size)}},En.prototype.fromArray=function(t){var e,n=Pn(this.type);if(t[0]&&t[0].length){var i=0,r=this.size;e=new n(t.length*r);for(var o=0;o=0){e||(e=[]);var n=this.indices;return e[0]=n[3*t],e[1]=n[3*t+1],e[2]=n[3*t+2],e}},setTriangleIndices:function(t,e){var n=this.indices;n[3*t]=e[0],n[3*t+1]=e[1],n[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,n=this.vertexCount>65535?F.Uint32Array:F.Uint16Array;if(t[0]&&t[0].length){var i=0;e=new n(3*t.length);for(var r=0;r=0&&(e.splice(n,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var n=[],i=this.vertexCount,r=0;ro[0]&&(o[0]=s),l>o[1]&&(o[1]=l),u>o[2]&&(o[2]=u)}n._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,n=e.position.value,i=e.normal.value;if(i&&i.length===n.length)for(var r=0;r65535&&(this.indices=new F.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,n=this.getEnabledAttributes(),i={},r=0;rthis.distance,r=1;r<8;r++)if(Jt.dot(e[r].array,n)>this.distance!=i)return!0},intersectLine:(Qn=Jt.create(),function(t,e,n){var i=this.distanceToPoint(t),r=this.distanceToPoint(e);if(i>0&&r>0||i<0&&r<0)return null;var o=this.normal.array,a=this.distance,s=t.array;Jt.sub(Qn,e.array,t.array),Jt.normalize(Qn,Qn);var l=Jt.dot(o,Qn);if(0===l)return null;n||(n=new ye);var u=(Jt.dot(o,s)-a)/l;return Jt.scaleAndAdd(n.array,s,Qn,-u),n._dirty=!0,n}),applyTransform:(qn=qt.create(),Kn=Ce.create(),Jn=Ce.create(),Jn[3]=1,function(t){t=t.array,Jt.scale(Jn,this.normal.array,this.distance),Ce.transformMat4(Jn,Jn,t),this.distance=Jt.dot(Jn,this.normal.array),qt.invert(qn,t),qt.transpose(qn,qn),Kn[3]=0,Jt.copy(Kn,this.normal.array),Ce.transformMat4(Kn,Kn,qn),Jt.copy(this.normal.array,Kn)}),copy:function(t){Jt.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new $n;return t.copy(this),t}};const ti=$n;var ei,ni=Jt.set,ii=Jt.copy,ri=Jt.transformMat4,oi=Math.min,ai=Math.max,si=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new ti);for(this.boundingBox=new rn,this.vertices=[],t=0;t<8;t++)this.vertices[t]=Jt.fromValues(0,0,0)};si.prototype={setFromProjection:function(t){var e=this.planes,n=t.array,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],p=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];ni(e[0].normal.array,a-i,h-s,f-c),e[0].distance=-(y-g),e[0].normalize(),ni(e[1].normal.array,a+i,h+s,f+c),e[1].distance=-(y+g),e[1].normalize(),ni(e[2].normal.array,a+r,h+l,f+d),e[2].distance=-(y+m),e[2].normalize(),ni(e[3].normal.array,a-r,h-l,f-d),e[3].distance=-(y-m),e[3].normalize(),ni(e[4].normal.array,a-o,h-u,f-p),e[4].distance=-(y-v),e[4].normalize(),ni(e[5].normal.array,a+o,h+u,f+p),e[5].distance=-(y+v),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(0===y){var b=l/i,w=-v/(p-1),S=-v/(p+1),T=-S/l,M=-w/l;_.min.set(-T*b,-T,S),_.max.set(T*b,T,w),ni(x[0],-T*b,-T,S),ni(x[1],-T*b,T,S),ni(x[2],T*b,-T,S),ni(x[3],T*b,T,S),ni(x[4],-M*b,-M,w),ni(x[5],-M*b,M,w),ni(x[6],M*b,-M,w),ni(x[7],M*b,M,w)}else{var A=(-1-g)/i,C=(1-g)/i,D=(1-m)/l,I=(-1-m)/l,L=(-1-v)/p,P=(1-v)/p;_.min.set(Math.min(A,C),Math.min(I,D),Math.min(P,L)),_.max.set(Math.max(C,A),Math.max(D,I),Math.max(L,P));var O=_.min.array,E=_.max.array;ni(x[0],O[0],O[1],O[2]),ni(x[1],O[0],E[1],O[2]),ni(x[2],E[0],O[1],O[2]),ni(x[3],E[0],E[1],O[2]),ni(x[4],O[0],O[1],E[2]),ni(x[5],O[0],E[1],E[2]),ni(x[6],E[0],O[1],E[2]),ni(x[7],E[0],E[1],E[2])}},getTransformedBoundingBox:(ei=Jt.create(),function(t,e){var n=this.vertices,i=e.array,r=t.min,o=t.max,a=r.array,s=o.array,l=n[0];ri(ei,l,i),ii(a,ei),ii(s,ei);for(var u=1;u<8;u++)l=n[u],ri(ei,l,i),a[0]=oi(ei[0],a[0]),a[1]=oi(ei[1],a[1]),a[2]=oi(ei[2],a[2]),s[0]=ai(ei[0],s[0]),s[1]=ai(ei[1],s[1]),s[2]=ai(ei[2],s[2]);return r._dirty=!0,o._dirty=!0,t})};const li=si;var ui;const hi=ln.extend((function(){return{projectionMatrix:new He,invProjectionMatrix:new He,viewMatrix:new He,frustum:new li}}),(function(){this.update(!0)}),{update:function(t){ln.prototype.update.call(this,t),He.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),He.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){He.copy(this.viewMatrix,t),He.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){He.copy(this.projectionMatrix,t),He.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(ui=Ce.create(),function(t,e){var n=void 0!==e?e:new Me,i=t.array[0],r=t.array[1];return Ce.set(ui,i,r,-1,1),Ce.transformMat4(ui,ui,this.invProjectionMatrix.array),Ce.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(n.origin.array,ui,1/ui[3]),Ce.set(ui,i,r,1,1),Ce.transformMat4(ui,ui,this.invProjectionMatrix.array),Ce.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(ui,ui,1/ui[3]),Jt.sub(n.direction.array,ui,n.origin.array),Jt.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n})});var ci,di,pi=qt.create(),fi=qt.create(),gi={};function mi(t){var e=[],n=Object.keys(t);n.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof Yn&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof hi?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof Yn&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},n=0;n0&&this._doUpdateRenderList(a,e,n,i,r)}},isFrustumCulled:(ci=new rn,di=new He,function(t,e,n){var i=t.boundingBox;if(i||(i=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!i)return!1;if(di.array=n,ci.transformFrom(i,di),t.castShadow&&this.viewBoundingBoxLastFrame.union(ci),t.frustumCulling){if(!ci.intersectBoundingBox(e.frustum.boundingBox))return!0;di.array=e.projectionMatrix.array,ci.max.array[2]>0&&ci.min.array[2]<0&&(ci.max.array[2]=-1e-20),ci.applyProjection(di);var r=ci.min.array,o=ci.max.array;if(o[0]<-1||r[0]>1||o[1]<-1||r[1]>1||o[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(yi);var e=this._lightUniforms;for(var n in e)for(var i in e[n])e[n][i].value.length=0;for(var r=0;r=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new xi(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();var Si=An.isPowerOfTwo,Ti=["px","nx","py","ny","pz","nz"],Mi=Sn.extend((function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}}),{textureType:"textureCube",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var r=t.getGLExtension("EXT_texture_filter_anisotropic");if(r&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var o=this.width,a=this.height,s=0;s0&&t.height>0}Object.defineProperty(Mi.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Mi.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ci=Mi,Di=hi.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=hi.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});var Ii="framebuffer",Li="renderbuffer",Pi="renderbuffer_width",Oi="renderbuffer_height",Ei="renderbuffer_attached",Ni="depthtexture_attached",ki=36160,Ri=36161,zi=36096,Bi=g.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},(function(){this._cache=new bn,this._textures={}}),{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(ki,this._getFrameBufferGL(t)),this._boundRenderer=t;var n=this._cache;n.put("viewport",t.viewport);var i,r,o=!1;for(var a in this._textures){o=!0;var s=this._textures[a];s&&(i=s.texture.width,r=s.texture.height,this._doAttach(t,s.texture,a,s.target))}this._width=i,this._height=r,!o&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,i,r,1);var l=n.get("attached_textures");if(l)for(var a in l)if(!this._textures[a]){var u=l[a];this._doDetach(e,a,u)}if(!n.get(Ni)&&this.depthBuffer){n.miss(Li)&&n.put(Li,e.createRenderbuffer());var h=n.get(Li);i===n.get(Pi)&&r===n.get(Oi)||(e.bindRenderbuffer(Ri,h),e.renderbufferStorage(Ri,e.DEPTH_COMPONENT16,i,r),n.put(Pi,i),n.put(Oi,r),e.bindRenderbuffer(Ri,null)),n.get(Ei)||(e.framebufferRenderbuffer(ki,zi,Ri,h),n.put(Ei,!0))}},unbind:function(t){t.__currentFrameBuffer=null,t.gl.bindFramebuffer(ki,null),this._boundRenderer=null,this._cache.use(t.__uid__);var e=this._cache.get("viewport");e&&t.setViewport(e),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var n in this._textures){var i=this._textures[n];if(i){var r=i.texture;if(!r.NPOT&&r.useMipmap&&r.minFilter===Sn.LINEAR_MIPMAP_LINEAR){var o="textureCube"===r.textureType?34067:3553;e.bindTexture(o,r.getWebGLTexture(t)),e.generateMipmap(o),e.bindTexture(o,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(ki)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(Ii)&&e.put(Ii,t.gl.createFramebuffer()),e.get(Ii)},attach:function(t,e,n){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||36064,n=n||3553;var i,r=this._boundRenderer;if(r&&r.gl){var o=this._cache;o.use(r.__uid__),i=o.get("attached_textures")}var a=this._textures[e];if(!a||a.target!==n||a.texture!==t||!i||null==i[e]){var s=!0;r&&(s=this._doAttach(r,t,e,n),this.viewport||r.setViewport(0,0,t.width,t.height,1)),s&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=n)}},_doAttach:function(t,e,n,i){var r=t.gl,o=e.getWebGLTexture(t),a=this._cache.get("attached_textures");if(a&&a[n]){var s=a[n];if(s.texture===e&&s.target===i)return}var l=!0;if(((n=+n)===zi||n===k)&&(t.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==M&&34041!==e.format&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l)){var u=this._cache.get(Li);u&&(r.framebufferRenderbuffer(ki,zi,Ri,null),r.deleteRenderbuffer(u),this._cache.put(Li,!1)),this._cache.put(Ei,!1),this._cache.put(Ni,!0)}return r.framebufferTexture2D(ki,n,i,o,0),a||(a={},this._cache.put("attached_textures",a)),a[n]=a[n]||{},a[n].texture=e,a[n].target=i,l},_doDetach:function(t,e,n){t.framebufferTexture2D(ki,e,n,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),e!==zi&&e!==k||this._cache.put(Ni,!1)},detach:function(t,e){this._textures[t]=null,this._boundRenderer&&(this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e))},dispose:function(t){var e=t.gl,n=this._cache;n.use(t.__uid__);var i=n.get(Li);i&&e.deleteRenderbuffer(i);var r=n.get(Ii);r&&e.deleteFramebuffer(r),n.deleteContext(t.__uid__),this._textures={}}});Bi.DEPTH_ATTACHMENT=zi,Bi.COLOR_ATTACHMENT0=36064,Bi.STENCIL_ATTACHMENT=36128,Bi.DEPTH_STENCIL_ATTACHMENT=k;const Zi=Bi;var Fi=["px","nx","py","ny","pz","nz"];const Vi=g.extend((function(){var t={position:new ye,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new Di({fov:90}),nx:new Di({fov:90}),py:new Di({fov:90}),ny:new Di({fov:90}),pz:new Di({fov:90}),nz:new Di({fov:90})};return e.px.lookAt(ye.POSITIVE_X,ye.NEGATIVE_Y),e.nx.lookAt(ye.NEGATIVE_X,ye.NEGATIVE_Y),e.py.lookAt(ye.POSITIVE_Y,ye.POSITIVE_Z),e.ny.lookAt(ye.NEGATIVE_Y,ye.NEGATIVE_Z),e.pz.lookAt(ye.POSITIVE_Z,ye.NEGATIVE_Y),e.nz.lookAt(ye.NEGATIVE_Z,ye.NEGATIVE_Y),t._frameBuffer=new Zi,t}),{getCamera:function(t){return this._cameras[t]},render:function(t,e,n){var i=t.gl;n||e.update();for(var r=this.texture.width,o=2*Math.atan(r/(r-.5))/Math.PI*180,a=0;a<6;a++){var s=Fi[a],l=this._cameras[s];if(ye.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=o,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),Gi=Hn.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,n=this.attributes,i=[],r=[],o=[],a=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var h=u/e;if(i.push([2*h-1,2*l-1,0]),r&&r.push([h,l]),o&&o.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],n)}}),Xi=ji;function Yi(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var qi=Yi("DXT1"),Ki=Yi("DXT3"),Ji=Yi("DXT5");const Qi=function(t,e){var n=new Int32Array(t,0,31);if(542327876!==n[0])return null;if(4&!n(20))return null;var i,r,o=n(21),a=n[4],s=n[3],l=512&n[28],u=131072&n[2];switch(o){case qi:i=8,r=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ki:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ji:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var h=n[1]+4,c=l?6:1,d=1;u&&(d=Math.max(1,n[7]));for(var p=[],f=0;f0){var r=Math.pow(2,t[3]-128-8+i);e[n+0]=t[0]*r,e[n+1]=t[1]*r,e[n+2]=t[2]*r}else e[n+0]=0,e[n+1]=0,e[n+2]=0;return e[n+3]=1,e}function er(t,e,n,i){for(var r,o,a=0,s=0,l=i;l>0;)if(t[s][0]=e[n++],t[s][1]=e[n++],t[s][2]=e[n++],t[s][3]=e[n++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(o=t[s])[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],s++,l--;a+=8}else s++,l--,a=0;return n}function nr(t,e,n,i){if(i<8|i>32767)return er(t,e,n,i);if(2!=(r=e[n++]))return er(t,e,n-1,i);if(t[0][1]=e[n++],t[0][2]=e[n++],r=e[n++],(t[0][2]<<8>>>0|r)>>>0!==i)return null;for(var r=0;r<4;r++)for(var o=0;o128){a=(127&a)>>>0;for(var s=e[n++];a--;)t[o++][r]=s}else for(;a--;)t[o++][r]=e[n++]}return n}const ir=function(t,e,n){null==n&&(n=0);var i=new Uint8Array(t),r=i.length;if("#?"===function(t,e,n){for(var i="",r=0;r<2;r++)i+=$i(t[r]);return i}(i)){for(var o=2;o=r)){o+=2;for(var a="";o20)return console.warn("Given image is not a height map"),t}var d,p,f,g;l%(4*i)==0?(d=a.data[l],f=a.data[l+4]):l%(4*i)==4*(i-1)?(d=a.data[l-4],f=a.data[l]):(d=a.data[l-4],f=a.data[l+4]),l<4*i?(p=a.data[l],g=a.data[l+4*i]):l>i*(r-1)*4?(p=a.data[l-4*i],g=a.data[l]):(p=a.data[l-4*i],g=a.data[l+4*i]),s.data[l]=d-f+127,s.data[l+1]=p-g+127,s.data[l+2]=255,s.data[l+3]=255}return o.putImageData(s,0,0),n},isHeightImage:function(t,e,n){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),r=i.getContext("2d"),o=e||32;n=n||20,i.width=i.height=o,r.drawImage(t,0,0,o,o);for(var a=r.getImageData(0,0,o,o),s=0;sn)return!1}return!0},_fetchTexture:function(t,e,n){F.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:n})},createChessboard:function(t,e,n,i){t=t||512,e=e||64,n=n||"black",i=i||"white";var r=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var a=o.getContext("2d");a.fillStyle=i,a.fillRect(0,0,t,t),a.fillStyle=n;for(var s=0;s=0||(ar.forEach((function(e){t.on(e,this[sr(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),ar.forEach((function(e){t.off(e,this[sr(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}};const ur=lr,hr=hi.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=hi.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});jt.import("\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end");var cr=new Gi,dr=new Mn({geometry:cr,frustumCulling:!1}),pr=new hr;const fr=g.extend((function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}}),(function(){var t=new jt(jt.source("clay.compositor.vertex"),this.fragment),e=new lt({shader:t});e.enableTexturesAll(),this.material=e}),{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||36064,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var n in this.outputs){var i=this.outputs[n];i&&e.attach(i,n)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var n=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var r=[];for(var o in this.outputs)(o=+o)>=n.COLOR_ATTACHMENT0&&o<=n.COLOR_ATTACHMENT0+8&&r.push(o);i.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var a=this.clearDepth?n.DEPTH_BUFFER_BIT:0;if(n.depthMask(!0),this.clearColor){a|=n.COLOR_BUFFER_BIT,n.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&n.clearColor(s[0],s[1],s[2],s[3])}n.clear(a),this.blendWithPrevious?(n.enable(n.BLEND),this.material.transparent=!0):(n.disable(n.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){dr.material=this.material,t.renderPass([dr],pr)},dispose:function(t){}});var gr={},mr=["px","nx","py","ny","pz","nz"];gr.prefilterEnvironmentMap=function(t,e,n,i,r){r&&i||(i=gr.generateNormalDistribution(),r=gr.integrateBRDF(t,i));var o=(n=n||{}).width||64,a=n.height||64,s=n.type||e.type,l=new Ci({width:o,height:a,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(o,a),h=Math.log(u)/Math.log(2)+1,c=new lt({shader:new jt({vertex:jt.source("clay.skybox.vertex"),fragment:"#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"})});c.set("normalDistribution",i),n.encodeRGBM&&c.define("fragment","RGBM_ENCODE"),n.decodeRGBM&&c.define("fragment","RGBM_DECODE");var d,p=new _i;if("texture2D"===e.textureType){var f=new Ci({width:o,height:a,type:s===Sn.FLOAT?Sn.HALF_FLOAT:s});or.panoramaToCubeMap(t,e,f,{encodeRGBM:n.decodeRGBM}),e=f}(d=new ji({scene:p,material:c})).material.set("environmentMap",e);var g=new Vi({texture:l});n.encodeRGBM&&(s=l.type=Sn.UNSIGNED_BYTE);for(var m=new Ln({width:o,height:a,type:s}),v=new Zi({depthBuffer:!1}),y=F[s===Sn.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_ 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"}),r=new Ln({width:512,height:256,type:Sn.HALF_FLOAT,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",e),i.setUniform("viewportSize",[512,256]),i.attachOutput(r),i.render(t,n),n.dispose(t),r},gr.generateNormalDistribution=function(t,e){for(var n=new Ln({width:t=t||256,height:e=e||1024,type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(e*t*4),r=[],o=0;o>>16)>>>0;u=(((16711935&(u=((252645135&(u=((858993459&(u=((1431655765&u)<<1|(2863311530&u)>>>1)>>>0))<<2|(3435973836&u)>>>2)>>>0))<<4|(4042322160&u)>>>4)>>>0))<<8|(4278255360&u)>>>8)>>>0)/4294967296;var h=Math.sqrt((1-u)/(1+(s*s-1)*u));r[l]=h}for(l=0;l65535?Uint32Array:Uint16Array,y=this.indices=new v(e*t*6),_=this.radius,x=this.phiStart,b=this.phiLength,w=this.thetaStart,S=this.thetaLength,T=[],M=[],A=0,C=1/(_=this.radius);for(d=0;d<=t;d++)for(c=0;c<=e;c++)u=c/e,h=d/t,a=-_*Math.cos(x+u*b)*Math.sin(w+h*S),s=_*Math.cos(w+h*S),l=_*Math.sin(x+u*b)*Math.sin(w+h*S),T[0]=a,T[1]=s,T[2]=l,M[0]=u,M[1]=h,n.set(A,T),i.set(A,M),T[0]*=C,T[1]*=C,T[2]*=C,r.set(A,T),A++;var D=e+1,I=0;for(d=0;d255?255:t}function Jr(t){return t<0?0:t>1?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100*255):Kr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Jr(parseFloat(e)/100):Jr(parseFloat(e))}function to(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function eo(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function no(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var io=new wi(20),ro=null;function oo(t,e){ro&&no(ro,e),ro=io.put(t,ro||e.slice())}function ao(t,e){if(t){e=e||[];var n=io.get(t);if(n)return no(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in qr)return no(e,qr[i]),oo(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(eo(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),oo(t,e),e):void eo(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(eo(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),oo(t,e),e):void eo(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?eo(e,+u[0],+u[1],+u[2],1):eo(e,0,0,0,1);h=$r(u.pop());case"rgb":return 3!==u.length?void eo(e,0,0,0,1):(eo(e,Qr(u[0]),Qr(u[1]),Qr(u[2]),h),oo(t,e),e);case"hsla":return 4!==u.length?void eo(e,0,0,0,1):(u[3]=$r(u[3]),so(u,e),oo(t,e),e);case"hsl":return 3!==u.length?void eo(e,0,0,0,1):(so(u,e),oo(t,e),e);default:return}}eo(e,0,0,0,1)}}function so(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),r=$r(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return eo(e=e||[],Kr(255*to(a,o,n+1/3)),Kr(255*to(a,o,n)),Kr(255*to(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}var lo=Object.prototype.toString,uo=Array.prototype,ho=uo.forEach,co=uo.filter,po=uo.slice,fo=uo.map,go=function(){}.constructor,mo=go?go.prototype:null;function vo(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function yo(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ra)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(_o(e)){var r=function(t){return _o(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&No(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=ao(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!No(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&Eo(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var d=h.percent-c.percent;if(0!==d){var p=(e-c.percent)/d,f=i?this._additiveValue:u?Zo:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Ro(f,m,g,v,y,p,p*p,p*p*p):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0?1===l?Lo(f,c[r],h[r],p):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],p),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(ao(t[n],Zo),Po(Zo,Zo,i,1),t[n]=Bo(Zo)):t[n]=t[n]+i:1===e?Po(t[n],t[n],i,1):2===e&&Oo(t[n],t[n],i,1)},t}();const Vo=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?function(){for(var t=[],e=0;e0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),Go={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(t,e){var n;if(this._animators=this._animators||[],t){for(var i=t.split("."),r=this,o=0,a=i.length;o=0&&s.splice(t,1)})),s.push(l),this.__zr&&this.__zr.animation.addAnimator(l),l},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,n=e.length,i=0;i 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.chunk.instancing_header\n#ifdef INSTANCING\nattribute vec4 instanceMat1;\nattribute vec4 instanceMat2;\nattribute vec4 instanceMat3;\n#endif\n@end\n@export clay.chunk.instancing_matrix\nmat4 instanceMat = mat4(\n vec4(instanceMat1.xyz, 0.0),\n vec4(instanceMat2.xyz, 0.0),\n vec4(instanceMat3.xyz, 0.0),\n vec4(instanceMat1.w, instanceMat2.w, instanceMat3.w, 1.0)\n);\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end";function Uo(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}Object.assign(ln.prototype,Go),jt.import(Ho),jt.import(Xt),jt.import("\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"),jt.import("@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\nattribute vec3 normal: NORMAL;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nvarying vec3 v_Normal;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\nvarying vec3 v_Normal;\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"),jt.import("/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"),jt.import("@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end");var Wo=_i.prototype.addToScene,jo=_i.prototype.removeFromScene;_i.prototype.addToScene=function(t){if(Wo.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},_i.prototype.removeFromScene=function(t){jo.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},lt.prototype.setTextureImage=function(t,e,n,i){if(this.shader){var r,o=n.getZr(),a=this;return a.autoUpdateTextureStatus=!1,a.disableTexture(t),!(s=e)||"none"===s||(r=Xo.loadTexture(e,n,i,(function(e){a.enableTexture(t),o&&o.refresh()})),a.set(t,r)),r}var s};var Xo={};Xo.Renderer=he,Xo.Node=ln,Xo.Mesh=Mn,Xo.Shader=jt,Xo.Material=lt,Xo.Texture=Sn,Xo.Texture2D=Ln,Xo.Geometry=Hn,Xo.SphereGeometry=Cr,Xo.PlaneGeometry=Gi,Xo.CubeGeometry=Wi,Xo.AmbientLight=Dr,Xo.DirectionalLight=Ir,Xo.PointLight=Lr,Xo.SpotLight=Pr,Xo.PerspectiveCamera=Di,Xo.OrthographicCamera=hr,Xo.Vector2=vt,Xo.Vector3=ye,Xo.Vector4=kr,Xo.Quaternion=Xe,Xo.Matrix2=Zr,Xo.Matrix2d=Hr,Xo.Matrix3=Wr,Xo.Matrix4=He,Xo.Plane=ti,Xo.Ray=Me,Xo.BoundingBox=rn,Xo.Frustum=li;var Yo=null;function qo(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function Ko(t){if((t.wrapS===Sn.REPEAT||t.wrapT===Sn.REPEAT)&&t.image){var e=qo(t.width),n=qo(t.height);if(e!==t.width||n!==t.height){var i=document.createElement("canvas");i.width=e,i.height=n,i.getContext("2d").drawImage(t.image,0,0,e,n),t.image=i}}}Xo.loadTexture=function(t,e,n,i){"function"==typeof n&&(i=n,n={}),n=n||{};for(var r=Object.keys(n).sort(),o="",a=0;a3?e[3]=t[3]:e[3]=1,e):((e=i.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},Xo.directionFromAlphaBeta=function(t,e){var n=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,r=[],o=Math.sin(n);return r[0]=o*Math.cos(i),r[1]=-Math.cos(n),r[2]=o*Math.sin(i),r},Xo.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},Xo.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"],Xo.createShader=function(t){"ecgl.shadow"===t&&(t="ecgl.displayShadow");var e=jt.source(t+".vertex"),n=jt.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),n||console.error("Fragment shader of '%s' not exits",t);var i=new jt(e,n);return i.name=t,i},Xo.createMaterial=function(t,e){e instanceof Array||(e=[e]);var n=Xo.createShader(t),i=new lt({shader:n});return e.forEach((function(t){"string"==typeof t&&i.define(t)})),i},Xo.setMaterialFromModel=function(t,e,n,i){e.autoUpdateTextureStatus=!1;var r=n.getModel(t+"Material"),o=r.get("detailTexture"),a=Mr(r.get("textureTiling"),1),s=Mr(r.get("textureOffset"),0);"number"==typeof a&&(a=[a,a]),"number"==typeof s&&(s=[s,s]);var l=a[0]>1||a[1]>1?Xo.Texture.REPEAT:Xo.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,i,u),c=Mr(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,i,u),h=Mr(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",o,i,u),e.setTextureImage("normalMap",d,i,u),e.set({roughness:h,metalness:c,detailUvRepeat:a,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("hatching"===t){var p=r.get("hatchingTextures")||[];p.length;for(var f=0;f<6;f++)e.setTextureImage("hatch"+(f+1),p[f],i,{anisotropic:8,wrapS:Xo.Texture.REPEAT,wrapT:Xo.Texture.REPEAT});e.set({detailUvRepeat:a,detailUvOffset:s})}},Xo.updateVertexAnimation=function(t,e,n,i){var r=i.get("animation"),o=i.get("animationDurationUpdate"),a=i.get("animationEasingUpdate"),s=n.shadowDepthMaterial;if(r&&e&&o>0&&e.geometry.vertexCount===n.geometry.vertexCount){n.material.define("vertex","VERTEX_ANIMATION"),n.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var n=this.zr;t.scene.traverse((function(t){t.__zr=n,t.addAnimatorsToZr&&t.addAnimatorsToZr(n)}))}},$o.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t))}},$o.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},$o.prototype.resize=function(t,e){this.renderer.resize(t,e)},$o.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},$o.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},$o.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},$o.prototype.needsRefresh=function(){this.zr.refresh()},$o.prototype.refresh=function(t){this._backgroundColor=t?Jo.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},$o.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,n=e.viewport,i=this.views.length-1;i>=0;i--){var r=this.views[i];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var o=this._picking.pick(t.offsetX,t.offsetY,!0);if(o)return o.view=r,o}}e.viewport=n},$o.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},$o.prototype.pickObject=function(t,e){for(var n=[],i=this.renderer,r=i.viewport,o=0;o=0&&(c.dataIndex=this._lastDataIndex,c.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0):null!=s&&s!==this._lastEventData&&(null!=this._lastEventData&&(c.eventData=this._lastEventData,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0),this._lastEventData=s,this._lastDataIndex=o,this._lastSeriesIndex=a),c.eventData=s,c.dataIndex=o,c.seriesIndex=a,(null!=s||parseInt(o,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(h,t,e),l&&this.zr.handler.dispatchToElement(h,"mouseover",e))},$o.prototype._dispatchToView=function(t,e){for(var n=0;nt&&a=0&&(function(t){la(t,"itemStyle"),la(t,"lineStyle"),la(t,"areaStyle"),la(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),ua(t.xAxis3D),ua(t.yAxis3D),ua(t.zAxis3D),ua(t.grid3D),la(t.geo3D)}));const ca={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(t){t=t||{},this.option.viewControl=this.option.viewControl||{},null!=t.alpha&&(this.option.viewControl.alpha=t.alpha),null!=t.beta&&(this.option.viewControl.beta=t.beta),null!=t.distance&&(this.option.viewControl.distance=t.distance),null!=t.center&&(this.option.viewControl.center=t.center)}},da={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}},pa={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}};var fa=i.ComponentModel.extend({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.util.merge(fa.prototype,ca),i.util.merge(fa.prototype,da),i.util.merge(fa.prototype,pa);const ga=fa;function ma(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function va(){var t="__ec_inner_"+ya++;return function(e){return e[t]||(e[t]={})}}var ya=Math.round(9*Math.random()),_a={};function xa(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||_a;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||_a).rich;if(n){e=e||{};for(var i=wo(n),r=0;r0&&this._notFirst?this.animateTo({alpha:u,beta:h,center:c,distance:o,orthographicSize:a,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(o),this.setAlpha(u),this.setBeta(h),this.setCenter(c),this.setOrthographicSize(a)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,n=this,i={},r={};return null!=t.distance&&(i.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(i.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(i.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(i.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(i.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,r).during((function(){null!=i.alpha&&n.setAlpha(i.alpha),null!=i.beta&&n.setBeta(i.beta),null!=i.distance&&n.setDistance(i.distance),null!=i.center&&n.setCenter(i.center),null!=i.orthographicSize&&n.setOrthographicSize(i.orthographicSize),n._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),n=this._orthoSize,i=n/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=n/2,e.bottom=-n/2},_updatePan:function(t){var e=this._panVelocity,n=this._distance,i=this.getCamera(),r=i.worldTransform.y,o=i.worldTransform.x;this._center.scaleAndAdd(o,-e.x*n/200).scaleAndAdd(r,-e.y*n/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new ye,n=this._theta+Math.PI/2,i=this._phi+Math.PI/2,r=Math.sin(n);e.x=r*Math.cos(i),e.y=-Math.cos(n),e.z=r*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var n=t.len();(n*=e)<1e-4&&(n=0),t.normalize().scale(n)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),n=Math.atan2(t.x,t.z);this._theta=e,this._phi=-n,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,n=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,n)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===Aa[this.rotateMouseButton]?this._mode="rotate":t.event.button===Aa[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=Ca(this.panSensitivity),n=Ca(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*n[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*n[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var n,i=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(i,r)||(n="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),t}});Object.defineProperty(Da.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});const Ia=Da,La={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var n in e)t||!e[n].value?e[n].value=[]:e[n].value=Array.prototype.slice.call(e[n].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},Pa={vec2:ft,vec3:Jt,vec4:Ce,mat2:zr,mat2d:Vr,mat3:Ie,mat4:qt,quat:ke};var Oa=Pa.vec3,Ea=[[0,0],[1,1]],Na=Hn.extend((function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),positionPrev:new Hn.Attribute("positionPrev","float",3),positionNext:new Hn.Attribute("positionNext","float",3),prevPositionPrev:new Hn.Attribute("prevPositionPrev","float",3),prevPosition:new Hn.Attribute("prevPosition","float",3),prevPositionNext:new Hn.Attribute("prevPositionNext","float",3),offset:new Hn.Attribute("offset","float",1),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Oa.dist(t,e)+Oa.dist(n,e)+Oa.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Ea)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Ea)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=n[0],p=n[1],f=n[2],g=i[0],m=i[1],v=i[2],y=this._getCubicCurveApproxStep(t,e,n,i),_=y*y,x=_*y,b=3*y,w=3*_,S=6*_,T=6*x,M=a-2*u+d,A=s-2*h+p,C=l-2*c+f,D=3*(u-d)-a+g,I=3*(h-p)-s+m,L=3*(c-f)-l+v,P=a,O=s,E=l,N=(u-a)*b+M*w+D*x,k=(h-s)*b+A*w+I*x,R=(c-l)*b+C*w+L*x,z=M*S+D*T,B=A*S+I*T,Z=C*S+L*T,F=D*T,V=I*T,G=L*T,H=0,U=0,W=Math.ceil(1/y),j=new Float32Array(3*(W+1)),X=(j=[],0);for(U=0;U1&&(P=N>0?Math.min(P,g):Math.max(P,g),O=k>0?Math.min(O,m):Math.max(O,m),E=R>0?Math.min(E,v):Math.max(E,v));return this.addPolyline(j,r,o)},addLine:function(t,e,n,i){return this.addPolyline([t,e],n,i)},addPolyline:function(t,e,n,i,r){if(t.length){var o="number"!=typeof t[0];if(null==r&&(r=o?t.length:t.length/3),!(r<2)){null==i&&(i=0),null==n&&(n=1),this._itemVertexOffsets.push(this._vertexOffset);var a,s,l=(o="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,p=this.attributes.offset,f=this.indices,g=this._vertexOffset;n=Math.max(n,.01);for(var m=i;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,a),c.set(g-1,a)),u.set(g,a),u.set(g+1,a),d.set(g,s),d.set(g+1,s),p.set(g,n/2),p.set(g+1,-n/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,a),g++;else if(m>0){var _=3*this._triangleOffset;(f=this.indices)[_]=g-4,f[_+1]=g-3,f[_+2]=g-2,f[_+3]=g-3,f[_+4]=g-1,f[_+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=ta&&(r=this._x=0,o+=this._rowHeight+l,this._y=o,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,n),o+n+l>s)return null;t.x+=this.offsetX*this.dpr+r,t.y+=this.offsetY*this.dpr+o,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/a+u[0],o/s+u[1]],[(r+e)/a+u[0],(o+n)/s+u[1]]]},_fitElement:function(t,e,n){var i=t.getBoundingRect(),r=e/i.width,o=n/i.height;t.x=-i.x*r,t.y=-i.y*o,t.scaleX=r,t.scaleY=o,t.update()}},za.prototype={clear:function(){for(var t=0;t=t)){var r=(n+this._nodeWidth)*this._dpr,o=(i+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:o})}catch(t){this._canvas.width=r,this._canvas.height=o}var a=new Ra(this._zr,n,i,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(a),a}},add:function(t,e,n){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,n);if(!i){var r=this._expand();if(!r)return;i=r.add(t,e,n)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}};const Ba=za;function Za(){}Za.prototype={constructor:Za,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new Jo.DirectionalLight({shadowBias:.005}),this.ambientLight=new Jo.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,n=this.ambientLight,i=t.getModel("light"),r=i.getModel("main"),o=i.getModel("ambient");e.intensity=r.get("intensity"),n.intensity=o.get("intensity"),e.color=Jo.parseColor(r.get("color")).slice(0,3),n.color=Jo.parseColor(o.get("color")).slice(0,3);var a=r.get("alpha")||0,s=r.get("beta")||0;e.position.setArray(Jo.directionFromAlphaBeta(a,s)),e.lookAt(Jo.Vector3.ZERO),e.castShadow=r.get("shadow"),e.shadowResolution=Jo.getShadowResolution(r.get("shadowQuality"))},updateAmbientCubemap:function(t,e,n){var i=e.getModel("light.ambientCubemap"),r=i.get("texture");if(r){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[r];if(!o){var a=this;o=this._cubemapLightsCache[r]=Jo.createAmbientCubemap(i.option,t,n,(function(){a._isSkyboxFromAmbientCubemap&&a._skybox.setEnvironmentMap(o.specular.cubemap),n.getZr().refresh()}))}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,n){var r=e.get("environment"),o=this,a=(o._skybox=o._skybox||new ji,o._skybox);if(r&&"none"!==r)if("auto"===r)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var s=this._currentCubemapLights.specular.cubemap;a.setEnvironmentMap(s),this._scene&&a.attachScene(this._scene),a.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof r&&r.colorStops||"string"==typeof r&&i.color.parse(r)){this._isSkyboxFromAmbientCubemap=!1;var l=new Jo.Texture2D({anisotropic:8,flipY:!1});a.setEnvironmentMap(l);var u=l.image=document.createElement("canvas");u.width=u.height=16;var h=u.getContext("2d"),c=new i.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:r}});i.innerDrawElementOnCanvas(h,c),a.attachScene(this._scene)}else this._isSkyboxFromAmbientCubemap=!1,l=Jo.loadTexture(r,n,{anisotropic:8,flipY:!1}),a.setEnvironmentMap(l),a.attachScene(this._scene);else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var d=e.coordinateSystem;if(this._skybox)if(!d||!d.viewGL||"auto"===r||r.match&&r.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var p=d.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[p]("fragment","SRGB_DECODE")}}};const Fa=Za;var Va=Pa.vec3,Ga=Hn.extend((function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,n=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==n&&(e.position.init(n),e.normal.init(n),e.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=Va.create(),e=Va.create(),n=Va.create(),i=[0,3,1,3,2,1];return function(r,o){var a=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;Va.sub(t,r[1],r[0]),Va.sub(e,r[2],r[1]),Va.cross(n,t,e),Va.normalize(n,n);for(var u=0;u<4;u++)a.set(this._vertexOffset+u,r[u]),l.set(this._vertexOffset+u,o),s.set(this._vertexOffset+u,n);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});i.util.defaults(Ga.prototype,La);const Ha=Ga;var Ua=Mr,Wa={x:0,y:2,z:1};function ja(t,e,n){this.rootNode=new Jo.Node;var i=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),r=new Jo.Mesh({geometry:new Ha,material:n,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(r),this.rootNode.add(i),this.faceInfo=t,this.plane=new Jo.Plane,this.linesMesh=i,this.quadsMesh=r}ja.prototype.update=function(t,e,n){var i=t.coordinateSystem,r=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,a=this.quadsMesh.geometry;o.convertToDynamicArray(!0),a.convertToDynamicArray(!0),this._updateSplitLines(o,r,t,n),this._udpateSplitAreas(a,r,t,n),o.convertToTypedArray(),a.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);!function(t,e,n,i){var r=[0,0,0],o=i<0?n.getExtentMin():n.getExtentMax();r[Wa[n.dim]]=o,t.position.setArray(r),t.rotation.identity(),e.distance=-Math.abs(o),e.normal.set(0,0,0),"x"===n.dim?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):"z"===n.dim?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}(this.rootNode,this.plane,s,this.faceInfo[3])},ja.prototype._updateSplitLines=function(t,e,n,r){var o=r.getDevicePixelRatio();e.forEach((function(r,a){var s=r.model,l=e[1-a].getExtent();if(!r.scale.isBlank()){var u=s.getModel("splitLine",n.getModel("splitLine"));if(u.get("show")){var h=u.getModel("lineStyle"),c=h.get("color"),d=Ua(h.get("opacity"),1),p=Ua(h.get("width"),1);c=i.util.isArray(c)?c:[c];for(var f=r.getTicksCoords({tickModel:u}),g=0,m=0;m65535?new Uint32Array(3*n):new Uint16Array(3*n))},setSpriteAlign:function(t,e,n,i,r){var o,a,s,l;switch(null==n&&(n="left"),null==i&&(i="top"),r=r||0,n){case"left":o=r,s=e[0]+r;break;case"center":case"middle":o=-e[0]/2,s=e[0]/2;break;case"right":o=-e[0]-r,s=-r}switch(i){case"bottom":a=r,l=e[1]+r;break;case"middle":a=-e[1]/2,l=e[1]/2;break;case"top":a=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[o,l]),h.set(u+1,[s,l]),h.set(u+2,[s,a]),h.set(u+3,[o,a])},addSprite:function(t,e,n,i,r,o){var a=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,n,i,r,o);for(var s=0;s 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end";var rs=Mr;Jo.Shader.import(is);var os={x:0,y:2,z:1};const as=i.ComponentView.extend({type:"grid3D",__ecgl__:!0,init:function(t,e){var n=new Jo.Material({shader:Jo.createShader("ecgl.color"),depthMask:!1,transparent:!0}),i=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});n.define("fragment","DOUBLE_SIDED"),n.define("both","VERTEX_COLOR"),this.groupGL=new Jo.Node,this._control=new Ia({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new Xa(t,i,n);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new ns(t,i);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new Ba({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:i,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new Ba({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new Ja({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,n){this._model=t,this._api=n;var i=t.coordinateSystem;i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(i.viewGL);var o=t.getModel("viewControl");r.setFromViewControlModel(o,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(i){i.update(t,e,n)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,n)}),this)),r.on("update",this._onCameraChange.bind(this,t,n),this),this._sceneHelper.setScene(i.viewGL.scene),this._sceneHelper.updateLight(t),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},showAxisPointer:function(t,e,n,i){this._doShowAxisPointer(),this._updateAxisPointer(i.value)},hideAxisPointer:function(t,e,n,i){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,n=this._model.coordinateSystem,i=n.viewGL,r=i.castRay(t.offsetX,t.offsetY,new Jo.Ray),o=0;oi[1]?0:1,a=this._faces[2*n+o],s=this._faces[2*n+1-o];a.rootNode.invisible=!0,s.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),n=t.getAxis("y"),i=t.getAxis("z"),r=i.getExtentMax(),o=i.getExtentMin(),a=e.getExtentMin(),s=e.getExtentMax(),l=n.getExtentMax(),u=n.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,p=this._faces,f=p[4].rootNode.invisible?u:l,g=p[2].rootNode.invisible?r:o,m=p[0].rootNode.invisible?a:s,v=p[2].rootNode.invisible?r:o,y=p[0].rootNode.invisible?s:a,_=p[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),p[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),p[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),p[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,f),c.position.set(m,v,0),d.position.set(y,0,_),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new Jo.Vector4,new Jo.Vector4],n=new Jo.Vector4;this.groupGL.getWorldPosition(n),n.w=1,n.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),n.x/=n.w,n.y/=n.w,this._axes.forEach((function(i){for(var r=i.axisLineCoords,o=(i.labelsMesh.geometry,0);on.y?"bottom":"top"):(s="middle",a=h>n.x?"left":"right"),i.setSpriteAlign(a,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,n=e.dataToPoint(t),i=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function a(t){return Mr(t.model.get("axisPointer.show"),r.get("show"))}function s(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),n=Jo.parseColor(e.get("color")),i=rs(e.get("width"),1),o=rs(e.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}i.convertToDynamicArray(!0);for(var l=0;lf&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}ms.x=ys.x=n.x,ms.y=_s.y=n.y,vs.x=_s.x=n.x+n.width,vs.y=ys.y=n.y+n.height,ms.transform(i),_s.transform(i),vs.transform(i),ys.transform(i),e.x=fs(ms.x,vs.x,ys.x,_s.x),e.y=fs(ms.y,vs.y,ys.y,_s.y);var l=gs(ms.x,vs.x,ys.x,_s.x),u=gs(ms.y,vs.y,ys.y,_s.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}();function Ss(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}function Ts(t,e,n){n=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}(n||0);var i=e.width,r=e.height,o=ma(t.left,i),a=ma(t.top,r),s=ma(t.right,i),l=ma(t.bottom,r),u=ma(t.width,i),h=ma(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(p>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ws(o+n[3],a+n[0],u,h);return f.margin=n,f}So(Ss,"vertical"),So(Ss,"horizontal");var Ms=function(){this._pool={},this._allocatedTextures=[]};Ms.prototype={constructor:Ms,get:function(t){var e=Ds(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var n=this._pool[e];if(!n.length){var i=new Ln(t);return this._allocatedTextures.push(i),i}return n.pop()},put:function(t){var e=Ds(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;e 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n #endif\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n #else\n depth += bias;\n #endif\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec4 P = vec4(position, 1.0);\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = skinMatrixWS * P;\n#endif\n#ifdef INSTANCING\n @import clay.chunk.instancing_matrix\n P = instanceMat * P;\n#endif\n gl_Position = worldViewProjection * P;\n v_WorldPosition = (world * P).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end");var Es,Ns,ks,Rs,zs,Bs,Zs,Fs=g.extend((function(){return{softShadow:Fs.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new Zi,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new Is}}),(function(){this._gaussianPassH=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new fr({fragment:jt.source("clay.sm.debug_depth")})}),{render:function(t,e,n,i){n||(n=e.getMainCamera()),this.trigger("beforerender",this,t,e,n),this._renderShadowPass(t,e,n,i),this.trigger("afterrender",this,t,e,n)},renderDebug:function(t,e){t.saveClear();var n=t.viewport,i=0,r=e||n.width/4,o=r;for(var a in this.softShadow===Fs.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM"),this._textures){var s=this._textures[a];t.setViewport(i,0,r*s.width/s.height,o),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(t),i+=r*s.width/s.height}t.setViewport(n),t.restoreClear()},_updateReceivers:function(t,e){if(e.receiveShadow?(this._receivers.push(e),e.material.set("shadowEnabled",1),e.material.set("pcfKernel",this.kernelPCF)):e.material.set("shadowEnabled",0),this.softShadow===Fs.VSM)e.material.define("fragment","USE_VSM"),e.material.undefine("fragment","PCF_KERNEL_SIZE");else{e.material.undefine("fragment","USE_VSM");var n=this.kernelPCF;n&&n.length?e.material.define("fragment","PCF_KERNEL_SIZE",n.length/2):e.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(t,e){var n=this;e.traverse((function(e){e.isRenderable()&&n._updateReceivers(t,e)}));for(var i=0;i4){console.warn("Support at most 4 cascade");continue}f.shadowCascade>1&&(a=f),this.renderDirectionalLightShadow(t,e,n,f,c,h,u)}else"SPOT_LIGHT"===f.type?this.renderSpotLightShadow(t,e,f,l,s):"POINT_LIGHT"===f.type&&this.renderPointLightShadow(t,e,f,d);this._shadowMapNumber[f.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(p=0;p0?y.define("fragment",v,m):y.isDefined("fragment",v)&&y.undefine("fragment",v))}for(p=0;p0){var x=u.map(T);if(_.directionalLightShadowMaps={value:u,type:"tv"},_.directionalLightMatrices={value:h,type:"m4v"},_.directionalLightShadowMapSizes={value:x,type:"1fv"},a){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),_.shadowCascadeClipsNear={value:b,type:"1fv"},_.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var S=s.map(T);(_=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},_.spotLightMatrices={value:l,type:"m4v"},_.spotLightShadowMapSizes={value:S,type:"1fv"}}d.length>0&&(_.pointLightShadowMaps={value:d,type:"tv"})}function T(t){return t.height}},renderDirectionalLightShadow:(Es=new li,Ns=new He,ks=new rn,Rs=new He,zs=new He,Bs=new He,Zs=new He,function(t,e,n,i,r,o,a){var s=this._getDepthMaterial(i),l={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:Os,getUniform:Ps,ifRender:function(t){return t.castShadow},sortCompare:he.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var u=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(u).applyTransform(n.viewMatrix)}var h=Math.min(-e.viewBoundingBoxLastFrame.min.z,n.far),c=Math.max(-e.viewBoundingBoxLastFrame.max.z,n.near),d=this._getDirectionalLightCamera(i,e,n),p=Bs.array;Zs.copy(d.projectionMatrix),qt.invert(zs.array,d.worldTransform.array),qt.multiply(zs.array,zs.array,n.worldTransform.array),qt.multiply(p,Zs.array,zs.array);for(var f=[],g=n instanceof Di,m=(n.near+n.far)/(n.near-n.far),v=2*n.near*n.far/(n.near-n.far),y=0;y<=i.shadowCascade;y++){var _=c*Math.pow(h/c,y/i.shadowCascade),x=c+(h-c)*y/i.shadowCascade,b=_*i.cascadeSplitLogFactor+x*(1-i.cascadeSplitLogFactor);f.push(b),r.push(-(-b*m+v)/-b)}var w=this._getTexture(i,i.shadowCascade);a.push(w);var S=t.viewport,T=t.gl;for(this._frameBuffer.attach(w),this._frameBuffer.bind(t),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT),y=0;yd?s>p?f[r>0?"px":"nx"]=!0:f[a>0?"pz":"nz"]=!0:d>p?f[o>0?"py":"ny"]=!0:f[a>0?"pz":"nz"]=!0}for(n=0;n0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}}),Hs=g.extend((function(){return{nodes:[]}}),{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=n.COLOR_ATTACHMENT0&&h<=n.COLOR_ATTACHMENT0+8&&u.push(h);l.drawBuffersEXT(u)}t.saveClear(),t.clearBit=16640,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}}),js=Gs.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),Xs=Gs.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new fr({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var n=t.gl;for(var i in this.inputLinks){var r=(c=this.inputLinks[i]).node.getOutput(t,c.pin);this.pass.setUniform(i,r)}if(this.outputs){this.pass.outputs={};var o={};for(var a in this.outputs){var s=this.updateParameter(a,t);isNaN(s.width)&&this.updateParameter(a,t);var l=this.outputs[a],u=this._compositor.allocateTexture(s);this._outputTextures[a]=u,"string"==typeof(h=l.attachment||n.COLOR_ATTACHMENT0)&&(h=n[h]),o[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),o)this._compositor.getFrameBuffer().attach(o[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var i in this.inputLinks){var c;(c=this.inputLinks[i]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var n,i,r=this.outputs[t],o=r.parameters,a=r._parametersCopy;if(a||(a=r._parametersCopy={}),o)for(var s in o)"width"!==s&&"height"!==s&&(a[s]=o[s]);return n="function"==typeof o.width?o.width.call(this,e):o.width,i="function"==typeof o.height?o.height.call(this,e):o.height,n=Math.ceil(n),i=Math.ceil(i),a.width===n&&a.height===i||this._outputTextures[t]&&this._outputTextures[t].dispose(e),a.width=n,a.height=i,a},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){Gs.prototype.clear.call(this),this.pass.material.disableTexturesAll()}}),Ys="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",qs="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",Ks="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",Js="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",Qs="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",$s="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",tl="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",el="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",nl="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";!function(t){t.import("@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"),t.import(Ys),t.import("@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"),t.import(qs),t.import("@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"),t.import(Ks),t.import(Js),t.import(Qs),t.import($s),t.import(tl),t.import("@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"),t.import(el),t.import(nl)}(jt);var il=/^#source\((.*?)\)/;function rl(t,e,n){var i,r,o,a,s=t.type||"filter";if("filter"===s){var l=t.shader.trim(),u=il.exec(l);if(u?i=jt.source(u[1].trim()):"#"===l.charAt(0)&&(i=e.shaders[l.substr(1)]),i||(i=l),!i)return}if(t.inputs)for(var h in r={},t.inputs)"string"==typeof t.inputs[h]?r[h]=t.inputs[h]:r[h]={node:t.inputs[h].node,pin:t.inputs[h].pin};if(t.outputs)for(var h in o={},t.outputs){var c=t.outputs[h];o[h]={},null!=c.attachment&&(o[h].attachment=c.attachment),null!=c.keepLastFrame&&(o[h].keepLastFrame=c.keepLastFrame),null!=c.outputLastFrame&&(o[h].outputLastFrame=c.outputLastFrame),c.parameters&&(o[h].parameters=sl(c.parameters))}if(a="scene"===s?new Ws({name:t.name,scene:n.scene,camera:n.camera,outputs:o}):"texture"===s?new js({name:t.name,outputs:o}):new Xs({name:t.name,shader:i,inputs:r,outputs:o})){if(t.parameters)for(var h in t.parameters)"string"==typeof(d=t.parameters[h])?"#"===(d=d.trim()).charAt(0)?d=e.textures[d.substr(1)]:a.on("beforerender",ll(h,ul(d))):"function"==typeof d&&a.on("beforerender",d),a.setParameter(h,d);if(t.defines&&a.pass)for(var h in t.defines){var d=t.defines[h];a.pass.material.define("fragment",h,d)}}return a}function ol(t,e){return t}function al(t,e){return e}function sl(t){var e={};if(!t)return e;["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach((function(n){var i=t[n];null!=i&&("string"==typeof i&&(i=Sn[i]),e[n]=i)}));var n=t.scale||1;return["width","height"].forEach((function(i){if(null!=t[i]){var r=t[i];"string"==typeof r?(r=r.trim(),e[i]=(o=ul(r),a=(a=n)||1,function(t){var e=t.getDevicePixelRatio(),n=t.getWidth()*a,i=t.getHeight()*a;return o(n,i,e)})):e[i]=r}var o,a})),e.width||(e.width=ol),e.height||(e.height=al),null!=t.useMipmap&&(e.useMipmap=t.useMipmap),e}function ll(t,e){return function(n){var i=n.getDevicePixelRatio(),r=n.getWidth(),o=n.getHeight(),a=e(r,o,i);this.setParameter(t,a)}}function ul(t){var e=/^expr\((.*)\)$/.exec(t);if(e)try{var n=new Function("width","height","dpr","return "+e[1]);return n(1,1),n}catch(t){throw new Error("Invalid expression.")}}const hl=function(t,e){for(var n=0,i=1/e,r=t;r>0;)n+=i*(r%e),r=Math.floor(r/e),i/=e;return n};function cl(t){for(var e=new Uint8Array(t*t*4),n=0,i=new ye,r=0;r 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"),fl.prototype.setDepthTexture=function(t){this._depthTex=t},fl.prototype.setNormalTexture=function(t){this._normalTex=t,this._ssaoPass.material[t?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},fl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._ssaoPass,a=this._blurPass;o.setUniform("kernel",this._kernels[n%this._kernels.length]),o.setUniform("depthTex",this._depthTex),null!=this._normalTex&&o.setUniform("normalTex",this._normalTex),o.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var s=new He;He.transpose(s,e.worldTransform),o.setUniform("projection",e.projectionMatrix.array),o.setUniform("projectionInv",e.invProjectionMatrix.array),o.setUniform("viewInverseTranspose",s.array);var l=this._ssaoTexture,u=this._blurTexture,h=this._blurTexture2;l.width=i/2,l.height=r/2,u.width=i,u.height=r,h.width=i,h.height=r,this._framebuffer.attach(l),this._framebuffer.bind(t),t.gl.clearColor(1,1,1,1),t.gl.clear(t.gl.COLOR_BUFFER_BIT),o.render(t),a.setUniform("textureSize",[i/2,r/2]),a.setUniform("projection",e.projectionMatrix.array),this._framebuffer.attach(u),a.setUniform("direction",0),a.setUniform("ssaoTexture",l),a.render(t),this._framebuffer.attach(h),a.setUniform("textureSize",[i,r]),a.setUniform("direction",1),a.setUniform("ssaoTexture",u),a.render(t),this._framebuffer.unbind(t);var c=t.clearColor;t.gl.clearColor(c[0],c[1],c[2],c[3])},fl.prototype.getTargetTexture=function(){return this._blurTexture2},fl.prototype.setParameter=function(t,e){"noiseTexSize"===t?this.setNoiseSize(e):"kernelSize"===t?this.setKernelSize(e):"intensity"===t?this._ssaoPass.material.set("intensity",e):this._ssaoPass.setUniform(t,e)},fl.prototype.setKernelSize=function(t){this._kernelSize=t,this._ssaoPass.material.define("fragment","KERNEL_SIZE",t),this._kernels=this._kernels||[];for(var e=0;e<30;e++)this._kernels[e]=pl(t,e*t,!!this._normalTex)},fl.prototype.setNoiseSize=function(t){var e=this._ssaoPass.getUniform("noiseTex");e?(e.data=cl(t),e.width=e.height=t,e.dirty()):(e=dl(t),this._ssaoPass.setUniform("noiseTex",dl(t))),this._ssaoPass.setUniform("noiseTexSize",[t,t])},fl.prototype.dispose=function(t){this._blurTexture.dispose(t),this._ssaoTexture.dispose(t),this._blurTexture2.dispose(t)};const gl=fl;function ml(t){t=t||{},this._ssrPass=new fr({fragment:jt.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new fr({fragment:jt.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",t.normalTexture),this._ssrPass.setUniform("gBufferTexture2",t.depthTexture),this._blurPass1.setUniform("gBufferTexture1",t.normalTexture),this._blurPass1.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.setUniform("gBufferTexture1",t.normalTexture),this._blurPass2.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new Ln({type:Sn.HALF_FLOAT}),this._texture2=new Ln({type:Sn.HALF_FLOAT}),this._texture3=new Ln({type:Sn.HALF_FLOAT}),this._prevTexture=new Ln({type:Sn.HALF_FLOAT}),this._currentTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}jt.import("@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"),ml.prototype.setAmbientCubemap=function(t,e){this._ssrPass.material.set("specularCubemap",t),this._ssrPass.material.set("specularIntensity",e);var n=t&&e;this._ssrPass.material[n?"enableTexture":"disableTexture"]("specularCubemap")},ml.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._ssrTexture,s=this._texture2,l=this._texture3;a.width=this._prevTexture.width=this._currentTexture.width=r/this._downScale,a.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,s.width=l.width=r,s.height=l.height=o;var u=this._frameBuffer,h=this._ssrPass,c=this._blurPass1,d=this._blurPass2,p=this._blendPass,f=new He,g=new He;He.transpose(f,e.worldTransform),He.transpose(g,e.viewMatrix),h.setUniform("sourceTexture",n),h.setUniform("projection",e.projectionMatrix.array),h.setUniform("projectionInv",e.invProjectionMatrix.array),h.setUniform("toViewSpace",f.array),h.setUniform("toWorldSpace",g.array),h.setUniform("nearZ",e.near);var m=i/this._totalSamples*this._samplePerFrame;if(h.setUniform("jitterOffset",m),h.setUniform("sampleOffset",i*this._samplePerFrame),c.setUniform("textureSize",[a.width,a.height]),d.setUniform("textureSize",[r,o]),d.setUniform("sourceTexture",n),c.setUniform("projection",e.projectionMatrix.array),d.setUniform("projection",e.projectionMatrix.array),u.attach(a),u.bind(t),h.render(t),this._physicallyCorrect&&(u.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",a),p.material.set({weight1:i>=1?.95:0,weight2:i>=1?.05:1}),p.render(t)),u.attach(s),c.setUniform("texture",this._physicallyCorrect?this._currentTexture:a),c.render(t),u.attach(l),d.setUniform("texture",s),d.render(t),u.unbind(t),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},ml.prototype.getTargetTexture=function(){return this._texture3},ml.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},ml.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=vr.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},ml.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},ml.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},ml.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};const vl=ml,yl=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925];function _l(t,e,n,i,r){var o=t.gl;e.setUniform(o,"1i",n,r),o.activeTexture(o.TEXTURE0+r),i.isRenderable()?i.bind(t):i.unbind(t)}function xl(t,e,n,i,r){var o,a,s,l,u=t.gl;return function(r,h,c){if(!l||l.material!==r.material){var d=r.material,p=r.__program,f=d.get("roughness");null==f&&(f=1);var g=d.get("normalMap")||e,m=d.get("roughnessMap"),v=d.get("bumpMap"),y=d.get("uvRepeat"),_=d.get("uvOffset"),x=d.get("detailUvRepeat"),b=d.get("detailUvOffset"),w=!!v&&d.isTextureEnabled("bumpMap"),S=!!m&&d.isTextureEnabled("roughnessMap"),T=d.isDefined("fragment","DOUBLE_SIDED");v=v||n,m=m||i,c!==h?(h.set("normalMap",g),h.set("bumpMap",v),h.set("roughnessMap",m),h.set("useBumpMap",w),h.set("useRoughnessMap",S),h.set("doubleSide",T),null!=y&&h.set("uvRepeat",y),null!=_&&h.set("uvOffset",_),null!=x&&h.set("detailUvRepeat",x),null!=b&&h.set("detailUvOffset",b),h.set("roughness",f)):(p.setUniform(u,"1f","roughness",f),o!==g&&_l(t,p,"normalMap",g,0),a!==v&&v&&_l(t,p,"bumpMap",v,1),s!==m&&m&&_l(t,p,"roughnessMap",m,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=_&&p.setUniform(u,"2f","uvOffset",_),null!=x&&p.setUniform(u,"2f","detailUvRepeat",x),null!=b&&p.setUniform(u,"2f","detailUvOffset",b),p.setUniform(u,"1i","useBumpMap",+w),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+T)),o=g,a=v,s=m,l=r}}}function bl(t){t=t||{},this._depthTex=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._normalTex=new Ln({type:Sn.HALF_FLOAT}),this._framebuffer=new Zi,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,Zi.DEPTH_ATTACHMENT),this._normalMaterial=new lt({shader:new jt(jt.source("ecgl.normal.vertex"),jt.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=or.createBlank("#000"),this._defaultBumpMap=or.createBlank("#000"),this._defaultRoughessMap=or.createBlank("#000"),this._debugPass=new fr({fragment:jt.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}jt.import("@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"),bl.prototype.getDepthTexture=function(){return this._depthTex},bl.prototype.getNormalTexture=function(){return this._normalTex},bl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._depthTex,a=this._normalTex,s=this._normalMaterial;o.width=i,o.height=r,a.width=i,a.height=r;var l=e.getRenderList(n).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,n,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:xl(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},bl.prototype.renderDebug=function(t){this._debugPass.render(t)},bl.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)};const wl=bl;function Sl(t){t=t||{},this._edgePass=new fr({fragment:jt.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi,this._frameBuffer.attach(this._targetTexture)}Sl.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._targetTexture;a.width=r,a.height=o;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,o]),this._edgePass.setUniform("texture",n),this._edgePass.render(t),s.unbind(t)},Sl.prototype.getTargetTexture=function(){return this._targetTexture},Sl.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},Sl.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};const Tl=Sl,Ml={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]};function Al(t,e){return{color:{parameters:{width:t,height:e}}}}jt.import(Ys),jt.import(qs),jt.import(Ks),jt.import(Js),jt.import(Qs),jt.import($s),jt.import(tl),jt.import(el),jt.import(nl),jt.import("@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"),jt.import("@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end");var Cl=["composite","FXAA"];function Dl(){this._width,this._height,this._dpr,this._sourceTexture=new Ln({type:Sn.HALF_FLOAT}),this._depthTexture=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._framebuffer=new Zi,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,Zi.DEPTH_ATTACHMENT),this._normalPass=new wl,this._compositor=function(t,e){var n=new Us;e=e||{};var i={textures:{},parameters:{}};for(var r in t.parameters){var o=t.parameters[r];i.parameters[r]=sl(o)}return function(t,e,n,i){if(t.textures){var r={},o=0,a=!1,s=n.textureRootPath;p.each(t.textures,(function(t,e){var n,l=t.path,u=sl(t.parameters);if(Array.isArray(l)&&6===l.length)s&&(l=l.map((function(t){return p.relative2absolute(t,s)}))),n=new Ci(u);else{if("string"!=typeof l)return;s&&(l=p.relative2absolute(l,s)),n=new Ln(u)}n.load(l),o++,n.once("success",(function(){r[e]=n,0==--o&&(i(r),a=!0)}))})),0!==o||a||i(r)}else i({})}(t,0,e,(function(r){i.textures=r,function(r,o){for(var a=0;a=this._haltonSequence.length},render:function(t,e,n){var i=this._blendPass;0===this._frame?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),n||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}};const Pl=Ll;function Ol(t){t=t||"perspective",this.layer=null,this.scene=new _i,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new Il,this._temporalSS=new Pl,this._shadowMapPass=new Vs;for(var e=[],n=0,i=0;i<30;i++){for(var r=[],o=0;o<6;o++)r.push(4*hl(n,2)-2),r.push(4*hl(n,3)-2),n++;e.push(r)}this._pcfKernels=e,this.scene.on("beforerender",(function(t,e,n){this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n)}),this)}Ol.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),"perspective"===t?this.camera instanceof Di||(this.camera=new Di,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof hr||(this.camera=new hr,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3},Ol.prototype.setViewport=function(t,e,n,i,r){this.camera instanceof Di&&(this.camera.aspect=n/i),r=r||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=n,this.viewport.height=i,this.viewport.devicePixelRatio=r,this._compositor.resize(n*r,i*r),this._temporalSS.resize(n*r,i*r)},Ol.prototype.containPoint=function(t,e){var n=this.viewport;return e=this.layer.renderer.getHeight()-e,t>=n.x&&e>=n.y&&t<=n.x+n.width&&e<=n.y+n.height};var El=new vt;Ol.prototype.castRay=function(t,e,n){var i=this.layer.renderer,r=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,El),this.camera.castRay(El,n),i.viewport=r,n},Ol.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},Ol.prototype._doRender=function(t,e,n){var i=this.scene,r=this.camera;n=n||0,this._updateTransparent(t,i,r,n),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,r,!0)),this._updateShadowPCFKernel(n);var o,a=t.clearColor;t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,i,r,this._temporalSS.getFrame())),this._updateSSAO(t,i,r,this._temporalSS.getFrame()),this._enablePostEffect?((o=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,r,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,r,null,0))):this.needsTemporalSS()&&e?((o=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,r,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(i,r,!0,!0))},Ol.prototype._updateTransparent=function(t,e,n,i){for(var r=new ye,o=new He,a=n.getWorldPosition(),s=e.getRenderList(n).transparent,l=0;lthis.camera.far||t80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);u=Math.max(o-i,a-r)}return ru(d,p,n,i,r,u),p}function nu(t,e,n,i,r){var o,a;if(r===Su(t,e,n,i)>0)for(o=e;o=e;o-=i)a=xu(o,t[o],t[o+1],a);return a&&mu(a,a.next)&&(bu(a),a=a.next),a}function iu(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!mu(i,i.next)&&0!==gu(i.prev,i,i.next))i=i.next;else{if(bu(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function ru(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=cu(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?au(t,i,r,o):ou(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),bu(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?ru(t=su(t,e,n),e,n,i,r,o,2):2===a&&lu(t,e,n,i,r,o):ru(iu(t),e,n,i,r,o,1);break}}}function ou(t){var e=t.prev,n=t,i=t.next;if(gu(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(pu(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&gu(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function au(t,e,n,i){var r=t.prev,o=t,a=t.next;if(gu(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,h=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=cu(s,l,e,n,i),d=cu(u,h,e,n,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function su(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!mu(r,o)&&vu(r,i,i.next,o)&&yu(r,o)&&yu(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),bu(i),bu(i.next),i=t=o),i=i.next}while(i!==t);return i}function lu(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&fu(a,s)){var l=_u(a,s);return a=iu(a,a.next),l=iu(l,l.next),ru(a,e,n,i,r,o),void ru(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function uu(t,e){return t.x-e.x}function hu(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=h&&r!==i.x&&pu(on.x)&&yu(i,t)&&(n=i,d=l),i=i.next;return n}(t,e)){var n=_u(e,t);iu(n,n.next)}}function cu(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function du(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function fu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&vu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&yu(t,e)&&yu(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function gu(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function mu(t,e){return t.x===e.x&&t.y===e.y}function vu(t,e,n,i){return!!(mu(t,e)&&mu(n,i)||mu(t,i)&&mu(n,e))||gu(t,e,n)>0!=gu(t,e,i)>0&&gu(n,i,t)>0!=gu(n,i,e)>0}function yu(t,e){return gu(t.prev,t,t.next)<0?gu(t,e,t.next)>=0&&gu(t,t.prev,e)>=0:gu(t,e,t.prev)<0||gu(t,t.next,e)<0}function _u(t,e){var n=new wu(t.i,t.x,t.y),i=new wu(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function xu(t,e,n,i){var r=new wu(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function bu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function wu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Su(t,e,n,i){for(var r=0,o=e,a=n-i;ou&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l}),u=o[a].pivot+1,(l=o[a].right)>u&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l})}o=this._parts=s}else for(a=0;a=2e4},doSortTriangles:function(t,e){var n=this.indices;if(0===e){var i=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new n.constructor(n.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var r,o=0,a=0;a0,n={},r=0;r65535?new Uint32Array(3*a):new Uint16Array(3*a),d.material.shader!==e&&d.material.attachShader(e,!0),Jo.setMaterialFromModel(e.__shading,d.material,t,n),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-i))},_updateRegionMesh:function(t,e,n,i){for(var r=t.getData(),o=0,a=0,s=!1,l=this._polygonMesh,u=this._linesMesh,h=n;h0;w&&(b*=e.getDevicePixelRatio(),this._updateLinesGeometry(u.geometry,t,h,y,b,t.coordinateSystem.transform)),u.invisible=!w,u.material.set({color:m})}(l=this._polygonMesh).material.transparent=s,l.material.depthMask=!s,l.geometry.updateBoundingBox(),l.frontFace=this.extrudeY?Jo.Mesh.CCW:Jo.Mesh.CW,l.material.get("normalMap")&&l.geometry.generateTangents(),l.seriesIndex=t.seriesIndex,l.on("mousemove",this._onmousemove,this),l.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var n=Jo.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=Mr(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",n),r.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,n){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(o=this._groundMaterials.lambert),Jo.setMaterialFromModel(r,o,i,n),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",Jo.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,n){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],o=t.coordinateSystem,a=e;a1?i:0,L[F][m]=A.points[G+2],l.set(r+F,L[F]),s?(N[0]=(A.points[G]*v[0]-y[0])/x,N[1]=(A.points[G+2]*v[m]-y[m])/x):(N[0]=(V?k:k+Z)/x,N[1]=(L[F][g]*v[g]-y[g])/x),h.set(r+F,N)}for(Bu.sub(P,L[1],L[0]),Bu.sub(O,L[3],L[0]),Bu.cross(E,P,O),Bu.normalize(E,E),F=0;F<4;F++)u.set(r+F,E),p&&c.set(r+F,a);for(F=0;F<6;F++)f[3*o+F]=I[F]+r;r+=4,o+=2,k+=Z}}return e.dirty(),{vertexOffset:r,triangleOffset:o}},_getRegionLinesInfo:function(t,e,n){var i=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,o=t.interiors;i+=n.getPolylineVertexCount(e),r+=n.getPolylineTriangleCount(e);for(var a=0;athis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[2*e];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});i.util.merge(nh.prototype,ca),i.util.merge(nh.prototype,da),i.util.merge(nh.prototype,pa),i.util.merge(nh.prototype,Kl);const ih=nh;var rh=Math.PI,oh=Math.sin,ah=Math.cos,sh=Math.tan,lh=Math.asin,uh=Math.atan2,hh=rh/180,ch=23.4397*hh;function dh(t,e){return uh(oh(t)*ah(ch)-sh(e)*oh(ch),ah(t))}function ph(t,e,n){return uh(oh(t),ah(t)*oh(e)-sh(n)*ah(e))}function fh(t,e,n){return lh(oh(e)*oh(n)+ah(e)*ah(n)*ah(t))}var gh={getPosition:function(t,e,n){var i=hh*-n,r=hh*e,o=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),a=function(t){var e,n,i=(n=function(t){return hh*(357.5291+.98560028*t)}(t))+hh*(1.9148*oh(n)+.02*oh(2*n)+3e-4*oh(3*n))+102.9372*hh+rh;return{dec:(e=i,lh(oh(0)*ah(ch)+ah(0)*oh(ch)*oh(e))),ra:dh(i,0)}}(o),s=function(t,e){return hh*(280.16+360.9856235*t)-e}(o,i)-a.ra;return{azimuth:ph(s,r,a.dec),altitude:fh(s,r,a.dec)}}};const mh=gh;Jo.Shader.import(Ho),Jo.Shader.import("@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end");const vh=i.ComponentView.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new Jo.Node,this._sphereGeometry=new Jo.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new Jo.PlaneGeometry,this._earthMesh=new Jo.Mesh({renderNormal:!0}),this._atmosphereMesh=new Jo.Mesh,this._atmosphereGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.atmosphere.vertex"),Jo.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=Jo.Mesh.CW,this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new Ia({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,n){var i=t.coordinateSystem,r=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var a="ecgl."+r;o.material&&o.material.shader.name===a||(o.material=Jo.createMaterial(a)),Jo.setMaterialFromModel(r,o.material,t,n),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",Jo.parseColor(t.get("baseColor")));var s=.99*i.radius;if(o.scale.set(s,s,s),t.get("atmosphere.show")){o.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),o.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else o.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),n,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),n,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,n),this._displaceVertices(t,n),this._updateViewControl(t,n),this._updateLayers(t,n)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},_updateLayers:function(t,e){var n=t.coordinateSystem,r=t.get("layers"),o=n.radius,a=[],s=[],l=[],u=[];i.util.each(r,(function(t){var r=new i.Model(t),h=r.get("type"),c=Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8});if(c.surface&&c.surface.attachToMesh(this._earthMesh),"blend"===h){var d=r.get("blendTo"),p=Mr(r.get("intensity"),1);"emission"===d?(l.push(c),u.push(p)):(a.push(c),s.push(p))}else{var f=r.get("id"),g=this._layerMeshes[f];g||(g=this._layerMeshes[f]=new Jo.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===r.get("shading")?(g.material=g.__lambertMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),g.__lambertMaterial=g.material):(g.material=g.__colorMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.color"),transparent:!0,depthMask:!1}),g.__colorMaterial=g.material),g.material.enableTexture("diffuseMap");var m=r.get("distance"),v=o+(null==m?n.radius/100:m);g.scale.set(v,v,v),o=v;var y=this._blankTexture||(this._blankTexture=Jo.createBlankTexture("rgba(255, 255, 255, 0)"));g.material.set("diffuseMap",y),Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(g),g.material.set("diffuseMap",t),e.getZr().refresh()})),r.get("show")?this.groupGL.add(g):this.groupGL.remove(g)}}),this);var h=this._earthMesh.material;h.define("fragment","LAYER_DIFFUSEMAP_COUNT",a.length),h.define("fragment","LAYER_EMISSIVEMAP_COUNT",l.length),h.set("layerDiffuseMap",a),h.set("layerDiffuseIntensity",s),h.set("layerEmissiveMap",l),h.set("layerEmissionIntensity",u);var c=t.getModel("debug.wireframe");if(c.get("show")){h.define("both","WIREFRAME_TRIANGLE");var d=Jo.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)"),p=Mr(c.get("lineStyle.width"),1);h.set("wireframeLineWidth",p),h.set("wireframeLineColor",d)}else h.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var n=t.coordinateSystem,i=t.getModel("viewControl"),r=(n.viewGL.camera,this),o=this._control;o.setViewGL(n.viewGL);var a,s,l=i.get("targetCoord");null!=l&&(s=l[0]+90,a=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:a,beta:s}),o.off("update"),o.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var n=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||n!==this._displacementQuality||i!==this._showDebugWireframe){this._displacementQuality=n,this._showDebugWireframe=i;var o=this._sphereGeometry,a={low:100,medium:200,high:400,ultra:800}[n]||200,s=a/2;(o.widthSegments!==a||i)&&(o.widthSegments=a,o.heightSegments=s,o.build()),this._doDisplaceVertices(o,r),i&&o.generateBarycentric()}},_doDisplaceVertices:function(t,e){var n=t.attributes.position.value,i=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===n.length||((r=new Float32Array(n.length)).set(n),t.__originalPosition=r);for(var o=e.displacementWidth,a=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var a=[];Oh.perspective(a,Nh,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(a),this.viewGL.camera.decomposeProjectionMatrix(),a=Oh.identity([]);var s=this.dataToPoint(this.center);Oh.scale(a,a,[1,-1,1]),Oh.translate(a,a,[0,0,-t]),Oh.rotateX(a,a,e),Oh.rotateZ(a,a,-this.bearing/180*Math.PI),Oh.translate(a,a,[-s[0]*this.getScale()*Rh,-s[1]*this.getScale()*Rh,0]),this.viewGL.camera.viewMatrix.array=a;var l=[];Oh.invert(l,a),this.viewGL.camera.worldTransform.array=l,this.viewGL.camera.decomposeWorldTransform();var u,h=Eh*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var c=this.altitudeExtent[1]-this.altitudeExtent[0];u=this.boxHeight/c*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else u=h/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*Rh;this.viewGL.rootNode.scale.set(this.getScale()*Rh,this.getScale()*Rh,u)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*Eh,e)},projectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1]*kh/180,o=e*(i*kh/180+kh)/(2*kh),a=e*(kh-Math.log(Math.tan(kh/4+.5*r)))/(2*kh);return(n=n||[])[0]=o,n[1]=a,n},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*Eh,e)},unprojectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1],o=i/e*(2*kh)-kh,a=2*(Math.atan(Math.exp(kh-r/e*(2*kh)))-kh/4);return(n=n||[])[0]=180*o/kh,n[1]=180*a/kh,n},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,Eh,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}};const Bh=zh;function Zh(){Bh.apply(this,arguments)}function Fh(t,e,n){function i(t,e){var n=e.getWidth(),i=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,n,i,r),this.width=n,this.height=i,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function r(t,e){if("auto"!==this.model.get("boxHeight")){var n=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=t.coordDimToDataDim("alt")[0];if(i){var r=e.getDataExtent(i,!0);n[0]=Math.min(n[0],r[0]),n[1]=Math.max(n[1],r[1])}}}),this),n&&isFinite(n[1]-n[0])&&(this.altitudeExtent=n)}}return{dimensions:e.prototype.dimensions,create:function(o,a){var s=[];return o.eachComponent(t,(function(t){var n=t.__viewGL;n||(n=t.__viewGL=new Nl).setRootNode(new Jo.Node);var o=new e;o.viewGL=t.__viewGL,o.resize=i,o.resize(t,a),s.push(o),t.coordinateSystem=o,o.model=t,o.update=r})),o.eachSeries((function(e){if(e.get("coordinateSystem")===t){var n=e.getReferringComponents(t).models[0];if(n||(n=o.getComponent(t)),!n)throw new Error(t+' "'+Mr(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=n.coordinateSystem}})),n&&n(s,o,a),s}}}Zh.prototype=new Bh,Zh.prototype.constructor=Zh,Zh.prototype.type="mapbox3D";const Vh=Fh("mapbox3D",Zh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMapboxCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Ah),t.registerComponentView(Ph),t.registerCoordinateSystem("mapbox3D",Vh),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"mapbox3D",query:t},(function(e){e.setMapboxCameraOption(t)}))}))}));var Gh=["zoom","center","pitch","bearing"],Hh=i.ComponentModel.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return Gh.reduce((function(e,n){return e[n]=t.get(n),e}),{})},setMaptalksCameraOption:function(t){null!=t&&Gh.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});i.util.merge(Hh.prototype,da),i.util.merge(Hh.prototype,pa);const Uh=Hh;function Wh(t,e,n,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:n,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}Wh.prototype.setUnpainted=function(){},Wh.prototype.resize=function(){this._maptalks.checkSize()},Wh.prototype.getMaptalks=function(){return this._maptalks},Wh.prototype.clear=function(){},Wh.prototype.refresh=function(){this._maptalks.checkSize()};var jh=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];Wh.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},jh.forEach((function(e){this._handlers[e]=function(n){var i={};for(var r in n)i[r]=n[r];i.bubbles=!1;var o=new n.constructor(n.type,i);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(o):t.firstElementChild.dispatchEvent(o)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},Wh.prototype.dispose=function(){jh.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()};const Xh=Wh;Jo.Shader.import(Lh);const Yh=i.ComponentView.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new Jo.Mesh({geometry:new Jo.PlaneGeometry,material:new Jo.Material({shader:new Jo.Shader({vertex:Jo.Shader.source("ecgl.displayShadow.vertex"),fragment:Jo.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var n=e.getZr();this._zrLayer=new Xh("maptalks3D",n,t.get("center"),t.get("zoom")),n.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach((function(t){i.on(t,r)}))},render:function(t,e,n){this._zrLayer||this._initMaptalksLayer(t,n);var i=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),o=i.getBaseLayer();r!==this._oldUrlTemplate&&(o?o.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(o=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(o))),this._oldUrlTemplate=r,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var a=t.coordinateSystem;a.viewGL.scene.add(this._lightRoot),a.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(a.viewGL.scene),this._sceneHelper.updateLight(t),a.viewGL.setPostEffect(t.getModel("postEffect"),n),a.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,n,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),n.getZr().refresh()},_dispatchInteractAction:function(t,e,n){var i;t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:(i=e.getResolution(),19-Math.log(i/qh)/Math.LN2+1),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var n=new Jo.Plane(new Jo.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new Jo.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new Jo.Vector2(1,1)),o=i.intersectPlane(n),a=r.intersectPlane(n),s=o.dist(a)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),qh=12756274*Math.PI/(256*Math.pow(2,20));function Kh(){Bh.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}Kh.prototype=new Bh,Kh.prototype.constructor=Kh,Kh.prototype.type="maptalks3D";const Jh=Fh("maptalks3D",Kh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMaptalksCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Uh),t.registerComponentView(Yh),t.registerCoordinateSystem("maptalks3D",Jh),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"maptalks3D",query:t},(function(e){e.setMaptalksCameraOption(t)}))}))}));var Qh=Pa.vec3,$h=i.helper.dataStack.isDimensionStacked;function tc(t,e,n){for(var i=t.getDataExtent(e),r=t.getDataExtent(n),o=i[1]-i[0]||i[0],a=r[1]-r[0]||r[0],s=new Uint8Array(2500),l=0;l0&&d>0||c<0&&d<0)),g=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),m=$h(n,g[2]),v=m?n.getCalculationInfo("stackResultDimension"):g[2];n.each(g,(function(t,i,o,a){var s=n.get(v,a),l=m?s-o:f?0:p[0],u=e.dataToPoint([t,i,l]),h=e.dataToPoint([t,i,s]),c=Qh.dist(u,h),d=[0,h[1]"+o.join("
")}(o):i.format.encodeHTML(i.format.addCommas(o)),s=r.getName(e),l=Nu(r,e);i.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=i.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?i.format.encodeHTML(h)+(n?": ":"
"):"",n?u+h+a:h+u+(s?i.format.encodeHTML(s)+": "+a:a)}function sc(t,e,n){n=n||t.getSource();var r=e||i.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],o=i.helper.createDimensions(n,{dimensionsDefine:n.dimensionsDefine||t.get("dimensions"),encodeDefine:n.encodeDefine||t.get("encode"),coordDimensions:r.map((function(e){var n=t.getReferringComponents(e+"Axis3D").models[0];return{type:n&&"category"===n.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&o.forEach((function(e){if(r.indexOf(e.coordDim)>=0){var n=t.getReferringComponents(e.coordDim+"Axis3D").models[0];n&&"category"===n.get("type")&&(e.ordinalMeta=n.getOrdinalMeta())}}));var a=i.helper.dataStack.enableDataStack(t,o,{byIndex:!0,stackedCoordDimension:"z"}),s=new i.List(o,t);return s.setCalculationInfo(a),s.initData(n),s}var lc=i.SeriesModel.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);return null==r&&(r=this.getData().get("z",t)),r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});i.util.merge(lc.prototype,Kl);const uc=lc;var hc,cc,dc,pc,fc,gc,mc,vc,yc=Pa.vec3,_c=Pa.mat3,xc=Hn.extend((function(){return{attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR"),prevPosition:new Hn.Attribute("prevPosition","float",3),prevNormal:new Hn.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,n=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==n&&(this.attributes.position.init(n),e?this.attributes.normal.init(n):this.attributes.normal.value=null,this.attributes.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i),this._dataIndices=new Uint32Array(n))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var n=this.getBarVertexCount(),i=n*(t+1),r=n*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,v);else{yc.copy(r,c),yc.normalize(r,r),yc.cross(o,g,r),yc.normalize(o,o),yc.cross(i,r,o),yc.normalize(o,o),yc.negate(a,i),yc.negate(s,r),yc.negate(l,o),e(u[0],t,i,m[0]/2),e(u[0],u[0],o,m[2]/2),e(u[1],t,i,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,a,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,a,m[0]/2),e(u[3],u[3],o,m[2]/2),e(n,t,r,m[1]),e(u[4],n,i,m[0]/2),e(u[4],u[4],o,m[2]/2),e(u[5],n,i,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],n,a,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],n,a,m[0]/2),e(u[7],u[7],o,m[2]/2);var x=this.attributes;if(this.enableNormal){h[0]=i,h[1]=a,h[2]=r,h[3]=s,h[4]=o,h[5]=l;for(var b=this._vertexOffset,w=0;w0&&(p++,h[3]<.99&&(f=!0))}})),a.geometry.setBarCount(p);var g=n.getLayout("orient"),m=this._barIndexOfData=new Int32Array(n.count());p=0,n.each((function(t){if(n.hasValue(t)){var e=n.getItemLayout(t),i=e[0],r=e[1],a=e[2],s=4*t;h[0]=c[s++],h[1]=c[s++],h[2]=c[s++],h[3]=c[s++],h[3]>0&&(o._barMesh.geometry.addBar(i,r,g,a,h,t),m[t]=p++)}else m[t]=-1})),a.geometry.dirty(),a.geometry.updateBoundingBox();var v=a.material;v.transparent=f,v.depthMask=!f,a.geometry.sortTriangles=f,this._initHandler(t,e)},_initHandler:function(t,e){var n=t.getData(),i=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=i.geometry.getDataIndexOfVertex(t.triangle[0]);a!==o&&(this._downplay(o),this._highlight(a),this._labelsBuilder.updateLabels([a]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",a),n.get("y",a),n.get("z",a,!0)]})),o=a,i.dataIndex=a}),this),i.on("mouseout",(function(t){this._downplay(o),this._labelsBuilder.updateLabels(),o=-1,i.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var r=e.getItemModel(t).getModel("emphasis.itemStyle"),o=r.get("color"),a=r.get("opacity");if(null==o){var s=Nu(e,t);o=i.color.lift(s,-.4)}null==a&&(a=ku(e,t));var l=Jo.parseColor(o);l[3]*=a,this._barMesh.geometry.setColor(n,l),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=Nu(e,t),r=ku(e,t),o=Jo.parseColor(i);o[3]*=r,this._barMesh.geometry.setColor(n,o),this._api.getZr().refresh()}}},highlight:function(t,e,n,i){this._toggleStatus("highlight",t,e,n,i)},downplay:function(t,e,n,i){this._toggleStatus("downplay",t,e,n,i)},_toggleStatus:function(t,e,n,r,o){var a=e.getData(),s=Ar(a,o),l=this;null!=s?i.util.each(oc.normalizeToArray(s),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):a.each((function(e){"highlight"===t?l._highlight(e):l._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Sc),t.registerSeriesModel(uc),rc(t),t.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))}));const Tc=i.SeriesModel.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return sc(this)},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}});function Mc(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||o=0){var m=3*l,v=new ye(this._points[m],this._points[m+1],this._points[m+2]);o.push({dataIndex:l,point:v,pointWorld:v.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(v)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Cc),t.registerSeriesModel(Tc),t.registerLayout((function(t,e){t.eachSeriesByType("line3D",(function(t){var e=t.getData(),n=t.coordinateSystem;if(n){if("cartesian3D"!==n.type)return;var i=new Float32Array(3*e.count()),r=[],o=[],a=n.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]}));n&&e.each(a,(function(t,e,a,s){r[0]=t,r[1]=e,r[2]=a,n.dataToPoint(r,o),i[3*s]=o[0],i[3*s+1]=o[1],i[3*s+2]=o[2]})),e.setLayout("points",i)}}))}))}));const Dc=i.SeriesModel.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function Ic(t,e,n){(e=e||document.createElement("canvas")).width=t,e.height=t;var i=e.getContext("2d");return n&&n(i),e}var Lc={getMarginByStyle:function(t){var e=t.minMargin||0,n=0;t.stroke&&"none"!==t.stroke&&(n=null==t.lineWidth?1:t.lineWidth);var i=t.shadowBlur||0,r=t.shadowOffsetX||0,o=t.shadowOffsetY||0,a={};return a.left=Math.max(n/2,-r+i,e),a.right=Math.max(n/2,r+i,e),a.top=Math.max(n/2,-o+i,e),a.bottom=Math.max(n/2,o+i,e),a},createSymbolSprite:function(t,e,n,r){var o=function(t,e,n,r){i.util.isArray(e)||(e=[e,e]);var o=Lc.getMarginByStyle(n,void 0),a=e[0]+o.left+o.right,s=e[1]+o.top+o.bottom,l=i.helper.createSymbol(t,0,0,e[0],e[1]),u=Math.max(a,s);l.x=o.left,l.y=o.top,a>s?l.y+=(u-s)/2:l.x+=(u-a)/2;var h=l.getBoundingRect();return l.x-=h.x,l.y-=h.y,l.setStyle(n),l.update(),l.__size=u,l}(t,e,n),a=Lc.getMarginByStyle(n);return{image:Ic(o.__size,r,(function(t){i.innerDrawElementOnCanvas(t,o)})),margin:a}},createSDFFromCanvas:function(t,e,n,i){return Ic(e,i,(function(e){var i=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,n){var i=e.width,r=e.height,o=t.canvas.width,a=t.canvas.height,s=i/o,l=r/a;function u(t){return t<128?1:-1}function h(t,o){var a=1/0;t=Math.floor(t*s);for(var h=(o=Math.floor(o*l))*i+t,c=u(e.data[4*h]),d=Math.max(o-n,0);d=2e4},doSortVertices:function(t,e){var n=this.indices,i=Oc.create();if(!n){n=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var r=0;r.05);else for(r=0;r<3;r++)this._progressiveQuickSort(3*e+r);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,n=this.indices;function i(t,n){return e[n]-e[t]}t?Array.prototype.sort.call(n,i):Du.sort(n,i,0,n.length-1)},_progressiveQuickSort:function(t){var e=this._zList,n=this.indices;this._quickSort=this._quickSort||new Du,this._quickSort.step(n,(function(t,n){return e[n]-e[t]}),t)}};var Nc=Pa.vec4;Jo.Shader.import("@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end");const kc=Jo.Mesh.extend((function(){var t=new Jo.Geometry({dynamic:!0,attributes:{color:new Jo.Geometry.Attribute("color","float",4,"COLOR"),position:new Jo.Geometry.Attribute("position","float",3,"POSITION"),size:new Jo.Geometry.Attribute("size","float",1),prevPosition:new Jo.Geometry.Attribute("prevPosition","float",3),prevSize:new Jo.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,Ec);var e=new Jo.Material({shader:Jo.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var n=new Jo.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",n),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:Jo.Mesh.POINTS,sizeScale:1}}),{_pick:function(t,e,n,i,r,o){var a=this._positionNDC;if(a)for(var s=n.viewport,l=2/s.width,u=2/s.height,h=this.geometry.vertexCount-1;h>=0;h--){var c,d=a[2*(c=this.geometry.indices?this.geometry.indices[h]:h)],p=a[2*c+1],f=this.geometry.attributes.size.get(c)/this.sizeScale/2;if(t>d-f*l&&tp-f*u&&e2?(f=this._updateSymbolSprite(t,d,h,c),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(r-i);var g=[];if(p){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var m=function(t){const e=t.getVisual("style");if(e)return e[t.getVisual("drawType")]}(a),v=function(t){return t.getVisual("style").opacity}(a);Jo.parseColor(m,g),g[3]*=v,s.set({color:g,u_Size:h.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(r-i),u.color.init(r-i),this._originalOpacity=new Float32Array(r-i);for(var y=a.getLayout("points"),_=u.position.value,x=0;x1?(a[0]=n.maxSize,a[1]=n.maxSize/n.aspect):(a[1]=n.maxSize,a[0]=n.maxSize*n.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===n.type&&(o=a,(r=this._symbolSize)&&o&&r[0]===o[0]&&r[1]===o[1])&&this._lineWidth===e.lineWidth||(Pc.createSymbolSprite(n.type,a,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),Pc.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=n.type,this._symbolSize=a,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/n.maxSize*i},_updateMaterial:function(t,e){var n="lighter"===t.get("blendMode")?Jo.additiveBlend:null,i=this._mesh.material;i.blend=n,i.set("lineWidth",e.lineWidth/20);var r=Jo.parseColor(e.stroke);i.set("strokeColor",r),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,n){var i=t.getData(),r=this._mesh.geometry,o=r.attributes.position.value,a=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(i,e,n),this._labelsBuilder.getLabelPosition=function(t,n,i){var r=3*(t-e);return[o[r],o[r+1],o[r+2]]},this._labelsBuilder.getLabelDistance=function(t,n,i){return r.attributes.size.get(t-e)/a/2+i},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,n){var i,r=t.getData(),o=this._mesh,a=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(i=t.coordinateSystem.model),o.seriesIndex=t.seriesIndex,o.off("mousemove"),o.off("mouseout"),o.on("mousemove",(function(e){var u=e.vertexIndex+a._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&n.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:i.componentIndex})),o.dataIndex=u,s=u}),this),o.on("mouseout",(function(t){var e=t.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,o.dataIndex=-1,l&&n.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:i.componentIndex})}),this)},updateLayout:function(t,e,n){var i=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,o=i.getLayout("points");if(this.is2D)for(var a=0;athis._endDataIndex||ethis._endDataIndex||e 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end");const od=Jo.Mesh.extend((function(){var t=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.trail2.vertex"),Jo.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new ka({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,n){var i=t.hostModel,r=this.geometry,o=i.getModel("effect"),a=o.get("trailWidth")*e.getDevicePixelRatio(),s=o.get("trailLength"),l=i.get("effect.constantSpeed"),u=1e3*i.get("effect.period"),h=null!=l;h?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[h?"define":"undefine"]("vertex","CONSTANT_SPEED");var c=i.get("polyline");r.trailLength=s,this.material.set("trailLength",s),r.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){r.attributes[t].value=n.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){r.attributes[t].init(r.vertexCount)})),r.indices=n.indices;var d=[],p=o.get("trailColor"),f=o.get("trailOpacity"),g=null!=p,m=null!=f;this.updateWorldTransform();var v=this.worldTransform.x.len(),y=this.worldTransform.y.len(),_=this.worldTransform.z.len(),x=0,b=0;t.each((function(e){var i=t.getItemLayout(e),o=m?f:ku(t,e),s=Nu(t,e);null==o&&(o=1),(d=Jo.parseColor(g?p:s,d))[3]*=o;for(var l=c?n.getPolylineVertexCount(i):n.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),w=0,S=[],T=[],M=x;Mx&&(w+=rd.dist(S,T)),r.attributes.dist.set(M,w),rd.copy(T,S);b=Math.max(b,w);var A=Math.random()*(h?w:u);for(M=x;M0?1:-1)*a/2),r.attributes.color.set(M,d);x+=l})),this.material.set("spotSize",.1*b*s),this.material.set("spotIntensity",o.get("spotIntensity")),r.dirty()},setAnimationTime:function(t){this.material.set("time",t)}});Jo.Shader.import(is);const ad=i.ChartView.extend({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this._meshLinesMaterial=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new Jo.Mesh({geometry:new ka,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new od},render:function(t,e,n){this.groupGL.add(this._linesMesh);var i=t.coordinateSystem,r=t.getData();if(i&&i.viewGL){i.viewGL.add(this.groupGL),this._updateLines(t,e,n);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var a=this._trailMesh;if(a.stopAnimation(),t.get("effect.show")){this.groupGL.add(a),a.updateData(r,n,this._linesMesh.geometry),a.__time=a.__time||0;var s=36e5;this._curveEffectsAnimator=a.animate("",{loop:!0}).when(s,{__time:s}).during((function(){a.setAnimationTime(a.__time)})).start()}else this.groupGL.remove(a),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?Jo.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,n){var i=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,a=t.get("polyline");o.expandLine=!0;var s=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=s/20;var l="lineStyle.width".split("."),u=n.getDevicePixelRatio(),h=0;i.each((function(t){var e=i.getItemModel(t).get(l);null==e&&(e=1),i.setItemVisual(t,"lineWidth",e),h=Math.max(e,h)})),o.useNativeLine=!1;var c=0,d=0;i.each((function(t){var e=i.getItemLayout(t);a?(c+=o.getPolylineVertexCount(e),d+=o.getPolylineTriangleCount(e)):(c+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),d+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(c),o.setTriangleCount(d),o.resetOffset();var p=[];i.each((function(t){var e=i.getItemLayout(t),n=Nu(i,t),r=ku(i,t),s=i.getItemVisual(t,"lineWidth")*u;null==r&&(r=1),(p=Jo.parseColor(n,p))[3]*=r,a?o.addPolyline(e,p,s):o.addCubicCurve(e[0],e[1],e[2],e[3],p,s)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function sd(t,e){for(var n=[],i=0;i0;this._updateSurfaceMesh(this._surfaceMesh,t,h,p);var f=this._surfaceMesh.material;p?(f.define("WIREFRAME_QUAD"),f.set("wireframeLineWidth",d),f.set("wireframeLineColor",Jo.parseColor(c.get("lineStyle.color")))):f.undefine("WIREFRAME_QUAD"),this._initHandler(t,n),this._updateAnimation(t)},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new Jo.Mesh({geometry:new Jo.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.sm.depth.vertex"),Jo.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,Eu),t},_initHandler:function(t,e){var n=t.getData(),i=this._surfaceMesh,r=t.coordinateSystem;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=function(t,e){for(var n=1/0,r=-1,o=[],a=0;a=0){var s=[];i.geometry.attributes.position.get(a,s);for(var l=r.pointToData(s),u=1/0,h=-1,c=[],d=0;d65535?Uint32Array:Uint16Array)((f-1)*(g-1)*6),w=function(t,e,n){n[1]=t*g+e,n[0]=t*g+e+1,n[3]=(t+1)*g+e+1,n[2]=(t+1)*g+e},S=!1;if(l){var T=[],M=[],A=0;m?h.init(r.vertexCount):h.value=null;for(var C=[[],[],[]],D=[],I=[],L=pd.create(),P=function(t,e,n){var i=3*e;return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n},O=new Float32Array(a.length),E=new Float32Array(a.length/3*4),N=0;N0;){if(Math.floor(s/h)===s/h)return[h,s/h];h--}return[h=Math.floor(Math.sqrt(s)),h]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function gd(t,e){for(var n=[],i=0;i=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof Ad||(e=this._nodesMap[Td(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}yo(Ad,Dd("hostGraph","data")),yo(Cd,Dd("hostGraph","edgeData"));const Id=Md;var Ld=va();function Pd(t,e){if(Ld(this).mainData===this){var n=vo({},Ld(this).datas);n[this.dataType]=e,Rd(e,n,t)}else zd(e,this.dataType,Ld(this).mainData,t);return e}function Od(t,e){return t.struct&&t.struct.update(),e}function Ed(t,e){return xo(Ld(e).datas,(function(n,i){n!==e&&zd(n.cloneShallow(),i,e,t)})),e}function Nd(t){var e=Ld(this).mainData;return null==t||null==e?e:Ld(e).datas[t]}function kd(){var t=Ld(this).mainData;return null==t?[{data:t}]:bo(wo(Ld(t).datas),(function(e){return{type:e,data:Ld(t).datas[e]}}))}function Rd(t,e,n){Ld(t).datas={},xo(e,(function(e,i){zd(e,i,t,n)}))}function zd(t,e,n,i){Ld(n).datas[e]=t,Ld(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Nd,t.getLinkedDataAll=kd}var Bd=i.SeriesModel.extend({type:"series.graphGL",visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,init:function(t){Bd.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){Bd.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},getInitialData:function(t,e){var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&n)return function(t,e,n,r,o){for(var a=new Id(!0),s=0;s "+f)),c++)}var g=i.helper.createDimensions(t,{coordDimensions:["value"]});(l=new i.List(g,n)).initData(t);var m,v,y,_=new i.List(["value"],n);return _.initData(h,u),o&&o(l,_),v=(m={mainData:l,struct:a,structAttr:"graph",datas:{node:l,edge:_},datasAttr:{node:"data",edge:"edgeData"}}).mainData,(y=m.datas)||(y={main:v},m.datasAttr={main:"data"}),m.datas=m.mainData=null,Rd(v,y,m),xo(y,(function(t){xo(v.TRANSFERABLE_METHODS,(function(e){t.wrapMethod(e,So(Pd,m))}))})),v.wrapMethod("cloneShallow",So(Ed,m)),xo(v.CHANGABLE_METHODS,(function(t){v.wrapMethod(t,So(Od,m))})),function(t,e){if(!t)throw new Error(void 0)}(y[v.dataType]===v),a.update(),a}(r,n,this,0,(function(t,n){t.wrapMethod("getItemModel",(function(t){const e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));const i=e.getModel([]).getModel;function r(t,e){const n=i.call(this,t,e);return n.resolveParentPath=a,n}function a(t){if(t&&("label"===t[0]||"label"===t[1])){const e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=a,t.getModel=r,t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(t,n),a=r.graph.getEdgeByIndex(t),s=r.getName(a.node1.dataIndex),l=r.getName(a.node2.dataIndex),u=[];return null!=s&&u.push(s),null!=l&&u.push(l),u=i.format.encodeHTML(u.join(" > ")),o.value&&(u+=" : "+i.format.encodeHTML(o.value)),u}return Bd.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:Object.assign({value:0},t)})),e=new i.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Fd.dist(t,e)+Fd.dist(n,e)+Fd.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Vd)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Vd)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=e[0],u=e[1],h=n[0],c=n[1],d=i[0],p=i[1],f=this._getCubicCurveApproxStep(t,e,n,i),g=f*f,m=g*f,v=3*f,y=3*g,_=6*g,x=6*m,b=a-2*l+h,w=s-2*u+c,S=3*(l-h)-a+d,T=3*(u-c)-s+p,M=a,A=s,C=(l-a)*v+b*y+S*m,D=(u-s)*v+w*y+T*m,I=b*_+S*x,L=w*_+T*x,P=S*x,O=T*x,E=0,N=0,k=Math.ceil(1/f),R=new Float32Array(3*(k+1)),z=(R=[],0);for(N=0;N1&&(M=C>0?Math.min(M,d):Math.max(M,d),A=D>0?Math.min(A,p):Math.max(A,p));this.addPolyline(R,r,o)},addLine:function(t,e,n,i){this.addPolyline([t,e],n,i)},addPolyline:function(){var t=Fd.create(),e=Fd.create(),n=Fd.create(),i=Fd.create(),r=[],o=[],a=[];return function(s,l,u,h,c){if(s.length){var d="number"!=typeof s[0];if(null==c&&(c=d?s.length:s.length/2),!(c<2)){null==h&&(h=0),null==u&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,f=d?"number"!=typeof l[0]:l.length/4===c,g=this.attributes.position,m=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,_=this.indices,x=this._vertexOffset,b=0;b1&&(g.copy(x,x-1),m.copy(x,x-1),x++);else{var T;if(b0){Fd.sub(t,r,a),Fd.sub(e,o,r),Fd.normalize(t,t),Fd.normalize(e,e),Fd.add(i,t,e),Fd.normalize(i,i);var M=u/2*Math.min(1/Fd.dot(t,i),2);n[0]=-i[1],n[1]=i[0],T=M}else Fd.sub(t,o,r),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;else Fd.sub(t,r,a),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;y.set(x,n),y.set(x+1,n),v.set(x,T),v.set(x+1,-T),Fd.copy(a,r),g.set(x,r),g.set(x+1,r),m.set(x,p),m.set(x+1,p),x+=2}if(this.useNativeLine)m.set(x,p),g.set(x,r),x++;else if(b>0){var A=3*this._faceOffset;(_=this.indices)[A]=x-4,_[A+1]=x-3,_[A+2]=x-2,_[A+3]=x-3,_[A+4]=x-1,_[A+5]=x-2,this._faceOffset+=2}}this._vertexOffset=x}}}}(),setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=t 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end");var Ud={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function Wd(t){var e={type:Jo.Texture.FLOAT,minFilter:Jo.Texture.NEAREST,magFilter:Jo.Texture.NEAREST};this._positionSourceTex=new Jo.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new Jo.Texture2D(e),this._positionPrevTex=new Jo.Texture2D(e),this._forceTex=new Jo.Texture2D(e),this._forcePrevTex=new Jo.Texture2D(e),this._weightedSumTex=new Jo.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new Jo.Texture2D(e),this._globalSpeedPrevTex=new Jo.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new fr({fragment:Jo.Shader.source("clay.compositor.output")});var n=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node1:new Jo.Geometry.Attribute("node1","float",2),node2:new Jo.Geometry.Attribute("node2","float",2),weight:new Jo.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._weightedSumMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._framebuffer=new Zi({depthBuffer:!1}),this._dummyCamera=new Jo.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}Wd.prototype.updateOption=function(t){for(var e in Ud)this[e]=Ud[e];var n=this._nodes.length;if(this.jitterTolerence=n>5e4?10:n>5e3?1:.1,this.scaling=n>100?2:10,t)for(var e in Ud)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,r=0;rt},Wd.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},Wd.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},Wd.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(n){this[n].width=t,this[n].height=e,this[n].dirty()}),this)},Wd.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};const jd=Wd;var Xd=function(){var t=function(){return new Float32Array(2)},e=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},n=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},r=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a=function(t,e,n){return t[0]=e,t[1]=n,t};function s(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var l=s.prototype;function u(){this.position=new Float32Array(2),this.force=t(),this.forcePrev=t(),this.mass=1,this.inDegree=0,this.outDegree=0}function h(t,e){this.source=t,this.target=e,this.weight=1}function c(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new s,this.rootRegion.centerOfMass=t(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}l.beforeUpdate=function(){for(var t=0;t=t&&this.bbox[1]<=e&&this.bbox[3]>=e},l.setBBox=function(t,e,n,i){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=n,this.bbox[3]=i,this.size=(n-t+i-e)/2},l._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new s,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},l._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),n=this.bbox;if(!e){var i=(n[0]+n[2])/2,r=(n[1]+n[3])/2,o=(n[2]-n[0])/2,a=(n[3]-n[1])/2,s=t.position[0]>=i?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*o+n[0],l*a+n[1],(s+1)*o+n[0],(l+1)*a+n[1])}e.addNode(t)},l._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,n=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,n+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=n/this.mass};var d=c.prototype;d.initNodes=function(t,e,n){var i=e.length;this.nodes.length=0;for(var r=void 0!==n,o=0;o0&&(this.strongGravityMode?this.applyNodeStrongGravity(c):this.applyNodeGravity(c))}for(u=0;u0&&(v=Math.min(v/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=v,u=0;u0&&(_=Math.min(x*_,10)/x,i(h.position,h.position,h.force,_))}},d.applyRegionToNodeRepulsion=function(){var e=t();return function(t,n){if(t.node)this.applyNodeToNodeRepulsion(t.node,n,!0);else{o(e,n.position,t.centerOfMass);var r=e[0]*e[0]+e[1]*e[1];if(r>this.barnesHutTheta*t.size*t.size){var a=this.scaling*n.mass*t.mass/r;i(n.force,n.force,e,a)}else for(var s=0;s0)s=this.scaling*t.mass*n.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*n.mass}}else s=this.scaling*t.mass*n.mass/a;i(t.force,t.force,e,s),i(n.force,n.force,e,-s)}}}}(),d.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,a=t.target;o(e,r.position,a.position);var s,l,u=n(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-a.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,i(r.force,r.force,e,l),i(a.force,a.force,e,-l))}}(),d.applyNodeGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position);var r=n(e);i(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),d.applyNodeStrongGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position),i(t.force,t.force,e,this.gravity*t.mass)}}(),d.updateBBox=function(){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,r=0;r5e4?10:o>5e3?1:.1,e.scaling=o>100?2:10,e.barnesHutOptimize=o>1e3,t)for(var n in Yd)null!=t[n]&&(e[n]=t[n]);if(!e.gravityCenter){for(var a=[1/0,1/0],s=[-1/0,-1/0],l=0;lt},qd.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var n=0;n0?1.1:.9,o=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=o/this._zoom;var a=this._convertPos(n,i),s=(a.x-this._dx)*(r-1),l=(a.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=o,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}});var Qd=Pa.vec2;Jo.Shader.import("@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end");var $d=1;const tp=i.ChartView.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this.viewGL=new Nl("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new zc(!0,e),this._forceEdgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2),color:new Jo.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:Jo.Mesh.LINES}),this._edgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Hd({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new Jd({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,n){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=n,this._initLayout(t,e,n),this._pointsBuilder.update(t,e,n),this._forceLayoutInstance instanceof jd||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,n),this._control.off("update"),this._control.on("update",(function(){n.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(Mr(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),n.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?n.getZr().on("click",this._clickHandler):"mouseover"===r&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var n=this._forceEdgesMesh.geometry,i=e.getEdgeData(),r=0,o=this._forceLayoutInstance,a=2*i.count();n.attributes.node.init(a),n.attributes.color.init(a),i.each((function(e){var a=t[e];n.attributes.node.set(r,o.getNodeUV(a.node1)),n.attributes.node.set(r+1,o.getNodeUV(a.node2));var s=Nu(i,a.dataIndex),l=Jo.parseColor(s);l[3]*=Mr(ku(i,a.dataIndex),1),n.attributes.color.set(r,l),n.attributes.color.set(r+1,l),r+=2})),n.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,n=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var i=[],r=[],o=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(a){var s=t.graph.getEdgeByIndex(a),l=2*s.node1.dataIndex,u=2*s.node2.dataIndex;i[0]=n[l],i[1]=n[l+1],r[0]=n[u],r[1]=n[u+1];var h=Nu(t,s.dataIndex),c=Jo.parseColor(h);c[3]*=Mr(ku(t,s.dataIndex),1);var d=t.getItemModel(s.dataIndex),p=Mr(d.get(o),1)*this._api.getDevicePixelRatio();e.addLine(i,r,c,p);for(var f=0;f<4;f++)this._originalEdgeColors[4*s.dataIndex+f]=c[f];this._edgeIndicesMap[s.dataIndex]=a}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),n=[],i=0;i=p&&(l._syncNodePosition(t),d=0),n.getZr().refresh(),Qo((function(){f(e)}))}))};Qo((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),f(u)})),this._layouting=!0}}},stopLayout:function(t,e,n,i){i&&null!=i.from&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,n)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,n){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,n),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData();this._downplayAll();var o=i.dataIndex,a=r.graph,s=[],l=a.getNodeByIndex(o);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,n,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),n=Jo.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=Mr(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);n[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],n)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(ep=[],function(t,e){this._getColor(t,ep),ep[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],ep)}),_getColor:function(t,e){for(var n=0;n<4;n++)e[n]=this._originalEdgeColors[4*t+n];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var n=this.viewGL.camera,i=t.getData().getLayout("points"),r=Qd.create(1/0,1/0),o=Qd.create(-1/0,-1/0),a=[],s=0;sn.left&&un.top)){var h=Math.max(o[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,n.left=r[0],n.top=l-c/2,n.bottom=l+c/2,n.right=h+r[0],n.near=0,n.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});var ep;function np(t){return t instanceof Array||(t=[t,t]),t}(0,i.use)((function(t){function e(){}t.registerChartView(tp),t.registerSeriesModel(Zd),t.registerVisual((function(t){const e={};t.eachSeriesByType("graphGL",(function(t){var n=t.getCategoriesData(),r=t.getData(),o={};n.each((function(i){var r=n.getName(i);o["ec-"+r]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),n.setItemVisual(i,"style",s);var l=["symbol","symbolSize","symbolKeepAspect"];for(let t=0;t65535?new Uint32Array(3*i):new Uint16Array(3*i))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});jt.import("@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n");var op=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Ln({type:Sn.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};op.prototype={constructor:op,init:function(){var t={type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1};this._spawnTexture=new Ln(t),this._particleTexture0=new Ln(t),this._particleTexture1=new Ln(t),this._frameBuffer=new Zi({depthBuffer:!1}),this._particlePass=new fr({fragment:jt.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new fr({fragment:jt.source("clay.compositor.downsample")});var e=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderPoints.vertex"),jt.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:Mn.POINTS,geometry:new Hn({dynamic:!0,mainAttribute:"texcoord0"})}),n=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderLines.vertex"),jt.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new rp,culling:!1}),i=new Mn({material:new lt({shader:new jt(jt.source("ecgl.color.vertex"),jt.source("ecgl.color.fragment"))}),geometry:new Gi});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=n,this._lastFrameFullQuadMesh=i,this._camera=new hr,this._thisFrameTexture=new Ln,this._lastFrameTexture=new Ln},setParticleDensity:function(t,e){for(var n=new Float32Array(t*e*4),i=0,r=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new Ln),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");return n.fillStyle="#fff",n.arc(t/2,t/2,t/2,0,2*Math.PI),n.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var n=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,o=this._width*this._supersampling,a=this._height*this._supersampling,s=0;s=359&&(r[0]>0&&(r[0]=0),o[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=Jo.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=Jo.Mesh.LINES),n=n||0,i=i||r.count(),s.resetOffset();var h=0,c=0,d=[],p=[],f=[],g=[],m=[],v=.3,y=.7;function _(){p[0]=d[0]*y+g[0]*v-(d[1]-g[1])*o,p[1]=d[1]*y+g[1]*v-(g[0]-d[0])*o,f[0]=d[0]*v+g[0]*y-(d[1]-g[1])*o,f[1]=d[1]*v+g[1]*y-(g[0]-d[0])*o}if(a||0!==o)for(var x=n;x{t.exports=i}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(468)})())},125:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Axis:()=>r.RD,ChartView:()=>r.TA,ComponentModel:()=>r.tF,ComponentView:()=>r.Ir,List:()=>r.aV,Model:()=>r.Hn,PRIORITY:()=>r.Hr,SeriesModel:()=>r.wJ,color:()=>r.$_,connect:()=>r.$j,dataTool:()=>r.Ok,dependencies:()=>r.HO,disConnect:()=>r.eU,disconnect:()=>r.zP,dispose:()=>r.B9,env:()=>r.OB,extendChartView:()=>r.Zy,extendComponentModel:()=>r.tv,extendComponentView:()=>r.Sp,extendSeriesModel:()=>r.Zr,format:()=>r.WU,getCoordinateSystemDimensions:()=>r.wL,getInstanceByDom:()=>r.JE,getInstanceById:()=>r.rp,getMap:()=>r.FU,graphic:()=>r.Q,helper:()=>r._y,init:()=>r.S1,innerDrawElementOnCanvas:()=>r.z$,matrix:()=>r.pI,number:()=>r.Rx,parseGeoJSON:()=>r.Nu,parseGeoJson:()=>r.pQ,registerAction:()=>r.zl,registerCoordinateSystem:()=>r.RS,registerLayout:()=>r.qR,registerLoading:()=>r.yn,registerLocale:()=>r.I2,registerMap:()=>r.je,registerPostInit:()=>r.sq,registerPostUpdate:()=>r.Br,registerPreprocessor:()=>r.ds,registerProcessor:()=>r.Pu,registerTheme:()=>r.aW,registerTransform:()=>r.rV,registerUpdateLifecycle:()=>r.YK,registerVisual:()=>r.Og,setCanvasCreator:()=>r.jQ,setPlatformAPI:()=>r.g2,throttle:()=>r.P2,time:()=>r.XV,use:()=>r.D$,util:()=>r.D5,vector:()=>r.xr,version:()=>r.i8,zrUtil:()=>r.gf,zrender:()=>r.x_});var i=n(8023),r=n(9060),o=n(6076);var a=n(12),s=n(655),l=n(8455),u=n(3321),h=n(1525),c=n(8154);const d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new c.Z,n=(0,h.th)("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=(0,h.th)(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(u.Z);var p=n(3051),f=n(8162),g=n(6351),m=n(9936);function v(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:(0,p.isNumber)(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=(0,p.map)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,m.M)(e,c[0])&&(d=!0,c[0]=f),(0,m.M)(e,c[1])&&(d=!0,c[1]=f),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function y(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var _=n(887);var x=n(4438),b=n(9266),w=n(6498),S=n(2234),T=n(327),M=n(4014),A=n(8554),C=Math.min,D=Math.max;function I(t,e){return isNaN(t)||isNaN(e)}function L(t,e,n,i,r,o,a,s,l){for(var u,h,c,d,p,f,g=n,m=0;m=r||g<0)break;if(I(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),c=v,d=y;else{var _=v-u,x=y-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===y&&m=i||I(w,S))p=v,f=y;else{A=w-u,L=S-h;var E=v-u,N=w-v,k=y-h,R=S-y,z=void 0,B=void 0;if("x"===s){var Z=A>0?1:-1;p=v-Z*(z=Math.abs(E))*a,f=y,P=v+Z*(B=Math.abs(N))*a,O=y}else if("y"===s){var F=L>0?1:-1;p=v,f=y-F*(z=Math.abs(k))*a,P=v,O=y+F*(B=Math.abs(R))*a}else z=Math.sqrt(E*E+k*k),p=v-A*a*(1-(M=(B=Math.sqrt(N*N+R*R))/(B+z))),f=y-L*a*(1-M),O=y+L*a*M,P=C(P=v+A*a*M,D(w,v)),O=C(O,D(S,y)),P=D(P,C(w,v)),f=y-(L=(O=D(O,C(S,y)))-y)*z/B,p=C(p=v-(A=P-v)*z/B,D(u,v)),f=C(f,D(h,y)),P=v+(A=v-(p=D(p,C(u,v))))*B/z,O=y+(L=y-(f=D(f,C(h,y))))*B/z}t.bezierCurveTo(c,d,p,f,v,y),c=P,d=O}else t.lineTo(v,y)}u=v,h=y,g+=o}return m}var P=function(){this.smooth=0,this.smoothConstraint=!0},O=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new P},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&I(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(h-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++];var v=a?(0,A.kD)(n,u,c,p,t,s):(0,A.kD)(i,h,d,f,t,s);if(v>0)for(var y=0;y=0){m=a?(0,A.af)(i,h,d,f,_):(0,A.af)(n,u,c,p,_);return a?[t,m]:[m,t]}}n=p,i=f}}},e}(T.ZP),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e}(P),N=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new E},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&I(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=p.map(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord,r=(n-i)/(e.coord-i);return{coord:n,color:(0,H.lerp)(r,[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),f=d.length;if(!f&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";p.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:c[0]||"transparent"});var y=new x.Z(0,0,0,0,d,!0);return y[r]=g,y[r+"2"]=m,y}}}function K(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return p.each(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function J(t,e){return[t[2*e],t[2*e+1]]}function Q(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1);(0,V.A)(f).seriesIndex=t.seriesIndex,(0,B.k5)(f,R,z,Z);var F=X(t.get("smooth")),H=t.get("smoothMonotone");if(f.setShape({smooth:F,smoothMonotone:H,connectNulls:C}),g){var W=a.getCalculationInfo("stackedOnSeries"),j=0;g.useStyle(p.defaults(l.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),W&&(j=X(W.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:H,connectNulls:C}),(0,B.WO)(g,t,"areaStyle"),(0,V.A)(g).seriesIndex=t.seriesIndex,(0,B.k5)(g,R,z,Z)}var J=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=J)})),this._polyline.onHoverStateChange=J,this._data=a,this._coordSys=r,this._stackedOnPoints=M,this._points=u,this._step=P,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,f),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,e){(0,V.A)(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new g.Z(r,o)).x=l,s.y=u,s.setZ(h,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else k.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else k.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,B.Gl)(this._polyline,t),e&&(0,B.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new O({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new N({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");p.isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=p.isFunction(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],d=void 0,f=void 0,g=void 0;if(n)if(r){var m=n,v=e.pointToCoord(c);i?(d=m.startAngle,f=m.endAngle,g=-v[1]/180*Math.PI):(d=m.r0,f=m.r,g=v[0])}else{var y=n;i?(d=y.x,f=y.x+y.width,g=t.x):(d=y.y+y.height,f=y.y,g=t.y)}var _=f===d?0:(g-d)/(f-d);a&&(_=1-_);var x=p.isFunction(u)?u(o):l*_+h,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Q(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new w.ZP({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&((0,Z.ni)(o,(0,Z.k3)(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?(0,F.O)(r,n):(0,F.H)(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),T=w.range,M=T[1]-T[0],A=void 0;if(M>=1){if(M>1&&!c){var C=J(u,T[0]);s.attr({x:C[0]+_,y:C[1]+x}),r&&(A=h.getRawValue(T[0]))}else{(C=l.getPointOn(y,b))&&s.attr({x:C[0]+_,y:C[1]+x});var D=h.getRawValue(T[0]),I=h.getRawValue(T[1]);r&&(A=S.pk(n,d,D,I,w.t))}i.lastFrameIndex=T[0]}else{var L=1===t||i.lastFrameIndex>0?T[0]:0;C=J(u,L);r&&(A=h.getRawValue(L)),s.attr({x:C[0]+_,y:C[1]+x})}r&&(0,Z.qA)(s).setLabelText(A)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],d=[],p=[],f=[],g=[],m=v(r,e,a),x=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w3e3||l&&j(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:p}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),b.D(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),b.D(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],x=h.status,w=0;we&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;(0,p.isString)(r)?f=it[r]:(0,p.isFunction)(r)&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,rt))}}}}}var at=n(9093),st=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(u.Z);u.Z.registerClass(st);const lt=st;var ut=n(2151);const ht=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(){return(0,l.Z)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(lt);var ct=n(1177),dt=n(5151),pt=n(7214),ft=n(270),gt=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},mt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new gt},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,d=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,b.XD)(e,t,(0,V.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(k.Z),Tt={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=bt(e.x,t.x),s=wt(e.x+e.width,r),l=bt(e.y,t.y),u=wt(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=wt(e.r,t.r),o=bt(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Mt={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new dt.Z({shape:(0,p.extend)({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?vt:pt.C,h=new u({shape:i,z2:1});h.name="item";var c,d,p=Ot(r);if(h.calculateTextPosition=(c=p,d=({isRoundCap:u===vt}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return(0,yt.wI)(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,p=(u+h)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(u-h)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(r){case"startArc":x=s+(h-o)*y(m),b=l+(h-o)*_(m),w="center",S="top";break;case"insideStartArc":x=s+(h+o)*y(m),b=l+(h+o)*_(m),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+_t(f,o+v,!1),b=l+p*_(f)+xt(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+_t(f,-o+v,!1),b=l+p*_(f)+xt(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*y(m),b=l+p*_(m),w="center",S="middle";break;case"endArc":x=s+(u+o)*y(m),b=l+(u+o)*_(m),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*y(m),b=l+(u-o)*_(m),w="center",S="top";break;case"endAngle":x=s+p*y(g)+_t(g,o+v,!0),b=l+p*_(g)+xt(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(g)+_t(g,-o+v,!0),b=l+p*_(g)+xt(g,-o+v,!0),w="right",S="middle";break;default:return(0,yt.wI)(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?0:i.startAngle,g[f]=i[f],(s?b.D:b.KZ)(h,{shape:g},o)}return h}};function At(t,e,n,i,r,o,a,s){var l,u;o?(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||(a?b.D:b.KZ)(n,{shape:l},e,r,null);var h=e?t.baseAxis.model:null;(a?b.D:b.KZ)(n,{shape:u},h,r)}function Ct(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Ot(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Et(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=(0,Z.k3)(i);(0,Z.ni)(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:(0,F.H)(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=t.getTextContent();if(s&&d){var f=i.get(["label","position"]);t.textConfig.inside="middle"===f||null,function(t,e,n,i){if((0,p.isNumber)(i))t.setTextConfig({rotation:i});else if((0,p.isArray)(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===f?h:f,Ot(a),i.get(["label","rotate"]))}(0,Z.pe)(d,c,o.getRawValue(n),(function(t){return(0,F.O)(e,t)}));var g=i.getModel(["emphasis"]);(0,B.k5)(t,g.get("focus"),g.get("blurScope"),g.get("disabled")),(0,B.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",(0,p.each)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Nt=function(){},kt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);(0,V.A)(this).dataIndex=e>=0?e:null}),30,!1);function Bt(t,e,n){if(z(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}const Zt=St;var Ft=n(1891),Vt=n(5669),Gt=n(6172),Ht=2*Math.PI,Ut=Math.PI/180;function Wt(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jt(t,e){var n=Wt(t,e),i=t.get("center"),r=t.get("radius");p.isArray(r)||(r=[0,r]),p.isArray(i)||(i=[i,i]);var o=(0,Vt.GM)(n.width,e.getWidth()),a=(0,Vt.GM)(n.height,e.getHeight()),s=Math.min(o,a);return{cx:(0,Vt.GM)(i[0],o)+n.x,cy:(0,Vt.GM)(i[1],a)+n.y,r0:(0,Vt.GM)(r[0],s/2),r:(0,Vt.GM)(r[1],s/2)}}function Xt(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=Wt(t,n),o=jt(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*Ut,c=t.get("minAngle")*Ut,d=0;e.each(i,(function(t){!isNaN(t)&&d++}));var p=e.getSum(i),f=Math.PI/(p||d)*2,g=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),y=e.getDataExtent(i);y[0]=0;var _=Ht,x=0,b=h,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===p&&v?f:t*f:Ht/d)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-c)/2}}}function ne(t){return"center"===t.position}function ie(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*$t,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,d=s.height;function f(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),y=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),x=v.get("alignTo"),b=(0,Vt.GM)(v.get("edgeDistance"),u),w=v.get("bleedMargin"),S=m.getModel("labelLine"),T=S.get("length");T=(0,Vt.GM)(T,u);var M=S.get("length2");if(M=(0,Vt.GM)(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":P>0?"left":"right"}var Z=Math.PI,F=0,V=v.get("rotate");if((0,p.isNumber)(V))F=V*(Z/180);else if("center"===y)F=0;else if("radial"===V||!0===V){F=P<0?-L+Z:-L}else if("tangential"===V&&"outside"!==y&&"outer"!==y){var G=Math.atan2(P,O);G<0&&(G=2*Z+G),O>0&&(G=Z+G),F=G-Z}if(o=!!F,d.x=A,d.y=C,d.rotation=F,d.setStyle({verticalAlign:"middle"}),E){d.setStyle({align:I});var H=d.states.select;H&&(H.x+=d.x,H.y+=d.y)}else{var U=d.getBoundingRect().clone();U.applyTransform(d.getComputedTransform());var W=(d.style.margin||0)+2.1;U.y-=W/2,U.height+=W,r.push({label:d,labelLine:g,position:y,len:T,len2:M,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Kt.Z(P,O),linePoints:D,textAlign:I,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:E})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(k.Z);var se=n(5623),le=n(5101);function ue(t,e,n){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=(0,se.Z)(i,e).dimensions,o=new le.Z(r,t);return o.initData(i,n),o}var he=n(1772),ce=n(2019);const de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=(0,Vt.eJ)(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){S.Cc(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(u.Z);const pe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(u.Z);var fe=n(479),ge=function(){},me=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ge},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const ye=ve;const _e=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=(0,nt.Z)("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ye:new f.Z,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(k.Z);var xe=n(3166),be=n(8071);const we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(be.Z);var Se=n(6650),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",S.C6).models[0]},e.type="cartesian2dAxis",e}(be.Z);p.mixin(Te,Se.W);var Me={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Ae=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Me),Ce=p.merge({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}}},Me);const De={category:Ae,value:Ce,time:p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ce),log:p.defaults({logBase:10},Ce)};var Ie=n(1401),Le={value:1,category:1,time:1,log:1};function Pe(t,e,n,i){(0,p.each)(Le,(function(r,o){var a=(0,p.merge)((0,p.merge)({},De[o],!0),i,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return(0,s.ZT)(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,Gt.YD)(this),i=n?(0,Gt.tE)(t):{},r=e.getTheme();(0,p.merge)(t,r.get(o+"Axis")),(0,p.merge)(t,this.getDefaultOption()),t.type=Oe(t),n&&(0,Gt.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Ie.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",Oe)}function Oe(t){return t.type||(t.data?"category":"value")}var Ee=n(7947);const Ne=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return p.map(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),p.filter(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var ke=n(2892),Re=n(5280),ze=["x","y"];function Be(t){return"interval"===t.type||"time"===t.type}const Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ze,e}return(0,s.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(Be(t)&&Be(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,d=this._transform=[l,0,0,u,h,c];this._invTransform=(0,ke.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,Re.applyTransform)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return(0,Re.applyTransform)(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new fe.Z(n,i,r,o)},e}(Ne);var Fe=n(2950),Ve=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Fe.Z);const Ge=Ve;var He=n(9069),Ue=n(5021),We=n(103),je=Math.log;function Xe(t,e,n){var i=We.Z.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=(0,Ee.Xv)(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var d=je(t.base);u=[je(u[0])/d,je(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],m=u[1];if(h&&c)f=(m-g)/a;else if(h)for(m=u[0]+f*a;mu[0]&&isFinite(g)&&isFinite(u[0]);)f=(0,Ue.r1)(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=(0,Ue.r1)(f));var v=f*a;m=Math.ceil(u[1]/f)*f,(g=(0,Vt.NM)(m-v))<0&&u[0]>=0?(g=0,m=(0,Vt.NM)(v)):m>0&&u[1]<=0&&(m=0,g=-(0,Vt.NM)(v))}var y=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,m+f*_),i.setInterval.call(t,f),(y||_)&&i.setNiceExtent.call(t,g+f,m-f)}var Ye=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ze,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=(0,p.keys)(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;(0,Ue.lM)(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):((0,Ee.Jk)(l,s),(0,Ue.lM)(l)&&(e=a))}r.length&&(e||(e=r.pop(),(0,Ee.Jk)(e.scale,e.model)),(0,p.each)(r,(function(t){Xe(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};(0,p.each)(n.x,(function(t){Ke(n,"y",t,r)})),(0,p.each)(n.y,(function(t){Ke(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=(0,Gt.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){(0,p.each)(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&((0,p.each)(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,Ee.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);o[n]-=e[n]+i,"top"===t.position?o.y+=e.height+i:"left"===t.position&&(o.x+=e.width+i)}}})),s()),(0,p.each)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,p.isObject)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=p.defaults({color:c.color},a));var f=p.merge(p.clone(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:h},!1);if(p.isString(l)){var g=f.name;f.name=l.replace("{value}",null!=g?g:"")}else p.isFunction(l)&&(f.name=l(f.name,f));var m=new An.Z(f,null,this.ecModel);return p.mixin(m,Se.W.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},Cn.axisLine),axisLabel:Dn(Cn.axisLabel,!1),axisTick:Dn(Cn.axisTick,!1),splitLine:Dn(Cn.splitLine,!0),splitArea:Dn(Cn.splitArea,!0),indicator:[]},e}(be.Z);const Ln=In;var Pn=n(9538),On=n(5795),En=["axisLine","axisTickLabel","axisName"],Nn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=p.map(n,(function(t){var n=t.model.get("showName")?t.name:"";return new tn.Z(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));p.each(i,(function(t){p.each(En,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),d=p.isArray(h)?h:[h],f=p.isArray(c)?c:[c],g=[],m=[];if("circle"===i)for(var v=n[0].getTicksCoords(),y=e.cx,_=e.cy,x=0;x=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=gi(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new c.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new dt.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=Fn[s];if(u&&(0,p.hasOwn)(Fn,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=ei[s];if(d&&(0,p.hasOwn)(ei,s)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(a&&a.isGroup)for(var m=t.firstChild;m;)1===m.nodeType?this._parseNode(m,a,n,l,r,o):3===m.nodeType&&o&&this._parseText(m,a),m=m.nextSibling},t.prototype._parseText=function(t,e){var n=new Yn.Z({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ri(e,n),ai(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Fn={g:function(t,e){var n=new c.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new dt.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},circle:function(t,e){var n=new Pn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new $e.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},ellipse:function(t,e){var n=new Wn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new _n.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new qt.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new xn.ZP;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,jn.iR)(n);return ri(e,i),ai(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),ei={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new x.Z(e,n,i,r);return ni(t,o),ii(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new Xn.Z(e,n,i);return ni(t,r),ii(t,r),r}};function ni(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function ii(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};fi(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function ri(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,t.__inheritedStyle))}function oi(t){for(var e=hi(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=hi(a);switch(r=r||ke.create(),s){case"translate":ke.translate(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ke.scale(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ke.rotate(r,r,-parseFloat(l[0])*di);break;case"skewX":var u=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,0,u,1,0,0],r);break;case"skewY":var h=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,h,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),fi(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=p.createHashMap(),n=p.createHashMap(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,Z.ni)(e,(0,Z.k3)(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(Fi(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ji(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):(0,V.A)(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function Xi(t,e,n,i,r){t.data||ct.setTooltipConfig({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function Yi(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return(0,B.k5)(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&(0,B.th)(e,r,n),a}function qi(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),p.each(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(u.Z);const tr=$i;function er(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),p.each(e,(function(t,e){for(var n,i,r,o=(n=p.map(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},p.each(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Gt.ME(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var hr=function(){function t(){this.dimensions=or}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new lr(o+r,o,p.extend({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=ur,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),p.each(r,(function(t,r){var o=p.map(t,(function(t){return t.get("nameMap")})),a=new lr(r,r,p.extend({nameMap:p.mergeAll(o)},i(t[0])));a.zoomLimit=p.retrieve.apply(null,p.map(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=ur,a.resize(t[0],e),p.each(t,(function(t){t.coordinateSystem=a,function(t,e){p.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=p.createHashMap(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=Mr(s),o=Ar(o),s&&o;){r=Mr(r),a=Ar(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);d>0&&(Dr(Cr(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!Mr(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!Ar(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function br(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function wr(t){return arguments.length?t:Ir}function Sr(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Tr(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Mr(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Ar(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Cr(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Dr(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Ir(t,e){return t.parentNode===e.parentNode?1:2}var Lr=n(3726),Pr=function(){this.parentPoint=[],this.childPoints=[]},Or=function(t){function e(e){return t.call(this,e)||this}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Pr},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=(0,Vt.GM)(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;dx.x)||(S-=Math.PI);var A=T?"left":"right",C=s.getModel("label"),D=C.get("rotate"),I=D*(Math.PI/180),L=y.getTextContent();L&&(y.setTextConfig({position:C.get("position")||A,rotation:null==D?-S:I,origin:"center"}),L.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),O="relative"===P?p.concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():null;O&&((0,V.A)(n).focus=O),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(m||(m=i.__edge=new _r.Z({shape:Zr(h,c,d,r,r)})),b.D(m,{shape:Zr(h,c,d,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,y=[],_=0;_e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(p.isString(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function jr(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xr(t,e){var n=jr(t);return p.indexOf(n,e)>=0}function Yr(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new An.Z(n,this,this.ecModel),r=Ur.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(u.Z);const Kr=qr;function Jr(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function Qr(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=Tr(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=wr((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=wr());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:a(u,h)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=Sr(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+p),f=r/(c.depth-1||1),Jr(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function $r(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");(0,p.extend)(i,n)}))}))}var to=["treemapZoomToNode","treemapRender","treemapMove"];var eo=n(5494);function no(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=(0,eo.i)(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var io=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ro(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new An.Z({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=(0,S.kF)(e.get("color")),o=(0,S.kF)(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],p.each(t,(function(t){var e=new An.Z(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=p.map(i||[],(function(t){return new An.Z(t,o,e)}),this),s=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return(0,Sn.TX)("nameValue",{name:o,value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(u.Z);function ro(t){var e=0;p.each(t.children,(function(t){ro(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const oo=io;var ao=n(4130),so=function(){function t(t){this.group=new c.Z,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Gt.p$(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=(0,S.U5)(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o=0,a=e.emptyItemWidth,s=t.get(["breadcrumb","height"]),l=Gt.lq(e.pos,e.box),u=e.totalWidth,h=e.renderList,c=h.length-1;c>=0;c--){var d=h[c],f=d.node,g=d.width,m=d.text;u>l.width&&(u-=g-a,g=a,m=null);var v=new _n.Z({shape:{points:lo(o,0,g,s,c===h.length-1,0===c)},style:(0,p.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new w.ZP({style:{text:m,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e4*B.zr,onclick:(0,p.curry)(r,f)});v.disableLabelAnimation=!0,this.group.add(v),uo(v,t,f),o+=g+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function lo(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function uo(t,e,n){(0,V.A)(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Yr(n,e)}}const ho=so;var co=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new fe.Z(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=ke.create();ke.translate(s,s,[-e,-n]),ke.scale(s,s,[t.scale,t.scale]),ke.translate(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&(0,G.MI)(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ho(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Xr(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(k.Z);const Mo=To;var Ao=p.each,Co=p.isObject,Do=-1,Io=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=p.clone(e);this.type=i,this.mappingMethod=n,this._normalizeData=Zo[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Lo(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,p.each(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Ao(e,(function(t,e){n[t]=e})),!p.isArray(i)){var r=[];p.isObject(i)?Ao(i,(function(t,e){var i=n[e];r[null!=i?i:Do]=t})):r[-1]=i,i=Bo(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):Lo(r,!0):(p.assert("linear"!==n||r.dataExtent),Lo(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},t.listVisualTypes=function(){return p.keys(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){p.isObject(t)?p.each(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=p.isArray(e)?[]:p.isObject(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&Ao(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(p.isArray(t))t=t.slice();else{if(!Co(t))return[];var e=[];Ao(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new Vo(c);return Go(d).drColorMappingBy=h,d}(0,r,o,0,u,f);(0,p.each)(f,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=(0,p.extend)({},e);if(r){var s=r.type,l="color"===s&&Go(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,g,i);Uo(t,o,n,i)}}))}else s=Wo(u),h.fill=s}}function Wo(t){var e=jo(t,"color");if(e){var n=jo(t,"colorAlpha"),i=jo(t,"colorSaturation");return i&&(e=(0,H.modifyHSL)(e,null,null,i)),n&&(e=(0,H.modifyAlpha)(e,n)),e}}function jo(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Xo(t,e){var n=t.get(e);return(0,p.isArray)(n)&&n.length?{name:e,range:n}:null}var Yo=Math.max,qo=Math.min,Ko=p.retrieve,Jo=p.each,Qo=["itemStyle","borderWidth"],$o=["itemStyle","gapWidth"],ta=["upperLabel","show"],ea=["upperLabel","height"];const na={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Gt.ME(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=(0,Vt.GM)(Ko(s.width,l[0]),r),h=(0,Vt.GM)(Ko(s.height,l[1]),o),c=i&&i.type,d=Wr(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?i.rootRect:null,g=t.getViewRoot(),m=jr(g);if("treemapMove"!==c){var v="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,d=0,p=c.length;dVt.YM&&(u=Vt.YM),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?Yo(u*i/l,l/(u*r)):1/0}function oa(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,d=t.length;c=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(T.ZP);function ha(t,e){var n=null==t?"":t+"";return e&&((0,p.isString)(e)?n=e.replace("{value}",n):(0,p.isFunction)(e)&&(n=e(t))),n}var ca=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:(0,Vt.GM)(n[0],e.getWidth()),cy:(0,Vt.GM)(n[1],e.getHeight()),r:(0,Vt.GM)(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?vt:pt.C,c=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];(0,M.L)(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:k}),silent:!0}))}if(y.get("show")&&P!==x){O=(O=y.get("distance"))?O+l:l;for(var R=0;R<=b;R++){u=Math.cos(M),h=Math.sin(M);var z=new $e.Z({shape:{x1:u*(f-O)+d,y1:h*(f-O)+p,x2:u*(f-T-O)+d,y2:h*(f-T-O)+p},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:i((P+R/b)/x)}),c.add(z),M+=C}M-=C}else M+=A}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,f=[],g=t.get(["pointer","show"]),m=t.getModel("progress"),v=m.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),S=[x,w],T=[o,a];function M(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=(0,Vt.GM)(o.get("width"),r.r),s=(0,Vt.GM)(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=(0,Vt.GM)(u[0],r.r),d=(0,Vt.GM)(u[1],r.r),p=o.get("keepAspect");return(i=l?(0,h.th)(l,c-a/2,d-s,a,s,null,p):new ua({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function A(t,e){var n=m.get("roundCap")?vt:pt.C,i=m.get("overlap"),a=i?m.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=w-y.get(_,t)%w),c}(v||g)&&(y.diff(c).add((function(e){var n=y.get(_,e);if(g){var i=M(e,o);b.KZ(i,{rotation:-((isNaN(+n)?T[0]:(0,Vt.NU)(n,S,T,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(v){var r=A(e,o),a=m.get("clip");b.KZ(r,{shape:{endAngle:(0,Vt.NU)(n,S,T,a)}},t),u.add(r),(0,V.Q)(t.seriesIndex,y.dataType,e,r),f[e]=r}})).update((function(e,n){var i=y.get(_,e);if(g){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=M(e,a);s.rotation=a,b.D(s,{rotation:-((isNaN(+i)?T[0]:(0,Vt.NU)(i,S,T,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(v){var l=d[n],h=A(e,l?l.shape.endAngle:o),p=m.get("clip");b.D(h,{shape:{endAngle:(0,Vt.NU)(i,S,T,p)}},t),u.add(h),(0,V.Q)(t.seriesIndex,y.dataType,e,h),f[e]=h}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(g){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof xn.ZP){var h=s.style;s.useStyle((0,p.extend)({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i((0,Vt.NU)(y.get(_,t),S,[0,1],!0))),s.z2EmphasisLift=0,(0,B.WO)(s,e),(0,B.k5)(s,r,o,a)}if(v){var c=f[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,(0,B.WO)(c,e),(0,B.k5)(c,r,o,a)}})),this._progressEls=f)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=(0,h.th)(r,e.cx-i/2+(0,Vt.GM)(o[0],e.r),e.cy-i/2+(0,Vt.GM)(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new c.Z,d=[],p=[],f=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new w.ZP({silent:!0}),p[t]=new w.ZP({silent:!0})})).update((function(t,e){d[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),m=new c.Z,v=i((0,Vt.NU)(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var _=y.get("offsetCenter"),x=r.cx+(0,Vt.GM)(_[0],r.r),b=r.cy+(0,Vt.GM)(_[1],r.r);(I=d[e]).attr({z2:g?0:2,style:(0,Z.Lr)(y,{x,y:b,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),m.add(I)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),T=r.cx+(0,Vt.GM)(S[0],r.r),M=r.cy+(0,Vt.GM)(S[1],r.r),A=(0,Vt.GM)(w.get("width"),r.r),C=(0,Vt.GM)(w.get("height"),r.r),D=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:v,I=p[e],L=w.get("formatter");I.attr({z2:g?0:2,style:(0,Z.Lr)(w,{x:T,y:M,text:ha(o,L),width:isNaN(A)?null:A,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:D})}),(0,Z.pe)(I,{normal:w},o,(function(t){return ha(t,L)})),f&&(0,Z.tD)(I,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return ha(a?a.interpolatedValue:o,L)}}),m.add(I)}h.add(m)})),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(k.Z);const da=ca;const pa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return ue(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(u.Z);var fa=["itemStyle","opacity"],ga=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new qt.Z,a=new w.ZP;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return(0,s.ZT)(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(fa);l=null==l?1:l,n||(0,b.Zi)(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,b.KZ(i,{style:{opacity:l}},r,e)):b.D(i,{style:{opacity:l},shape:{points:a.points}},r,e),(0,B.WO)(i,o),this._updateLabel(t,e),(0,B.k5)(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;(0,Z.ni)(r,(0,Z.k3)(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Kt.Z(h[0][0],h[0][1]):null},b.D(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),(0,Jt.Iu)(n,(0,Jt.$x)(a),{stroke:u})},e}(_n.Z);const ma=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new ga(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){var n=r.getItemGraphicEl(e);b.XD(n,t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(k.Z);var va=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype._defaultLabelLine=function(t){(0,S.Cc)(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(u.Z);const ya=va;function _a(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ea(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Ea(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const Na=Pa;var ka=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&p.merge(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);p.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(be.Z);const Ra=ka;const za=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(Fe.Z);var Ba=n(9233),Za=p.each,Fa=Math.min,Va=Math.max,Ga=Math.floor,Ha=Math.ceil,Ua=Vt.NM,Wa=Math.PI,ja=function(){function t(t,e,n){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Za(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new za(t,Ee.aG(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Za(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Ee.Jk(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=Xa(e.get("axisExpandWidth"),l),c=Xa(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=e.get("axisExpandWindow");p?(t=Xa(p[1]-p[0],l),p[1]=p[0]+t):(t=Xa(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||Ga(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Ga(Ua(p[0]/h,1))+1,Ha(Ua(p[1]/h,1))-1],m=f/h*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Za(n,(function(e,n){var o=(i.axisExpandable?qa:Ya)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Wa/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=ke.create();ke.rotate(h,h,u),ke.translate(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];p.each(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?(0,Ba.Z)(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[Va(0,o[1]*s/d-d/2)])[1]=Fa(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function Xa(t,e){return Fa(Va(t,e[0]),e[1])}function Ya(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function qa(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Vt.dt(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i=0&&(o[r[a].depth]=new An.Z(r[a],this,e));if(i&&n){var s=(0,cs.Z)(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value,s=o.source+" -- "+o.target;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return(0,Sn.TX)("nameValue",{name:null!=u?u+"":null,value:l,noValue:i(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(u.Z);const ps=ds;function fs(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){p.each(t,(function(t){var e=Ts(t.outEdges,Ss),n=Ts(t.inEdges,Ss),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,d=0;d=0;y&&v.depth>f&&(f=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_c-1?f:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)vs(s,l*=.99,a),ms(s,r,n,i,a),Ms(s,l,a),ms(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";p.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),p.each(t,(function(t){var e=0,n=0;p.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),p.each(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==p.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function gs(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ms(t,e,n,i,r){var o="vertical"===r?"x":"y";p.each(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function vs(t,e,n){p.each(t.slice().reverse(),(function(t){p.each(t,(function(t){if(t.outEdges.length){var i=Ts(t.outEdges,ys,n)/Ts(t.outEdges,Ss);if(isNaN(i)){var r=t.outEdges.length;i=r?Ts(t.outEdges,_s,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-ws(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-ws(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function ys(t,e){return ws(t.node2,e)*t.getValue()}function _s(t,e){return ws(t.node2,e)}function xs(t,e){return ws(t.node1,e)*t.getValue()}function bs(t,e){return ws(t.node1,e)}function ws(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Ss(t){return t.getValue()}function Ts(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),p.each(e,(function(e){var r=new Vo({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var Cs=n(381),Ds=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[r,o],f=d[u].get("type"),g=d[1-u].get("type"),m=t.data;if(m&&i){var v=[];p.each(m,(function(t,e){var n;p.isArray(t)?(n=t.slice(),t.unshift(e)):p.isArray(t.value)?((n=p.extend({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,v.push(n)})),t.data=v}var y=this.defaultValueDimensions,_=[{name:h,type:(0,Cs.T)(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,Cs.T)(g),dimsDef:y.slice()}];return ue(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:p.curry(he.pY,_,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Is=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return(0,s.ZT)(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(u.Z);(0,p.mixin)(Is,Ds,!0);const Ls=Is;var Ps=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=Ns(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?((0,b.Zi)(n),ks(s,n,i,t)):n=Ns(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(k.Z),Os=function(){},Es=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Os},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();im){var b=[y,x];i.push(b)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var Us=["color","borderColor"],Ws=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&qs(s,a))return;var l=Ys(a,n,!0);b.KZ(l,{shape:{points:a.ends}},t,n),Ks(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&qs(s,h)?i.remove(u):(u?(b.D(u,{shape:{points:h.ends}},t,a),(0,b.Zi)(u)):u=Ys(h,a),Ks(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),tl(t,this.group);var e=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=Ys(i.getItemLayout(n),n);Ks(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){tl(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(k.Z),js=function(){},Xs=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new js},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(T.ZP);function Ys(t,e,n){var i=t.ends;return new Xs({shape:{points:n?Js(i,t):i},z2:100})}function qs(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(Us);e.useStyle(o),e.style.fill=null,e.style.stroke=r}const nl=Ws;var il=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return(0,s.ZT)(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(u.Z);(0,p.mixin)(il,Ds,!0);const rl=il;function ol(t){t&&p.isArray(t.series)&&p.each(t.series,(function(t){p.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}var al=n(5682),sl=["itemStyle","borderColor"],ll=["itemStyle","borderColor0"],ul=["itemStyle","color"],hl=["itemStyle","color0"],cl={seriesType:"candlestick",plan:(0,al.Z)(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?ul:hl)}function i(t,e){return e.get(t>0?sl:ll)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill;var l=e.ensureUniqueItemVisual(r,"style");(0,p.extend)(l,s)}}}}};const dl=cl;var pl={seriesType:"candlestick",plan:(0,al.Z)(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=(0,Vt.GM)((0,p.retrieve2)(t.get("barMaxWidth"),r),r),a=(0,Vt.GM)((0,p.retrieve2)(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?(0,Vt.GM)(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=(0,p.map)(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=(0,_.o)(4*t.count),c=0,d=[],p=[],f=n.getStore();for(;null!=(r=t.next());){var g=f.get(o,r),m=f.get(s,r),v=f.get(l,r),y=f.get(u,r),x=f.get(h,r);isNaN(g)||isNaN(y)||isNaN(x)?(a[c++]=NaN,c+=3):(a[c++]=fl(f,r,m,v,l),d[0]=g,d[1]=y,i=e.dataToPoint(d,null,p),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,d[1]=x,i=e.dataToPoint(d,null,p),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),d=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(h,r),m=Math.min(d,p),v=Math.max(d,p),y=S(m,c),_=S(v,c),x=S(f,c),b=S(g,c),w=[];T(w,_,0),T(w,y,1),w.push(A(b),A(_),A(x),A(y)),n.setItemLayout(r,{sign:fl(a,r,d,p,l),initBaseline:d>p?_[1]:y[1],ends:w,brushRect:M(f,g,c)})}function S(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var r=e.slice(),o=e.slice();r[0]=(0,ct.subPixelOptimize)(r[0]+i/2,1,!1),o[0]=(0,ct.subPixelOptimize)(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=S(t,n),o=S(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function A(t){return t[0]=(0,ct.subPixelOptimize)(t[0],1),t}}}}};function fl(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}const gl=pl;var ml=n(3132),vl=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=ml.qW.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p0){var M=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=M[T],_[x++]=M[T+1],_[x++]=M[T+2],_[x++]=M[T+3]*v*256}else x+=4}return c.putImageData(y,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=ml.qW.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();const yl=vl;function _l(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var xl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):_l(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(_l(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=z(u,"cartesian2d");if(h){var c=u.getAxis("x"),d=u.getAxis("y");0,o=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),_=(0,Z.k3)(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),T=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;Ms[1]||Il[1])continue;var L=u.dataToPoint([D,I]);A=new dt.Z({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(T[1],M)))continue;A=new dt.Z({z2:1,shape:u.dataToRect([f.get(T[0],M)]).contentShape,style:C})}if(f.hasItemOption){var P=f.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),m=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),y=P.get(["itemStyle","borderRadius"]),b=O.get("focus"),w=O.get("blurScope"),S=O.get("disabled"),_=(0,Z.k3)(P)}A.shape.r=y;var E=t.getRawValue(M),N="-";E&&null!=E[2]&&(N=E[2]+""),(0,Z.ni)(A,_,{labelFetcher:t,labelDataIndex:M,defaultOpacity:C.opacity,defaultText:N}),A.ensureState("emphasis").style=g,A.ensureState("blur").style=m,A.ensureState("select").style=v,(0,B.k5)(A,b,w,S),A.incremental=r,r&&(A.states.emphasis.hoverLayer=!0),p.add(A),f.setItemGraphicEl(M,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new yl;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),g=d-h,m=f-c,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(v,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),_=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(_,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=p.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,d),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),g=t.getItemVisual(e,"symbolSize");h=p.isArray(g)?g.slice():null==g?["100%","100%"]:[g,g];h[d.index]=(0,Vt.GM)(h[d.index],f),h[c.index]=(0,Vt.GM)(h[c.index],i?f:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,d.boundingLength,d.pxSign,u,i,d),function(t,e,n,i,r){var o=t.get(Tl)||0;o&&(Al.attr({scaleX:e[0],scaleY:e[1],rotation:n}),Al.updateTransform(),o/=Al.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var f=d.symbolSize,g=(0,h.Cq)(n.get("symbolOffset"),f);return function(t,e,n,i,r,o,a,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,g=c.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var y=Math.abs(l),_=p.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;_.lastIndexOf("!")===_.length-1&&(x=!0,_=_.slice(0,_.length-1));var b=(0,Vt.GM)(_,e[f.index]),w=Math.max(m+2*b,0),S=x?0:2*b,T=(0,Vt.kE)(i),M=T?i:Hl((y+S)/w);w=m+2*(b=(y-M*m)/2/(x?M:Math.max(M-1,1))),S=x?0:2*b,T||"fixed"===i||(M=u?Hl((Math.abs(u)+S)/w):0),v=M*w-S,c.repeatTimes=M,c.symbolMargin=b}var A=g*(v/2),C=c.pathPosition=[];C[d.index]=n[d.wh]/2,C[f.index]="start"===a?A:"end"===a?l-A:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var D=c.bundlePosition=[];D[d.index]=n[d.xy],D[f.index]=n[f.xy];var I=c.barRectShape=p.extend({},n);I[f.wh]=g*Math.max(Math.abs(n[f.wh]),Math.abs(C[f.index]+A)),I[d.wh]=n[d.wh];var L=c.clipShape={};L[d.xy]=-n[d.xy],L[d.wh]=h.ecSize[d.wh],L[f.xy]=0,L[f.wh]=n[f.wh]}(n,f,r,o,0,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function Dl(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Il(t){var e=t.symbolPatternSize,n=(0,h.th)(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Ll(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(Fl(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Pl(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?Vl(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=Il(n),r.add(o),Vl(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function Ol(t,e,n){var i=p.extend({},e.barRectShape),r=t.__pictorialBarRect;r?Vl(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new dt.Z({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function El(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=p.extend({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)b.D(r,{shape:o},s,l);else{o[a.wh]=0,r=new dt.Z({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ct[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Nl(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=kl,n.isAnimationEnabled=Rl,n}function kl(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Rl(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zl(t,e,n,i){var r=new c.Z,o=new c.Z;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?Ll(r,e,n):Pl(r,0,n),Ol(r,n,i),El(r,e,n,i),r.__pictorialShapeStr=Zl(t,n),r.__pictorialSymbolMeta=n,r}function Bl(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Fl(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),p.each(o,(function(t){b.bX(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function Zl(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fl(t,e,n){p.each(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function Vl(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ct[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function Gl(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");Fl(t,(function(t){if(t instanceof xn.ZP){var e=t.style;t.useStyle(p.extend({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var f=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;(0,Z.ni)(g,(0,Z.k3)(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:(0,F.H)(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),(0,B.k5)(t,h,c,o.get("disabled"))}function Hl(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Ul=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Ml[+s],categoryDim:Ml[1-+s]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=Nl(r,t),n=Cl(r,t,e,u),o=zl(r,u,n);r.setItemGraphicEl(t,o),i.add(o),Gl(o,u,n)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=Nl(r,t),s=Cl(r,t,a,u),l=Zl(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,r=n.dataIndex,o=t.__pictorialBundle;b.D(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?Ll(t,e,n,!0):Pl(t,e,n,!0);Ol(t,n,!0),El(t,e,n,!0)}(n,u,s):n=zl(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),Gl(n,u,s)}else i.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&Bl(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){Bl(i,(0,V.A)(e).dataIndex,t,e)})):n.removeAll()},e.type="pictorialBar",e}(k.Z);const Wl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(lt);var jl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var d=new ao.Z(this._layersSeries||[],a,h,h),f=[];function g(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,d=[],p=[],g=a[n].indices,m=0;mo&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,d=o.length,f=o[0].indices.length,g=0;gMath.PI/2?"right":"left"):T&&"center"!==T?"left"===T?(_=r.r0+S,a>Math.PI/2&&(T="right")):"right"===T&&(_=r.r-S,a>Math.PI/2&&(T="left")):(_=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,T="center"),m.style.align=T,m.style.verticalAlign=g(d,"verticalAlign")||"middle",m.x=_*s+r.cx,m.y=_*l+r.cy;var M=g(d,"rotate"),A=0;"radial"===M?(A=-a)<-Math.PI/2&&(A+=Math.PI):"tangential"===M?(A=Math.PI/2-a)>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI):p.isNumber(M)&&(A=M*Math.PI/180),m.rotation=A})),h.dirtyStyle()},e}(pt.C);const $l=Ql;var tu="sunburstRootToNode",eu="sunburstHighlight";var nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new $l(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new ao.Z(r,i,s,s).add(h).update(h).remove(p.curry(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new $l(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";(0,G.MI)(a,s)}}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tu,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(k.Z);const iu=nu;var ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ou(n);var i=this._levelModels=p.map(t.levels||[],(function(t){return new An.Z(t,this,e)}),this),r=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Yr(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(u.Z);function ou(t){var e=0;p.each(t.children,(function(t){ou(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const au=ru;var su=Math.PI/180;function lu(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");p.isArray(i)||(i=[0,i]),p.isArray(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=(0,Vt.GM)(e[0],r),l=(0,Vt.GM)(e[1],o),u=(0,Vt.GM)(i[0],a/2),h=(0,Vt.GM)(i[1],a/2),c=-t.get("startAngle")*su,d=t.get("minAngle")*su,f=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&uu(g,v);var y=0;p.each(g.children,(function(t){!isNaN(t.getValue())&&y++}));var _=g.getValue(),x=Math.PI/(_||y)*2,b=g.depth>0,w=g.height-(b?-1:1),S=(h-u)/(w||1),T=t.get("clockwise"),M=t.get("stillShowZeroSum"),A=T?1:-1,C=function(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===_&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&(0,p.isString)(o)&&(o=(0,H.lift)(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height));var a=n.ensureUniqueItemVisual(r.dataIndex,"style");(0,p.extend)(a,o)}))}))}var cu={color:"fill",borderColor:"stroke"},du={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},pu=(0,S.Yf)();const fu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=pu(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(u.Z);function gu(t,e){return e=e||[0,0],p.map(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function mu(t,e){return e=e||[0,0],p.map([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function vu(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function yu(t,e){return e=e||[0,0],p.map(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function _u(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||(0,p.hasOwn)(t,"text")))}function xu(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},(0,p.hasOwn)(a,"text")&&(o.text=a.text),(0,p.hasOwn)(a,"rich")&&(o.rich=a.rich),(0,p.hasOwn)(a,"textFill")&&(o.fill=a.textFill),(0,p.hasOwn)(a,"textStroke")&&(o.stroke=a.textStroke),(0,p.hasOwn)(a,"fontFamily")&&(o.fontFamily=a.fontFamily),(0,p.hasOwn)(a,"fontSize")&&(o.fontSize=a.fontSize),(0,p.hasOwn)(a,"fontStyle")&&(o.fontStyle=a.fontStyle),(0,p.hasOwn)(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textPosition")&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textOffset")&&(i.offset=a.textOffset),(0,p.hasOwn)(a,"textRotation")&&(i.rotation=a.textRotation),(0,p.hasOwn)(a,"textDistance")&&(i.distance=a.textDistance)}return bu(o,t),(0,p.each)(o.rich,(function(t){bu(t,t)})),{textConfig:i,textContent:r}}function bu(t,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(t.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(t.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(t.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(t.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function wu(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Su(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,(0,p.each)(e.rich,(function(t){Su(t,t)})),i}function Su(t,e){e&&((0,p.hasOwn)(e,"fill")&&(t.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(t.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(t.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(t.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(t.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(t.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(t.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(t.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(t.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(t.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(t.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(t.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Tu=n(5622),Mu=n(7411),Au={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Cu=(0,p.keys)(Au),Du=((0,p.reduce)(Mu.dN,(function(t,e){return t[e]=1,t}),{}),Mu.dN.join(", "),["","style","shape","extra"]),Iu=(0,S.Yf)();function Lu(t,e,n,i,r){var o=t+"Animation",a=(0,b.ke)(t,i,r)||{},s=Iu(e).userDuring;return a.duration>0&&(a.during=s?(0,p.bind)(zu,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),(0,p.extend)(a,n[o]),a}function Pu(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Iu(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!r&&(r=i.style={});var f=(0,p.keys)(n);for(u=0;u0&&t.animateFrom(d,f)}else!function(t,e,n,i,r){if(r){var o=Lu("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);Ou(t,e),u?t.dirty():t.markRedraw()}function Ou(t,e){for(var n=Iu(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=(0,p.keys)(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:p.bind(yu,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function eh(t){return t instanceof T.ZP}function nh(t){return t instanceof ki.ZP}const ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=lh(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){hh(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);Eu(n,pu(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);hh(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=lh(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=_(i,Wu).getItemStyle(),o=x(i,Wu),a=Z.Lr(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,p.retrieve3)(t.getFormattedLabel(i,Wu),t.getFormattedLabel(i,ju),(0,F.H)(e,i)):null;var l=Z.nC(o,null,!0);return w(n,r),r=wu(r,a,l),n&&b(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),(0,p.hasOwn)(cu,t)){var i=e.getItemVisual(n,"style");return i?i[cu[t]]:null}if((0,p.hasOwn)(du,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){var e=o.getBaseAxis();return(0,at.Gk)((0,p.defaults)({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return Z.qT(t,n)}},a.api||{}),h={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:uh(t.getData())},c={},d={},f={},g={},m=0;m=c;d--){Eu(e.childAt(d),pu(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function dh(t,e,n){var i,r=pu(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&((0,p.hasOwn)(i,"pathData")||(0,p.hasOwn)(i,"d")))&&_h(a)!==r.customPathData||"image"===o&&(0,p.hasOwn)(s,"image")&&s.image!==r.customImagePath}function ph(t,e,n){var i=e?fh(t,e):t,r=e?gh(t,i,Wu):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?fh(s,e):s:null;if(r&&(n.isLegacy||_u(r,o,!!a,!!l))){n.isLegacy=!0;var u=xu(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function fh(t,e){return e?t?t[e]:null:t}function gh(t,e,n){var i=e&&e.style;return null==i&&n===Wu&&t&&(i=t.styleEmphasis),i}function mh(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function vh(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ch(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function yh(t){var e=this.context,n=e.oldChildren[t];Eu(n,pu(n).option,e.seriesModel)}function _h(t){return t&&(t.pathData||t.d)}var xh=n(6026),bh=n(9517),wh=n(241),Sh=n(7037);var Th=n(7329),Mh=n(5539),Ah=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ch[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=ke.create();ke.rotate(d,d,s),ke.translate(d,d,[i.cx,i.cy]),l=ct.applyTransform([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=tn.Z.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));Mh.$_(t,n,i,r,d)},e}(Th.Z);var Ch={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:Mh.BL(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Mh.Rj(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:Mh.Rj(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}};const Dh=Ah;const Ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(be.Z);var Lh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",S.C6).models[0]},e.type="polarAxis",e}(be.Z);p.mixin(Lh,Se.W);var Ph=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="angleAxis",e}(Lh),Oh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="radiusAxis",e}(Lh),Eh=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(Fe.Z);Eh.prototype.dataToRadius=Fe.Z.prototype.dataToCoord,Eh.prototype.radiusToData=Fe.Z.prototype.coordToData;const Nh=Eh;var kh=(0,S.Yf)(),Rh=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=yt.lP(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=kh(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-h)<=1&&Math.abs(p-r)<=1&&d>h?h=d:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(Fe.Z);Rh.prototype.dataToAngle=Fe.Z.prototype.dataToCoord,Rh.prototype.angleToData=Fe.Z.prototype.coordToData;const zh=Rh;var Bh=["radius","angle"],Zh=function(){function t(t){this.dimensions=Bh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Nh,this._angleAxis=new zh,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return Fh(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Fh(e)===this?this.pointToData(n):null},t}();function Fh(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const Vh=Zh;function Gh(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();p.each((0,Ee.PY)(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),p.each((0,Ee.PY)(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),(0,Ee.Jk)(i.scale,i.model),(0,Ee.Jk)(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function Hh(t,e){if(t.type=e.get("type"),t.scale=(0,Ee.aG)(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var Uh={dimensions:Bh,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new Vh(i+"");r.update=Gh;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Hh(o,s),Hh(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=(0,Vt.GM)(i[0],r),t.cy=(0,Vt.GM)(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,Vt.GM)(l[0],s),(0,Vt.GM)(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",S.C6).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}};const Wh=Uh;var jh=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xh(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function Yh(t){return t.getRadiusAxis().inverse?0:1}function qh(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var Kh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=p.map(n.getViewLabels(),(function(t){t=p.clone(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));qh(s),qh(o),p.each(jh,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||Jh[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(en.Z),Jh={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=Yh(n),u=l?0:1;(a=0===o[u]?new Pn.Z({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new On.Z({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[Yh(n)],u=p.map(i,(function(t){return new $e.Z({shape:Xh(n,[l,l+s],t.coord)})}));t.add(ct.mergePath(u,{style:p.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[Yh(n)],h=[],c=0;cg?"left":"right",y=Math.abs(f[1]-m)/d<.3?"middle":f[1]>m?"top":"bottom";if(s&&s[c]){var _=s[c];p.isObject(_)&&_.textStyle&&(a=new An.Z(_.textStyle,l,l.ecModel))}var x=new w.ZP({silent:tn.Z.isLabelSilent(e),style:(0,Z.Lr)(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:v,verticalAlign:y})});if(t.add(x),h){var b=tn.Z.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,(0,V.A)(x).eventData=b}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",C=b;_&&(i[s][M]||(i[s][M]={p:b,n:b}),C=i[s][M][A]);var D=void 0,I=void 0,L=void 0,P=void 0;if("radius"===c.dim){var O=c.dataToCoord(T)-b,E=o.dataToCoord(M);Math.abs(O)=P})}}}))};var sc={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},lc={splitNumber:5},uc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="polar",e}(xe.Z);function hc(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.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]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),p.retrieve(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var cc=["axisLine","axisTickLabel","axisName"],dc=["splitArea","splitLine"],pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new c.Z;var s=hc(e),l=new tn.Z(e,s);p.each(cc,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),p.each(dc,(function(t){e.get([t,"show"])&&fc[t](this,this.group,this._axisGroup,e)}),this),ct.groupTransition(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){on(this)},e.type="singleAxis",e}(en.Z),fc={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),h=[],c=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return bc(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return bc(e)===this?this.pointToData(n):null},t}();const Sc={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new wc(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",S.C6).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:xc};var Tc=["x","y"],Mc=["width","height"],Ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=Ic(a,1-Dc(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Cc[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=hc(n);Mh.gf(e,t,d,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=hc(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=Mh.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=Dc(r),s=Ic(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Ic(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Th.Z),Cc={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:Mh.BL([e,n[0]],[e,n[1]],Dc(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Mh.uE([e-i/2,n[0]],[i,r],Dc(t))}}};function Dc(t){return t.isHorizontal()?0:1}function Ic(t,e){var n=t.getRect();return[n[Tc[e]],n[Tc[e]]+n[Mc[e]]]}const Lc=Ac;var Pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="single",e}(xe.Z);function Oc(t,e){var n,i=t.cellSize;1===(n=p.isArray(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=p.map([0,1],(function(t){return(0,Gt.QM)(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));(0,Gt.dt)(t,e,{type:"box",ignoreSize:r})}const Ec=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e,n,i){var r=(0,Gt.tE)(e);t.prototype.init.apply(this,arguments),Oc(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Oc(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(be.Z);var Nc=n(3917),kc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new dt.Z({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new qt.Z({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return(0,p.isString)(t)&&t?(0,G.wx)(t,e):(0,p.isFunction)(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new w.ZP({z2:30,style:(0,Z.Lr)(r,{text:g})});m.attr(this._yearTextPositionControl(m,c[a],n,a,o)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!(0,p.isString)(o)||(o&&(e=(0,Nc.G8)(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,f=0;f=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/zc)-Math.floor(n[0].time/zc)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function Fc(t,e){var n;return p.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var Vc=["transition","enterFrom","leaveTo"],Gc=Vc.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Hc(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?Vc:Gc,r=0;r=0;l--){var f,g;u=n[l];if(g=null!=(f=S.U5(u.id,null))?r.get(f):null){var m=g.parent,v=(d=jc(m),m===i?{width:o,height:a}:{width:d.width,height:d.height}),y={},_=Gt.p$(g,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!jc(g).isNew&&_){for(var x=u.transition,w={},T=0;T=0)?w[M]=A:g[M]=A}(0,b.D)(g,w,t,0)}else g.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Kc(n,jc(n).option,e,t._lastGraphicModel)})),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xe.Z);function Yc(t){var e=new(p.hasOwn(Wc,t)?Wc[t]:ct.getShapeClass(t))({});return jc(e).type=t,e}function qc(t,e,n,i){var r=Yc(n);return e.add(r),i.set(t,r),jc(r).id=t,jc(r).isNew=!0,r}function Kc(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Kc(t,e,n,i)})),Eu(t,e,i),n.removeKey(jc(t).id))}function Jc(t,e,n,i){t.isGroup||p.each([["cursor",ki.ZP.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];p.hasOwn(e,i)?t[i]=p.retrieve2(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),p.each(p.keys(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=p.isFunction(i)?i:null}})),p.hasOwn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Qc=["rect","polygon","keep","clear"];function $c(t,e){var n=(0,S.kF)(t?t.brush:[]);if(n.length){var i=[];p.each(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;p.isArray(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),o=u,a={},p.each(o,(function(t){a[t]=1})),o.length=0,p.each(a,(function(t,e){o.push(e)})),e&&!u.length&&u.push.apply(u,Qc)}}var td=n(6211),ed=p.each;function nd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function id(t,e,n){var i={};return ed(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);ed(t[e],(function(t,i){if(Vo.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new Vo(r),"opacity"===i&&((r=p.clone(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Vo(r))}}))})),i}function rd(t,e,n){var i;p.each(n,(function(t){e.hasOwnProperty(t)&&nd(e[t])&&(i=!0)})),i&&p.each(n,(function(n){e.hasOwnProperty(n)&&nd(e[n])?t[n]=p.clone(e[n]):delete t[n]}))}var od=n(765);var ad={lineX:sd(0),lineY:sd(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&od.X(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(od.X(i,r,o)||od.X(i,r+a,o)||od.X(i,r,o+s)||od.X(i,r+a,o+s)||fe.Z.create(t).contain(l[0],l[1])||(0,ct.linePolygonIntersect)(r,o,r+a,o,i)||(0,ct.linePolygonIntersect)(r,o,r,o+s,i)||(0,ct.linePolygonIntersect)(r+a,o,r+a,o+s,i)||(0,ct.linePolygonIntersect)(r,o+s,r+a,o+s,i))||void 0}}};function sd(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ld(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&yd(e)}};function yd(t){return new fe.Z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const _d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ts.Z(e.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){pd(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:p.clone(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:p.clone(n),$from:e})},e.type="brush",e}(xe.Z);function xd(t,e){return p.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new An.Z(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const bd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,(function(t){return xd(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=xd(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(be.Z);var wd=n(1806),Sd=["rect","polygon","lineX","lineY","keep","clear"],Td=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,p.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return p.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:Sd.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wd.f1);const Md=Td;const Ad=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],(0,p.each)(n,(function(e,n){var i,o=(0,S.U5)((0,S.C4)(e),"");(0,p.isObject)(e)?(i=(0,p.clone)(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new le.Z([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(be.Z);var Cd=n(1219),Dd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline.slider",e.defaultOption=(0,ut.ZL)(Ad.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Ad);(0,p.mixin)(Dd,Cd.X.prototype);const Id=Dd;const Ld=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline",e}(xe.Z);const Pd=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return(0,s.ZT)(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(Fe.Z);var Od=n(5043),Ed=n(1618),Nd=Math.PI,kd=(0,S.Yf)(),Rd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return(0,Sn.TX)("nameValue",{noName:!0,value:e})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Nd/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),g=f.get("show",!0),m=g?f.get("itemSize"):0,v=g?f.get("itemGap"):0,y=m+v,_=t.get(["label","rotate"])||0;_=_*Nd/180;var x=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),w=g&&f.get("showPrevBtn",!0),S=g&&f.get("showNextBtn",!0),T=0,M=d;"left"===x||"bottom"===x?(b&&(i=[0,0],T+=y),w&&(r=[T,0],T+=y),S&&(o=[M-m,0],M-=y)):(b&&(i=[M-m,0],M-=y),w&&(r=[0,0],T+=y),S&&(o=[M-m,0],M-=y));var A=[T,M];return t.get("inverse")&&A.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:_,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:A,controlSize:m,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=ke.create(),a=r.x,s=r.y+r.height;ke.translate(o,o,[-a,-s]),ke.rotate(o,o,-Nd/2),ke.translate(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=v(r),u=v(n.getBoundingRect()),h=v(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var f,g=t.labelPosOpt;null==g||(0,p.isString)(g)?(y(c,u,l,1,f="+"===g?0:1),y(d,h,l,1,1-f)):(y(c,u,l,1,f=g>=0?0:1),d[1]=c[1]+g);function m(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,m(n),m(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Od.Z({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Ed.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new We.Z}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new Pd("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new c.Z;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new $e.Z({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:(0,p.extend)({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new $e.Z({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],(0,p.each)(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:(0,p.bind)(r._changeTimeline,r,t.value)},d=zd(s,l,e,c);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=h.getItemStyle(),(0,B.vF)(d);var f=(0,V.A)(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],(0,p.each)(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),d=new w.ZP({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(r._changeTimeline,r,a),silent:!1,style:(0,Z.Lr)(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=(0,Z.Lr)(u),d.ensureState("progress").style=(0,Z.Lr)(h),e.add(d),(0,B.vF)(d),kd(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=(0,yt.GM)((0,p.retrieve2)(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=ct.createIcon(t.get(["controlStyle",e]),i||{},new fe.Z(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),(0,B.vF)(c)}}h(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=(0,p.bind)(s._handlePointerDrag,s),t.ondragend=(0,p.bind)(s._handlePointerDragend,s),Bd(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){Bd(t,s._progressLine,o,n,i)}};this._currentPointer=zd(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=Vt.dt(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var $d={min:(0,p.curry)(Qd,"min"),max:(0,p.curry)(Qd,"max"),average:(0,p.curry)(Qd,"average"),median:(0,p.curry)(Qd,"median")};function tp(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!(0,p.isArray)(e.coord)&&i){var r=i.dimensions,o=ep(e,n,i,t);if((e=(0,p.clone)(e)).type&&$d[e.type]&&o.baseAxis&&o.valueAxis){var a=(0,p.indexOf)(r,o.baseAxis.dim),s=(0,p.indexOf)(r,o.valueAxis.dim),l=$d[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$d[u[h]]&&(u[h]=rp(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function ep(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function np(t,e){return!(t&&t.containData&&e.coord&&!Jd(e))||t.containData(e.coord)}function ip(t,e){return t?function(t,n,i,r){var o=r<2?t.coord&&t.coord[r]:t.value;return(0,Kd.yQ)(o,e[r])}:function(t,n,i,r){return(0,Kd.yQ)(t.value,e[r])}}function rp(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var op=(0,S.Yf)();const ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){op(t).keep=!1})),e.eachSeries((function(t){var r=Yd.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!op(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){op(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;(0,p.each)(t,(function(t){var i=Yd.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?(0,B.SX)(t):(0,B.VP)(t))}))}))},e.type="marker",e}(xe.Z);function sp(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Vt.GM(a.get("x"),n.getWidth()),l=Vt.GM(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}const lp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markPoint");e&&(sp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new f.Z),u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=(0,p.map)(n.get("data"),(0,p.curry)(tp,e));t&&(o=(0,p.filter)(o,(0,p.curry)(np,t)));var a=ip(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),sp(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if((0,p.isFunction)(i)||(0,p.isFunction)(r)||(0,p.isFunction)(o)||(0,p.isFunction)(s)){var h=e.getRawValue(t),c=e.getDataParams(t);(0,p.isFunction)(i)&&(i=i(h,c)),(0,p.isFunction)(r)&&(r=r(h,c)),(0,p.isFunction)(o)&&(o=o(h,c)),(0,p.isFunction)(s)&&(s=s(h,c))}var d=n.getModel("itemStyle").getItemStyle(),f=(0,td.UL)(a,"color");d.fill||(d.fill=f),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ap);const up=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Yd);var hp=n(7145),cp=(0,S.Yf)(),dp=function(t,e,n,i){var r,o=t.getData();if((0,p.isArray)(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=(0,p.retrieve)(i.yAxis,i.xAxis);else{var u=ep(i,o,e,t);s=u.valueAxis,l=rp(o,(0,m.IR)(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,d=(0,p.clone)(i),f={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,f.coord[c]=1/0;var g=n.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=f.coord[h]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var v=[tp(t,r[0]),tp(t,r[1]),(0,p.extend)({},r[2])];return v[2].type=v[2].type||null,(0,p.merge)(v[2],v[0]),(0,p.merge)(v[2],v[1]),v};function pp(t){return!isNaN(t)&&!isFinite(t)}function fp(t,e,n,i){var r=1-t,o=i.dimensions[t];return pp(e[r])&&pp(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function gp(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(fp(1,n,i,t)||fp(0,n,i,t)))return!0}return np(t,e[0])&&np(t,e[1])}function mp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get("x"),r.getWidth()),u=Vt.GM(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if(z(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;pp(t.get(h[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):pp(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}const vp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=cp(e).from,o=cp(e).to;r.each((function(e){mp(r,e,!0,t,n),mp(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new hp.Z);this.group.add(l.group);var u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=new le.Z(i,n),a=new le.Z([],n),s=(0,p.map)(n.get("data"),(0,p.curry)(dp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(gp,t)));var l=ip(!!t,i);return r.initData((0,p.map)(s,(function(t){return t[0]})),null,l),o.initData((0,p.map)(s,(function(t){return t[1]})),null,l),a.initData((0,p.map)(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,d=u.line;cp(e).from=h,cp(e).to=c,e.setData(d);var f=e.get("symbol"),g=e.get("symbolSize"),m=e.get("symbolRotate"),v=e.get("symbolOffset");function y(e,n,r){var o=e.getItemModel(n);mp(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=(0,td.UL)(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:(0,p.retrieve2)(o.get("symbolRotate",!0),m[r?0:1]),symbolSize:(0,p.retrieve2)(o.get("symbolSize"),g[r?0:1]),symbol:(0,p.retrieve2)(o.get("symbol",!0),f[r?0:1]),style:s})}(0,p.isArray)(f)||(f=[f,f]),(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(v)||(v=[v,v]),u.from.each((function(t){y(h,t,!0),y(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){(0,V.A)(t).dataModel=e,t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ap);const yp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Yd);var _p=(0,S.Yf)(),xp=function(t,e,n,i){var r=tp(t,i[0]),o=tp(t,i[1]),a=r.coord,s=o.coord;a[0]=(0,p.retrieve)(a[0],-1/0),a[1]=(0,p.retrieve)(a[1],-1/0),s[0]=(0,p.retrieve)(s[0],1/0),s[1]=(0,p.retrieve)(s[1],1/0);var l=(0,p.mergeAll)([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function bp(t){return!isNaN(t)&&!isFinite(t)}function wp(t,e,n,i){var r=1-t;return bp(e[r])&&bp(n[r])}function Sp(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return z(t,"cartesian2d")?!(!n||!i||!wp(1,n,i)&&!wp(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!Jd(e)&&!Jd(n))||t.containZone(e.coord,n.coord)}(t,r,o):np(t,r)||np(t,o)}function Tp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get(n[0]),r.getWidth()),u=Vt.GM(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[p=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(z(a,"cartesian2d")){var c=a.getAxis("x"),d=a.getAxis("y"),p=t.get(n[0],e),f=t.get(n[1],e);bp(p)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):bp(f)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Mp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=(0,p.map)(Mp,(function(r){return Tp(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new c.Z});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},i),{name:t,ordinalMeta:null})}));r=(0,p.map)(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new le.Z(r,n)}else r=[{name:"value",type:"float"}],i=new le.Z(r,n);var s=(0,p.map)(n.get("data"),(0,p.curry)(xp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(Sp,t)));var l=t?function(t,e,n,i){var o=t.coord[Math.floor(i/2)][i%2];return(0,Kd.yQ)(o,r[i])}:function(t,e,n,i){return(0,Kd.yQ)(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=(0,p.map)(Mp,(function(n){return Tp(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Vt.dt(c),Vt.dt(d);var f=!!(l[0]>c[1]||l[1]d[1]||h[1]i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),ft.T9(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Np(i,t)}))}))}var Bp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Ep(i,e,{pan:(0,p.bind)(Zp.pan,this),zoom:(0,p.bind)(Zp.zoom,this),scrollMove:(0,p.bind)(Zp.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Op(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return(0,Ba.Z)(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Fp((function(t,e,n,i,r,o){var a=Vp[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:Fp((function(t,e,n,i,r,o){return Vp[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function Fp(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return(0,Ba.Z)(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var Vp={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};const Gp=Bp;var Hp=n(7543);function Up(t){(0,Hp.Z)(t),t.registerComponentModel(Ip),t.registerComponentView(Gp),zp(t)}const Wp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,ut.ZL)(Dp.Z.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Dp.Z);var jp=n(1158),Xp=dt.Z,Yp="horizontal",qp="vertical",Kp=["line","bar","candlestick","scatter"],Jp={easing:"cubicOut",duration:100,delay:0},Qp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),ft.T9(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ft.ZH(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new c.Z;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===Yp?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Gt.tE(t.option);(0,p.each)(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Gt.ME(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===qp&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==Yp||r?n===Yp&&r?{scaleY:a?1:-1,scaleX:-1}:n!==qp||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Xp({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Xp({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(r!==this._shadowData||o!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(y>0&&e%y)v+=m;else{var n=null==t||isNaN(t)||""===t,i=n?0:(0,Vt.NU)(t,l,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,h=n}})),a=this._shadowPolygonPts=f,s=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=o,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var b=w(1===x);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new c.Z,i=new _n.Z({shape:{points:a},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new qt.Z({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){var a=t.getAxisProxy(r,o).getTargetSeriesModels();(0,p.each)(a,(function(t){if(!(n||!0!==e&&(0,p.indexOf)(Kp,t.get("type"))<0)){var a,s=i.getComponent((0,Pp.jQ)(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Xp({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Xp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],(function(e){var o=a.get("handleIcon");!h.Pw[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=(0,h.th)(o,-1,0,2,2,null,!0);s.attr({cursor:$p(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,e),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=(0,Vt.GM)(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,B.vF)(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var d=a.getModel("textStyle");t.add(i[e]=new w.ZP({silent:!0,invisible:!0,style:(0,Z.Lr)(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var f=(0,Vt.GM)(a.get("moveHandleSize"),o[1]),g=e.moveHandle=new dt.Z({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:f}}),m=.8*f,v=e.moveHandleIcon=(0,h.th)(a.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);v.silent=!0,v.y=o[1]+f/2-.5,g.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(f,10));(d=e.moveZone=new dt.Z({invisible:!0,shape:{y:o[1]-y,height:f+y}})).on("mouseover",(function(){s.enterEmphasis(g)})).on("mouseout",(function(){s.leaveEmphasis(g)})),r.add(g),r.add(v),r.add(d)}d.attr({draggable:!0,cursor:$p(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[(0,Vt.NU)(t[0],[0,100],e,!0),(0,Vt.NU)(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];(0,Ba.Z)(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?(0,Vt.NU)(o.minSpan,a,r,!0):null,null!=o.maxSpan?(0,Vt.NU)(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=(0,Vt.dt)([(0,Vt.NU)(i[0],r,a,!0),(0,Vt.NU)(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=(0,Vt.dt)(n.slice()),r=this._size;(0,p.each)([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Kt.Z(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=(0,Vt.dt)([(0,Vt.NU)(n.x,i,r,!0),(0,Vt.NU)(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(jp.sT(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new Xp({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Jp:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=(0,Pp.rg)(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lp.Z);function $p(t){return"vertical"===t?"ns-resize":"ew-resize"}const tf=Qp;function ef(t){t.registerComponentModel(Wp),t.registerComponentView(tf),(0,Hp.Z)(t)}var nf={get:function(t,e,n){var i=p.clone((rf[t]||{})[e]);return n&&p.isArray(i)?i[i.length-1]:i}},rf={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const of=nf;var af=Vo.mapVisual,sf=Vo.eachVisual,lf=p.isArray,uf=p.each,hf=Vt.dt,cf=Vt.NU,df=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=p.bind(t,this),this.controllerVisuals=id(this.option.controller,e,t),this.targetVisuals=id(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=S.kF(t),e},e.prototype.eachTargetSeries=function(t,e){p.each(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],p.isArray(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return p.isString(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):p.isFunction(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=hf([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});p.merge(i,n),p.merge(r,n);var o=this.isCategory();function a(n){lf(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},uf(i,(function(t,e){if(Vo.isValidType(e)){var n=of.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";uf(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&p.clone(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&p.clone(n)||(o?s[0]:[s[0],s[0]])),l.symbol=af(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;sf(u,(function(t){t>h&&(h=t)})),l.symbolSize=af(u,(function(t){return cf(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(be.Z);const pf=df;var ff=[20,140],gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=ff[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=ff[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):p.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Vt.dt((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=mf(this,"outOfRange",this.getExtent()),n=mf(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new c.Z("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();Tf([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=Sf(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var d=ct.applyTransform(n.handleLabelPoints[l],ct.getTransform(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=Sf(t,o,s,!0),p=a[0]-c/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=ct.applyTransform(l.indicatorLabelPoint,ct.getTransform(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:p,y:d,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),m.animateTo(x,b)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||If(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=S.XI(h,c);this._dispatchHighDown("downplay",wf(d[0],n)),this._dispatchHighDown("highlight",wf(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=(0,V.A)(e).dataIndex){var i=(0,V.A)(e),r=this.ecModel.getSeriesByIndex(i.seriesIndex);if(n.isTargetSeries(r)){var o=r.getData(i.dataType),a=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function kf(t,e,n,i){for(var r=e.targetVisuals[i],o=Vo.prepareVisualTypes(r),a={color:(0,td.UL)(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(Of,Ef),(0,p.each)(Nf,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(zf))}function Vf(t){t.registerComponentModel(vf),t.registerComponentView(Pf),Ff(t)}var Gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Hf[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=p.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p.map(this._pieceList,(function(t){return t=p.clone(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=Vo.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}p.each(e.pieces,(function(t){p.each(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),p.each(n,(function(t,n){var i=!1;p.each(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&p.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=of.get(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var e=Vo.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){Vo.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return p.each(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=(0,ut.ZL)(pf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(pf),Hf={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function Uf(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const Wf=Gf;const jf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=p.retrieve(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),p.each(l.viewPieceList,(function(i){var l=i.piece,u=new c.Z;u.onclick=p.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),h){var f=this.visualMapModel.getValueState(d);u.add(new w.ZP({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===f?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Gt.BZ(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:wf(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return bf(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new c.Z,a=this.visualMapModel.textStyleModel;o.add(new w.ZP({style:(0,Z.Lr)(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=p.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add((0,h.th)(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=p.clone(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,p.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(_f);function Xf(t){t.registerComponentModel(Wf),t.registerComponentView(jf),Ff(t)}var Yf={label:{enabled:!0},decal:{show:!1}},qf=(0,S.Yf)(),Kf={};function Jf(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=p.clone(Yf);p.merge(i.label,t.getLocaleModel().get("aria"),!1),p.merge(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=p.createHashMap();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),qf(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(p.isFunction(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=(0,eo.i)(e.ecModel,e.name,Kf,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=qf(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=(0,eo.i)(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?p.extend(p.extend({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=p.defaults(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(d){var f=o.get(["general","withTitle"]);s=r(f,{title:d})}else s=o.get(["general","withoutTitle"]);var g=[],m=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(m,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),d=o.get(["data","separator","end"]),p=[],f=0;f":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tg=function(){function t(t){if(null==(this._condVal=(0,p.isString)(t)?new RegExp(t):(0,p.isRegExp)(t)?t:null)){0,(0,Vs._y)("")}}return t.prototype.evaluate=function(t){var e=typeof t;return(0,p.isString)(e)?this._condVal.test(t):!!(0,p.isNumber)(e)&&this._condVal.test(t+"")},t}(),eg=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),ng=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){yg(t,i)&&yg(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nT:C2&&l.push(e),l}function xg(t,e,n,i,r,o,a,s,l,u){if(yg(t,n)&&yg(e,i)&&yg(r,a)&&yg(o,s))l.push(a,s);else{var h=2/u,c=h*h,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,m=i-e,v=r-a,y=o-s,_=g*g+m*m,x=v*v+y*y;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],T=[];(0,A.Vz)(t,n,r,a,.5,S),(0,A.Vz)(e,i,o,s,.5,T),xg(S[0],T[0],S[1],T[1],S[2],T[2],S[3],T[3],l,u),xg(S[4],T[4],S[5],T[5],S[6],T[6],S[7],T[7],l,u)}}}}function bg(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=bg([l,u],h?0:1,e),d=(h?s:u)/c.length,p=0;p1?null:new Kt.Z(p*l+t,p*u+e)}function Mg(t,e,n){var i=new Kt.Z;Kt.Z.sub(i,n,e),i.normalize();var r=new Kt.Z;return Kt.Z.sub(r,t,e),r.dot(i)}function Ag(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function Cg(t){var e=t.points,n=[],i=[];(0,Lr.zk)(e,n,i);var r=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Kt.Z,h=new Kt.Z;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=bg([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,d=0;d0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),T=Math.cos(w),M=0;for(_=0;_0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function Hg(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=(0,p.map)(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return(0,p.map)(o,(function(o,a){return{cp:o,z:Gg(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function Ug(t){return Ig(t.path,t.count)}function Wg(t){return(0,p.isArray)(t[0])}function jg(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var Xg={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);Wg(t)&&(s=t,l=e),Wg(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?jg(l,s):jg(c?e:t,[c?t:e]),f=0,g=0;g1e4))for(var i=n.getIndices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof T.ZP&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function nm(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function im(t){return(0,p.isArray)(t)?t.sort().join(","):t}function rm(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function om(t,e){for(var n=0;n=0&&r.push({data:e.oldData[n],divide:rm(e.oldData[n]),dim:t.dimension})})),(0,p.each)((0,S.kF)(t.to),(function(t){var e=om(n.updatedSeries,t);if(e>=0){var i=n.updatedSeries[e].getData();o.push({data:i,divide:rm(i),dim:t.dimension})}})),r.length>0&&o.length>0&&em(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=(0,p.createHashMap)(),i=(0,p.createHashMap)(),r=(0,p.createHashMap)();return(0,p.each)(t.oldSeries,(function(e,n){var o=t.oldData[n],a=nm(e),s=im(a);i.set(s,o),(0,p.isArray)(a)&&(0,p.each)(a,(function(t){r.set(t,{data:o,key:s})}))})),(0,p.each)(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.getData(),o=nm(t),a=im(o),s=i.get(a);if(s)n.set(a,{oldSeries:[{divide:rm(s),data:s}],newSeries:[{divide:rm(e),data:e}]});else if((0,p.isArray)(o)){var l=[];(0,p.each)(o,(function(t){var e=i.get(t);e&&l.push({divide:rm(e),data:e})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:e,divide:rm(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldSeries:[{data:u.data,divide:rm(u.data)}],newSeries:[]},n.set(u.key,h)),h.newSeries.push({data:e,divide:rm(e)})}}}})),n}(i,n);(0,p.each)(o.keys(),(function(t){var n=o.get(t);em(n.oldSeries,n.newSeries,e)}))}(0,p.each)(n.updatedSeries,(function(t){t[u.V]&&(t[u.V]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldData=[],h=0;h{"use strict";function i(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function r(t,e,n,r){var o=t.getZoom(),a=t.getCenter(),s=e.zoom,l=t.projectedToPoint?t.projectedToPoint(a):t.dataToPoint(a);if(null!=e.dx&&null!=e.dy&&(l[0]-=e.dx,l[1]-=e.dy,t.setCenter(i(t,l),r)),null!=s){if(n){var u=n.min||0,h=n.max||1/0;s=Math.max(Math.min(o*s,h),u)/o}t.scaleX*=s,t.scaleY*=s;var c=(e.originX-t.x)*(s-1),d=(e.originY-t.y)*(s-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(i(t,l),r),t.setZoom(s*o)}return{center:t.getCenter(),zoom:t.getZoom()}}n.d(e,{A:()=>r})},9266:(t,e,n)=>{"use strict";n.d(e,{D:()=>s,KZ:()=>l,XD:()=>d,Zi:()=>p,_W:()=>f,bX:()=>h,eq:()=>u,ke:()=>o});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e,n,r,o){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var l="update"===t;if(e&&e.isAnimationEnabled()){var u=void 0,h=void 0,c=void 0;return r?(u=(0,i.retrieve2)(r.duration,200),h=(0,i.retrieve2)(r.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(u=a.duration),null!=a.easing&&(h=a.easing),null!=a.delay&&(c=a.delay)),(0,i.isFunction)(c)&&(c=c(n,o)),(0,i.isFunction)(u)&&(u=u(n)),{duration:u||0,delay:c,easing:h}}return null}function a(t,e,n,r,a,s,l){var u,h=!1;(0,i.isFunction)(a)?(l=s,s=a,a=null):(0,i.isObject)(a)&&(s=a.cb,l=a.during,h=a.isFrom,u=a.removeOpt,a=a.dataIndex);var c="leave"===t;c||e.stopAnimation("leave");var d=o(t,r,a,c?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(e,a):null);if(d&&d.duration>0){var p={duration:d.duration,delay:d.delay||0,easing:d.easing,done:s,force:!!s||!!l,setToFinal:!c,scope:t,during:l};h?e.animateFrom(n,p):e.animateTo(n,p)}else e.stopAnimation(),!h&&e.attr(n),l&&l(1),s&&s()}function s(t,e,n,i,r,o){a("update",t,e,n,i,r,o)}function l(t,e,n,i,r,o){a("enter",t,e,n,i,r,o)}function u(t){if(!t.__zr)return!0;for(var e=0;e{"use strict";n.d(e,{N:()=>v});var i=n(655),r=n(8162),o=n(1525),a=n(8154),s=n(6357),l=n(6351);function u(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var h=function(t){function e(e,n){var i=t.call(this)||this,r=new l.Z(e,n),o=new a.Z;return i.add(r),i.add(o),i.updateData(e,n),i}return(0,i.ZT)(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),a=0;a{"use strict";n.d(e,{N:()=>dt});var i=n(3051);function r(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),r=t.getGraph().data,o=n.mapArray(n.getName);r.filterSelf((function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){(0,i.isNumber)(n)&&(n=o[n]);for(var a=0;ar&&(r=e);var a=r%2?r+2:r+3;o=[];for(var s=0;s=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Y(t,e){var n=[],i=F.Lx,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[l.clone(u[0]),l.clone(u[1])],u[2]&&u.__original.push(l.clone(u[2])));var d=u.__original;if(null!=u[2]){if(l.copy(r[0],d[0]),l.copy(r[1],d[2]),l.copy(r[2],d[1]),h&&"none"!==h){var p=x(t.node1),f=X(r,d[0],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){p=x(t.node2),f=X(r,d[1],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]}l.copy(u[0],r[0]),l.copy(u[1],r[2]),l.copy(u[2],r[1])}else{if(l.copy(o[0],d[0]),l.copy(o[1],d[1]),l.sub(a,o[1],o[0]),l.normalize(a,a),h&&"none"!==h){p=x(t.node1);l.scaleAndAdd(o[0],o[0],a,p*e)}if(c&&"none"!==c){p=x(t.node2);l.scaleAndAdd(o[1],o[1],a,-p*e)}l.copy(u[0],o[0]),l.copy(u[1],o[1])}}))}var q=n(5797),K=n(106);function J(t){return"view"===t.type}var Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,E.ZT)(e,t),e.prototype.init=function(t,e){var n=new N.Z,i=new k.Z,r=this.group;this._controller=new R.Z(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,s=this._lineDraw,l=this.group;if(J(o)){var u={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?l.attr(u):Z.D(l,u,t)}Y(t.getGraph(),_(t));var h=t.getData();a.updateData(h);var c=t.getEdgeData();s.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p),h.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){d&&(d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,p),d.setFixed(e),h.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(e)})),n.setDraggable(o&&!!d,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&((0,K.A)(n).focus=t.getAdjacentDataIndices())}})),h.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&((0,K.A)(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),m=h.getLayout("cy");h.eachItemGraphicEl((function(t,e){var n=h.getItemModel(e).get(["label","rotate"])||0,r=t.getSymbolPath();if(f){var o=h.getItemLayout(e),a=Math.atan2(o[1]-m,o[0]-g);a<0&&(a=2*Math.PI+a);var s=o[0] "),value:r.value,noValue:null==r.value})}return(0,st.w)({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=i.map(this.option.categories||[],(function(t){return null!=t.value?t:i.extend({value:0},t)})),e=new tt.Z(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ot.Z);const ut=lt;var ht=n(553),ct={type:"graphRoam",event:"graphRoam",update:"none"};function dt(t){t.registerChartView($),t.registerSeriesModel(ut),t.registerProcessor(r),t.registerVisual(o),t.registerVisual(s),t.registerLayout(y),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,M),t.registerLayout(D),t.registerCoordinateSystem("graphView",{dimensions:I.Z.dimensions,create:O}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},i.noop),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},i.noop),t.registerAction(ct,(function(t,e,n){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,r=(0,ht.A)(i,t,void 0,n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom)}))}))}},9971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>M});var i=n(655),r=n(3051),o=n(5280),a=n(1525),s=n(2095),l=n(4174),u=n(327),h=s.Z.prototype,c=l.Z.prototype,d=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}(0,i.ZT)(e,t)}(d);function p(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}const f=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new d},e.prototype.buildPath=function(t,e){p(e)?h.buildPath.call(this,t,e):c.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return p(this.shape)?h.pointAt.call(this,t):c.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=p(e)?[e.x2-e.x1,e.y2-e.y1]:c.tangentAt.call(this,t);return o.normalize(n,n)},e}(u.ZP);var g=n(9266),m=n(8154),v=n(6357),y=n(6006),_=n(5669),x=["fromSymbol","toSymbol"];function b(t){return"_"+t+"Type"}function w(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),s=e.getItemVisual(n,t+"Offset"),l=e.getItemVisual(n,t+"KeepAspect"),u=a.zp(r),h=a.Cq(s||0,u),c=a.th(i,-u[0]/2+h[0],-u[1]/2+h[1],u[0],u[1],null,l);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=t,c}}function S(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var T=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return(0,i.ZT)(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new f({name:"line",subPixelOptimize:!0});return S(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,g.KZ(o,{shape:{percent:1}},i,e),this.add(o),(0,r.each)(x,(function(n){var i=w(n,t,e);this.add(i),this[b(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),s={shape:{}};S(s.shape,a),g.D(o,s,i,e),(0,r.each)(x,(function(n){var i=t.getItemVisual(e,n),r=b(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=w(n,t,e);this.add(o)}this[r]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,l=n&&n.selectLineStyle,u=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),f=p.getModel("emphasis");a=f.getModel("lineStyle").getLineStyle(),s=p.getModel(["blur","lineStyle"]).getLineStyle(),l=p.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),d=f.get("blurScope"),u=(0,y.k3)(p)}var g=t.getItemVisual(e,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=a,o.ensureState("blur").style=s,o.ensureState("select").style=l,(0,r.each)(x,(function(t){var e=this.childOfName(t);if(e){e.setColor(m),e.style.opacity=g.opacity;for(var n=0;n0&&(_[0]=-_[0],_[1]=-_[1]);var b=y[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(y[1],y[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*g+u[0],i.y=-c[1]*m+u[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=g*b+u[0],i.y=u[1]+S,d=y[0]<0?"right":"left",i.originX=-g*b,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-g*b+h[0],i.y=h[1]+S,d=y[0]>=0?"right":"left",i.originX=g*b,i.originY=-S}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}}}function T(t,e){var n=t.__specifiedRotation;if(null==n){var i=s.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(m.Z);const M=T},7145:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(8154),r=n(1177),o=n(9971),a=n(6006);function s(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:(0,a.k3)(e)}}function l(t){return isNaN(t[0])||isNaN(t[1])}function u(t){return t&&!l(t[0])&&!l(t[1])}const h=function(){function t(t){this.group=new i.Z,this._LineCtor=t||o.Z}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=s(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=s(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i{"use strict";n.d(e,{Z:()=>f});var i=n(655),r=n(1525),o=n(9266),a=n(8154),s=n(106),l=n(6357),u=n(3140),h=n(3051),c=n(6006),d=n(4535);function p(t,e){this.parent.drift(t,e)}const f=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,i.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var a=(0,r.th)(t,-1,-1,2,2,null,o);a.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=p,this._symbolType=t,this.add(a)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,l.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,l.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var a=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=a!==this._symbolType,h=r&&r.disableAnimation;if(u){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,t,n,l,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?p.attr(d):o.D(p,d,s,n),(0,o.Zi)(p)}if(this._updateCommon(t,n,l,i,r),u){var p=this.childAt(0);if(!h){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,o.KZ(p,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,o){var a,s,p,f,g,m,v,y,_,x=this.childAt(0),b=t.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,p=i.selectItemStyle,f=i.focus,g=i.blurScope,v=i.labelStatesModels,y=i.hoverScale,_=i.cursorStyle,m=i.emphasisDisabled),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");a=S.getModel("itemStyle").getItemStyle(),p=w.getModel(["select","itemStyle"]).getItemStyle(),s=w.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),g=S.get("blurScope"),m=S.get("disabled"),v=(0,c.k3)(w),y=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0);var M=(0,r.Cq)(t.getItemVisual(e,"symbolOffset"),n);M&&(x.x=M[0],x.y=M[1]),_&&x.attr("cursor",_);var A=t.getItemVisual(e,"style"),C=A.fill;if(x instanceof d.ZP){var D=x.style;x.useStyle((0,h.extend)({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},A))}else x.__isEmptyBrush?x.useStyle((0,h.extend)({},A)):x.useStyle(A),x.style.decal=null,x.setColor(C,o&&o.symbolInnerColor),x.style.strokeNoScale=!0;var I=t.getItemVisual(e,"liftZ"),L=this._z2;null!=I?null==L&&(this._z2=x.z2,x.z2+=I):null!=L&&(x.z2=L,this._z2=null);var P=o&&o.useNameLabel;(0,c.ni)(x,v,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return P?t.getName(e):(0,u.H)(t,e)},inheritColor:C,defaultOpacity:A.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=x.ensureState("emphasis");if(O.style=a,x.ensureState("select").style=p,x.ensureState("blur").style=s,y){var E=Math.max((0,h.isNumber)(y)?y:1.1,3/this._sizeY);O.scaleX=this._sizeX*E,O.scaleY=this._sizeY*E}this.setSymbolScale(1),(0,l.k5)(this,f,g,m)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=(0,s.A)(this).dataIndex,a=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&o.bX(l,{style:{opacity:0}},e,{dataIndex:r,removeOpt:a,cb:function(){i.removeTextContent()}})}else i.removeTextContent();o.bX(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:a})},e.getSymbolSize=function(t,e){return(0,r.zp)(t.getItemVisual(e,"symbolSize"))},e}(a.Z)},8162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(8154),r=n(9266),o=n(1177),a=n(6351),s=n(3051),l=n(6006);function u(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function h(t){return null==t||(0,s.isObject)(t)||(t={isIgnore:t}),t||{}}function c(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:(0,l.k3)(e),cursorStyle:e.get("cursor")}}const d=function(){function t(t){this.group=new i.Z,this._SymbolCtor=t||a.Z}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=h(e);var n=this.group,i=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=c(t),d={disableAnimation:s},p=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var r=p(i);if(u(t,r,i,e)){var o=new a(t,i,l,d);o.setPosition(r),t.setItemGraphicEl(i,o),n.add(o)}})).update((function(h,c){var f=o.getItemGraphicEl(c),g=p(h);if(u(t,g,h,e)){var m=t.getItemVisual(h,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)n.remove(f),(f=new a(t,h,l,d)).setPosition(g);else{f.updateData(t,h,l,d);var y={x:g[0],y:g[1]};s?f.attr(y):r.D(f,y,i)}n.add(f),t.setItemGraphicEl(h,f)}else n.remove(f)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=p,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=c(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=h(n);for(var r=t.start;r{"use strict";n.d(e,{ID:()=>l,X0:()=>u,lQ:()=>h});var i=n(5151),r=n(9266),o=n(7214),a=n(5669),s=n(3051);function l(t,e,n,o,a){var l=t.getArea(),u=l.x,h=l.y,c=l.width,d=l.height,p=n.get(["lineStyle","width"])||2;u-=p/2,h-=p/2,c+=p,d+=p,u=Math.floor(u),c=Math.round(c);var f=new i.Z({shape:{x:u,y:h,width:c,height:d}});if(e){var g=t.getBaseAxis(),m=g.isHorizontal(),v=g.inverse;m?(v&&(f.shape.x+=c),f.shape.width=0):(v||(f.shape.y+=d),f.shape.height=0);var y=(0,s.isFunction)(a)?function(t){a(t,f)}:null;r.KZ(f,{shape:{width:c,height:d,x:u,y:h}},n,null,o,y)}return f}function u(t,e,n){var i=t.getArea(),s=(0,a.NM)(i.r0,1),l=(0,a.NM)(i.r,1),u=new o.C({shape:{cx:(0,a.NM)(t.cx,1),cy:(0,a.NM)(t.cy,1),r0:s,r:l,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?u.shape.endAngle=i.startAngle:u.shape.r=s,r.KZ(u,{shape:{endAngle:i.endAngle,r:l}},n));return u}function h(t,e,n,i,r){return t?"polar"===t.type?u(t,e,n):"cartesian2d"===t.type?l(t,e,n,i,r):null:null}},1764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101);function o(t){return"_EC_"+t}var a=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[o(t)]){var i=new s(t,e);return i.hostGraph=this,this.nodes.push(i),n[o(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[o(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,a=this._edgesMap;if(i.isNumber(t)&&(t=this.nodes[t]),i.isNumber(e)&&(e=this.nodes[e]),t instanceof s||(t=r[o(t)]),e instanceof s||(e=r[o(e)]),t&&e){var u=t.id+"-"+e.id,h=new l(t,e,n);return h.hostGraph=this,this._directed&&(t.outEdges.push(h),e.inEdges.push(h)),t.edges.push(h),t!==e&&e.edges.push(h),this.edges.push(h),a[u]=h,h}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof s&&(t=t.id),e instanceof s&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof s||(e=this._nodesMap[o(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}i.mixin(s,u("hostGraph","data")),i.mixin(l,u("hostGraph","edgeData"));const h=a;var c=n(9344),d=n(5623),p=n(4267),f=n(8455),g=n(2234);function m(t,e,n,o,a){for(var s=new h(o),l=0;l "+x)),v++)}var b,w=n.get("coordinateSystem");if("cartesian2d"===w||"polar"===w)b=(0,f.Z)(t,n);else{var S=p.Z.get(w),T=S&&S.dimensions||[];i.indexOf(T,"value")<0&&T.concat(["value"]);var M=(0,d.Z)(t,{coordDimensions:T,encodeDefine:n.getEncode()}).dimensions;(b=new r.Z(M,n)).initData(t)}var A=new r.Z(["value"],n);return A.initData(m,u),a&&a(b,A),(0,c.Z)({mainData:b,struct:s,structAttr:"graph",datas:{node:b,edge:A},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},5682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2234);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},8455:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101),o=n(5623),a=n(381),s=n(2234),l=n(4267),u=function(t){this.coordSysDims=[],this.axisMap=(0,i.createHashMap)(),this.categoryAxisMap=(0,i.createHashMap)(),this.coordSysName=t};var h={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",s.C6).models[0],o=t.getReferringComponents("yAxis",s.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),c(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),c(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",s.C6).models[0];e.coordSysDims=["single"],n.set("single",r),c(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",s.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),c(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),c(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.each)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),c(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function c(t){return"category"===t.get("type")}var d=n(9574),p=n(9936),f=n(1772),g=n(4279);const m=function(t,e,n){n=n||{};var c,m=e.getSourceManager(),v=!1;t?(v=!0,c=(0,d.nx)(t)):v=(c=m.getSource()).sourceFormat===g.cy;var y=function(t){var e=t.get("coordinateSystem"),n=new u(e),i=h[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),_=function(t,e){var n,r=t.get("coordinateSystem"),o=l.Z.get(r);return e&&e.coordSysDims&&(n=i.map(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=(0,a.T)(r)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(e,y),x=n.useEncodeDefaulter,b=i.isFunction(x)?x:x?i.curry(f.pY,_,e):null,w={coordDimensions:_,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!v},S=(0,o.Z)(c,w),T=function(t,e,n){var r,o;return n&&i.each(t,(function(t,i){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==r||(t[r].otherDims.itemName=0),r}(S.dimensions,n.createInvertedIndices,y),M=v?null:m.getSharedDataStore(S),A=(0,p.BM)(e,{schema:S,store:M}),C=new r.Z(S,e);C.setCalculationInfo(A);var D=null!=T&&function(t){if(t.sourceFormat===g.cy){var e=function(t){var e=0;for(;e{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(8540),r=n(3051);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=(0,i.hk)(t,e,n[0]);return null!=o?o+"":null}if(r){for(var a=[],s=0;s=0&&i.push(e[a])}return i.join(" ")}},241:(t,e,n)=>{"use strict";n.d(e,{N:()=>B});var i=n(655),r=n(7145),o=n(8154),a=n(9971),s=n(3051),l=n(1525),u=n(5280),h=n(8554);const c=function(t){function e(e,n,i){var r=t.call(this)||this;return r.add(r.createLine(e,n,i)),r._updateEffectSymbol(e,n),r}return(0,i.ZT)(e,t),e.prototype.createLine=function(t,e,n){return new a.Z(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");s.isArray(i)||(i=[i,i]);var o=t.getItemVisual(e,"style"),a=n.get("color")||o&&o.stroke,u=this.childAt(1);this._symbolType!==r&&(this.remove(u),(u=(0,l.th)(r,-.5,-.5,1,1,a)).z2=100,u.culling=!0,this.add(u)),u&&(u.setStyle("shadowColor",a),u.setStyle(n.getItemStyle(["color"])),u.scaleX=i[0],u.scaleY=i[1],u.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=t.getItemLayout(n),o=1e3*e.get("period"),a=e.get("loop"),l=e.get("constantSpeed"),u=s.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3}));if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop){i.stopAnimation();var h=void 0;h=s.isFunction(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a)}this._period=o,this._loop=a}},e.prototype._animateSymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getLineLength=function(t){return u.dist(t.__p1,t.__cp1)+u.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=h.Zm,l=h.AZ;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var c=l(e[0],i[0],n[0],r),d=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(c);var y=n(479),_=n(327),x=n(3640),b=n(5674),w=n(106),S=function(){this.polyline=!1,this.curveness=0,this.segs=[]},T=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,i.ZT)(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new S},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,d=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){var f=(u+d)/2-(h-p)*r,g=(h+p)/2-(d-u)*r;if(b.m(u,h,f,g,d,p,o,t,e))return a}else if(x.m(u,h,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const A={seriesType:"lines",plan:(0,n(5682).Z)(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&(0,C.lQ)(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=A.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),s=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&s===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=s?new M:new r.Z(o?i?v:m:i?c:a.Z),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(n(5797).Z);var I=n(3321),L=n(5101),P=n(5685),O="undefined"==typeof Uint32Array?Array:Uint32Array,E="undefined"==typeof Float64Array?Array:Float64Array;function N(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=(0,s.map)(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),(0,s.mergeAll)([e,t[0],t[1]])})))}const k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return(0,i.ZT)(e,t),e.prototype.init=function(e){e.data=e.data||[],N(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(N(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=(0,s.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=(0,s.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(I.Z);function R(t){return t instanceof Array||(t=[t,t]),t}const z={seriesType:"lines",reset:function(t){var e=R(t.get("symbol")),n=R(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=R(n.getShallow("symbol",!0)),r=R(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};function B(t){t.registerChartView(D),t.registerSeriesModel(k),t.registerLayout(A),t.registerVisual(z)}},8608:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var i=n(3051),r=n(8154),o=n(2095),a=n(6498),s=n(1177),l=n(106),u=n(6006),h=n(1497),c=n(5669),d=n(1525),p=n(2892),f=n(5280),g=n(7947),m=n(4162),v=Math.PI,y=function(){function t(t,e){this.group=new r.Z,this.opt=e,this.axisModel=t,(0,i.defaults)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Z({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!_[t]},t.prototype.add=function(t){_[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,c.wW)(e-t);return(0,c.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,c.mW)(o-v)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),_={axisLine:function(t,e,n,r){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=r.transform,u=[s[0],0],h=[s[1],0];l&&((0,f.applyTransform)(u,u,l),(0,f.applyTransform)(h,h,l));var c=(0,i.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new o.Z({subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});p.anid="line",n.add(p);var g=e.get(["axisLine","symbol"]);if(null!=g){var m=e.get(["axisLine","symbolSize"]);(0,i.isString)(g)&&(g=[g,g]),((0,i.isString)(m)||(0,i.isNumber)(m))&&(m=[m,m]);var v=(0,d.Cq)(e.get(["axisLine","symbolOffset"])||0,m),y=m[0],_=m[1];(0,i.each)([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-h[0])*(u[0]-h[0])+(u[1]-h[1])*(u[1]-h[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,d.th)(g[i],-y/2,-_/2,y,_,c.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:u[0]+o*Math.cos(t.rotation),y:u[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,r){var o=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");"auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick"));if(!s||o.scale.isBlank())return;for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),h=S(o.getTicksCoords(),e.transform,u,(0,i.defaults)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c_[1]?-1:1,b=["start"===p?_[0]-x*m:"end"===p?_[1]+x*m:(_[0]+_[1])/2,w(p)?t.labelOffset+f*m:0],S=e.get("nameRotate");null!=S&&(S=S*v/180),w(p)?h=y.innerTextLayout(t.rotation,null!=S?S:t.rotation,f):(h=function(t,e,n,i){var r,o,a=(0,c.wW)(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;(0,c.mW)(a-v/2)?(o=l?"bottom":"top",r="center"):(0,c.mW)(a-1.5*v)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*v&&a>v/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,S||0,_),null!=(d=t.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var T=g.getFont(),M=e.get("nameTruncate",!0)||{},A=M.ellipsis,C=(0,i.retrieve)(t.nameTruncateMaxWidth,M.maxWidth,d),D=new a.ZP({x:b[0],y:b[1],rotation:h.rotation,silent:y.isLabelSilent(e),style:(0,u.Lr)(g,{text:o,font:T,overflow:"truncate",width:C,ellipsis:A,fill:g.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:g.get("align")||h.textAlign,verticalAlign:g.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(s.setTooltipConfig({el:D,componentModel:e,itemName:o}),D.__fullText=o,D.anid="name",e.get("triggerEvent")){var I=y.makeAxisEventDataBase(e);I.targetType="axisName",I.name=o,(0,l.A)(D).eventData=I}r.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function x(t){t&&(t.ignore=!0)}function b(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=p.identity([]);return p.rotate(r,r,-t.rotation),n.applyTransform(p.mul([],r,t.getLocalTransform())),i.applyTransform(p.mul([],r,e.getLocalTransform())),n.intersect(i)}}function w(t){return"middle"===t||"center"===t}function S(t,e,n,i,r){for(var a=[],s=[],l=[],u=0;u{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(8490),o=n(3166),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(1177),a=n(6498),s=n(9266),l=n(8490),u=n(1158),h=n(270),c=(0,n(2234).Yf)(),d=i.clone,p=i.bind,f=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,o){var a=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,o||this._lastValue!==a||this._lastStatus!==s){this._lastValue=a,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var h={};this.makeElOption(h,a,t,e,n);var c=h.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var p=i.curry(g,e,d);this.updatePointerEl(l,h,p),this.updateLabelEl(l,h,p,e)}else l=this._group=new r.Z,this.createPointerEl(l,h,t,e),this.createLabelEl(l,h,t,e),n.getZr().add(l);_(l,e,!0),this._renderHandle(a)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=l.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var a=c(t).pointerEl=new o[r.type](d(e.pointer));t.add(a)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=c(t).labelEl=new a.ZP(d(e.label));t.add(r),v(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=c(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=c(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),v(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),a=this._handle,s=n.getModel("handle"),l=n.get("status");if(!s.get("show")||!l||"hide"===l)return a&&r.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=o.createIcon(s.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){u.sT(t.event)},onmousedown:p(this._onHandleDragMove,this,0,0),drift:p(this._onHandleDragMove,this),ondragend:p(this._onHandleDragEnd,this)}),r.add(a)),_(a,n,!1),a.setStyle(s.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var c=s.get("size");i.isArray(c)||(c=[c,c]),a.scaleX=c[0]/2,a.scaleY=c[1]/2,h.T9(this,"_doDispatchAxisPointer",s.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){g(this._axisPointerModel,!e&&this._moveAnimation,this._handle,y(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(y(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(y(i)),c(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),h.ZH(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function g(t,e,n,i){m(c(n).lastProp,i)||(c(n).lastProp=i,e?s.D(n,i,t):(n.stopAnimation(),n.attr(i)))}function m(t,e){if(i.isObject(t)&&i.isObject(e)){var n=!0;return i.each(e,(function(e,i){n=n&&m(t[i],e)})),!!n}return t===e}function v(t,e){t[e.get(["label","show"])?"show":"hide"]()}function y(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const x=f},2448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r=n(2234);function o(t,e){var n,o=[],a=t.seriesIndex;if(null==a||!(n=e.getSeriesByIndex(a)))return{point:[]};var s=n.getData(),l=r.gO(s,t);if(null==l||l<0||i.isArray(l))return{point:[]};var u=s.getItemGraphicEl(l),h=n.coordinateSystem;if(n.getTooltipPosition)o=n.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)if(t.isStacked){var c=h.getBaseAxis(),d=h.getOtherAxis(c).dim,p=c.dim,f="x"===d||"radius"===d?1:0,g=s.mapDimension(p),m=[];m[f]=s.get(g,l),m[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),o=h.dataToPoint(m)||[]}else o=h.dataToPoint(s.getValues(i.map(h.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var v=u.getBoundingRect().clone();v.applyTransform(u.transform),o=[v.x+v.width/2,v.y+v.height/2]}return{point:o,el:u}}},6996:(t,e,n)=>{"use strict";n.d(e,{E:()=>h,z:()=>s});var i=n(3051),r=n(6387),o=(0,n(2234).Yf)(),a=i.each;function s(t,e,n){if(!r.default.node){var s=e.getZr();o(s).records||(o(s).records={}),function(t,e){if(o(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);a(o(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}o(t).initialized=!0,n("click",i.curry(u,"click")),n("mousemove",i.curry(u,"mousemove")),n("globalout",l)}(s,e),(o(s).records[t]||(o(s).records[t]={})).handler=n}}function l(t,e,n){t.handler("leave",null,n)}function u(t,e,n,i){e.handler(t,n,i)}function h(t,e){if(!r.default.node){var n=e.getZr();(o(n).records||{})[t]&&(o(n).records[t]=null)}}},7037:(t,e,n)=>{"use strict";n.d(e,{N:()=>C});var i=n(1726),r=n(655),o=n(7329),a=n(5539),s=n(9069),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,l=o.grid,c=i.get("type"),d=u(l,o).getOtherAxis(o).getGlobalExtent(),p=o.toGlobalCoord(o.dataToCoord(e,!0));if(c&&"none"!==c){var f=a.fk(i),g=h[c](o,p,d);g.style=f,t.graphicKey=g.type,t.pointer=g}var m=s.bK(l.model,n);a.gf(e,t,m,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=s.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=a.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=u(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=h[l];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(o.Z);function u(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var h={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:a.BL([e,n[0]],[e,n[1]],c(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:a.uE([e-i/2,n[0]],[i,r],c(t))}}};function c(t){return"x"===t.dim?0:1}const d=l;const p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(n(8071).Z);var f=n(6996);const g=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";f.z("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){f.E("axisPointer",e)},e.prototype.dispose=function(t,e){f.E("axisPointer",e)},e.type="axisPointer",e}(n(3166).Z);var m=n(3051),v=n(8490),y=n(2234),_=n(2448),x=(0,y.Yf)();function b(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||(0,m.bind)(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){A(r)&&(r=(0,_.Z)({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=A(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||A(r),d={},p={},f={list:[],map:{}},g={showPointer:(0,m.curry)(S,p),showTooltip:(0,m.curry)(T,f)};(0,m.each)(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);(0,m.each)(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&w(t,a,g,!1,d)}}))}));var v={};return(0,m.each)(h,(function(t,e){var n=t.linkGroup;n&&!p[e]&&(0,m.each)(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,M(e),M(t)))),v[t.key]=o}}))})),(0,m.each)(v,(function(t,e){w(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];(0,m.each)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,h,d),function(t,e,n,i){if(A(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=x(i)[r]||{},a=x(i)[r]={};(0,m.each)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,m.each)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];(0,m.each)(o,(function(t,e){!a[e]&&l.push(t)})),(0,m.each)(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),d}}function w(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return(0,m.each)(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),(0,m.each)(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&(0,m.extend)(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function S(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function T(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=v.zm(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function M(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function A(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function C(t){i.Z.registerAxisPointerClass("CartesianAxisPointer",d),t.registerComponentModel(p),t.registerComponentView(g),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!(0,m.isArray)(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=(0,v.KM)(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},b)}},8490:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,np:()=>u,r:()=>l,zm:()=>c});var i=n(1497),r=n(3051);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.each)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var d=c(n.model),p=t.coordSysAxesInfo[d]={};t.coordSysMap[d]=n;var f=n.model.getModel("tooltip",o);if((0,r.each)(n.getAxes(),(0,r.curry)(y,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),m="cross"===f.get(["axisPointer","type"]),v=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||m)&&(0,r.each)(v.baseAxes,(0,r.curry)(y,!m||"cross",g)),m&&(0,r.each)(v.otherAxes,(0,r.curry)(y,"cross",!1))}}function y(o,d,g){var m=g.model.getModel("axisPointer",s),v=m.get("show");if(v&&("auto"!==v||o||h(m))){null==d&&(d=m.get("triggerTooltip")),m=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],h={};(0,r.each)(u,(function(t){h[t]=(0,r.clone)(l.get(t))})),h.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===a){var d=l.get(["label","show"]);if(c.show=null==d||d,!s){var p=h.lineStyle=l.get("crossStyle");p&&(0,r.defaults)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(h,n,o))}(g,f,s,e,o,d):m;var y=m.get("snap"),_=c(g.model),x=d||y||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:m,triggerTooltip:d,involveSeries:x,snap:y,useHandle:h(m),seriesModels:[],linkGroup:null};p[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=h(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a{"use strict";n.d(e,{$_:()=>d,BL:()=>m,Rj:()=>y,Zh:()=>f,fk:()=>c,gf:()=>g,gk:()=>p,uE:()=>v});var i=n(3051),r=n(1177),o=n(423),a=n(8988),s=n(2892),l=n(7947),u=n(8608),h=n(6006);function c(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function d(t,e,n,i,r){var s=p(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),u=a.MY(l.get("padding")||0),c=l.getFont(),d=o.lP(s,c),f=r.position,g=d.width+u[1]+u[3],m=d.height+u[0]+u[2],v=r.align;"right"===v&&(f[0]-=g),"center"===v&&(f[0]-=g/2);var y=r.verticalAlign;"bottom"===y&&(f[1]-=m),"middle"===y&&(f[1]-=m/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,g,m,i);var _=l.get("backgroundColor");_&&"auto"!==_||(_=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:(0,h.Lr)(l,{text:s,font:c,fill:l.getTextColor(),padding:u,backgroundColor:_}),z2:10}}function p(t,e,n,r,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var u={value:l.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};i.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&u.seriesData.push(r)})),i.isString(s)?a=s.replace("{value}",a):i.isFunction(s)&&(a=s(u))}return a}function f(t,e,n){var i=s.create();return s.rotate(i,i,n.rotation),s.translate(i,i,n.position),r.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function g(t,e,n,i,r,o){var a=u.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),d(e,i,r,o,{position:f(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function m(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function v(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function y(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}},2719:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(3051),o=n(8071),a=n(6398),s=n(2234),l=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function u(t){var e={};return(0,r.each)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const h=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=u(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=u(t);(0,r.merge)(this.option,t,!0),(0,r.merge)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.createHashMap)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.each)(a.I,(function(n){var i=this.getReferringComponents((0,a.jQ)(n),s.iP);if(i.specified){e=!0;var o=new l;(0,r.each)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";u(n.findComponents({mainType:o+"Axis"}),o)}i&&u(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function u(e,n){var o=e[0];if(o){var a=new l;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var u=o.getReferringComponents("grid",s.C6).models[0];u&&(0,r.each)(e,(function(t){o.componentIndex!==t.componentIndex&&u===t.getReferringComponents("grid",s.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&(0,r.each)(a.I,(function(e){if(i){var r=n.findComponents({mainType:(0,a.jQ)(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new l;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.each)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent((0,a.jQ)(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.each)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent((0,a.jQ)(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.each)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(n(3166).Z)},6398:(t,e,n)=>{"use strict";n.d(e,{BL:()=>l,I:()=>r,jQ:()=>s,kc:()=>a,rg:()=>u});var i=n(3051),r=["x","y","radius","angle","single"],o=["cartesian2d","polar","singleAxis"];function a(t){var e=t.get("coordinateSystem");return(0,i.indexOf)(o,e)>=0}function s(t){return t+"Axis"}function l(t,e){var n,r=(0,i.createHashMap)(),o=[],a=(0,i.createHashMap)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var i=r.get(t);i&&i[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return o}function u(t){var e=t.ecModel,n={infoList:[],infoMap:(0,i.createHashMap)()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(s(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,l=n.infoMap.get(a);l||(l={model:o,axisModels:[]},n.infoList.push(l),n.infoMap.set(a,l)),l.axisModels.push(r)}}})),n}},7543:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(3051),r=n(6398),o=n(5669),a=n(9233),s=n(7947),l=n(8986),u=n(2234),h=i.each,c=o.dt;const d=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if((0,r.kc)(e)){var n=(0,r.jQ)(this._dimName),i=e.getReferringComponents(n,u.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return i.clone(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];h(["start","end"],(function(a,h){var c=t[a],d=t[a+"Value"];"percent"===r[h]?(null==c&&(c=s[h]),d=i.parse(o.NU(c,s,n))):(e=!0,d=null==d?n[h]:i.parse(d),c=o.NU(d,n,s)),u[h]=d,l[h]=c})),c(u),c(l);var d=this._minMaxSpan;function p(t,e,n,r,s){var l=s?"Span":"ValueSpan";(0,a.Z)(0,t,n,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=o.NU(t[u],n,r,!0),s&&(e[u]=i.parse(e[u]))}return e?p(u,l,n,s,!1):p(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];h(n,(function(t){(0,s.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,l.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&h(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var s=e.getStore(),l=i.map(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,o=0;oa[1];if(h&&!c&&!d)return!0;h&&(i=!0),c&&(e=!0),d&&(n=!0)}return i&&e&&n}))}else h(r,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));h(r,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;h(["min","max"],(function(i){var r=e.get(i+"Span"),a=e.get(i+"ValueSpan");null!=a&&(a=this.getAxisModel().axis.scale.parse(a)),null!=a?r=o.NU(n[0]+a,n,[0,100],!0):null!=r&&(a=o.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=a}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=o.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();const p={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var a=t.getComponent((0,r.jQ)(i),o);e(i,o,a,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new d(e,i,o,t),n.push(r.__dzAxisProxy))}));var o=(0,i.createHashMap)();return(0,i.each)(n,(function(t){(0,i.each)(t.getTargetSeriesModels(),(function(t){o.set(t.uid,t)}))})),o},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var f=!1;function g(t){f||(f=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,p),function(t){t.registerAction("dataZoom",(function(t,e){var n=(0,r.BL)(e,t);(0,i.each)(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}},7240:(t,e,n)=>{"use strict";n.d(e,{N:()=>h});var i=n(655),r=n(8071),o=n(3166),a=n(4279),s=n(6437),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new s.U(this),(0,s.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,s.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:a.fY},e}(r.Z),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(o.Z);function h(t){t.registerComponentModel(l),t.registerComponentView(u)}},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>$});var i=n(655),r=n(3051),o=n(3510),a=n(8154),s=n(5151),l=n(1177),u=n(2514),h=n(5094),c=n(582),d=n(4130),p=!0,f=Math.min,g=Math.max,m=Math.pow,v="globalPan",y={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},x={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},b=0,w=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new a.Z,n._uid="brushController_"+b++,(0,r.each)(q,(function(t,e){this._handlers[e]=(0,r.bind)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||c.qn(e,v,this._uid),(0,r.each)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.merge)((0,r.clone)(x),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;c.Ar(t,v,this._uid),(0,r.each)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.each)(t,(function(t){e[t.panelId]=(0,r.clone)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.map)(t,(function(t){return(0,r.merge)((0,r.clone)(x),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new d.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):T(i,S(i,s));C(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(o.Z);function S(t,e){var n=J[e.brushType].createCover(t,e);return n.__brushOption=e,A(n,e),t.group.add(n),n}function T(t,e){var n=D(e);return n.endCreating&&(n.endCreating(t,e),A(e,e.__brushOption)),e}function M(t,e){var n=e.__brushOption;D(e).updateCoverShape(t,e,n.range,n)}function A(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function C(t,e){D(e).updateCommon(t,e),M(t,e)}function D(t){return J[t.__brushOption.brushType]}function I(t,e,n){var i,o=t._panels;if(!o)return p;var a=t._transform;return(0,r.each)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function L(t,e){var n=t._panels;if(!n)return p;var i=e.__brushOption.panelId;return null!=i?n[i]:p}function P(t){var e=t._covers,n=e.length;return(0,r.each)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function O(t,e){var n=(0,r.map)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.clone)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function E(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function N(t,e,n,i){var o=new a.Z;return o.add(new s.Z({name:"main",style:B(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.curry)(V,t,e,o,["n","s","w","e"]),ondragend:(0,r.curry)(O,e,{isEnd:!0})})),(0,r.each)(i,(function(n){o.add(new s.Z({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.curry)(V,t,e,o,n),ondragend:(0,r.curry)(O,e,{isEnd:!0})}))})),o}function k(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=g(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,p=c-o+r/2,f=h-a,m=c-s,v=f+r,y=m+r;z(t,e,"main",a,s,f,m),i.transformable&&(z(t,e,"w",l,u,o,y),z(t,e,"e",d,u,o,y),z(t,e,"n",l,u,v,o),z(t,e,"s",l,p,v,o),z(t,e,"nw",l,u,o,o),z(t,e,"ne",d,u,o,o),z(t,e,"sw",l,p,o,o),z(t,e,"se",d,p,o,o))}function R(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(B(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?F(t,n[0]):function(t,e){var n=[F(t,e[0]),F(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?_[o]+"-resize":null})}))}function z(t,e,n,i,r,o,a){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=U(t,e,[[i,r],[i+o,r+a]]),l=f(s[0][0],s[1][0]),u=f(s[0][1],s[1][1]),h=g(s[0][0],s[1][0]),c=g(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function B(t){return(0,r.defaults)({strokeNoScale:!0},t.brushStyle)}function Z(t,e,n,i){var r=[f(t,n),f(e,i)],o=[g(t,n),g(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function F(t,e){var n=l.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return l.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function V(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=H(e,o,a);(0,r.each)(i,(function(t){var e=y[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(Z(l[0][0],l[1][0],l[0][1],l[1][1])),C(e,n),O(e,{isEnd:!1})}function G(t,e,n,i){var o=e.__brushOption.range,a=H(t,n,i);(0,r.each)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),C(t,e),O(t,{isEnd:!1})}function H(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function U(t,e,n){var i=L(t,e);return i&&i!==p?i.clipPath(n,t._transform):(0,r.clone)(n)}function W(t){var e=t.event;e.preventDefault&&e.preventDefault()}function j(t,e,n){return t.childOfName("main").contain(e,n)}function X(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return m(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&P(t);var u=(0,r.clone)(l);u.brushType=Y(u.brushType,s),u.panelId=s===p?null:s.panelId,a=t._creatingCover=S(t,u),t._covers.push(a)}if(a){var h=J[Y(t._brushType,s)];a.__brushOption.range=h.getCreatingRange(U(t,a,t._track)),i&&(T(t,a),h.updateCommon(t,a)),M(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&I(t,e,n)&&P(t)&&(o={isEnd:i,removeOnClick:!0});return o}function Y(t,e){return"auto"===t?e.defaultBrushType:t}var q={mousedown:function(t){if(this._dragging)K(this,t);else if(!t.target||!t.target.draggable){W(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=I(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=I(t,e,n);if(!t._dragging)for(var a=0;a{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(1177),o=n(1463),a=n(2234),s=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],l=function(){function t(t,e,n){var r=this;this._targetInfoList=[];var o=h(e,t);(0,i.each)(c,(function(t,e){(!n||!n.include||(0,i.indexOf)(n.include,e)>=0)&&t(o,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=f[t.brushType](0,n,e);t.__rangeOffset={offset:m[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,i.each)(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&(0,i.each)(r.coordSyses,(function(i){var r=f[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,i.each)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=f[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?m[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=y(n),o=y(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,i.map)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:o.x0(i),isTargetByCursor:o.G(i,t,n.coordSysModel),getLinearBrushOtherExtent:o.VM(i)}}))},t.prototype.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&(0,i.indexOf)(r.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=h(e,t),r=0;rt[1]&&t.reverse(),t}function h(t,e){return(0,a.pm)(t,e,{includeMainTypes:s})}var c={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,o=t.gridModels,a=(0,i.createHashMap)(),s={},l={};(n||r||o)&&((0,i.each)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,i.each)(r,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,i.each)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,i.each)(o.getCartesians(),(function(t,e){((0,i.indexOf)(n,t.getAxis("x").model)>=0||(0,i.indexOf)(r,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:p.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,i.each)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:p.geo})}))}},d=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],p={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(r.getTransform(t)),e}},f={lineX:(0,i.curry)(g,0),lineY:(0,i.curry)(g,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[u([r[0],o[0]]),u([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,i.map)(n,(function(n){var i=t?e.pointToData(n,r):e.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function g(t,e,n,r){var o=n.getAxis(["x","y"][t]),a=u((0,i.map)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(r[t]),!0):o.toGlobalCoord(o.dataToCoord(r[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var m={lineX:(0,i.curry)(v,0),lineY:(0,i.curry)(v,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,i.map)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function v(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function y(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const _=l},9176:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(3510),o=n(1158),a=n(582),s=n(3051);function l(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(o.sT(i.event),u(t,e,n,i,r))}function u(t,e,n,i,r){r.isAvailableBehavior=(0,s.bind)(h,null,n,i),t.trigger(e,r)}function h(t,e,n){var i=n[t];return!t||i&&(!(0,s.isString)(i)||e.event[i+"Key"])}const c=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=(0,s.bind)(n._mousedownHandler,n),r=(0,s.bind)(n._mousemoveHandler,n),o=(0,s.bind)(n._mouseupHandler,n),a=(0,s.bind)(n._mousewheelHandler,n),l=(0,s.bind)(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=(0,s.defaults)((0,s.clone)(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",l)},n}return(0,i.ZT)(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(o.x1(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&h("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!a.Tf(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,s=e-i,l=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&o.sT(t.event),u(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){o.x1(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=h("zoomOnMouseWheel",t,this._opt),n=h("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;l(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i);l(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){a.Tf(this._zr,"globalPan")||l(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(r.Z)},1463:(t,e,n)=>{"use strict";n.d(e,{G:()=>l,VM:()=>s,x0:()=>a});var i=n(479),r=n(1485),o=n(1177);function a(t){return t=u(t),function(e){return o.clipPointsByRect(e,t)}}function s(t,e){return t=u(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function l(t,e,n){var i=u(t);return function(t,o){return i.contain(o[0],o[1])&&!(0,r.l)(t,e,n)}}function u(t){return i.Z.create(t)}},1485:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});var i={axisPointer:1,tooltip:1,brush:1};function r(t,e,n){var r=e.getComponentByElement(t.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!i.hasOwnProperty(r.mainType)&&o&&o.model!==n}},582:(t,e,n)=>{"use strict";n.d(e,{Ar:()=>s,Tf:()=>l,qn:()=>a});var i=n(1615),r=n(3051),o="\0_ec_interaction_mutex";function a(t,e,n){u(t)[e]=n}function s(t,e,n){var i=u(t);i[e]===n&&(i[e]=null)}function l(t,e){return!!u(t)[e]}function u(t){return t[o]||(t[o]={})}i.zl({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r.noop)},9337:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(6172),r=n(8988),o=n(5151);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new o.Z({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},1194:(t,e,n)=>{"use strict";function i(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function r(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}n.d(e,{H:()=>r,e:()=>i})},9233:(t,e,n)=>{"use strict";function i(t,e,n,i,a,s){t=t||0;var l=n[1]-n[0];if(null!=a&&(a=o(a,[0,l])),null!=s&&(s=Math.max(s,null!=a?a:0)),"all"===i){var u=Math.abs(e[1]-e[0]);u=o(u,[0,l]),a=s=o(u,[a,s]),i=0}e[0]=o(e[0],n),e[1]=o(e[1],n);var h=r(e,i);e[i]+=t;var c,d=a||0,p=n.slice();return h.sign<0?p[0]+=d:p[1]-=d,e[i]=o(e[i],p),c=r(e,i),null!=a&&(c.sign!==h.sign||c.spans&&(e[1-i]=e[i]+c.sign*s),e}function r(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function o(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}n.d(e,{Z:()=>i})},3450:(t,e,n)=>{"use strict";n.d(e,{N:()=>G});var i=n(8023),r=n(655),o=n(3051),a=n(1497),s=n(2234),l=n(8071);const u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.isArray(e)&&o.each(e,(function(t,i){o.isString(t)&&(t={type:t}),e[i]=o.merge(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);var h=n(1092),c=n(1177),d=n(8154),p=n(6498),f=n(5151),g=n(6357),m=n(6006),v=n(9337),y=n(6172),_=n(3166),x=n(1525),b=n(8625),w=o.curry,S=o.each,T=d.Z;function M(t,e,n,i){D(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),C(t,e,n,i)}function A(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0),S(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?(0,b.I)(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=C||u||"roundRect",i,s,l,v,w,d),I=new T,L=i.getModel("textStyle");if(!o.isFunction(t.getLegendIcon)||C&&"inherit"!==C){var P="inherit"===C&&t.getData().getVisual("symbol")?"inherit"===M?t.getData().getVisual("symbolRotate"):M:0;I.add(function(t){var e=t.icon||"roundRect",n=(0,x.th)(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:y,itemHeight:_,icon:u,iconRotate:P,itemStyle:D.itemStyle,lineStyle:D.lineStyle,symbolKeepAspect:A}))}else I.add(t.getLegendIcon({itemWidth:y,itemHeight:_,icon:u,iconRotate:M,itemStyle:D.itemStyle,lineStyle:D.lineStyle,symbolKeepAspect:A}));var O="left"===a?y+5:-5,E=a,N=r.get("formatter"),k=e;o.isString(N)&&N?k=N.replace("{name}",null!=e?e:""):o.isFunction(N)&&(k=N(e));var R=i.get("inactiveColor");I.add(new p.ZP({style:(0,m.Lr)(L,{text:k,x:O,y:_/2,fill:w?L.getTextColor():R,align:E,verticalAlign:"middle"})}));var z=new f.Z({shape:I.getBoundingRect(),invisible:!0}),B=i.getModel("tooltip");return B.get("show")&&c.setTooltipConfig({el:z,componentModel:r,itemName:e,itemTooltipOption:B.option}),I.add(z),I.eachChild((function(t){t.silent=!0})),z.silent=!h,this.getContentGroup().add(I),(0,g.vF)(I),I.__legendDataIndex=n,I},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();y.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){y.BZ("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+h[f],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(_.Z);function L(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;nn[r],m=[-d.x,-d.y];e||(m[i]=u[l]);var v=[0,0],_=[-p.x,-p.y],x=o.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[i]+=n[r]-p[r]:v[i]+=p[r]+x);_[1-i]+=d[a]/2-p[a]/2,u.setPosition(m),h.setPosition(v),c.setPosition(_);var b={x:0,y:0};if(b[r]=g?n[r]:d[r],b[a]=Math.max(d[a],p[a]),b[s]=Math.min(0,p[s]+_[1-i]),h.__rectSize=n[r],g){var w={x:0,y:0};w[r]=Math.max(n[r]-p[r]-x,0),w[a]=b[a],h.setClipPath(new f.Z({shape:w})),h.__rectSize=w[r]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&R.D(u,{x:S.contentPosition[0],y:S.contentPosition[1]},g?t:null),this._updatePageInfoView(t,S),b},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;o.each(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,s=null!=a?a+1:0,l=e.pageCount;i&&r&&i.setStyle("text",o.isString(r)?r.replace("{current}",null==s?"":s+"").replace("{total}",null==l?"":l+""):r({current:s,total:l}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=B[r],a=Z[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=h;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(I);function V(t){(0,i.D)(O),t.registerComponentModel(k),t.registerComponentView(F),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}function G(t){(0,i.D)(O),(0,i.D)(V)}},8690:(t,e,n)=>{"use strict";n.d(e,{N:()=>g});var i=n(655),r=n(3051),o=n(6498),a=n(5151),s=n(106),l=n(6006),u=n(6172),h=n(8071),c=n(3166),d=n(8988),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(h.Z),f=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,h=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),f=r.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),g=new o.ZP({style:(0,l.Lr)(h,{text:t.get("text"),fill:h.getTextColor()},{disableBox:!0}),z2:10}),m=g.getBoundingRect(),v=t.get("subtext"),y=new o.ZP({style:(0,l.Lr)(c,{text:v,fill:c.getTextColor(),y:m.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),_=t.get("link"),x=t.get("sublink"),b=t.get("triggerEvent",!0);g.silent=!_&&!b,y.silent=!x&&!b,_&&g.on("click",(function(){(0,d.MI)(_,"_"+t.get("target"))})),x&&y.on("click",(function(){(0,d.MI)(x,"_"+t.get("subtarget"))})),(0,s.A)(g).eventData=(0,s.A)(y).eventData=b?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(g),v&&i.add(y);var w=i.getBoundingRect(),S=t.getBoxLayoutParams();S.width=w.width,S.height=w.height;var T=(0,u.ME)(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?T.x+=T.width:"center"===p&&(T.x+=T.width/2)),f||("center"===(f=t.get("top")||t.get("bottom"))&&(f="middle"),"bottom"===f?T.y+=T.height:"middle"===f&&(T.y+=T.height/2),f=f||"top"),i.x=T.x,i.y=T.y,i.markRedraw();var M={align:p,verticalAlign:f};g.setStyle(M),y.setStyle(M),w=i.getBoundingRect();var A=T.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var D=new a.Z({shape:{x:w.x-A[3],y:w.y-A[0],width:w.width+A[1]+A[3],height:w.height+A[0]+A[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});i.add(D)}},e.type="title",e}(c.Z);function g(t){t.registerComponentModel(p),t.registerComponentView(f)}},1806:(t,e,n)=>{"use strict";n.d(e,{Bm:()=>a,f1:()=>i,ls:()=>o});var i=function(){},r={};function o(t,e){r[t]=e}function a(t){return r[t]}},5045:(t,e,n)=>{"use strict";n.d(e,{N:()=>et});var i=n(8023),r=n(655);const o=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2719).Z);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2159).Z);var s=n(7543);function l(t){t.registerComponentModel(o),t.registerComponentView(a),(0,s.Z)(t)}var u=n(3051),h=n(1806);const c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u.each(this.option.feature,(function(t,n){var i=h.Bm(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),u.merge(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(n(8071).Z);var d=n(423),p=n(1177),f=n(6357),g=n(1497),m=n(4130),v=n(9337),y=n(3166),_=n(2151),x=n(6498);const b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),c=[];u.each(s,(function(t,e){c.push(e)})),new m.Z(this._featureNames||[],c).add(y).update(y).remove(u.curry(y,null)).execute(),this._featureNames=c,v.b(r,t,n),r.add(v.l(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!u.isFunction(l)&&e){var h=l.style||(l.style={}),c=d.lP(e,x.ZP.makeFont(h)),p=t.x+r.x,f=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",f=!0);var g=f?-5-c.height:o+10;p+c.width/2>n.getWidth()?(a.position=["100%",g],h.align="right"):p-c.width/2<0&&(a.position=[0,g],h.align="left")}}))}function y(d,m){var v,y=c[d],b=c[m],w=s[y],S=new g.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===y&&(w.title=i.newTitle),y&&!b){if(function(t){return 0===t.indexOf("my")}(y))v={onclick:S.option.onclick,featureName:y};else{var T=(0,h.Bm)(y);if(!T)return;v=new T}l[y]=v}else if(!(v=l[b]))return;v.uid=(0,_.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n;var M=v instanceof h.f1;y||!b?!S.get("show")||M&&v.unusable?M&&v.remove&&v.remove(e,n):(!function(i,s,l){var c,d,g=i.getModel("iconStyle"),m=i.getModel(["emphasis","iconStyle"]),v=s instanceof h.f1&&s.getIcons?s.getIcons():i.get("icon"),y=i.get("title")||{};u.isString(v)?(c={})[l]=v:c=v;u.isString(y)?(d={})[l]=y:d=y;var _=i.iconPaths={};u.each(c,(function(l,h){var c=p.createIcon(l,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(g.getItemStyle()),c.ensureState("emphasis").style=m.getItemStyle();var v=new x.ZP({style:{text:d[h],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v),p.setTooltipConfig({el:c,componentModel:t,itemName:h,formatterParamsExtra:{title:d[h]}}),c.__title=d[h],c.on("mouseover",(function(){var e=m.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";v.setStyle({fill:m.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),c.setTextConfig({position:m.get("textPosition")||i}),v.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",h])&&n.leaveEmphasis(this),v.hide()})),("emphasis"===i.get(["iconStatus",h])?f.fD:f.Mh)(c),r.add(c),c.on("click",u.bind(s.onclick,s,e,n,h)),_[h]=c}))}(S,v,y),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?f.fD:f.Mh)(i[t])},v instanceof h.f1&&v.render&&v.render(S,e,n,i)):M&&v.dispose&&v.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){u.each(this._features,(function(t){t instanceof h.f1&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);var w=n(6387);const S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=w.default.browser;if((0,u.isFunction)(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),d=c[0].indexOf("base64")>-1,p=r?decodeURIComponent(c[1]):c[1];d&&(p=window.atob(p));var f=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,f)}else{var y=document.createElement("iframe");document.body.appendChild(y);var _=y.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,f),document.body.removeChild(y)}}else{var b=n.get("lang"),S='',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(h.f1);var T=n(1615),M=n(2234),A="__ec_magicType_stack__",C=[["line","bar"],["stack"]],D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return u.each(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(I[n]){var o,a={series:[]};u.each(C,(function(t){u.indexOf(t,n)>=0&&u.each(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=I[n](e,r,t,i);o&&(u.defaults(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",c=t.getReferringComponents(h,M.C6).models[0].componentIndex;a[h]=a[h]||[];for(var d=0;d<=c;d++)a[h][c]=a[h][c]||{};a[h][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=u.merge({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(h.f1),I={line:function(t,e,n,i){if("bar"===t)return u.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return u.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===A;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),u.merge({id:e,stack:r?"":A},i.get(["option","stack"])||{},!0)}};T.zl({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const L=D;var P=n(1158),O=new Array(60).join("-"),E="\t";function N(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var k=new RegExp("[\t]+","g");function R(t,e){var n=t.split(new RegExp("\n*"+O+"\n*","g")),i={series:[]};return u.each(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(E)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=N(e.shift()).split(k),i=[],r=u.map(n,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){Q[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new j.Z($(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=G(t);F(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=(0,X.Z)(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];q(t,(function(t,n){e.push(u.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(h.f1),Q={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=G(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return F(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function $(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}(0,Y.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=$(i),a=(0,M.pm)(t,o);return q(a.xAxisModels,(function(t){return s(t,"xAxis","xAxisIndex")})),q(a.yAxisModels,(function(t){return s(t,"yAxis","yAxisIndex")})),r}function s(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:K+e+o};a[n]=o,r.push(a)}}));const tt=J;function et(t){t.registerComponentModel(c),t.registerComponentView(b),(0,h.ls)("saveAsImage",S),(0,h.ls)("magicType",L),(0,h.ls)("dataView",Z),(0,h.ls)("dataZoom",tt),(0,h.ls)("restore",U),(0,i.D)(l)}},7813:(t,e,n)=>{"use strict";n.d(e,{N:()=>$});var i=n(7037),r=n(8023),o=n(655);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(n(8071).Z);var s=n(3051),l=n(6387),u=n(1158),h=n(4058),c=n(8988);function d(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function p(t){if(l.default.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(h+="top:50%",d+="translateY(-50%) rotate("+(a="left"===l?-225:-45)+"deg)"):(h+="left:50%",d+="translateX(-50%) rotate("+(a="top"===l?225:45)+"deg)");var p=a*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),m=e+" solid "+r+"px;";return'
'}(n,i,r)),(0,s.isString)(t))o.innerHTML=t+a;else if(t){o.innerHTML="",(0,s.isArray)(t)||(t=[t]);for(var l=0;l=0;o--){var a=t[o];a&&(a instanceof z.Z&&(a=a.get("tooltip",!0)),(0,s.isString)(a)&&(a={formatter:a}),a&&(i=new z.Z(a,i,r)))}return i}function K(t,e){return t.dispatchAction||(0,s.bind)(e.dispatchAction,e)}function J(t){return"center"===t||"middle"===t}const Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.prototype.init=function(t,e){if(!l.default.node&&e.getDom()){var n=t.getComponent("tooltip"),i=this._renderMode=(0,V.U9)(n.get("renderMode"));this._tooltipContent="richText"===i?new O(e):new M(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!l.default.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?(0,X.T9)(this,"_updatePosition",50,"fixRate"):(0,X.ZH)(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");B.z("itemTooltip",this._api,(0,s.bind)((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!l.default.node&&n.getDom()){var r=K(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=(0,V.zH)(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=(0,V.HZ)(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=(0,U.A)(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Y;u.x=i.x,u.y=i.y,u.update(),(0,U.A)(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=(0,k.Z)(i,e),c=h.point[0],d=h.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:h.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(K(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===q([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,(0,j.o)(n,(function(t){return null!=(0,U.A)(t).dataIndex?(r=t,!0):null!=(0,U.A)(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=(0,s.bind)(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=q([e.tooltipOption],i),a=this._renderMode,l=[],u=(0,v.TX)("section",{blocks:[],noHeader:!0}),h=[],d=new v.iv;(0,s.each)(t,(function(t){(0,s.each)(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=F.gk(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),p=(0,v.TX)("section",{header:o,noHeader:!(0,s.trim)(o),sortBlocks:!0,blocks:[]});u.blocks.push(p),(0,s.each)(t.seriesDataIndices,(function(u){var f=n.getSeriesByIndex(u.seriesIndex),g=u.dataIndexInside,m=f.getDataParams(g);if(!(m.dataIndex<0)){m.axisDim=t.axisDim,m.axisIndex=t.axisIndex,m.axisType=t.axisType,m.axisId=t.axisId,m.axisValue=Z.DX(e.axis,{value:r}),m.axisValueLabel=o,m.marker=d.makeTooltipMarker("item",(0,c.Lz)(m.color),a);var v=(0,W.f)(f.formatTooltip(g,!0,null)),y=v.frag;if(y){var _=q([f],i).get("valueFormatter");p.blocks.push(_?(0,s.extend)({valueFormatter:_},y):y)}v.text&&h.push(v.text),l.push(m)}}))}}))})),u.blocks.reverse(),h.reverse();var p=e.position,f=o.get("order"),g=(0,v.BY)(u,d,a,f,n.get("useUTC"),o.get("textStyle"));g&&h.unshift(g);var m="richText"===a?"\n\n":"
",y=h.join(m);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(o,p,r[0],r[1],this._tooltipContent,l):this._showTooltipContent(o,y,l,Math.random()+"",r[0],r[1],p,null,d)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=(0,U.A)(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),l=r.dataModel||a,u=r.dataIndex,h=r.dataType,d=l.getData(h),p=this._renderMode,f=t.positionDefault,g=q([d.getItemModel(u),l,a&&(a.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=g.get("trigger");if(null==m||"item"===m){var y=l.getDataParams(u,h),_=new v.iv;y.marker=_.makeTooltipMarker("item",(0,c.Lz)(y.color),p);var x=(0,W.f)(l.formatTooltip(u,!1,h)),b=g.get("order"),w=g.get("valueFormatter"),S=x.frag,T=S?(0,v.BY)(w?(0,s.extend)({valueFormatter:w},S):S,_,p,b,i.get("useUTC"),g.get("textStyle")):x.text,M="item_"+l.name+"_"+u;this._showOrMove(g,(function(){this._showTooltipContent(g,T,y,M,t.offsetX,t.offsetY,t.position,t.target,_)})),n({type:"showTip",dataIndexInside:u,dataIndex:d.getRawIndex(u),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=(0,U.A)(e),r=i.tooltipConfig.option||{};if((0,s.isString)(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var l=t.positionDefault,u=q(o,this._tooltipModel,l?{position:l}:null),h=u.get("content"),c=Math.random()+"",d=new v.iv;this._showOrMove(u,(function(){var n=(0,s.clone)(u.get("formatterParams")||{});this._showTooltipContent(u,h,n,c,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");a=a||t.get("position");var p=e,f=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(d)if((0,s.isString)(d)){var g=t.ecModel.get("useUTC"),m=(0,s.isArray)(n)?n[0]:n;p=d,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=(0,H.WU)(m.axisValue,p,g)),p=(0,c.kF)(p,n,!0)}else if((0,s.isFunction)(d)){var v=(0,s.bind)((function(e,i){e===this._ticket&&(h.setContent(i,u,t,f,a),this._updatePosition(t,a,r,o,h,n,l))}),this);this._ticket=i,p=d(n,i,v)}else p=d;h.setContent(p,u,t,f,a),h.show(t,f),this._updatePosition(t,a,r,o,h,n,l)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||(0,s.isArray)(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:(0,s.isArray)(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),c=t.get("align"),p=t.get("verticalAlign"),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),(0,s.isFunction)(e)&&(e=e([n,i],o,r.el,f,{viewSize:[l,u],contentSize:h.slice()})),(0,s.isArray)(e))n=(0,E.GM)(e[0],l),i=(0,E.GM)(e[1],u);else if((0,s.isObject)(e)){var g=e;g.width=h[0],g.height=h[1];var m=(0,R.ME)(g,{width:l,height:u});n=m.x,i=m.y,c=null,p=null}else if((0,s.isString)(e)&&a){var v=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,f,h,t.get("borderWidth"));n=v[0],i=v[1]}else{v=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,l,u,c?null:20,p?null:20);n=v[0],i=v[1]}if(c&&(n-=J(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=J(p)?h[1]/2:"bottom"===p?h[1]:0),d(t)){v=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,l,u);n=v[0],i=v[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&(0,s.each)(n,(function(n,o){var a=n.dataByAxis||[],l=(t[o]||{}).dataByAxis||[];(r=r&&a.length===l.length)&&(0,s.each)(a,(function(t,n){var o=l[n]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&(0,s.each)(a,(function(t,e){var n=u[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&(0,s.each)(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!l.default.node&&e.getDom()&&((0,X.ZH)(this,"_updatePosition"),this._tooltipContent.dispose(),B.E("itemTooltip",e))},e.type="tooltip",e}(G.Z);function $(t){(0,r.D)(i.N),t.registerComponentModel(a),t.registerComponentView(Q),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},s.noop),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},s.noop)}},3993:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var i=n(3051),r=n(5685),o=n(8540),a=n(2234);function s(t){var e,n,s,l,u=t.series,h=t.dataIndex,c=t.multipleSeries,d=u.getData(),p=d.mapDimensionsAll("defaultedTooltip"),f=p.length,g=u.getRawValue(h),m=(0,i.isArray)(g),v=(0,r.jT)(u,h);if(f>1||m&&!f){var y=function(t,e,n,a,s){var l=e.getData(),u=(0,i.reduce)(t,(function(t,e,n){var i=l.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),h=[],c=[],d=[];function p(t,e){var n=l.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(u?d.push((0,r.TX)("nameValue",{markerType:"subItem",markerColor:s,name:n.displayName,value:t,valueType:n.type})):(h.push(t),c.push(n.type)))}return a.length?(0,i.each)(a,(function(t){p((0,o.hk)(l,n,t),t)})):(0,i.each)(t,p),{inlineValues:h,inlineValueTypes:c,blocks:d}}(g,u,h,p,v);e=y.inlineValues,n=y.inlineValueTypes,s=y.blocks,l=y.inlineValues[0]}else if(f){var _=d.getDimensionInfo(p[0]);l=e=(0,o.hk)(d,h,p[0]),n=_.type}else l=e=m?g[0]:g;var x=(0,a.yu)(u),b=x&&u.name||"",w=d.getName(h),S=c?b:w;return(0,r.TX)("section",{header:b,noHeader:c||!x,sortParam:l,blocks:[(0,r.TX)("nameValue",{markerType:"item",markerColor:v,name:S,noName:!(0,i.trim)(S),value:e,valueType:n})].concat(s||[])})}},5685:(t,e,n)=>{"use strict";n.d(e,{BY:()=>m,TX:()=>h,d_:()=>x,iv:()=>b,jT:()=>_});var i=n(8988),r=n(3051),o=n(8407),a=n(5669);function s(t,e){var n=t.color||"#6e7079",r=t.fontSize||12,o=t.fontWeight||"400",a=t.color||"#464646",s=t.fontSize||14,l=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+(0,i.F1)(r+"")+"px;color:"+(0,i.F1)(n)+";font-weight:"+(0,i.F1)(o+""),valueStyle:"font-size:"+(0,i.F1)(s+"")+"px;color:"+(0,i.F1)(a)+";font-weight:"+(0,i.F1)(l+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:s,fill:a,fontWeight:l}}}var l=[0,10,20,30],u=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function c(t){return"section"===t.type}function d(t){return c(t)?f:g}function p(t){if(c(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return(0,r.each)(t.blocks,(function(t){var n=p(t);n>=e&&(e=n+ +(i&&(!n||c(t)&&!t.noHeader)))})),e}return 0}function f(t,e,n,a){var h,c=e.noHeader,f=(h=p(e),{html:l[h],richText:u[h]}),g=[],m=e.blocks||[];(0,r.assert)(!m||(0,r.isArray)(m)),m=m||[];var _=t.orderMode;if(e.sortBlocks&&_){m=m.slice();var x={valueAsc:"asc",valueDesc:"desc"};if((0,r.hasOwn)(x,_)){var b=new o.ID(x[_],null);m.sort((function(t,e){return b.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===_&&m.reverse()}(0,r.each)(m,(function(n,i){var o=e.valueFormatter,s=d(n)(o?(0,r.extend)((0,r.extend)({},t),{valueFormatter:o}):t,n,i>0?f.html:0,a);null!=s&&g.push(s)}));var w="richText"===t.renderMode?g.join(f.richText):v(g.join(""),c?n:f.html);if(c)return w;var S=(0,i.uX)(e.header,"ordinal",t.useUTC),T=s(a,t.renderMode).nameStyle;return"richText"===t.renderMode?y(t,S,T)+f.richText+w:v('
'+(0,i.F1)(S)+"
"+w,n)}function g(t,e,n,o){var a=t.renderMode,l=e.noName,u=e.noValue,h=!e.markerType,c=e.name,d=t.useUTC,p=e.valueFormatter||t.valueFormatter||function(t){return t=(0,r.isArray)(t)?t:[t],(0,r.map)(t,(function(t,e){return(0,i.uX)(t,(0,r.isArray)(m)?m[e]:m,d)}))};if(!l||!u){var f=h?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),g=l?"":(0,i.uX)(c,"ordinal",d),m=e.valueType,_=u?[]:p(e.value),x=!h||!l,b=!h&&l,w=s(o,a),S=w.nameStyle,T=w.valueStyle;return"richText"===a?(h?"":f)+(l?"":y(t,g,S))+(u?"":function(t,e,n,i,o){var a=[o],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle((0,r.isArray)(e)?e.join(" "):e,a)}(t,_,x,b,T)):v((h?"":f)+(l?"":function(t,e,n){return''+(0,i.F1)(t)+""}(g,!h,S))+(u?"":function(t,e,n,o){var a=n?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=(0,r.isArray)(t)?t:[t],''+(0,r.map)(t,(function(t){return(0,i.F1)(t)})).join("  ")+""}(_,x,b,T)),n)}}function m(t,e,n,i,r,o){if(t)return d(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function v(t,e){return'
'+t+'
'}function y(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function _(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function x(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var b=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.isString)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.isArray)(e)?(0,r.each)(e,(function(t){return(0,r.extend)(n,t)})):(0,r.extend)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},2950:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(5669),o=n(423),a=n(2234),s=n(7947),l=(0,a.Yf)();function u(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:i.map(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function h(t,e){return"category"===t.type?function(t,e){var n,r,o=d(t,"ticks"),a=(0,s.rk)(e),l=p(o,a);if(l)return l;e.get("show")&&!t.scale.isBlank()||(n=[]);if(i.isFunction(a))n=m(t,a,!0);else if("auto"===a){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,n=i.map(u.labels,(function(t){return t.tickValue}))}else n=g(t,r=a,!0);return f(o,a,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:i.map(t.scale.getTicks(),(function(t){return t.value}))}}function c(t,e){var n,r,o=d(t,"labels"),a=(0,s.rk)(e),u=p(o,a);return u||(i.isFunction(a)?n=m(t,a):(r="auto"===a?function(t){var e=l(t).autoInterval;return null!=e?e:l(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=g(t,r)),f(o,a,{labels:n,labelCategoryInterval:r}))}function d(t,e){return l(t)[e]||(l(t)[e]=[])}function p(t,e){for(var n=0;n1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=(0,s.WY)(t),p=a.get("showMinLabel")||d,f=a.get("showMaxLabel")||d;p&&h!==o[0]&&m(o[0]);for(var g=h;g<=o[1];g+=u)m(g);function m(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&m(o[1]),l}function m(t,e,n){var r=t.scale,o=(0,s.J9)(t),a=[];return i.each(r.getTicks(),(function(t){var i=r.getLabel(t),s=t.value;e(t.value,i)&&a.push(n?s:{formattedLabel:o(t),rawLabel:i,tickValue:s})})),a}var v=[0,1];function y(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const _=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,r.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count()),(0,r.NU)(t,v,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count());var o=(0,r.NU)(t,n,v,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=h(this,e).ticks,o=(0,i.map)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,o){var a=e.length;if(!t.onBand||n||!a)return;var s,l,u=t.getExtent();if(1===a)e[0].coord=u[0],s=e[1]={coord:u[0]};else{var h=e[a-1].tickValue-e[0].tickValue,c=(e[a-1].coord-e[0].coord)/h;(0,i.each)(e,(function(t){t.coord-=c/2})),l=1+t.scale.getExtent()[1]-e[a-1].tickValue,s={coord:e[a-1].coord+c*l},e.push(s)}var d=u[0]>u[1];p(e[0].coord,u[0])&&(o?e[0].coord=u[0]:e.shift());o&&p(u[0],e[0].coord)&&e.unshift({coord:u[0]});p(u[1],s.coord)&&(o?s.coord=u[1]:e.pop());o&&p(s.coord,u[1])&&e.push({coord:u[1]});function p(t,e){return t=(0,r.NM)(t),e=(0,r.NM)(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,i.map)(e,(function(t){return(0,i.map)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return u(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),u=r.count();if(a[1]-a[0]<1)return 0;var h=1;u>40&&(h=Math.max(1,Math.floor(u/40)));for(var c=a[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),p=Math.abs(d*Math.cos(i)),f=Math.abs(d*Math.sin(i)),g=0,m=0;c<=a[1];c+=h){var v,y,_=o.lP(n({value:c}),e.font,"center","top");v=1.3*_.width,y=1.3*_.height,g=Math.max(g,v,7),m=Math.max(m,y,7)}var x=g/p,b=m/f;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=l(t.model),T=t.getExtent(),M=S.lastAutoInterval,A=S.lastTickCount;return null!=M&&null!=A&&Math.abs(M-w)<=1&&Math.abs(A-u)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=u,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}()},3845:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(5280),o=n(2892),a=n(479),s=n(7411),l=n(5669),u=r.applyTransform;function h(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const c=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new s.ZP,n._rawTransformable=new s.ZP,n.name=e,n}return(0,i.ZT)(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new a.Z(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new a.Z(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new a.Z(t,e,n,i));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[(0,l.GM)(t[0],e.getWidth()),(0,l.GM)(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=r.applyTransform([],i,t),n=r.applyTransform([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),o.copy(this.transform||(this.transform=[]),e.transform||o.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],o.invert(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new s.ZP;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?u(n,t,i):r.copy(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?u([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=h(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=h(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(s.ZP)},7947:(t,e,n)=>{"use strict";n.d(e,{aG:()=>D,Do:()=>O,DX:()=>P,PY:()=>k,rk:()=>E,Xv:()=>A,Yb:()=>I,J9:()=>L,Jk:()=>C,WY:()=>N,AH:()=>R});var i=n(3051),r=n(5043),o=n(103),a=n(379),s=n(9093),l=n(479),u=n(1618),h=n(655),c=n(5669),d=n(5021),p=a.Z.prototype,f=o.Z.prototype,g=c.NM,m=Math.floor,v=Math.ceil,y=Math.pow,_=Math.log,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new o.Z,e._interval=0,e}return(0,h.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=f.getTicks.call(this,t);return i.map(o,(function(t){var e=t.value,i=c.NM(y(this.base,e));return i=e===n[0]&&this._fixMin?w(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?w(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=_(t)/_(n),e=_(e)/_(n),f.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=p.getExtent.call(this);e[0]=y(t,e[0]),e[1]=y(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=w(e[0],n[0])),this._fixMax&&(e[1]=w(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=_(t[0])/_(e),t[1]=_(t[1])/_(e),p.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=c.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[c.NM(v(e[0]/i)*i),c.NM(m(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){f.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_(t)/_(this.base),d.XS(t,this._extent)},e.prototype.normalize=function(t){return t=_(t)/_(this.base),d.Fv(t,this._extent)},e.prototype.scale=function(t){return t=d.bA(t,this._extent),y(this.base,t)},e.type="log",e}(a.Z),b=x.prototype;function w(t,e){return g(t,c.p8(e))}b.getMinorTicks=f.getMinorTicks,b.getLabel=f.getLabel,a.Z.registerClass(x);const S=x;var T=n(9936),M=n(8986);function A(t,e){var n=t.type,r=(0,M.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,l=e.ecModel;if(l&&"time"===n){var u=(0,s.Ge)("bar",l),h=!1;if(i.each(u,(function(t){h=h||t.getBaseAxis()===e.axis})),h){var c=(0,s.My)(u),d=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],l=(0,s.G_)(r,n.axis);if(void 0===l)return{min:t,max:e};var u=1/0;i.each(l,(function(t){u=Math.min(t.offset,u)}));var h=-1/0;i.each(l,(function(t){h=Math.max(t.offset+t.width,h)})),u=Math.abs(u),h=Math.abs(h);var c=u+h,d=e-t,p=d/(1-(u+h)/a)-d;return{min:t-=p*(u/c),max:e+=p*(h/c)}}(o,a,e,c);o=d.min,a=d.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function C(t,e){var n=e,i=A(t,n),r=i.extent,o=n.get("splitNumber");t instanceof S&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function D(t,e){if(e=e||t.get("type"))switch(e){case"category":return new r.Z({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new u.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(a.Z.getClass(e)||o.Z)}}function I(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function L(t){var e,n,r=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):i.isString(r)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(r):i.isFunction(r)?(e=r,function(n,i){return null!=o&&(i=n.value-o),e(P(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function P(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function O(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,a=n.getExtent();o=n instanceof r.Z?n.count():(i=n.getTicks()).length;var s,u,h,c,d,p,f,g,m=t.getLabelModel(),v=L(t),y=1;o>40&&(y=Math.ceil(o/40));for(var _=0;_t[1]&&(t[1]=i[1])}))}},6650:(t,e,n)=>{"use strict";n.d(e,{W:()=>i});var i=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}()},9069:(t,e,n)=>{"use strict";n.d(e,{Mk:()=>s,Yh:()=>a,bK:()=>o});var i=n(3051),r=n(2234);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,h=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===h?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(s){var m=s.toGlobalCoord(s.dataToCoord(0));g[p.onZero]=Math.max(Math.min(m,g[1]),g[0])}a.position=["y"===h?g[p[u]]:d[0],"x"===h?g[p[u]]:d[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[p[l]]-g[p.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.retrieve(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-v:v,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.each(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},4215:(t,e,n)=>{"use strict";n.d(e,{Im:()=>m,Ni:()=>g,Qh:()=>p,jM:()=>f});var i=n(655),r=n(479),o=n(5280),a=n(765),s=n(2892),l=n(3051),u=[];function h(t,e){for(var n=0;nn&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s{"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(4215);function o(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function s(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var r=e.features;return i.each(r,(function(t){var e=t.geometry,r=e.encodeOffsets,s=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=a(s,r,n);break;case"Polygon":case"MultiLineString":o(s,r,n);break;case"MultiPolygon":i.each(s,(function(t,e){return o(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t),i.map(i.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,o=t.geometry,a=[];switch(o.type){case"Polygon":var s=o.coordinates;a.push(new r.Qh(s[0],s.slice(1)));break;case"MultiPolygon":i.each(o.coordinates,(function(t){t[0]&&a.push(new r.Qh(t[0],t.slice(1)))}));break;case"LineString":a.push(new r.jM([o.coordinates]));break;case"MultiLineString":a.push(new r.jM(o.coordinates))}var l=new r.Ni(n[e||"name"],a,n.cp);return l.properties=n,l}))}},8986:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(3051),r=n(423),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(s=d,u=!0),null!=p&&(l=p,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.eqNaN)(e)?NaN:t.parse(e)}},4267:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.each(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},1615:(t,e,n)=>{"use strict";n.d(e,{Hr:()=>xe,$j:()=>hn,Ok:()=>Nn,HO:()=>ve,eU:()=>cn,zP:()=>dn,B9:()=>pn,wL:()=>Tn,JE:()=>fn,rp:()=>gn,FU:()=>On,S1:()=>un,zl:()=>wn,RS:()=>Sn,qR:()=>Mn,yn:()=>In,I2:()=>ue.I2,je:()=>Pn,sq:()=>_n,Br:()=>xn,ds:()=>vn,Pu:()=>yn,aW:()=>mn,OB:()=>En,YK:()=>bn,Og:()=>An,jQ:()=>Ln,i8:()=>me});var i=n(655),r=n(9448),o=n(3051),a=n(6387),s=n(9455),l=n(3510),u=n(2234),h=n(1497),c=n(8071),d="";"undefined"!=typeof navigator&&(d=navigator.platform||"");var p="rgba(0, 0, 0, 0.2)";const f={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:p,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:p,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:p,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:p,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:p,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:p,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:d.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 g,m,v,y=n(1772),_=n(2468),x=n(5494);var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new h.Z(i),this._locale=new h.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=T(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,T(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):v(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.each)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.createHashMap)(),l=e&&e.replaceMergeMainTypeMap;(0,y.md)(this),(0,o.each)(t,(function(t,e){null!=t&&(c.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.clone)(t):(0,o.merge)(n[e],t,!0))})),l&&l.each((function(t,e){c.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),c.Z.topologicalTravel(a,c.Z.getAllClassMainTypes(),(function(e){var a=(0,_.R)(this,e,u.kF(t[e])),s=i.get(e),h=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=u.ab(s,a,h);u.O0(d,e,c.Z),n[e]=null,i.set(e,null),r.set(e,0);var p,f=[],m=[],v=0;(0,o.each)(d,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a="series"===e,s=c.Z.getClass(e,t.keyInfo.subType,!a);if(!s)return;if("tooltip"===e){if(p)return void 0;p=!0}if(i&&i.constructor===s)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var l=(0,o.extend)({componentIndex:n},t.keyInfo);i=new s(r,this,this,l),(0,o.extend)(i,l),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(f.push(i.option),m.push(i),v++):(f.push(void 0),m.push(void 0))}),this),n[e]=f,i.set(e,m),r.set(e,v),"series"===e&&g(this)}),this),this._seriesIndices||g(this)},e.prototype.getOption=function(){var t=(0,o.clone)(this.option);return(0,o.each)(t,(function(e,n){if(c.Z.hasClass(n)){for(var i=u.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!u.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const O=L;var E=o.each,N=o.isObject,k=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function R(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=k.length;n=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=(0,$.S$)(p,v),f=v;break}}}return i[0]=p,i[1]=f,i}))}))}var et=n(3321),nt=n(3166),it=n(5797),rt=n(5151),ot=n(4535),at=n(9266),st=n(327),lt=n(106),ut=n(6357),ht=n(270),ct=n(9066),dt=n(9887),pt=n(7515),ft=(0,u.Yf)(),gt={itemStyle:(0,ct.Z)(dt.t,!0),lineStyle:(0,ct.Z)(pt.v,!0)},mt={lineStyle:"stroke",itemStyle:"fill"};function vt(t,e){var n=t.visualStyleMapper||gt[e];return n||(console.warn("Unkown style type '"+e+"'."),gt.itemStyle)}function yt(t,e){var n=t.visualDrawType||mt[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var _t={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=vt(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=yt(t,i),u=a[l],h=(0,o.isFunction)(u)?u:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[l]||h||c){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||(0,o.isFunction)(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||(0,o.isFunction)(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.extend)({},a);r[l]=h(i),e.setItemVisual(n,"style",r)}}}},xt=new h.Z,bt={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=vt(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){xt.option=n[i];var s=r(xt),l=t.ensureUniqueItemVisual(e,"style");(0,o.extend)(l,s),xt.option.decal&&(t.setItemVisual(e,"decal",xt.option.decal),xt.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},wt={performRawSeries:!0,overallReset:function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),ft(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ft(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=yt(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},St=n(8154),Tt=n(6498),Mt=n(4826),At=Math.PI;var Ct=n(8674),Dt=n(2151),It=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.createHashMap)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.createHashMap)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.each)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.assert)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.each)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),a.updatePayload(h,n);var p=a.getPerformArgs(h,i.block);d.each((function(t){t.perform(p)})),h.perform(p)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.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)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.createHashMap)(),l=t.seriesType,u=t.getTargetSeries;function h(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,Ct.v)({plan:Nt,reset:kt,count:Bt}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,Ct.v)({reset:Lt});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.createHashMap)(),u=t.seriesType,h=t.getTargetSeries,c=!0,d=!1;function p(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(d=!0,(0,Ct.v)({reset:Pt,onDirty:Et})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,r._pipe(t,n)}(0,o.assert)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,p):h?h(n,i).each(p):(c=!1,(0,o.each)(n.getSeries(),p)),d&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.isFunction)(t)&&(t={overallReset:t,seriesType:Zt(t)}),t.uid=(0,Dt.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function Lt(t){t.overallReset(t.ecModel,t.api,t.payload)}function Pt(t){return t.overallProgress&&Ot}function Ot(){this.agent.dirty(),this.getDownstream().dirty()}function Et(){this.agent&&this.agent.dirty()}function Nt(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function kt(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,u.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.map)(e,(function(t,e){return zt(e)})):Rt}var Rt=zt(0);function zt(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),ee=["symbol","symbolSize","symbolRotate","symbolOffset"],ne=ee.concat(["symbolKeepAspect"]),ie={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},a=!1,s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{var i,r,a;if((0,o.isObject)(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,a=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var s=new O(this._api),l=this._theme,u=this._model=new M;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:r},$e);var h={seriesTransition:a,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:h},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{Ae(this),Ie.update.call(this,null,h)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.setTheme=function(){(0,ae.Sh)("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ge&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(a.default.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return(0,o.each)(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;(0,o.each)(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return(0,o.each)(i,(function(t){t.group.ignore=!1})),a}qe(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(on[n]){var l=s,u=s,h=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();(0,o.each)(rn,(function(r,s){if(r.group===n){var p=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas((0,o.clone)(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),h=a(f.right,h),c=a(f.bottom,c),d.push({dom:p,left:f.left,top:f.top})}}));var f=(h*=p)-(l*=p),g=(c*=p)-(u*=p),m=pe.qW.createCanvas(),v=r.init(m,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:g}),e){var y="";return(0,o.each)(d,(function(t){var e=t.left-l,n=t.top-u;y+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new rt.Z({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),(0,o.each)(d,(function(t){var e=new ot.ZP({style:{x:t.left*p-l,y:t.top*p-u,image:t.dom}});v.add(e)})),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}qe(this.id)},e.prototype.convertToPixel=function(t,e){return Le(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Le(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=u.pm(i,t);return(0,o.each)(r,(function(t,i){i.indexOf("Models")>=0&&(0,o.each)(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}qe(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=u.pm(n,t,{defaultMainType:"series"});var r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?(0,oe.Or)(r,o,e):(0,oe.UL)(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;(0,o.each)(Ye,(function(e){var n=function(n){var i,r=t.getModel(),a=n.target;if("globalout"===e?i={}:a&&(0,he.o)(a,(function(t){var e=(0,lt.A)(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=(0,o.extend)({},e.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:a,packedEvent:i,model:u,view:h},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),(0,o.each)(Je,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),(0,o.each)(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),(0,se.s)(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?qe(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)qe(this.id);else{this._disposed=!0,this.getDom()&&u.P$(this.getDom(),ln,"");var t=this,e=t._api,n=t._model;(0,o.each)(t._componentsViews,(function(t){t.dispose(n,e)})),(0,o.each)(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete rn[t.id]}},e.prototype.resize=function(t){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&Ae(this),Ie.update.call(this,{type:"resize",animation:(0,o.extend)({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nn[t]){var n=nn[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?qe(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=(0,o.extend)({},t);return e.type=Je[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(e)||(e={silent:!!e}),Ke[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Oe.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.default.browser.weChat&&this._throttledZrFlush(),Ee.call(this,n),Ne.call(this,n)}},e.prototype.updateLabelLayout=function(){de.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)qe(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(at.eq(t))return;if(t instanceof st.ZP&&(0,ut.e9)(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ae=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ce(t,!0),Ce(t,!1),e.plan()},Ce=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.default.node&&!a.default.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),de.trigger("series:afterupdate",e,i,s)},Ge=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},He=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){at.eq(t)||e(t)})),t.__needsUpdateStatus=!1)},Fe=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,ut.fD)(e,n),Ge(t)},n.prototype.leaveEmphasis=function(e,n){(0,ut.Mh)(e,n),Ge(t)},n.prototype.enterBlur=function(e){(0,ut.SX)(e),Ge(t)},n.prototype.leaveBlur=function(e){(0,ut.VP)(e),Ge(t)},n.prototype.enterSelect=function(e){(0,ut.XX)(e),Ge(t)},n.prototype.leaveSelect=function(e){(0,ut.SJ)(e),Ge(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(C))(t)},Ve=function(t){function e(t,e){for(var n=0;n=0)){Cn.push(n);var a=Ut.wrapStageHandler(n,r);a.__prio=e,a.__raw=n,t.push(a)}}function In(t,e){nn[t]=e}function Ln(t){(0,pe.g2)({createCanvas:t})}function Pn(t,e,n){var i=(0,fe.C)("registerMap");i&&i(t,e,n)}function On(t){var e=(0,fe.C)("getMap");return e&&e(t)}var En=le.DA;An(ye,_t),An(_e,bt),An(_e,wt),An(ye,ie),An(_e,re),An(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=(0,ce.I)(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=(0,ce.I)(r,e)}}))})),vn(Q),yn(900,(function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(tt)})),In("default",(function(t,e){e=e||{},o.defaults(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new St.Z,i=new rt.Z({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=new Tt.ZP({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),s=new rt.Z({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Mt.Z({shape:{startAngle:-At/2,endAngle:-At/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*At/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*At/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=a.getBoundingRect().width,o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:o),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),wn({type:ut.Ki,event:ut.Ki,update:ut.Ki},o.noop),wn({type:ut.yx,event:ut.yx,update:ut.yx},o.noop),wn({type:ut.Hg,event:ut.Hg,update:ut.Hg},o.noop),wn({type:ut.JQ,event:ut.JQ,update:ut.JQ},o.noop),wn({type:ut.iK,event:ut.iK,update:ut.iK},o.noop),mn("light",jt),mn("dark",Qt);var Nn={}},9428:(t,e,n)=>{"use strict";n.d(e,{C:()=>o,M:()=>r});var i={};function r(t,e){i[t]=e}function o(t){return i[t]}},3917:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>g,G8:()=>f,I2:()=>d});var i=n(1497),r=n(6387);var o=n(3051),a="ZH",s="EN",l=s,u={},h={},c=r.default.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:l;function d(t,e){t=t.toUpperCase(),h[t]=new i.Z(e),u[t]=e}function p(t){if((0,o.isString)(t)){var e=u[t.toUpperCase()]||{};return t===a||t===s?(0,o.clone)(e):(0,o.merge)((0,o.clone)(e),(0,o.clone)(u.EN),!1)}return(0,o.merge)((0,o.clone)(t),(0,o.clone)(u.EN),!1)}function f(t){return h[t]}function g(){return h.EN}d(s,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),d(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},8674:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(3051);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=c(this._modBy),l=this._modDataCount||0,u=c(t&&t.modBy),h=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}s===u&&l===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=h;var d=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(a||p1&&i>0?s:a}};return o;function a(){return e=t?null:o{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a1){var h=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(h,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s1&&1===d)this._updateManyToOne&&this._updateManyToOne(h,u),r[l]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(h,u),r[l]=null;else if(1===c&&1===d)this._update&&this._update(h,u),r[l]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(h,u),r[l]=null;else if(c>1)for(var p=0;p1)for(var s=0;s{"use strict";n.d(e,{ZP:()=>g,hG:()=>h});var i,r=n(3051),o=n(8407),a=n(9574),s="undefined",l=typeof Uint32Array===s?Array:Uint32Array,u=typeof Uint16Array===s?Array:Uint16Array,h=typeof Int32Array===s?Array:Int32Array,c=typeof Float64Array===s?Array:Float64Array,d={float:c,int:h,ordinal:Array,number:Array,time:c};function p(t){return t>65535?l:u}function f(t,e,n,i,r){var o=d[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=(0,r.map)(a,(function(t){return t.property})),h=0;hy[1]&&(y[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=h&&b<=c||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){m=d[i[0]];var y=d[i[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=h&&b<=c||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=h&&b<=c||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[A][1])&&(T=!1)}T&&(s[l++]=e.getRawIndex(v))}return lm[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(p(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var d=1;dn&&(n=i,r=A)}M>0&&Mu-f&&(s=u-f,a.length=s);for(var g=0;gh[1]&&(h[1]=v),c[d++]=y}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return(0,o.yQ)(t[i],this._dimensions[i])}i={arrayRows:t,objectRows:function(t,e,n,i){return(0,o.yQ)(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return(0,o.yQ)(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}()},1401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3051),r=0;function o(t){return(0,i.isObject)(t)&&null!=t.value?t.value:t+""}const a=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++r}return t.createByAxisModel=function(e){var n=e.option,r=n.data,a=r&&(0,i.map)(r,o);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!(0,i.isString)(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.createHashMap)(this.categories))},t}()},5101:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var i,r,o,a,s,l,u,h=n(3051),c=n(1497),d=n(4130),p=n(8540),f=n(381),g=n(5440),m=n(4279),v=n(2234),y=n(106),_=n(9574),x=n(3834),b=n(1029),w=h.isObject,S=h.map,T="undefined"==typeof Int32Array?Array:Int32Array,M=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],A=["_approximateExtent"];const C=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;(0,b.bB)(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===m.cy&&!n.pure)for(var a=[],s=t;s0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),h.isArray(r)?r=r.slice():w(r)&&(r=h.extend({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,w(e)?h.extend(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){w(t)?h.extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?h.extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;(0,y.Q)(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){h.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:S(this.dimensions,this._getDimInfo,this),this.hostModel)),s(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];h.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(h.slice(arguments)))})},t.internalField=(i=function(t){var e=t._invertedIndicesMap;h.each(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new T(o.categories.length);for(var s=0;s1&&(l+="__ec__"+h),i[e]=l}})),t}()},5440:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);const r=function(t){this.otherDims={},null!=t&&i.extend(this,t)}},9574:(t,e,n)=>{"use strict";n.d(e,{Kp:()=>d,Ld:()=>l,ML:()=>c,QY:()=>g,_P:()=>u,nx:()=>h});var i=n(3051),r=n(4279),o=n(2234),a=n(1772),s=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n{"use strict";n.d(e,{Eo:()=>l,Jj:()=>c,Jl:()=>d,bB:()=>u,v5:()=>h});var i=n(3051),r=n(2234),o=n(9574),a=(0,r.Yf)(),s={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},l=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=c(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return(0,i.retrieve2)(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=(0,o.QY)(this.source),n=!d(t),i="",r=[],a=0,l=0;a30}},5623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d,q:()=>c});var i=n(4279),r=n(5440),o=n(3051),a=n(9574),s=n(3834),l=n(2234),u=n(1772),h=n(1029);function c(t,e){return d(t,e).dimensions}function d(t,e){(0,a.Ld)(t)||(t=(0,a.nx)(t));var n=(e=e||{}).coordDimensions||[],c=e.dimensionsDefine||t.dimensionsDefine||[],d=(0,o.createHashMap)(),f=[],g=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return(0,o.each)(e,(function(t){var e;(0,o.isObject)(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,c,e.dimensionsCount),m=e.canOmitUnusedDimensions&&(0,h.Jl)(g),v=c===t.dimensionsDefine,y=v?(0,h.Jj)(t):(0,h.v5)(c),_=e.encodeDefine;!_&&e.encodeDefaulter&&(_=e.encodeDefaulter(t,g));for(var x=(0,o.createHashMap)(_),b=new s.hG(g),w=0;w0&&(i.name=r+(a-1)),a++,e.set(r,a)}}(f),new h.Eo({source:t,dimensions:f,fullDimensionCount:g,dimensionOmitted:m})}function p(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}},8540:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>d,_j:()=>g,a:()=>y,hk:()=>S,tB:()=>b});var i,r,o,a,s,l=n(3051),u=n(2234),h=n(9574),c=n(4279),d=function(){function t(t,e){var n=(0,h.Ld)(t)?t:(0,h.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===c.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,h=o.startIndex,d=o.dimensionsDefine,p=a[w(s,u)];if((0,l.extend)(t,p),s===c.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.bind)(f,null,r,h,d);var m=y(s,u);t.count=(0,l.bind)(m,null,r,h,d)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;ou&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e{"use strict";n.d(e,{BM:()=>o,IR:()=>s,M:()=>a});var i=n(3051),r=n(1029);function o(t,e,n){var o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension;!function(t){return!(0,r.bB)(t.schema)}(e)?(a=e.schema,o=a.dimensions,s=e.store):o=e;var h,c,d,p,f=!(!t||!t.get("stack"));if((0,i.each)(o,(function(t,e){(0,i.isString)(t)&&(o[e]=t={name:t}),f&&!t.isExtraCoord&&(l||h||!t.ordinalMeta||(h=t),c||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(c=t))})),!c||l||h||(l=!0),c){d="__\0ecstackresult_"+t.id,p="__\0ecstackedover_"+t.id,h&&(h.createInvertedIndices=!0);var g=c.coordDim,m=c.type,v=0;(0,i.each)(o,(function(t){t.coordDim===g&&v++}));var y={name:d,coordDim:g,coordDimIndex:v,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},_={name:p,coordDim:p,coordDimIndex:v+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(y.storeDimIndex=s.ensureCalculationDimension(p,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),a.appendCalculationDimension(y),a.appendCalculationDimension(_)):(o.push(y),o.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:h&&h.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:d}}function a(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function s(t,e){return a(t,e)?t.getCalculationInfo("stackResultDimension"):e}},8407:(t,e,n)=>{"use strict";n.d(e,{ID:()=>c,o2:()=>l,tR:()=>p,yQ:()=>a});var i=n(5669),r=n(3051),o=n(175);function a(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||(0,r.isNumber)(t)||null==t||"-"===t||(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t)}var s=(0,r.createHashMap)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return(0,r.isString)(t)?(0,r.trim)(t):t}});function l(t){return s.get(t)}var u={lt:function(t,e){return te},gte:function(t,e){return t>=e}},h=function(){function t(t,e){if(!(0,r.isNumber)(e)){0,(0,o._y)("")}this._opFn=u[t],this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){return(0,r.isNumber)(t)?this._opFn(t,this._rvalFloat):this._opFn((0,i.FK)(t),this._rvalFloat)},t}(),c=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=(0,r.isNumber)(t)?t:(0,i.FK)(t),o=(0,r.isNumber)(e)?e:(0,i.FK)(e),a=isNaN(n),s=isNaN(o);if(a&&(n=this._incomparable),s&&(o=this._incomparable),a&&s){var l=(0,r.isString)(t),u=(0,r.isString)(e);l&&(n=u?t:0),u&&(o=l?e:0)}return no?-this._resultLT:0},t}(),d=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=(0,i.FK)(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function p(t,e){return"eq"===t||"ne"===t?new d("eq"===t,e):(0,r.hasOwn)(u,t)?new h(t,e):null}},381:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,y:()=>a});var i=n(3051),r=n(4279),o=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function a(t,e){var n={},a=n.encode={},l=(0,i.createHashMap)(),u=[],h=[],c={};(0,i.each)(t.dimensions,(function(e){var n,i=t.getDimensionInfo(e),o=i.coordDim;if(o){0;var d=i.coordDimIndex;s(a,o)[d]=e,i.isExtraCoord||(l.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(u[0]=e),s(c,o)[d]=t.getDimensionIndex(i.name)),i.defaultTooltip&&h.push(e)}r.f7.each((function(t,e){var n=s(a,e),r=i.otherDims[e];null!=r&&!1!==r&&(n[r]=i.name)}))}));var d=[],p={};l.each((function(t,e){var n=a[e];p[e]=n[0],d=d.concat(n)})),n.dataDimsOnCoord=d,n.dataDimIndicesOnCoord=(0,i.map)(d,(function(e){return t.getDimensionInfo(e).storeDimIndex})),n.encodeFirstDimNotExtra=p;var f=a.label;f&&f.length&&(u=f.slice());var g=a.tooltip;return g&&g.length?h=g.slice():h.length||(h=u.slice()),a.defaultedLabel=u,a.defaultedTooltip=h,n.userOutput=new o(c,e),n}function s(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function l(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},9344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e){if(r(o=this).mainData===o){var n=(0,i.extend)({},r(this).datas);n[this.dataType]=e,h(e,n,t)}else c(e,this.dataType,r(this).mainData,t);var o;return e}function a(t,e){return t.struct&&t.struct.update(),e}function s(t,e){return(0,i.each)(r(e).datas,(function(n,i){n!==e&&c(n.cloneShallow(),i,e,t)})),e}function l(t){var e=r(this).mainData;return null==t||null==e?e:r(e).datas[t]}function u(){var t=r(this).mainData;return null==t?[{data:t}]:(0,i.map)((0,i.keys)(r(t).datas),(function(e){return{type:e,data:r(t).datas[e]}}))}function h(t,e,n){r(t).datas={},(0,i.each)(e,(function(e,i){c(e,i,t,n)}))}function c(t,e,n,i){r(n).datas[e]=t,r(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=l,t.getLinkedDataAll=u}const d=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,h(e,n,t),(0,i.each)(n,(function(n){(0,i.each)(e.TRANSFERABLE_METHODS,(function(e){n.wrapMethod(e,(0,i.curry)(o,t))}))})),e.wrapMethod("cloneShallow",(0,i.curry)(s,t)),(0,i.each)(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,(0,i.curry)(a,t))})),(0,i.assert)(n[e.dataType]===e)}},1772:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,JT:()=>d,Ss:()=>h,Wd:()=>c,md:()=>l,pY:()=>u,u7:()=>p});var i=n(2234),r=n(3051),o=n(4279),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.createHashMap)()}function u(t,e,n){var i={},o=c(e);if(!o||!t)return i;var a,l,u=[],h=[],d=e.ecModel,p=s(d).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.each)(t,(function(e,n){var o=(0,r.isObject)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=v(o)),i[o.name]=[]}));var g=p.get(f)||p.set(f,{categoryWayDim:l,valueWayDim:0});function m(t,e,n){for(var i=0;i{"use strict";n.d(e,{U:()=>h,t:()=>c});var i=n(3051),r=n(9574),o=n(4279),a=n(1772),s=n(437),l=n(3834),u=n(8540),h=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;if(d(n)){var l=n,u=void 0,h=void 0,c=void 0;if(s){var p=a[0];p.prepareSource(),u=(c=p.getSource()).data,h=c.sourceFormat,e=[p._getVersionSign()]}else u=l.get("data",!0),h=(0,i.isTypedArray)(u)?o.J5:o.cy,e=[];var f=this._getSourceMetaRawOption()||{},g=c&&c.metaRawOption||{},m=(0,i.retrieve2)(f.seriesLayoutBy,g.seriesLayoutBy)||null,v=(0,i.retrieve2)(f.sourceHeader,g.sourceHeader),y=(0,i.retrieve2)(f.dimensions,g.dimensions);t=m!==g.seriesLayoutBy||!!v!=!!g.sourceHeader||y?[(0,r._P)(u,{seriesLayoutBy:m,sourceHeader:v,dimensions:y},h)]:[]}else{var _=n;if(s){var x=this._applyTransform(a);t=x.sourceList,e=x.upstreamSignList}else{var b=_.get("source",!0);t=[(0,r._P)(b,this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(null!=a){1!==t.length&&p("")}var l=[],u=[];return(0,i.each)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||p(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e{"use strict";n.d(e,{DA:()=>m,vK:()=>v});var i=n(4279),r=n(2234),o=n(3051),a=n(8540),s=n(8407),l=n(175),u=n(9574),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function c(t){if(!_(t.sourceFormat)){0,(0,l._y)("")}return t.data}function d(t){var e=t.sourceFormat,n=t.data;if(!_(e)){0,(0,l._y)("")}if(e===i.XD){for(var r=[],a=0,s=n.length;a{"use strict";n.d(e,{RD:()=>dt.Z,TA:()=>p.Z,tF:()=>h.Z,Ir:()=>c.Z,aV:()=>f.Z,Hn:()=>T.Z,Hr:()=>u.Hr,wJ:()=>d.Z,$_:()=>_,$j:()=>u.$j,Ok:()=>u.Ok,HO:()=>u.HO,eU:()=>u.eU,zP:()=>u.zP,B9:()=>u.B9,OB:()=>ct.default,Zy:()=>vt,tv:()=>ft,Sp:()=>gt,Zr:()=>mt,WU:()=>s,wL:()=>u.wL,JE:()=>u.JE,rp:()=>u.rp,FU:()=>u.FU,Q:()=>a,_y:()=>i,S1:()=>u.S1,z$:()=>pt.RV,pI:()=>m,Rx:()=>r,Nu:()=>Z.Z,pQ:()=>Z.Z,zl:()=>u.zl,RS:()=>u.RS,qR:()=>u.qR,yn:()=>u.yn,I2:()=>u.I2,je:()=>u.je,sq:()=>u.sq,Br:()=>u.Br,ds:()=>u.ds,Pu:()=>u.Pu,aW:()=>u.aW,rV:()=>u.OB,YK:()=>u.YK,Og:()=>u.Og,jQ:()=>u.jQ,g2:()=>B.g2,P2:()=>x.P2,XV:()=>o,D$:()=>z.D,D5:()=>l,xr:()=>v,i8:()=>u.i8,gf:()=>y,x_:()=>g});var i={};n.r(i),n.d(i,{createDimensions:()=>I.q,createList:()=>O,createScale:()=>N,createSymbol:()=>L.th,createTextStyle:()=>R,dataStack:()=>E,enableHoverEmphasis:()=>P.vF,getECData:()=>C.A,getLayoutRect:()=>M.ME,mixinAxisModelCommonMethods:()=>k});var r={};n.r(r),n.d(r,{MAX_SAFE_INTEGER:()=>F.YM,asc:()=>F.dt,getPercentWithPrecision:()=>F.eJ,getPixelPrecision:()=>F.M9,getPrecision:()=>F.p8,getPrecisionSafe:()=>F.ZB,isNumeric:()=>F.kE,isRadianAroundZero:()=>F.mW,linearMap:()=>F.NU,nice:()=>F.kx,numericToNumber:()=>F.FK,parseDate:()=>F.sG,quantile:()=>F.VR,quantity:()=>F.Xd,quantityExponent:()=>F.xW,reformIntervals:()=>F.nR,remRadian:()=>F.wW,round:()=>F.NM});var o={};n.r(o),n.d(o,{format:()=>V.WU,parse:()=>F.sG});var a={};n.r(a),n.d(a,{Arc:()=>nt.Z,BezierCurve:()=>et.Z,BoundingRect:()=>st.Z,Circle:()=>X.Z,CompoundPath:()=>rt.Z,Ellipse:()=>Y.Z,Group:()=>U.Z,Image:()=>W.ZP,IncrementalDisplayable:()=>it.Z,Line:()=>tt.Z,LinearGradient:()=>ot.Z,Polygon:()=>J.Z,Polyline:()=>Q.Z,RadialGradient:()=>at.Z,Rect:()=>$.Z,Ring:()=>K.Z,Sector:()=>q.C,Text:()=>j.ZP,clipPointsByRect:()=>G.clipPointsByRect,clipRectByRect:()=>G.clipRectByRect,createIcon:()=>G.createIcon,extendPath:()=>G.extendPath,extendShape:()=>G.extendShape,getShapeClass:()=>G.getShapeClass,getTransform:()=>G.getTransform,initProps:()=>H.KZ,makeImage:()=>G.makeImage,makePath:()=>G.makePath,mergePath:()=>G.mergePath,registerShape:()=>G.registerShape,resizePath:()=>G.resizePath,updateProps:()=>H.D});var s={};n.r(s),n.d(s,{addCommas:()=>lt.OD,capitalFirst:()=>lt.ew,encodeHTML:()=>lt.F1,formatTime:()=>lt.mr,formatTpl:()=>lt.kF,getTextRect:()=>ht,getTooltipMarker:()=>lt.A0,normalizeCssArray:()=>lt.MY,toCamelCase:()=>lt.zW,truncateText:()=>ut.aF});var l={};n.r(l),n.d(l,{bind:()=>y.bind,clone:()=>y.clone,curry:()=>y.curry,defaults:()=>y.defaults,each:()=>y.each,extend:()=>y.extend,filter:()=>y.filter,indexOf:()=>y.indexOf,inherits:()=>y.inherits,isArray:()=>y.isArray,isFunction:()=>y.isFunction,isObject:()=>y.isObject,isString:()=>y.isString,map:()=>y.map,merge:()=>y.merge,reduce:()=>y.reduce});var u=n(1615),h=n(8071),c=n(3166),d=n(3321),p=n(5797),f=n(5101),g=n(9448),m=n(2892),v=n(5280),y=n(3051),_=n(1092),x=n(270),b=n(8455),w=n(7947),S=n(6650),T=n(1497),M=n(6172),A=n(9936),C=n(106),D=n(6006),I=n(5623),L=n(1525),P=n(6357);function O(t){return(0,b.Z)(null,t)}var E={isDimensionStacked:A.M,enableDataStack:A.BM,getStackedDimension:A.IR};function N(t,e){var n=e;e instanceof T.Z||(n=new T.Z(e));var i=w.aG(n);return i.setExtent(t[0],t[1]),w.Jk(i,n),i}function k(t){y.mixin(t,S.W)}function R(t,e){return e=e||{},(0,D.Lr)(t,null,null,"normal"!==e.state)}var z=n(8023),B=n(3132),Z=n(6672),F=n(5669),V=n(5015),G=n(1177),H=n(9266),U=n(8154),W=n(4535),j=n(6498),X=n(9538),Y=n(2797),q=n(7214),K=n(5795),J=n(5094),Q=n(2514),$=n(5151),tt=n(2095),et=n(4174),nt=n(4826),it=n(1754),rt=n(2776),ot=n(4438),at=n(6369),st=n(479),lt=n(8988),ut=n(6918);function ht(t,e,n,i,r,o,a,s){return new j.ZP({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var ct=n(6387),dt=n(2950),pt=n(7772);function ft(t){var e=h.Z.extend(t);return h.Z.registerClass(e),e}function gt(t){var e=c.Z.extend(t);return c.Z.registerClass(e),e}function mt(t){var e=d.Z.extend(t);return d.Z.registerClass(e),e}function vt(t){var e=p.Z.extend(t);return p.Z.registerClass(e),e}var yt=n(7164);(0,z.D)(yt.T)},8023:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var i=n(1615),r=n(3166),o=n(5797),a=n(8071),s=n(3321),l=n(3051),u=n(9428),h=n(9448),c=[],d={registerPreprocessor:i.ds,registerProcessor:i.Pu,registerPostInit:i.sq,registerPostUpdate:i.Br,registerUpdateLifecycle:i.YK,registerAction:i.zl,registerCoordinateSystem:i.RS,registerLayout:i.qR,registerVisual:i.Og,registerTransform:i.OB,registerLoading:i.yn,registerMap:i.je,registerImpl:u.M,PRIORITY:i.Hr,ComponentModel:a.Z,ComponentView:r.Z,SeriesModel:s.Z,ChartView:o.Z,registerComponentModel:function(t){a.Z.registerClass(t)},registerComponentView:function(t){r.Z.registerClass(t)},registerSeriesModel:function(t){s.Z.registerClass(t)},registerChartView:function(t){o.Z.registerClass(t)},registerSubTypeDefaulter:function(t,e){a.Z.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){(0,h.registerPainter)(t,e)}};function p(t){(0,l.isArray)(t)?(0,l.each)(t,(function(t){p(t)})):(0,l.indexOf)(c,t)>=0||(c.push(t),(0,l.isFunction)(t)&&(t={install:t}),t.install(d))}},7164:(t,e,n)=>{"use strict";n.d(e,{T:()=>S});var i=n(2234),r=n(479),o=n(9266),a=n(106),s=n(5669),l=n(7411),u=n(7377),h=n(3051),c=n(4162),d=n(6006);function p(t){if(t){for(var e=[],n=0;n=0&&n.attr(b.oldLayoutSelect),(0,h.indexOf)(p,"emphasis")>=0&&n.attr(b.oldLayoutEmphasis)),(0,o.D)(n,u,e,l)}else if(n.attr(u),!(0,d.qA)(n).valueAnimation){var f=(0,h.retrieve2)(n.style.opacity,1);n.style.opacity=0,(0,o.KZ)(n,{style:{opacity:f}},e,l)}if(b.oldLayout=u,n.states.select){var g=b.oldLayoutSelect={};_(g,u,x),_(g,n.states.select,x)}if(n.states.emphasis){var m=b.oldLayoutEmphasis={};_(m,u,x),_(m,n.states.emphasis,x)}(0,d.tD)(n,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){r=(b=y(i)).oldLayout;var b,w={points:i.shape.points};r?(i.attr({shape:r}),(0,o.D)(i,{shape:w},e)):(i.setShape(w),i.style.strokePercent=0,(0,o.KZ)(i,{style:{strokePercent:1}},e)),b.oldLayout=w}},t}();var w=(0,i.Yf)();function S(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=w(e).labelManager;i||(i=w(e).labelManager=new b),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=w(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}},7377:(t,e,n)=>{"use strict";n.d(e,{$x:()=>R,Iu:()=>k,_A:()=>O,d:()=>D,qK:()=>P});var i=n(1610),r=n(327),o=n(2514),a=n(4014),s=n(3266),l=n(8554),u=n(3051),h=n(2892),c=n(5280),d=n(6357),p=2*Math.PI,f=a.Z.CMD,g=["top","right","bottom","left"];function m(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function v(t,e,n,i,r,o,a,l,u){a-=t,l-=e;var h=Math.sqrt(a*a+l*l),c=(a/=h)*n+t,d=(l/=h)*n+e;if(Math.abs(i-r)%p<1e-4)return u[0]=c,u[1]=d,h-n;if(o){var f=i;i=(0,s.m)(r),r=(0,s.m)(f)}else i=(0,s.m)(i),r=(0,s.m)(r);i>r&&(r+=p);var g=Math.atan2(l,a);if(g<0&&(g+=p),g>=i&&g<=r||g+p>=i&&g+p<=r)return u[0]=c,u[1]=d,h-n;var m=n*Math.cos(i)+t,v=n*Math.sin(i)+e,y=n*Math.cos(r)+t,_=n*Math.sin(r)+e,x=(m-a)*(m-a)+(v-l)*(v-l),b=(y-a)*(y-a)+(_-l)*(_-l);return x0){e=e/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(A,S,T),i.Z.sub(C,M,T);var n=A.len(),r=C.len();if(!(n<.001||r<.001)){A.scale(1/n),C.scale(1/r);var o=A.dot(C);if(Math.cos(e)1&&i.Z.copy(L,M),L.toArray(t[1])}}}}function O(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(A,T,S),i.Z.sub(C,M,T);var r=A.len(),o=C.len();if(!(r<.001||o<.001))if(A.scale(1/r),C.scale(1/o),A.dot(e)=s)i.Z.copy(L,M);else{L.scaleAndAdd(C,a/Math.tan(Math.PI/2-l));var u=M.x!==T.x?(L.x-T.x)/(M.x-T.x):(L.y-T.y)/(M.y-T.y);if(isNaN(u))return;u<0?i.Z.copy(L,T):u>1&&i.Z.copy(L,M)}L.toArray(t[1])}}}function E(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function N(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=c.dist(i[0],i[1]),o=c.dist(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=c.lerp([],i[1],i[0],a/r),l=c.lerp([],i[1],i[2],a/o),u=c.lerp([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h{"use strict";n.d(e,{GI:()=>l,VT:()=>o,WE:()=>s,yl:()=>u});var i=n(1587),r=n(479);function o(t){for(var e=[],n=0;n0&&o&&w(-c/a,0,a);var m,v,y=t[0],_=t[a-1];return x(),m<0&&S(-m,.8),v<0&&S(v,.8),x(),b(m,v,1),b(v,m,-1),x(),m<0&&T(-m),v<0&&T(v),u}function x(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){w(-(o[l-1]*c),l,a)}}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}function s(t,e,n,i){return a(t,"x","width",e,n,i)}function l(t,e,n,i){return a(t,"y","height",e,n,i)}function u(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new r.Z(0,0,0,0);function o(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var a=0;a{"use strict";n.d(e,{Lr:()=>p,k3:()=>d,nC:()=>f,ni:()=>c,pe:()=>b,qA:()=>x,qT:()=>_,tD:()=>w});var i=n(6498),r=n(3051),o=n(6357),a=n(2234),s=n(9266),l={};function u(t,e){for(var n=0;n{"use strict";n.d(e,{Bk:()=>v,G_:()=>g,Ge:()=>d,Gk:()=>c,My:()=>p,bK:()=>m});var i=n(3051),r=n(5669),o=n(9936),a=n(5682),s=n(887),l="__ec_stack_";function u(t){return t.get("stack")||l+t.seriesIndex}function h(t){return t.dim+t.index}function c(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),a=0;a0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return(0,i.each)(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],c=Math.abs(a[1]-a[0]),d=o.scale.getExtent(),p=Math.abs(d[1]-d[0]);i=l?c/p*l:c}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),m=(0,r.GM)(t.get("barMaxWidth"),i),v=(0,r.GM)(t.get("barMinWidth")||(_(t)?.5:1),i),y=t.get("barGap"),x=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:m,barMinWidth:v,barGap:y,barCategoryGap:x,axisKey:h(o),stackId:u(t)})})),f(n)}function f(t){var e={};(0,i.each)(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return(0,i.each)(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=(0,i.keys)(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),h=(0,r.GM)(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,p=(c-u)/(d+(d-1)*h);p=Math.max(p,0),(0,i.each)(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+h*i,d--}else{var i=p;e&&ei&&(i=n),i!==p&&(t.width=i,c-=i+h*i,d--)}})),p=(c-u)/(d+(d-1)*h),p=Math.max(p,0);var f,g=0;(0,i.each)(o,(function(t,e){t.width||(t.width=p),f=t,g+=t.width*(1+h)})),f&&(g-=f.width*h);var m=-g/2;(0,i.each)(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:m,width:t.width},m+=t.width*(1+h)}))})),n}function g(t,e,n){if(t&&e){var i=t[h(e)];return null!=i&&null!=n?i[u(n)]:i}}function m(t,e){var n=d(t,e),r=p(n);(0,i.each)(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=u(t),o=r[h(n)][i],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function v(t){return{seriesType:t,plan:(0,a.Z)(),reset:function(t){if(y(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.getDimensionIndex(e.mapDimension(r.dim)),l=e.getDimensionIndex(e.mapDimension(i.dim)),u=t.get("showBackground",!0),h=e.mapDimension(r.dim),c=e.getCalculationInfo("stackResultDimension"),d=(0,o.M)(e,h)&&!!e.getCalculationInfo("stackedOnSeries"),p=r.isHorizontal(),f=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),g=_(t),m=t.get("barMinHeight")||0,v=c&&e.getDimensionIndex(c),x=e.getLayout("size"),b=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,o=g&&(0,s.o)(3*r),h=g&&u&&(0,s.o)(3*r),c=g&&(0,s.o)(r),y=n.master.getRect(),_=p?y.width:y.height,w=e.getStore(),S=0;null!=(i=t.next());){var T=w.get(d?v:a,i),M=w.get(l,i),A=f,C=void 0;d&&(C=+T-w.get(a,i));var D=void 0,I=void 0,L=void 0,P=void 0;if(p){var O=n.dataToPoint([T,M]);if(d)A=n.dataToPoint([C,M])[0];D=A,I=O[1]+b,L=O[0]-A,P=x,Math.abs(L){"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(5682),o=n(9936),a=n(887);function s(t,e){return{seriesType:t,plan:(0,r.Z)(),reset:function(t){var n=t.getData(),r=t.coordinateSystem,s=t.pipelineContext,l=e||s.large;if(r){var u=(0,i.map)(r.dimensions,(function(t){return n.mapDimension(t)})).slice(0,2),h=u.length,c=n.getCalculationInfo("stackResultDimension");(0,o.M)(n,u[0])&&(u[0]=c),(0,o.M)(n,u[1])&&(u[1]=c);var d=n.getStore(),p=n.getDimensionIndex(u[0]),f=n.getDimensionIndex(u[1]);return h&&{progress:function(t,e){for(var n=t.end-t.start,i=l&&(0,a.o)(n*h),o=[],s=[],u=t.start,c=0;u{"use strict";n.d(e,{s:()=>s,y:()=>o});var i=n(3051),r=n(2234);function o(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}(0,i.each)([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,r,o){e=(0,i.extend)({},e),o.dispatchAction((0,i.extend)(e,{type:t[1],seriesIndex:n(r,e)}))}))}))}function a(t,e,n,o,a){var s=t+e;n.isSilent(s)||o.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,o=t.option.selectedMap,l=a.selected,u=0;u{"use strict";n.d(e,{Z:()=>d});var i=n(655),r=n(3051),o=n(1497),a=n(2151),s=n(4251),l=n(2234),u=n(6172),h=(0,l.Yf)(),c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.merge(t,o.get(this.mainType)),r.merge(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.merge(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=h(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.merge(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(c,o.Z),(0,s.au)(c),a.cj(c),a.jS(c,(function(t){var e=[];r.each(c.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.map(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e}));const d=c},1497:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(6387),r=n(4251),o=(0,n(9066).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(6006),l=n(6498),u=["textStyle","color"],h=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],c=new l.ZP;const d=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n{"use strict";n.d(e,{V:()=>v,Z:()=>A});var i=n(655),r=n(3051),o=n(6387),a=n(2234),s=n(8071),l=n(5494),u=n(1219),h=n(6172),c=n(8674),d=n(4251),p=n(6437),f=n(3993),g=a.Yf();function m(t,e){return t.getName(e)||t.getId(e)}var v="__universalTransitionEnabled",y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,c.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(g(this).sourceManager=new p.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,g(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,h.YD)(this),i=n?(0,h.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,h.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,h.YD)(this);n&&(0,h.dt)(this.option,t,n);var i=g(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,g(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[m(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[v])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r.isObject(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.each(r.concatArray(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.curry(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.mixin(y,u.X),r.mixin(y,l._),(0,d.pw)(y,s.Z);const A=y},2468:(t,e,n)=>{"use strict";n.d(e,{R:()=>a,f:()=>o});var i=n(3051),r=(0,i.createHashMap)();function o(t,e){(0,i.assert)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},1219:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(3051),r=n(8540),o=n(8988),a=/\{@(.+?)\}/g,s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,h=this.mainType,c="series"===h,d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var h=this.getData(n),c=this.getDataParams(t,n);(u&&(c.value=u.interpolatedValue),null!=s&&i.isArray(c.value)&&(c.value=c.value[s]),l)||(l=h.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return i.isFunction(l)?(c.status=e,c.dimensionIndex=s,l(c)):i.isString(l)?(0,o.kF)(l,c).replace(a,(function(e,n){var o=n.length,a=n;"["===a.charAt(0)&&"]"===a.charAt(o-1)&&(a=+a.slice(1,o-1));var s=(0,r.hk)(h,t,a);if(u&&i.isArray(u.interpolatedValue)){var l=h.getDimensionIndex(a);l>=0&&(s=u.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.isObject(t)?t.type&&(n=t):e=t,{text:e,frag:n}}},9887:(t,e,n)=>{"use strict";n.d(e,{D:()=>a,t:()=>r});var i=n(9066),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},7515:(t,e,n)=>{"use strict";n.d(e,{K:()=>a,v:()=>r});var i=n(9066),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},9066:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);function r(t,e){for(var n=0;n=0||o&&i.indexOf(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},5494:(t,e,n)=>{"use strict";n.d(e,{_:()=>a,i:()=>s});var i=n(2234),r=(0,i.Yf)(),o=(0,i.Yf)(),a=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return l(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t,e;(e=r)(t=this).paletteIdx=0,e(t).paletteNameMap={}},t}();function s(t,e,n,r){var a=(0,i.kF)(t.get(["aria","decal","decals"]));return l(t,o,a,null,e,n,r)}function l(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var h=null!=a&&i?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}},12:(t,e,n)=>{"use strict";n.d(e,{N:()=>b});var i=n(4990),r=n(3051),o=n(655),a=n(3510),s=n(5787),l=n(7772),u=n(479),h=n(4414),c=n(3132);function d(t,e,n){var i=c.qW.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}const p=function(t){function e(e,n,o){var a,s=t.call(this)||this;s.motionBlur=!1,s.lastFrameAlpha=.7,s.dpr=1,s.virtual=!1,s.config={},s.incremental=!1,s.zlevel=0,s.maxRepaintRectCount=5,s.__dirty=!0,s.__firstTimePaint=!0,s.__used=!1,s.__drawIndex=0,s.__startIndex=0,s.__endIndex=0,s.__prevStartIndex=null,s.__prevEndIndex=null,o=o||i.KL,"string"==typeof e?a=d(e,n,o):r.isObject(e)&&(e=(a=e).id),s.id=e,s.dom=a;var l=a.style;return l&&(r.disableUserSelect(a),a.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),s.painter=n,s.dpr=o,s}return(0,o.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=d("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new u.Z(0,0,0,0);function c(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new u.Z(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,h=0;h=a)}}for(var d=this.__startIndex;d15)break}n.prevElClipPaths&&u.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var x=p.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?y:0),this._needsManuallyCompositing),c.__builtin__||r.logError("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),l.__dirty&h.YV&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,r.each(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?r.merge(n[t],e,!0):n[t]=e;for(var i=0;i{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(5669),o=n(8988),a=n(379),s=n(5021),l=r.NM,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return s.XS(t,this._extent)},e.prototype.normalize=function(t){return s.Fv(t,this._extent)},e.prototype.scale=function(t){return s.bA(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=s.lb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:l(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&c{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(379),o=n(1401),a=n(5021),s=n(3051),l=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new o.Z({})),(0,s.isArray)(i)&&(i=new o.Z({categories:(0,s.map)(i,(function(t){return(0,s.isObject)(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return null==t?NaN:(0,s.isString)(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),a.XS(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),a.Fv(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(a.bA(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(r.Z);r.Z.registerClass(l);const u=l},379:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4251),r=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();i.au(r);const o=r},1618:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(655),r=n(5669),o=n(5015),a=n(5021),s=n(103),l=n(379),u=n(3051),h=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,i.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,o.WU)(t.value,o.V8[(0,o.xC)((0,o.Tj)(this._minLevelUnit))]||o.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,o.k7)(t,e,n,r,i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),a=function(t,e,n,i){var a=1e4,s=o.FW,l=0;function h(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===c&&s.unshift({value:s[0].value-x})}}for(c=0;c=i[0]&&A<=i[1]&&x++)}var C=(i[1]-i[0])/e;if(x>1.5*C&&b>C/1.5)break;if(y.push(T),x>C||t===s[w])break}_=[]}}0;var D=(0,u.filter)((0,u.map)(y,(function(t){return(0,u.filter)(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),I=[],L=D.length-1;for(w=0;wn&&(this._approxInterval=n);var o=c.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function p(t){return(t/=30*o.s2)>6?6:t>3?3:t>2?2:1}function f(t){return(t/=o.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function g(t,e){return(t/=e?o.yR:o.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function m(t){return r.kx(t,!0)}function v(t,e,n){var i=new Date(t);switch((0,o.Tj)(e)){case"year":case"month":i[(0,o.vh)(n)](0);case"day":i[(0,o.f5)(n)](1);case"hour":i[(0,o.En)(n)](0);case"minute":i[(0,o.eN)(n)](0);case"second":i[(0,o.rM)(n)](0),i[(0,o.cb)(n)](0)}return i.getTime()}l.Z.registerClass(h);const y=h},5021:(t,e,n)=>{"use strict";n.d(e,{Fv:()=>h,Qf:()=>o,XS:()=>u,bA:()=>c,lM:()=>r,lb:()=>s,r1:()=>a});var i=n(5669);function r(t){return"interval"===t.type||"log"===t.type}function o(t,e,n,r){var o={},a=t[1]-t[0],u=o.interval=(0,i.kx)(a/e,!0);null!=n&&ur&&(u=o.interval=r);var h=o.intervalPrecision=s(u);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),l(t,0,e),l(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[(0,i.NM)(Math.ceil(t[0]/u)*u,h),(0,i.NM)(Math.floor(t[1]/u)*u,h)],t),o}function a(t){var e=Math.pow(10,(0,i.xW)(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,(0,i.NM)(n*e)}function s(t){return(0,i.p8)(t)+2}function l(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function u(t,e){return t>=e[0]&&t<=e[1]}function h(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function c(t,e){return t*(e[1]-e[0])+e[0]}},4251:(t,e,n)=>{"use strict";n.d(e,{PT:()=>l,Qj:()=>d,au:()=>g,dm:()=>u,pw:()=>h,u9:()=>s});var i=n(655),r=n(3051),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e,n,o=this;return n=o,r.isFunction(n)&&/^class\s/.test(Function.prototype.toString.call(n))?e=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o):(e=function(){(t.$constructor||o).apply(this,arguments)},r.inherits(e,this)),r.extend(e.prototype,t),e[a]=!0,e.extend=this.extend,e.superCall=p,e.superApply=f,e.superClass=o,e}}function h(t,e){t.extend=e.extend}var c=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",c++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function p(t,e){for(var n=[],i=2;i{"use strict";n.d(e,{Kr:()=>a,ZL:()=>u,cj:()=>s,jS:()=>l});var i=n(3051),r=n(4251),o=Math.round(10*Math.random());function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.each(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.each(t,(function(t){i.indexOf(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.each(l,(function(t){i.indexOf(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,h={};for(i.each(t,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(o.call(a,c,d.originalDeps.slice()),delete h[c]),i.each(d.successor,p?g:f)}i.each(h,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}}}function u(t,e){return i.merge(i.merge({},t,!0),e,!0)}},8625:(t,e,n)=>{"use strict";n.d(e,{I:()=>g});var i=Math.round(9*Math.random()),r="function"==typeof Object.defineProperty;const o=function(){function t(){this._id="__ec_inner_"+i++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return r?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var a=n(2528),s=n(3051),l=n(5669),u=n(1525),h=n(7772),c=n(3132),d=new o,p=new a.ZP(100),f=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function g(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&d.delete(t);var o=d.get(t);if(o)return o;var a=(0,s.defaults)(t,{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});"none"===a.backgroundColor&&(a.backgroundColor=null);var g={repeat:"repeat"};return function(t){for(var e,o=[n],d=!0,g=0;g{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},8988:(t,e,n)=>{"use strict";n.d(e,{A0:()=>v,F1:()=>c,Lz:()=>x,MI:()=>b,MY:()=>l,OD:()=>a,ew:()=>_,kF:()=>g,mr:()=>y,uX:()=>d,wx:()=>m,zW:()=>s});var i=n(3051),r=n(5669),o=n(5015);function a(t){if(!(0,r.kE)(t))return i.isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var l=i.normalizeCssArray,u=/([&<>"'])/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"};function c(t){return null==t?"":(t+"").replace(u,(function(t,e){return h[e]}))}function d(t,e,n){function s(t){return t&&i.trim(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,h=t instanceof Date;if(u||h){var c=u?(0,r.sG)(t):t;if(!isNaN(+c))return(0,o.WU)(c,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(h)return"-"}if("ordinal"===e)return i.isStringSafe(t)?s(t):i.isNumber(t)&&l(t)?t+"":"-";var d=(0,r.FK)(t);return l(d)?a(d):i.isStringSafe(t)?s(t):"boolean"==typeof t?t+"":"-"}var p=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(0,r.sG)(e),a=n?"getUTC":"get",s=i[a+"FullYear"](),l=i[a+"Month"]()+1,u=i[a+"Date"](),h=i[a+"Hours"](),c=i[a+"Minutes"](),d=i[a+"Seconds"](),p=i[a+"Milliseconds"]();return t=t.replace("MM",(0,o.vk)(l,2)).replace("M",l).replace("yyyy",s).replace("yy",(0,o.vk)(s%100+"",2)).replace("dd",(0,o.vk)(u,2)).replace("d",u).replace("hh",(0,o.vk)(h,2)).replace("h",h).replace("mm",(0,o.vk)(c,2)).replace("m",c).replace("ss",(0,o.vk)(d,2)).replace("s",d).replace("SSS",(0,o.vk)(p,3))}function _(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function x(t,e){return e=e||"transparent",i.isString(t)?t:i.isObject(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function b(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},1177:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Arc:()=>x.Z,BezierCurve:()=>_.Z,BoundingRect:()=>T.Z,Circle:()=>c.Z,CompoundPath:()=>b.Z,Ellipse:()=>d.Z,Group:()=>u.Z,Image:()=>l.ZP,IncrementalDisplayable:()=>C.Z,Line:()=>y.Z,LinearGradient:()=>w.Z,OrientedBoundingRect:()=>M.Z,Path:()=>a.ZP,Point:()=>A.Z,Polygon:()=>g.Z,Polyline:()=>m.Z,RadialGradient:()=>S.Z,Rect:()=>v.Z,Ring:()=>f.Z,Sector:()=>p.C,Text:()=>h.ZP,applyTransform:()=>q,clipPointsByRect:()=>$,clipRectByRect:()=>tt,createIcon:()=>et,extendPath:()=>z,extendShape:()=>k,getShapeClass:()=>Z,getTransform:()=>Y,groupTransition:()=>Q,initProps:()=>P.KZ,isElementRemoved:()=>P.eq,lineLineIntersect:()=>it,linePolygonIntersect:()=>nt,makeImage:()=>V,makePath:()=>F,mergePath:()=>H,registerShape:()=>B,removeElement:()=>P.bX,removeElementWithFadeOut:()=>P.XD,resizePath:()=>U,setTooltipConfig:()=>ot,subPixelOptimize:()=>X,subPixelOptimizeLine:()=>W,subPixelOptimizeRect:()=>j,transformDirection:()=>K,traverseElements:()=>st,updateProps:()=>P.D});var i=n(7494),r=n(2892),o=n(5280),a=n(327),s=n(7411),l=n(4535),u=n(8154),h=n(6498),c=n(9538),d=n(2797),p=n(7214),f=n(5795),g=n(5094),m=n(2514),v=n(5151),y=n(2095),_=n(4174),x=n(4826),b=n(2776),w=n(4438),S=n(6369),T=n(479),M=n(1587),A=n(1610),C=n(1754),D=n(4111),I=n(3051),L=n(106),P=n(9266),O=Math.max,E=Math.min,N={};function k(t){return a.ZP.extend(t)}var R=i.Pc;function z(t,e){return R(t,e)}function B(t,e){N[t]=e}function Z(t){if(N.hasOwnProperty(t))return N[t]}function F(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=G(n,o.getBoundingRect())),U(o,n)),o}function V(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(G(e,r))}}});return i}function G(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var H=i.AA;function U(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function W(t){return D._3(t.shape,t.shape,t.style),t}function j(t){return D.Pw(t.shape,t.shape,t.style),t}var X=D.vu;function Y(t,e){for(var n=r.identity([]);t&&t!==e;)r.mul(n,t.getLocalTransform(),n),t=t.parent;return n}function q(t,e,n){return e&&!(0,I.isArrayLike)(e)&&(e=s.ZP.getLocalTransform(e)),n&&(e=r.invert([],e)),o.applyTransform([],t,e)}function K(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=q(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function J(t){return!t.isGroup}function Q(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){J(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(J(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),(0,P.D)(t,i,n,(0,L.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,I.extend)({},t.shape)),e}}function $(t,e){return(0,I.map)(t,(function(t){var n=t[0];n=O(n,e.x),n=E(n,e.x+e.width);var i=t[1];return i=O(i,e.y),[n,i=E(i,e.y+e.height)]}))}function tt(t,e){var n=O(t.x,e.x),i=E(t.x+t.width,e.x+e.width),r=O(t.y,e.y),o=E(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function et(t,e,n){var i=(0,I.extend)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,I.defaults)(r,n),new l.ZP(i)):F(t.replace("path://",""),i,n,"center")}function nt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,m=rt(f,g,u,h)/p;if(m<0||m>1)return!1;var v=rt(f,g,c,d)/p;return!(v<0||v>1)}function rt(t,e,n,i){return t*i-n*e}function ot(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=(0,I.isString)(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&(0,I.each)((0,I.keys)(l),(function(t){(0,I.hasOwn)(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=(0,L.A)(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:(0,I.defaults)({content:i,formatterParams:s},r)}}function at(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function st(t,e){if(t)if((0,I.isArray)(t))for(var n=0;n{"use strict";n.d(e,{A:()=>i,Q:()=>r});var i=(0,n(2234).Yf)(),r=function(t,e,n,r){if(r){var o=i(r);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var o=i(r);o.seriesIndex=t,o.dataIndex=n,o.dataType=e}))}}},6172:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>c,ME:()=>p,QM:()=>g,QT:()=>_,YD:()=>m,dt:()=>v,gN:()=>l,lq:()=>d,p$:()=>f,tE:()=>y});var i=n(3051),r=n(479),o=n(5669),a=n(8988),s=i.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var c=h;i.curry(h,"vertical"),i.curry(h,"horizontal");function d(t,e,n){var i=e.width,r=e.height,s=(0,o.GM)(t.left,i),l=(0,o.GM)(t.top,r),u=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,r);return(isNaN(s)||isNaN(parseFloat(t.left)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.right)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.top)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.bottom)))&&(h=r),n=a.MY(n||0),{width:Math.max(u-s-n[1]-n[3],0),height:Math.max(h-l-n[0]-n[2],0)}}function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),h=(0,o.GM)(t.right,i),c=(0,o.GM)(t.bottom,s),d=(0,o.GM)(t.width,i),p=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],m=t.aspect;switch(isNaN(d)&&(d=i-h-g-l),isNaN(p)&&(p=s-c-f-u),null!=m&&(isNaN(d)&&isNaN(p)&&(m>i/s?d=.8*i:p=.8*s),isNaN(d)&&(d=m*p),isNaN(p)&&(p=d/m)),isNaN(l)&&(l=i-h-d-g),isNaN(u)&&(u=s-c-p-f),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-p/2-n[0];break;case"bottom":u=s-p-f}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(h||0)),isNaN(p)&&(p=s-f-u-(c||0));var v=new r.Z(l+n[3],u+n[0],d,p);return v.margin=n,v}function f(t,e,n,o,a,s){var l,u=!a||!a.hv||a.hv[0],h=!a||!a.hv||a.hv[1],c=a&&a.boundingMode||"all";if((s=s||t).x=t.x,s.y=t.y,!u&&!h)return!1;if("raw"===c)l="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var d=t.getLocalTransform();(l=l.clone()).applyTransform(d)}var f=p(i.defaults({width:l.width,height:l.height},e),n,o),g=u?f.x-l.x:0,m=h?f.y-l.y:0;return"raw"===c?(s.x=g,s.y=m):(s.x+=g,s.y+=m),s===t&&t.markRedraw(),!0}function g(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]}function m(t){var e=t.layoutMode||t.constructor.layoutMode;return i.isObject(e)?e:e?{type:e}:null}function v(t,e,n){var r=n&&n.ignoreSize;!i.isArray(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){h(e,t)&&(o[t]=l[t]=e[t]),c(o,t)&&a++,c(l,t)&&u++})),r[i])return c(e,n[1])?l[n[2]]=null:c(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var d=0;d{"use strict";n.d(e,{Sh:()=>s,ZK:()=>a,_y:()=>l});var i={},r="undefined"!=typeof console&&console.warn&&console.log;function o(t,e,n){if(r){if(n){if(i[e])return;i[e]=!0}console[t]("[ECharts] "+e)}}function a(t,e){o("warn",t,e)}function s(t){0}function l(t){throw new Error(t)}},2234:(t,e,n)=>{"use strict";n.d(e,{C4:()=>d,C6:()=>D,Cc:()=>h,Co:()=>p,HZ:()=>L,IL:()=>O,O0:()=>b,P$:()=>P,Td:()=>c,U5:()=>v,U9:()=>E,XI:()=>w,Yf:()=>T,ab:()=>f,g0:()=>x,gO:()=>S,iP:()=>I,kF:()=>u,lY:()=>_,pk:()=>k,pm:()=>A,pv:()=>N,yu:()=>y,zH:()=>C});var i=n(3051),r=n(6387),o=n(5669);function a(t,e,n){return(e-t)*n+t}var s="series\0",l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function h(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i{"use strict";n.d(e,{FK:()=>T,GM:()=>a,M9:()=>c,NM:()=>s,NU:()=>o,S$:()=>p,VR:()=>w,Xd:()=>_,YM:()=>f,ZB:()=>h,dt:()=>l,eJ:()=>d,jj:()=>A,kE:()=>M,kx:()=>b,mW:()=>m,nR:()=>S,nl:()=>D,p8:()=>u,sG:()=>y,wW:()=>g,xW:()=>x});var i=n(3051),r=1e-4;function o(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function a(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return i.isString(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function s(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function l(t){return t.sort((function(t,e){return t-e})),t}function u(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return h(t)}function h(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function c(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function d(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var o=Math.pow(10,n),a=i.map(t,(function(t){return(isNaN(t)?0:t)/r*o*100})),s=100*o,l=i.map(a,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),h=i.map(a,(function(t,e){return t-l[e]}));uc&&(c=h[p],d=p);++l[d],h[d]=0,++u}return l[e]/o}function p(t,e){var n=Math.max(u(t),u(e)),i=t+e;return n>20?i:s(i,n)}var f=9007199254740991;function g(t){var e=2*Math.PI;return(t%e+e)%e}function m(t){return t>-1e-4&&t=10&&e++,e}function b(t,e){var n=x(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function w(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function S(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i{"use strict";n.d(e,{$l:()=>Q,Av:()=>ht,C5:()=>nt,CX:()=>p,Gl:()=>k,Hg:()=>x,Ib:()=>ot,JQ:()=>b,Ki:()=>y,L1:()=>g,MA:()=>z,Mh:()=>V,Nj:()=>ut,RW:()=>dt,SJ:()=>W,SX:()=>G,T5:()=>X,UL:()=>K,VP:()=>H,WO:()=>lt,XX:()=>U,aG:()=>pt,ci:()=>et,e9:()=>gt,fD:()=>F,iK:()=>w,k5:()=>rt,oJ:()=>J,og:()=>tt,qc:()=>m,th:()=>ct,vF:()=>it,wU:()=>f,xp:()=>ft,xr:()=>$,yx:()=>_,zI:()=>q,zr:()=>v});var i=n(2528),r=n(3051),o=n(106),a=n(1092),s=n(2234),l=n(327),u=1,h={},c=(0,s.Yf)(),d=(0,s.Yf)(),p=1,f=2,g=["emphasis","blur","select"],m=["normal","emphasis","blur","select"],v=10,y="highlight",_="downplay",x="select",b="unselect",w="toggleSelect";function S(t){return null!=t&&"none"!==t}var T=new i.ZP(100);function M(t){if((0,r.isString)(t)){var e=T.get(t);return e||(e=a.lift(t,-.1),T.put(t,e)),e}if((0,r.isGradientObject)(t)){var n=(0,r.extend)({},t);return n.colorStops=(0,r.map)(t.colorStops,(function(t){return{offset:t.offset,color:a.lift(t.color,-.1)}})),n}return t}function A(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function C(t){A(t,"emphasis",f)}function D(t){t.hoverState===f&&A(t,"normal",0)}function I(t){A(t,"blur",p)}function L(t){t.hoverState===p&&A(t,"normal",0)}function P(t){t.selected=!0}function O(t){t.selected=!1}function E(t,e,n){e(t,n)}function N(t,e,n){E(t,e,n),t.isGroup&&t.traverse((function(t){E(t,e,n)}))}function k(t,e){switch(e){case"emphasis":t.hoverState=f;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.indexOf)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=c(t),u=o&&s.selectFill||s.normalFill,h=o&&s.selectStroke||s.normalStroke;if(S(u)||S(h)){var d=(i=i||{}).style||{};"inherit"===d.fill?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=u):!S(d.fill)&&S(u)?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=M(u)):!S(d.stroke)&&S(h)&&(a||(i=(0,r.extend)({},i),d=(0,r.extend)({},d)),d.stroke=M(h)),i.style=d}}if(i&&null==i.z2){a||(i=(0,r.extend)({},i));var p=t.z2EmphasisLift;i.z2=t.z2+(null!=p?p:v)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.indexOf)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function it(t,e,n){ut(t,!0),N(t,z),ot(t,e,n)}function rt(t,e,n,i){i?function(t){ut(t,!1)}(t):it(t,e,n)}function ot(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var at=["emphasis","blur","select"],st={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function lt(t,e,n,i){n=n||"itemStyle";for(var r=0;r{"use strict";n.d(e,{Cq:()=>S,Pw:()=>y,th:()=>b,zp:()=>w});var i=n(3051),r=n(327),o=n(2095),a=n(5151),s=n(9538),l=n(1177),u=n(479),h=n(423),c=n(5669),d=r.ZP.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),p=r.ZP.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),f=r.ZP.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),g=r.ZP.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),m={line:o.Z,rect:a.Z,roundRect:a.Z,square:a.Z,circle:s.Z,diamond:p,pin:f,arrow:g,triangle:d},v={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},y={};(0,i.each)(m,(function(t,e){y[e]=new t}));var _=r.ZP.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,h.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=y[i];r||(r=y[i="rect"]),v[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function x(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function b(t,e,n,i,r,o,a){var s,h=0===t.indexOf("empty");return h&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?l.makeImage(t.slice(8),new u.Z(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?l.makePath(t.slice(7),{},new u.Z(e,n,i,r),a?"center":"cover"):new _({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=h,s.setColor=x,o&&s.setColor(o),s}function w(t){return(0,i.isArray)(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function S(t,e){if(null!=t)return(0,i.isArray)(t)||(t=[t,t]),[(0,c.GM)(t[0],e[0])||0,(0,c.GM)((0,i.retrieve2)(t[1],t[0]),e[1])||0]}},270:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s,ZH:()=>l});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,h=l[o];if(l[r]!==n||h!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}function l(t,e){var n=t[e];n&&n[i]&&(n.clear&&n.clear(),t[e]=n[i])}},5015:(t,e,n)=>{"use strict";n.d(e,{$K:()=>_,CW:()=>A,En:()=>k,FW:()=>m,MV:()=>L,P5:()=>c,RZ:()=>P,Tj:()=>y,V8:()=>f,WT:()=>s,WU:()=>b,Wp:()=>D,cb:()=>B,dV:()=>u,eN:()=>R,f5:()=>N,fn:()=>I,k7:()=>w,q5:()=>T,rM:()=>z,s2:()=>h,sx:()=>M,vh:()=>E,vk:()=>v,xC:()=>x,xL:()=>O,xz:()=>C,yR:()=>l});var i=n(3051),r=n(5669),o=n(3917),a=n(1497),s=1e3,l=60*s,u=60*l,h=24*u,c=365*h,d={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}"},p="{yyyy}-{MM}-{dd}",f={year:"{yyyy}",month:"{yyyy}-{MM}",day:p,hour:"{yyyy}-{MM}-{dd} "+d.hour,minute:"{yyyy}-{MM}-{dd} "+d.minute,second:"{yyyy}-{MM}-{dd} "+d.second,millisecond:d.none},g=["year","month","day","hour","minute","second","millisecond"],m=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function _(t){return t===y(t)}function x(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function b(t,e,n,i){var s=r.sG(t),l=s[M(n)](),u=s[A(n)]()+1,h=Math.floor((u-1)/3)+1,c=s[C(n)](),d=s["get"+(n?"UTC":"")+"Day"](),p=s[D(n)](),f=(p-1)%12+1,g=s[I(n)](),m=s[L(n)](),y=s[P(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,h+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(c,2)).replace(/{d}/g,c+"").replace(/{eeee}/g,w[d]).replace(/{ee}/g,S[d]).replace(/{e}/g,d+"").replace(/{HH}/g,v(p,2)).replace(/{H}/g,p+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(m,2)).replace(/{s}/g,m+"").replace(/{SSS}/g,v(y,3)).replace(/{S}/g,y+"")}function w(t,e,n,r,o){var a=null;if(i.isString(n))a=n;else if(i.isFunction(n))a=n(t.value,e,{level:t.level});else{var s=i.extend({},d);if(t.level>0)for(var l=0;l=0;--l)if(u[h]){a=u[h];break}a=a||s.none}if(i.isArray(a)){var c=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[c=Math.min(c,a.length-1)]}}return b(new Date(t.value),a,o,r)}function S(t,e){var n=r.sG(t),i=n[A(e)]()+1,o=n[C(e)](),a=n[D(e)](),s=n[I(e)](),l=n[L(e)](),u=0===n[P(e)](),h=u&&0===l,c=h&&0===s,d=c&&0===a,p=d&&1===o;return p&&1===i?"year":p?"month":d?"day":c?"hour":h?"minute":u?"second":"millisecond"}function T(t,e,n){var o=i.isNumber(t)?r.sG(t):t;switch(e=e||S(t,n)){case"year":return o[M(n)]();case"half-year":return o[A(n)]()>=6?1:0;case"quarter":return Math.floor((o[A(n)]()+1)/4);case"month":return o[A(n)]();case"day":return o[C(n)]();case"half-day":return o[D(n)]()/24;case"hour":return o[D(n)]();case"minute":return o[I(n)]();case"second":return o[L(n)]();case"millisecond":return o[P(n)]()}}function M(t){return t?"getUTCFullYear":"getFullYear"}function A(t){return t?"getUTCMonth":"getMonth"}function C(t){return t?"getUTCDate":"getDate"}function D(t){return t?"getUTCHours":"getHours"}function I(t){return t?"getUTCMinutes":"getMinutes"}function L(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"getUTCMilliseconds":"getMilliseconds"}function O(t){return t?"setUTCFullYear":"setFullYear"}function E(t){return t?"setUTCMonth":"setMonth"}function N(t){return t?"setUTCDate":"setDate"}function k(t){return t?"setUTCHours":"setHours"}function R(t){return t?"setUTCMinutes":"setMinutes"}function z(t){return t?"setUTCSeconds":"setSeconds"}function B(t){return t?"setUTCMilliseconds":"setMilliseconds"}},4279:(t,e,n)=>{"use strict";n.d(e,{J5:()=>l,RA:()=>u,Wc:()=>c,XD:()=>o,cy:()=>r,f7:()=>i,fY:()=>h,hL:()=>s,qb:()=>a});var i=(0,n(3051).createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",h="column",c="row"},887:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});var i=n(3051),r="undefined"!=typeof Float32Array,o=r?Float32Array:Array;function a(t){return(0,i.isArray)(t)?r?new Float32Array(t):t:new o(t)}},5797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(2151),a=n(4251),s=n(2234),l=n(6357),u=n(8674),h=n(5682),c=n(1177),d=s.Yf(),p=(0,h.Z)(),f=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){(0,c.traverseElements)(this.group,t)},t.markUpdateMethod=function(t,e){d(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function g(t,e,n){t&&(0,l.Av)(t)&&("emphasis"===e?l.fD:l.Mh)(t,n)}function m(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.each)(s.kF(r),(function(e){g(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){g(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&d(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),_[l]}a.dm(f,["dispose"]),a.au(f);var _={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const x=f},3166:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8154),r=n(2151),o=n(4251),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();o.dm(a),o.au(a);const s=a},2019:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}()},6211:(t,e,n)=>{"use strict";function i(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function r(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function o(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}n.d(e,{LZ:()=>o,Or:()=>i,UL:()=>r})},531:function(t,e){ +(()=>{var t={3721:(t,e,n)=>{var i;self,t.exports=(i=n(125),(()=>{"use strict";var t={468:(t,e,n)=>{n.r(e);var i=n(83);function r(t,e,n){"object"==typeof e&&(n=e,e=null);var i,r=this;if(!(t instanceof Function))for(var s in i=[],t)t.hasOwnProperty(s)&&i.push(s);var l=function(e){if(r.apply(this,arguments),t instanceof Function?o(this,t.call(this,e)):a(this,t,i),this.constructor===l)for(var n=l.__initializers__,s=0;s=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}};var z,B={supportWebGL:function(){if(null==z)try{var t=document.createElement("canvas");if(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))throw new Error}catch(t){z=!1}return z}};B.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,B.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,B.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,B.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,B.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,B.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,B.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var Z={};"undefined"!=typeof window?Z=window:void 0!==n.g&&(Z=n.g),B.requestAnimationFrame=Z.requestAnimationFrame||Z.msRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},B.createCanvas=function(){return document.createElement("canvas")},B.createImage=function(){return new Z.Image},B.request={get:R.get},B.addEventListener=function(t,e,n,i){t.addEventListener(e,n,i)},B.removeEventListener=function(t,e,n){t.removeEventListener(e,n)};const F=B;var V=function(){this.head=null,this.tail=null,this._length=0};V.prototype.insert=function(t){var e=new V.Entry(t);return this.insertEntry(e),e},V.prototype.insertAt=function(t,e){if(!(t<0)){for(var n=this.head,i=0;n&&i!=t;)n=n.next,i++;if(n){var r=new V.Entry(e),o=n.prev;o?(o.next=r,r.prev=o):this.head=r,r.next=n,n.prev=r}else this.insert(e)}},V.prototype.insertBeforeEntry=function(t,e){var n=new V.Entry(t),i=e.prev;i?(i.next=n,n.prev=i):this.head=n,n.next=e,e.prev=n,this._length++},V.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},V.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._length--},V.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e?(this.remove(e),e.value):void 0}},V.prototype.getHead=function(){if(this.head)return this.head.value},V.prototype.getTail=function(){if(this.tail)return this.tail.value},V.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e.value}},V.prototype.indexOf=function(t){for(var e=this.head,n=0;e;){if(e.value===t)return n;e=e.next,n++}},V.prototype.length=function(){return this._length},V.prototype.isEmpty=function(){return 0===this._length},V.prototype.forEach=function(t,e){for(var n=this.head,i=0,r=void 0!==e;n;)r?t.call(e,n.value,i):t(n.value,i),n=n.next,i++},V.prototype.clear=function(){this.tail=this.head=null,this._length=0},V.Entry=function(t){this.value=t,this.next=null,this.prev=null};const G=V;var H=function(t){this._list=new G,this._map={},this._maxSize=t||10};H.prototype.setMaxSize=function(t){this._maxSize=t},H.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var n=this._list.length();if(n>=this._maxSize&&n>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},H.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},H.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},H.prototype.clear=function(){this._list.clear(),this._map={}};const U=H;var W={},j={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 X(t){return(t=Math.round(t))<0?0:t>255?255:t}function Y(t){return t<0?0:t>1?1:t}function q(t){return t.length&&"%"===t.charAt(t.length-1)?X(parseFloat(t)/100*255):X(parseInt(t,10))}function K(t){return t.length&&"%"===t.charAt(t.length-1)?Y(parseFloat(t)/100):Y(parseFloat(t))}function J(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Q(t,e,n){return t+(e-t)*n}function $(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function tt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var et=new U(20),nt=null;function it(t,e){nt&&tt(nt,e),nt=et.put(t,nt||e.slice())}function rt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=K(t[1]),r=K(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return $(e=e||[],X(255*J(a,o,n+1/3)),X(255*J(a,o,n)),X(255*J(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}W.parse=function(t,e){if(t){e=e||[];var n=et.get(t);if(n)return tt(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in j)return tt(e,j[r]),it(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?($(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),it(t,e),e):void $(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?($(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),it(t,e),e):void $(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void $(e,0,0,0,1);u=K(l.pop());case"rgb":return 3!==l.length?void $(e,0,0,0,1):($(e,q(l[0]),q(l[1]),q(l[2]),u),it(t,e),e);case"hsla":return 4!==l.length?void $(e,0,0,0,1):(l[3]=K(l[3]),rt(l,e),it(t,e),e);case"hsl":return 3!==l.length?void $(e,0,0,0,1):(rt(l,e),it(t,e),e);default:return}}$(e,0,0,0,1)}},W.parseToFloat=function(t,e){if(e=W.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},W.lift=function(t,e){var n=W.parse(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return W.stringify(n,4===n.length?"rgba":"rgb")}},W.toHex=function(t){var e=W.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},W.fastLerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=X(Q(a[0],s[0],l)),n[1]=X(Q(a[1],s[1],l)),n[2]=X(Q(a[2],s[2],l)),n[3]=Y(Q(a[3],s[3],l)),n}},W.fastMapToColor=W.fastLerp,W.lerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=W.parse(e[r]),s=W.parse(e[o]),l=i-r,u=W.stringify([X(Q(a[0],s[0],l)),X(Q(a[1],s[1],l)),X(Q(a[2],s[2],l)),Y(Q(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}},W.mapToColor=W.lerp,W.modifyHSL=function(t,e,n,i){if(t=W.parse(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(t[1]=K(n)),null!=i&&(t[2]=K(i)),W.stringify(rt(t),"rgba");var r},W.modifyAlpha=function(t,e){if((t=W.parse(t))&&null!=e)return t[3]=Y(e),W.stringify(t,"rgba")},W.stringify=function(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}};var ot=W.parseToFloat,at={};function st(t){var e=Object.keys(t);e.sort();for(var n=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var n in t){var i=t[n];this.setUniform(n,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var n=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var r=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=p.clone(t.vertexDefines),this.fragmentDefines=p.clone(t.fragmentDefines),e){for(var a in n)i[a]&&(i[a].value=n[a].value);p.defaults(this.vertexDefines,r),p.defaults(this.fragmentDefines,o)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:!(!e||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=p.clone(this.vertexDefines),t.fragmentDefines=p.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,n){var i=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(n=e,e=t,t="both"),n=null!=n?n:null,"vertex"!==t&&"both"!==t||i[e]!==n&&(i[e]=n,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==n&&(r[e]=n,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},pt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},pt.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},pt.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},pt.random=function(t,e){e=e||1;var n=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},pt.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},pt.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},pt.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},pt.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},pt.forEach=(ut=pt.create(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0&&i.push("#define "+r.toUpperCase()+"_COUNT "+o)}if(n)for(var a=0;al.getMaxJointNumber()&&(d.USE_SKIN_MATRICES_TEXTURE=null),c+="\n"+Mt(d)+"\n"}o&&(c+="\n#define INSTANCING\n");var p=c+Mt(e.vertexDefines,s,h),f=c+Mt(e.fragmentDefines,s,h),g=p+"\n"+e.shader.vertex,m=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=l.getGLExtension(t)}));m.indexOf("EXT_shader_texture_lod")>=0&&(f+="\n#define SUPPORT_TEXTURE_LOD"),m.indexOf("OES_standard_derivatives")>=0&&(f+="\n#define SUPPORT_STANDARD_DERIVATIVES");var v,y,_=function(t){for(var e=[],n=0;n=0){if(1!==s&&4!==s){Vt();break}s=2,u=[]}else if(1!==s)if(4!==s)h(c),s=0;else{var d=c;Nt.indexOf(d)>=0||kt.indexOf(d)>=0||Rt.indexOf(d)>=0?l[a].semantic=d:"ignore"===d||"unconfigurable"===d?l[a].ignore=!0:l[a].value="bool"===t?"true"===d:parseFloat(d)}else l[a].value="bool"===t?"true"===c:parseFloat(c),u=null;else{if(2!==s){Vt();break}if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else l[a].value=new F.Float32Array(u),u=null,s=5;else if(2===s){if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else s=5;else s=4;else{if(0!==s&&3!==s){Vt();break}s=1}}return l}function Ht(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=Ft(t),e=Ft(e),this._shaderID=function(t,e){var n="vertex:"+t+"fragment:"+e;if(Bt[n])return Bt[n];var i=p.genGUID();return Bt[n]=i,Zt[i]={vertex:t,fragment:e},i}(t,e),this._vertexCode=Ht.parseImport(t),this._fragmentCode=Ht.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}Ht.prototype={constructor:Ht,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var n=this.uniformTemplates[e];t[e]={type:n.type,value:n.value()}}return t},_parseImport:function(){this._vertexCode=Ht.parseImport(this.vertex),this._fragmentCode=Ht.parseImport(this.fragment)},_addSemanticUniform:function(t,e,n){if(Nt.indexOf(n)>=0)this.attributeSemantics[n]={symbol:t,type:e};else if(Rt.indexOf(n)>=0){var i=!1,r=n;n.match(/TRANSPOSE$/)&&(i=!0,r=n.slice(0,-9)),this.matrixSemantics[n]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:r}}else kt.indexOf(n)>=0&&(this.uniformSemantics[n]={symbol:t,type:e})},_addMaterialUniform:function(t,e,n,i,r,o){o[t]={type:n,value:r?Et.array:i||Et[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function n(t){return null!=t?function(){return t}:null}function i(i,r,o){var a=Gt(r,o),s=[];for(var l in a){var u=a[l],h=u.semantic,c=l,d=Pt[r],p=n(a[l].value);a[l].isArray&&(c+="["+a[l].arraySize+"]",d+="v"),s.push(c),e._uniformList.push(l),u.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[l]={shaderType:"fragment",type:r}),h?e._addSemanticUniform(l,d,h):e._addMaterialUniform(l,r,d,p,a[l].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(It,i),this._fragmentCode=this._fragmentCode.replace(It,i),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(Dt,(function(n,i,r){var o=Gt(i,r),a=zt[i]||1,s=[];for(var l in o){var u=o[l].semantic;if(t[l]={type:"float",size:a,semantic:u||null},u){if(Nt.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:i}}s.push(l)}return"attribute "+i+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,n,i){var r=t.fragmentDefines;return r[n]||(r[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}this._vertexCode=this._vertexCode.replace(Lt,e),this._fragmentCode=this._fragmentCode.replace(Lt,e)},clone:function(){var t=Zt[this._shaderID];return new Ht(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(Ht.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(Ht.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(Ht.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(Ht.prototype,"uniforms",{get:function(){return this._uniformList}}));var Ut=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;Ht.parseImport=function(t){return t.replace(Ut,(function(t,e,n){return(t=Ht.source(n))?Ht.parseImport(t):(console.error('Shader chunk "'+n+'" not existed in library'),"")}))};var Wt=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;Ht.import=function(t){t.replace(Wt,(function(t,e,n,i){if(i=i.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,o=n.split("."),a=Ht.codes,s=0;s 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n}\n@end";var Yt={create:function(){var t=new ct(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},clone:function(t){var e=new ct(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},transpose:function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15],y=n*s-i*a,_=n*l-r*a,x=n*u-o*a,b=i*l-r*s,w=i*u-o*s,S=r*u-o*l,T=h*g-c*f,M=h*m-d*f,C=h*v-p*f,A=c*m-d*g,I=c*v-p*g,D=d*v-p*m,L=y*D-_*I+x*A+b*C-w*M+S*T;return L?(L=1/L,t[0]=(s*D-l*I+u*A)*L,t[1]=(r*I-i*D-o*A)*L,t[2]=(g*S-m*w+v*b)*L,t[3]=(d*w-c*S-p*b)*L,t[4]=(l*C-a*D-u*M)*L,t[5]=(n*D-r*C+o*M)*L,t[6]=(m*x-f*S-v*_)*L,t[7]=(h*S-d*x+p*_)*L,t[8]=(a*I-s*C+u*T)*L,t[9]=(i*C-n*I-o*T)*L,t[10]=(f*w-g*x+v*y)*L,t[11]=(c*x-h*w-p*y)*L,t[12]=(s*M-a*A-l*T)*L,t[13]=(n*A-i*M+r*T)*L,t[14]=(g*_-f*b-m*y)*L,t[15]=(h*b-c*_+d*y)*L,t):null},adjoint:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15];return t[0]=s*(d*v-p*m)-c*(l*v-u*m)+g*(l*p-u*d),t[1]=-(i*(d*v-p*m)-c*(r*v-o*m)+g*(r*p-o*d)),t[2]=i*(l*v-u*m)-s*(r*v-o*m)+g*(r*u-o*l),t[3]=-(i*(l*p-u*d)-s*(r*p-o*d)+c*(r*u-o*l)),t[4]=-(a*(d*v-p*m)-h*(l*v-u*m)+f*(l*p-u*d)),t[5]=n*(d*v-p*m)-h*(r*v-o*m)+f*(r*p-o*d),t[6]=-(n*(l*v-u*m)-a*(r*v-o*m)+f*(r*u-o*l)),t[7]=n*(l*p-u*d)-a*(r*p-o*d)+h*(r*u-o*l),t[8]=a*(c*v-p*g)-h*(s*v-u*g)+f*(s*p-u*c),t[9]=-(n*(c*v-p*g)-h*(i*v-o*g)+f*(i*p-o*c)),t[10]=n*(s*v-u*g)-a*(i*v-o*g)+f*(i*u-o*s),t[11]=-(n*(s*p-u*c)-a*(i*p-o*c)+h*(i*u-o*s)),t[12]=-(a*(c*m-d*g)-h*(s*m-l*g)+f*(s*d-l*c)),t[13]=n*(c*m-d*g)-h*(i*m-r*g)+f*(i*d-r*c),t[14]=-(n*(s*m-l*g)-a*(i*m-r*g)+f*(i*l-r*s)),t[15]=n*(s*d-l*c)-a*(i*d-r*c)+h*(i*l-r*s),t},determinant:function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],m=t[15];return(e*a-n*o)*(c*m-d*g)-(e*s-i*o)*(h*m-d*f)+(e*l-r*o)*(h*g-c*f)+(n*s-i*a)*(u*m-d*p)-(n*l-r*a)*(u*g-c*p)+(i*l-r*s)*(u*f-h*p)},multiply:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],g=e[12],m=e[13],v=e[14],y=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*i+x*s+b*c+w*g,t[1]=_*r+x*l+b*d+w*m,t[2]=_*o+x*u+b*p+w*v,t[3]=_*a+x*h+b*f+w*y,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*i+x*s+b*c+w*g,t[5]=_*r+x*l+b*d+w*m,t[6]=_*o+x*u+b*p+w*v,t[7]=_*a+x*h+b*f+w*y,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*i+x*s+b*c+w*g,t[9]=_*r+x*l+b*d+w*m,t[10]=_*o+x*u+b*p+w*v,t[11]=_*a+x*h+b*f+w*y,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*i+x*s+b*c+w*g,t[13]=_*r+x*l+b*d+w*m,t[14]=_*o+x*u+b*p+w*v,t[15]=_*a+x*h+b*f+w*y,t},multiplyAffine:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],h=e[9],c=e[10],d=e[12],p=e[13],f=e[14],g=n[0],m=n[1],v=n[2];return t[0]=g*i+m*a+v*u,t[1]=g*r+m*s+v*h,t[2]=g*o+m*l+v*c,g=n[4],m=n[5],v=n[6],t[4]=g*i+m*a+v*u,t[5]=g*r+m*s+v*h,t[6]=g*o+m*l+v*c,g=n[8],m=n[9],v=n[10],t[8]=g*i+m*a+v*u,t[9]=g*r+m*s+v*h,t[10]=g*o+m*l+v*c,g=n[12],m=n[13],v=n[14],t[12]=g*i+m*a+v*u+d,t[13]=g*r+m*s+v*h+p,t[14]=g*o+m*l+v*c+f,t}};Yt.mul=Yt.multiply,Yt.mulAffine=Yt.multiplyAffine,Yt.translate=function(t,e,n){var i,r,o,a,s,l,u,h,c,d,p,f,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=h,t[8]=c,t[9]=d,t[10]=p,t[11]=f,t[12]=i*g+s*m+c*v+e[12],t[13]=r*g+l*m+d*v+e[13],t[14]=o*g+u*m+p*v+e[14],t[15]=a*g+h*m+f*v+e[15]),t},Yt.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},Yt.rotate=function(t,e,n,i){var r,o,a,s,l,u,h,c,d,p,f,g,m,v,y,_,x,b,w,S,T,M,C,A,I=i[0],D=i[1],L=i[2],P=Math.sqrt(I*I+D*D+L*L);return Math.abs(P)0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},Kt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},Kt.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},Kt.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},Kt.random=function(t,e){e=e||1;var n=2*dt()*Math.PI,i=2*dt()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t},Kt.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},Kt.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},Kt.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Kt.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.forEach=function(){var t=Kt.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=3),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s1?0:Math.acos(r)};const Jt=Kt;jt.import(Xt);var Qt=qt.create,$t={};function te(t){return t.material}function ee(t,e,n){return e.uniforms[n].value}function ne(t,e,n,i){return n!==i}function ie(t){return!0}function re(){}var oe={float:T,byte:5120,ubyte:S,short:5122,ushort:5123};function ae(t,e,n){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=n,this.vao=null}function se(t){var e,n;this.bind=function(t){e||((e=F.createCanvas()).width=e.height=1,e.getContext("2d"));var i=t.gl,r=!n;r&&(n=i.createTexture()),i.bindTexture(i.TEXTURE_2D,n),r&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var le=g.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=F.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new y(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new At(this),this._placeholderTexture=new se(this)}),{resize:function(t,e){var n=this.canvas,i=this.devicePixelRatio;null!=t?(n.style&&(n.style.width=t+"px",n.style.height=e+"px"),n.width=t*i,n.height=e*i,this._width=t,this._height=e):(this._width=n.width/i,this._height=n.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,n,i,r){if("object"==typeof t){var o=t;t=o.x,e=o.y,n=o.width,i=o.height,r=o.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,n*r,i*r),this.viewport={x:t,y:e,width:n,height:i,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,n,i){var r=this.gl,o=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var a=this.viewport,s=!1,l=a.devicePixelRatio;(a.width!==this._width||a.height!==this._height||l&&l!==this.devicePixelRatio||a.x||a.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(a.x*l,a.y*l,a.width*l,a.height*l)),r.clearColor(o[0],o[1],o[2],o[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(n||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,d=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var p=Qt(),f=Jt.create(),g=0;g0){var s=t[r-1],l=s.joints?s.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===s.material&&o.lightGroup===s.lightGroup){o.__program=s.__program;continue}}var u=this._programMgr.getProgram(o,a,e);this.validateProgram(u),o.__program=u}},renderPass:function(t,e,n){this.trigger("beforerenderpass",this,t,e,n),(n=n||{}).getMaterial=n.getMaterial||te,n.getUniform=n.getUniform||ee,n.isMaterialChanged=n.isMaterialChanged||ne,n.beforeRender=n.beforeRender||re,n.afterRender=n.afterRender||re;var i=n.ifRender||ie;this.updatePrograms(t,this._sceneRendering,n),n.sortCompare&&t.sort(n.sortCompare);var r=this.viewport,o=r.devicePixelRatio,a=[r.x*o,r.y*o,r.width*o,r.height*o],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[a[2],a[3]],h=Date.now();e?(qt.copy(ue.VIEW,e.viewMatrix.array),qt.copy(ue.PROJECTION,e.projectionMatrix.array),qt.copy(ue.VIEWINVERSE,e.worldTransform.array)):(qt.identity(ue.VIEW),qt.identity(ue.PROJECTION),qt.identity(ue.VIEWINVERSE)),qt.multiply(ue.VIEWPROJECTION,ue.PROJECTION,ue.VIEW),qt.invert(ue.PROJECTIONINVERSE,ue.PROJECTION),qt.invert(ue.VIEWPROJECTIONINVERSE,ue.VIEWPROJECTION);for(var c,d,p,f,g,m,v,y,_,x,b,w,S=this.gl,T=this._sceneRendering,M=0;Mthis.getMaxJointNumber()){var o=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,o,n),e.setUniform(i,"1i","skinMatricesTexture",n),e.setUniform(i,"1f","skinMatricesTextureSize",o.width)}else{var a=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",a)}},_renderObject:function(t,e,n){var i=this.gl,r=t.geometry,o=t.mode;null==o&&(o=4);var a=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(!s||(a=this.getGLExtension("ANGLE_instanced_arrays"))){var l;if(s&&(l=this._bindInstancedAttributes(t,n,a)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint")&&r.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?a.drawElementsInstancedANGLE(o,e.indicesBuffer.count,u,0,t.getInstanceCount()):i.drawElements(o,e.indicesBuffer.count,u,0)}else s?a.drawArraysInstancedANGLE(o,0,r.vertexCount,t.getInstanceCount()):i.drawArrays(o,0,r.vertexCount);if(s)for(var h=0;hn?n:t}ce.add=function(t,e,n){return Jt.add(t.array,e.array,n.array),t._dirty=!0,t},ce.set=function(t,e,n,i){Jt.set(t.array,e,n,i),t._dirty=!0},ce.copy=function(t,e){return Jt.copy(t.array,e.array),t._dirty=!0,t},ce.cross=function(t,e,n){return Jt.cross(t.array,e.array,n.array),t._dirty=!0,t},ce.distance=ce.dist=function(t,e){return Jt.distance(t.array,e.array)},ce.divide=ce.div=function(t,e,n){return Jt.divide(t.array,e.array,n.array),t._dirty=!0,t},ce.dot=function(t,e){return Jt.dot(t.array,e.array)},ce.len=function(t){return Jt.length(t.array)},ce.lerp=function(t,e,n,i){return Jt.lerp(t.array,e.array,n.array,i),t._dirty=!0,t},ce.min=function(t,e,n){return Jt.min(t.array,e.array,n.array),t._dirty=!0,t},ce.max=function(t,e,n){return Jt.max(t.array,e.array,n.array),t._dirty=!0,t},ce.multiply=ce.mul=function(t,e,n){return Jt.multiply(t.array,e.array,n.array),t._dirty=!0,t},ce.negate=function(t,e){return Jt.negate(t.array,e.array),t._dirty=!0,t},ce.normalize=function(t,e){return Jt.normalize(t.array,e.array),t._dirty=!0,t},ce.random=function(t,e){return Jt.random(t.array,e),t._dirty=!0,t},ce.scale=function(t,e,n){return Jt.scale(t.array,e.array,n),t._dirty=!0,t},ce.scaleAndAdd=function(t,e,n,i){return Jt.scaleAndAdd(t.array,e.array,n.array,i),t._dirty=!0,t},ce.squaredDistance=ce.sqrDist=function(t,e){return Jt.sqrDist(t.array,e.array)},ce.squaredLength=ce.sqrLen=function(t){return Jt.sqrLen(t.array)},ce.subtract=ce.sub=function(t,e,n){return Jt.subtract(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat3=function(t,e,n){return Jt.transformMat3(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat4=function(t,e,n){return Jt.transformMat4(t.array,e.array,n.array),t._dirty=!0,t},ce.transformQuat=function(t,e,n){return Jt.transformQuat(t.array,e.array,n.array),t._dirty=!0,t};var ge=Math.atan2,me=Math.asin,ve=Math.abs;ce.eulerFromQuat=function(t,e,n){t._dirty=!0,e=e.array;var i=t.array,r=e[0],o=e[1],a=e[2],s=e[3],l=r*r,u=o*o,h=a*a,c=s*s;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":i[0]=ge(2*(r*s-o*a),c-l-u+h),i[1]=me(fe(2*(r*a+o*s),-1,1)),i[2]=ge(2*(a*s-r*o),c+l-u-h);break;case"YXZ":i[0]=me(fe(2*(r*s-o*a),-1,1)),i[1]=ge(2*(r*a+o*s),c-l-u+h),i[2]=ge(2*(r*o+a*s),c-l+u-h);break;case"ZXY":i[0]=me(fe(2*(r*s+o*a),-1,1)),i[1]=ge(2*(o*s-a*r),c-l-u+h),i[2]=ge(2*(a*s-r*o),c-l+u-h);break;case"ZYX":i[0]=ge(2*(r*s+a*o),c-l-u+h),i[1]=me(fe(2*(o*s-r*a),-1,1)),i[2]=ge(2*(r*o+a*s),c+l-u-h);break;case"YZX":i[0]=ge(2*(r*s-a*o),c-l+u-h),i[1]=ge(2*(o*s-r*a),c+l-u-h),i[2]=me(fe(2*(r*o+a*s),-1,1));break;case"XZY":i[0]=ge(2*(r*s+o*a),c-l+u-h),i[1]=ge(2*(r*a+o*s),c+l-u-h),i[2]=me(fe(2*(a*s-r*o),-1,1));break;default:console.warn("Unkown order: "+n)}return t},ce.eulerFromMat3=function(t,e,n){var i=e.array,r=i[0],o=i[3],a=i[6],s=i[1],l=i[4],u=i[7],h=i[2],c=i[5],d=i[8],p=t.array;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":p[1]=me(fe(a,-1,1)),ve(a)<.99999?(p[0]=ge(-u,d),p[2]=ge(-o,r)):(p[0]=ge(c,l),p[2]=0);break;case"YXZ":p[0]=me(-fe(u,-1,1)),ve(u)<.99999?(p[1]=ge(a,d),p[2]=ge(s,l)):(p[1]=ge(-h,r),p[2]=0);break;case"ZXY":p[0]=me(fe(c,-1,1)),ve(c)<.99999?(p[1]=ge(-h,d),p[2]=ge(-o,l)):(p[1]=0,p[2]=ge(s,r));break;case"ZYX":p[1]=me(-fe(h,-1,1)),ve(h)<.99999?(p[0]=ge(c,d),p[2]=ge(s,r)):(p[0]=0,p[2]=ge(-o,l));break;case"YZX":p[2]=me(fe(s,-1,1)),ve(s)<.99999?(p[0]=ge(-u,l),p[1]=ge(-h,r)):(p[0]=0,p[1]=ge(a,d));break;case"XZY":p[2]=me(-fe(o,-1,1)),ve(o)<.99999?(p[0]=ge(c,l),p[1]=ge(a,r)):(p[0]=ge(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+n)}return t._dirty=!0,t},Object.defineProperties(ce,{POSITIVE_X:{get:function(){return new ce(1,0,0)}},NEGATIVE_X:{get:function(){return new ce(-1,0,0)}},POSITIVE_Y:{get:function(){return new ce(0,1,0)}},NEGATIVE_Y:{get:function(){return new ce(0,-1,0)}},POSITIVE_Z:{get:function(){return new ce(0,0,1)}},NEGATIVE_Z:{get:function(){return new ce(0,0,-1)}},UP:{get:function(){return new ce(0,1,0)}},ZERO:{get:function(){return new ce}}});const ye=ce;var _e,xe,be,we,Se,Te=function(t,e){this.origin=t||new ye,this.direction=e||new ye};Te.prototype={constructor:Te,intersectPlane:function(t,e){var n=t.normal.array,i=t.distance,r=this.origin.array,o=this.direction.array,a=Jt.dot(n,o);if(0===a)return null;e||(e=new ye);var s=(Jt.dot(n,r)-i)/a;return Jt.scaleAndAdd(e.array,r,o,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=Jt.dot(t.normal.array,this.direction.array);Jt.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,2*-e),this.direction._dirty=!0},distanceToPoint:(Se=Jt.create(),function(t){Jt.sub(Se,t,this.origin.array);var e=Jt.dot(Se,this.direction.array);if(e<0)return Jt.distance(this.origin.array,t);var n=Jt.lenSquared(Se);return Math.sqrt(n-e*e)}),intersectSphere:function(){var t=Jt.create();return function(e,n,i){var r=this.origin.array,o=this.direction.array;e=e.array,Jt.sub(t,e,r);var a=Jt.dot(t,o),s=Jt.squaredLength(t)-a*a,l=n*n;if(!(s>l)){var u=Math.sqrt(l-s),h=a-u,c=a+u;return i||(i=new ye),h<0?c<0?null:(Jt.scaleAndAdd(i.array,r,o,c),i):(Jt.scaleAndAdd(i.array,r,o,h),i)}}}(),intersectBoundingBox:function(t,e){var n,i,r,o,a,s,l=this.direction.array,u=this.origin.array,h=t.min.array,c=t.max.array,d=1/l[0],p=1/l[1],f=1/l[2];if(d>=0?(n=(h[0]-u[0])*d,i=(c[0]-u[0])*d):(i=(h[0]-u[0])*d,n=(c[0]-u[0])*d),p>=0?(r=(h[1]-u[1])*p,o=(c[1]-u[1])*p):(o=(h[1]-u[1])*p,r=(c[1]-u[1])*p),n>o||r>i)return null;if((r>n||n!=n)&&(n=r),(o=0?(a=(h[2]-u[2])*f,s=(c[2]-u[2])*f):(s=(h[2]-u[2])*f,a=(c[2]-u[2])*f),n>s||a>i)return null;if((a>n||n!=n)&&(n=a),(s=0?n:i;return e||(e=new ye),Jt.scaleAndAdd(e.array,u,l,g),e},intersectTriangle:(_e=Jt.create(),xe=Jt.create(),be=Jt.create(),we=Jt.create(),function(t,e,n,i,r,o){var a=this.direction.array,s=this.origin.array;t=t.array,e=e.array,n=n.array,Jt.sub(_e,e,t),Jt.sub(xe,n,t),Jt.cross(we,xe,a);var l=Jt.dot(_e,we);if(i){if(l>-1e-5)return null}else if(l>-1e-5&&l<1e-5)return null;Jt.sub(be,s,t);var u=Jt.dot(we,be)/l;if(u<0||u>1)return null;Jt.cross(we,_e,be);var h=Jt.dot(a,we)/l;if(h<0||h>1||u+h>1)return null;Jt.cross(we,_e,xe);var c=-Jt.dot(be,we)/l;return c<0?null:(r||(r=new ye),o&&ye.set(o,1-u-h,u,h),Jt.scaleAndAdd(r.array,s,a,c),r)}),applyTransform:function(t){ye.add(this.direction,this.direction,this.origin),ye.transformMat4(this.origin,this.origin,t),ye.transformMat4(this.direction,this.direction,t),ye.sub(this.direction,this.direction,this.origin),ye.normalize(this.direction,this.direction)},copy:function(t){ye.copy(this.origin,t.origin),ye.copy(this.direction,t.direction)},clone:function(){var t=new Te;return t.copy(this),t}};const Me=Te;var Ce={create:function(){var t=new ct(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var e=new ct(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},fromValues:function(t,e,n,i){var r=new ct(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},set:function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},subtract:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}};Ce.sub=Ce.subtract,Ce.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},Ce.mul=Ce.multiply,Ce.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},Ce.div=Ce.divide,Ce.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},Ce.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},Ce.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},Ce.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},Ce.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},Ce.dist=Ce.distance,Ce.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},Ce.sqrDist=Ce.squaredDistance,Ce.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},Ce.len=Ce.length,Ce.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},Ce.sqrLen=Ce.squaredLength,Ce.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Ce.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},Ce.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},Ce.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Ce.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},Ce.random=function(t,e){return e=e||1,t[0]=dt(),t[1]=dt(),t[2]=dt(),t[3]=dt(),Ce.normalize(t,t),Ce.scale(t,t,e),t},Ce.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},Ce.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Ce.forEach=function(){var t=Ce.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=4),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Jt.cross(Le,e,n),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=1+i,Ne.normalize(t,t))}),Ne.setAxes=(Ee=De.create(),function(t,e,n,i){return Ee[0]=n[0],Ee[3]=n[1],Ee[6]=n[2],Ee[1]=i[0],Ee[4]=i[1],Ee[7]=i[2],Ee[2]=-e[0],Ee[5]=-e[1],Ee[8]=-e[2],Ne.normalize(t,Ne.fromMat3(t,Ee))}),Ne.clone=Ae.clone,Ne.fromValues=Ae.fromValues,Ne.copy=Ae.copy,Ne.set=Ae.set,Ne.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},Ne.setAxisAngle=function(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},Ne.add=Ae.add,Ne.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],h=n[3];return t[0]=i*h+a*s+r*u-o*l,t[1]=r*h+a*l+o*s-i*u,t[2]=o*h+a*u+i*l-r*s,t[3]=a*h-i*s-r*l-o*u,t},Ne.mul=Ne.multiply,Ne.scale=Ae.scale,Ne.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+a*s,t[1]=r*l+o*s,t[2]=o*l-r*s,t[3]=a*l-i*s,t},Ne.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*s,t[1]=r*l+a*s,t[2]=o*l+i*s,t[3]=a*l-r*s,t},Ne.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*s,t[1]=r*l-i*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},Ne.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},Ne.dot=Ae.dot,Ne.lerp=Ae.lerp,Ne.slerp=function(t,e,n,i){var r,o,a,s,l,u=e[0],h=e[1],c=e[2],d=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return(o=u*p+h*f+c*g+d*m)<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,l=Math.sin(i*r)/a):(s=1-i,l=i),t[0]=s*u+l*p,t[1]=s*h+l*f,t[2]=s*c+l*g,t[3]=s*d+l*m,t},Ne.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},Ne.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},Ne.length=Ae.length,Ne.len=Ne.length,Ne.squaredLength=Ae.squaredLength,Ne.sqrLen=Ne.squaredLength,Ne.normalize=Ae.normalize,Ne.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t};const ke=Ne;var Re,ze,Be,Ze,Fe=function(){this._axisX=new ye,this._axisY=new ye,this._axisZ=new ye,this.array=qt.create(),this._dirty=!0};Fe.prototype={constructor:Fe,setArray:function(t){for(var e=0;e0){var e=this.min,n=this.max,i=e.array,r=n.array;en(i,t[0]),en(r,t[0]);for(var o=1;or[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1]),a[2]>r[2]&&(r[2]=a[2])}e._dirty=!0,n._dirty=!0}},union:function(t){var e=this.min,n=this.max;return Jt.min(e.array,e.array,t.min.array),Jt.max(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersection:function(t){var e=this.min,n=this.max;return Jt.max(e.array,e.array,t.min.array),Jt.min(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,n=this.max.array,i=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||n[0]=r[0]&&n[1]>=r[1]&&n[2]>=r[2]},containPoint:function(t){var e=this.min.array,n=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&n[0]>=i[0]&&n[1]>=i[1]&&n[2]>=i[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(Ye=Jt.create(),qe=Jt.create(),Ke=Jt.create(),Je=Jt.create(),Qe=Jt.create(),$e=Jt.create(),function(t,e){var n=t.min.array,i=t.max.array,r=e.array;return Ye[0]=r[0]*n[0],Ye[1]=r[1]*n[0],Ye[2]=r[2]*n[0],qe[0]=r[0]*i[0],qe[1]=r[1]*i[0],qe[2]=r[2]*i[0],Ke[0]=r[4]*n[1],Ke[1]=r[5]*n[1],Ke[2]=r[6]*n[1],Je[0]=r[4]*i[1],Je[1]=r[5]*i[1],Je[2]=r[6]*i[1],Qe[0]=r[8]*n[2],Qe[1]=r[9]*n[2],Qe[2]=r[10]*n[2],$e[0]=r[8]*i[2],$e[1]=r[9]*i[2],$e[2]=r[10]*i[2],n=this.min.array,i=this.max.array,n[0]=Math.min(Ye[0],qe[0])+Math.min(Ke[0],Je[0])+Math.min(Qe[0],$e[0])+r[12],n[1]=Math.min(Ye[1],qe[1])+Math.min(Ke[1],Je[1])+Math.min(Qe[1],$e[1])+r[13],n[2]=Math.min(Ye[2],qe[2])+Math.min(Ke[2],Je[2])+Math.min(Qe[2],$e[2])+r[14],i[0]=Math.max(Ye[0],qe[0])+Math.max(Ke[0],Je[0])+Math.max(Qe[0],$e[0])+r[12],i[1]=Math.max(Ye[1],qe[1])+Math.max(Ke[1],Je[1])+Math.max(Qe[1],$e[1])+r[13],i[2]=Math.max(Ye[2],qe[2])+Math.max(Ke[2],Je[2])+Math.max(Qe[2],$e[2])+r[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,n=this.max.array,i=t.array,r=e[0],o=e[1],a=e[2],s=n[0],l=n[1],u=e[2],h=n[0],c=n[1],d=n[2];if(1===i[15])e[0]=i[0]*r+i[12],e[1]=i[5]*o+i[13],n[2]=i[10]*a+i[14],n[0]=i[0]*h+i[12],n[1]=i[5]*c+i[13],e[2]=i[10]*d+i[14];else{var p=-1/a;e[0]=i[0]*r*p,e[1]=i[5]*o*p,n[2]=(i[10]*a+i[14])*p,p=-1/u,n[0]=i[0]*s*p,n[1]=i[5]*l*p,p=-1/d,e[2]=(i[10]*d+i[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=Jt.fromValues(0,0,0);this.vertices=t}var n=this.min.array,i=this.max.array;return tn(t[0],n[0],n[1],n[2]),tn(t[1],n[0],i[1],n[2]),tn(t[2],i[0],n[1],n[2]),tn(t[3],i[0],i[1],n[2]),tn(t[4],n[0],n[1],i[2]),tn(t[5],n[0],i[1],i[2]),tn(t[6],i[0],n[1],i[2]),tn(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,n=this.max;return en(e.array,t.min.array),en(n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},clone:function(){var t=new nn;return t.copy(this),t}};const rn=nn;var on,an,sn=0;const ln=g.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},(function(){this.name||(this.name=(this.type||"NODE")+"_"+sn++),this.position||(this.position=new ye),this.rotation||(this.rotation=new Xe),this.scale||(this.scale=new ye(1,1,1)),this.worldTransform=new He,this.localTransform=new He,this._children=[]}),{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var n=e._nodeRepository;delete n[this.name],n[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var n=this._scene;n&&n!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,n=e.indexOf(t);n<0||(e.splice(n,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=ln.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(un=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=ln.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e=0&&m[f]>1e-4&&(Jt.transformMat4(S,g,d[v[f]]),Jt.scaleAndAdd(y,y,S,m[f]));T.set(p,y)}}for(p=0;p>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var n=e.get("webgl_texture");n&&t.gl.deleteTexture(n),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(wn.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(wn.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),wn.BYTE=5120,wn.UNSIGNED_BYTE=S,wn.SHORT=5122,wn.UNSIGNED_SHORT=5123,wn.INT=5124,wn.UNSIGNED_INT=5125,wn.FLOAT=T,wn.HALF_FLOAT=36193,wn.UNSIGNED_INT_24_8_WEBGL=34042,wn.DEPTH_COMPONENT=M,wn.DEPTH_STENCIL=34041,wn.ALPHA=6406,wn.RGB=6407,wn.RGBA=C,wn.LUMINANCE=6409,wn.LUMINANCE_ALPHA=6410,wn.SRGB=35904,wn.SRGB_ALPHA=35906,wn.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,wn.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,wn.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,wn.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,wn.NEAREST=A,wn.LINEAR=I,wn.NEAREST_MIPMAP_NEAREST=D,wn.LINEAR_MIPMAP_NEAREST=L,wn.NEAREST_MIPMAP_LINEAR=P,wn.LINEAR_MIPMAP_LINEAR=O,wn.REPEAT=E,wn.CLAMP_TO_EDGE=N,wn.MIRRORED_REPEAT=33648;const Sn=wn;var Tn=cn.extend({skeleton:null,joints:null},(function(){this.joints||(this.joints=[])}),{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=cn.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});Tn.POINTS=0,Tn.LINES=1,Tn.LINE_LOOP=2,Tn.LINE_STRIP=3,Tn.TRIANGLES=4,Tn.TRIANGLE_STRIP=5,Tn.TRIANGLE_FAN=6,Tn.BACK=x,Tn.FRONT=_,Tn.FRONT_AND_BACK=1032,Tn.CW=b,Tn.CCW=w;const Mn=Tn,Cn={isPowerOfTwo:function(t){return 0==(t&t-1)},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};var An=Cn.isPowerOfTwo;function In(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var Dn=Sn.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type,r=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==Sn.REPEAT&&this.wrapT!==Sn.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r?this.minFilter:this.getAvailableMinFilter());var o=t.getGLExtension("EXT_texture_filter_anisotropic");if(o&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,o.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var a=this.width,s=this.height,l=0;l=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,n,o,i,r,0,e.pixels):t.texImage2D(t.TEXTURE_2D,n,o,i,r,0,o,a,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return An(this.width)&&An(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var n=F.createImage();e&&(n.crossOrigin=e);var i=this;return n.onload=function(){i.dirty(),i.trigger("success",i)},n.onerror=function(){i.trigger("error",i)},n.src=t,this.image=n,this}});Object.defineProperty(Dn.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Dn.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ln=Dn;function Pn(t){return{byte:F.Int8Array,ubyte:F.Uint8Array,short:F.Int16Array,ushort:F.Uint16Array}[t]||F.Float32Array}function On(t){return"attr_"+t}function En(t,e,n,i){switch(this.name=t,this.type=e,this.size=n,this.semantic=i||"",this.value=null,n){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var n=this.value;return e[0]=n[2*t],e[1]=n[2*t+1],e},this.set=function(t,e){var n=this.value;n[2*t]=e[0],n[2*t+1]=e[1]},this.copy=function(t,e){var n=this.value;e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]};break;case 3:this.get=function(t,e){var n=3*t,i=this.value;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e},this.set=function(t,e){var n=3*t,i=this.value;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2]},this.copy=function(t,e){var n=this.value;e*=3,n[t*=3]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2]};break;case 4:this.get=function(t,e){var n=this.value,i=4*t;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e[3]=n[i+3],e},this.set=function(t,e){var n=this.value,i=4*t;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3]},this.copy=function(t,e){var n=this.value;e*=4,n[t*=4]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2],n[t+3]=n[e+3]}}}function Nn(t,e,n,i,r){this.name=t,this.type=e,this.buffer=n,this.size=i,this.semantic=r,this.symbol="",this.needsRemove=!1}function kn(t){this.buffer=t,this.count=0}En.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=Pn(this.type);this.value=new e(t*this.size)}},En.prototype.fromArray=function(t){var e,n=Pn(this.type);if(t[0]&&t[0].length){var i=0,r=this.size;e=new n(t.length*r);for(var o=0;o=0){e||(e=[]);var n=this.indices;return e[0]=n[3*t],e[1]=n[3*t+1],e[2]=n[3*t+2],e}},setTriangleIndices:function(t,e){var n=this.indices;n[3*t]=e[0],n[3*t+1]=e[1],n[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,n=this.vertexCount>65535?F.Uint32Array:F.Uint16Array;if(t[0]&&t[0].length){var i=0;e=new n(3*t.length);for(var r=0;r=0&&(e.splice(n,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var n=[],i=this.vertexCount,r=0;ro[0]&&(o[0]=s),l>o[1]&&(o[1]=l),u>o[2]&&(o[2]=u)}n._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,n=e.position.value,i=e.normal.value;if(i&&i.length===n.length)for(var r=0;r65535&&(this.indices=new F.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,n=this.getEnabledAttributes(),i={},r=0;rthis.distance,r=1;r<8;r++)if(Jt.dot(e[r].array,n)>this.distance!=i)return!0},intersectLine:(Qn=Jt.create(),function(t,e,n){var i=this.distanceToPoint(t),r=this.distanceToPoint(e);if(i>0&&r>0||i<0&&r<0)return null;var o=this.normal.array,a=this.distance,s=t.array;Jt.sub(Qn,e.array,t.array),Jt.normalize(Qn,Qn);var l=Jt.dot(o,Qn);if(0===l)return null;n||(n=new ye);var u=(Jt.dot(o,s)-a)/l;return Jt.scaleAndAdd(n.array,s,Qn,-u),n._dirty=!0,n}),applyTransform:(qn=qt.create(),Kn=Ae.create(),Jn=Ae.create(),Jn[3]=1,function(t){t=t.array,Jt.scale(Jn,this.normal.array,this.distance),Ae.transformMat4(Jn,Jn,t),this.distance=Jt.dot(Jn,this.normal.array),qt.invert(qn,t),qt.transpose(qn,qn),Kn[3]=0,Jt.copy(Kn,this.normal.array),Ae.transformMat4(Kn,Kn,qn),Jt.copy(this.normal.array,Kn)}),copy:function(t){Jt.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new $n;return t.copy(this),t}};const ti=$n;var ei,ni=Jt.set,ii=Jt.copy,ri=Jt.transformMat4,oi=Math.min,ai=Math.max,si=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new ti);for(this.boundingBox=new rn,this.vertices=[],t=0;t<8;t++)this.vertices[t]=Jt.fromValues(0,0,0)};si.prototype={setFromProjection:function(t){var e=this.planes,n=t.array,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],p=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];ni(e[0].normal.array,a-i,h-s,f-c),e[0].distance=-(y-g),e[0].normalize(),ni(e[1].normal.array,a+i,h+s,f+c),e[1].distance=-(y+g),e[1].normalize(),ni(e[2].normal.array,a+r,h+l,f+d),e[2].distance=-(y+m),e[2].normalize(),ni(e[3].normal.array,a-r,h-l,f-d),e[3].distance=-(y-m),e[3].normalize(),ni(e[4].normal.array,a-o,h-u,f-p),e[4].distance=-(y-v),e[4].normalize(),ni(e[5].normal.array,a+o,h+u,f+p),e[5].distance=-(y+v),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(0===y){var b=l/i,w=-v/(p-1),S=-v/(p+1),T=-S/l,M=-w/l;_.min.set(-T*b,-T,S),_.max.set(T*b,T,w),ni(x[0],-T*b,-T,S),ni(x[1],-T*b,T,S),ni(x[2],T*b,-T,S),ni(x[3],T*b,T,S),ni(x[4],-M*b,-M,w),ni(x[5],-M*b,M,w),ni(x[6],M*b,-M,w),ni(x[7],M*b,M,w)}else{var C=(-1-g)/i,A=(1-g)/i,I=(1-m)/l,D=(-1-m)/l,L=(-1-v)/p,P=(1-v)/p;_.min.set(Math.min(C,A),Math.min(D,I),Math.min(P,L)),_.max.set(Math.max(A,C),Math.max(I,D),Math.max(L,P));var O=_.min.array,E=_.max.array;ni(x[0],O[0],O[1],O[2]),ni(x[1],O[0],E[1],O[2]),ni(x[2],E[0],O[1],O[2]),ni(x[3],E[0],E[1],O[2]),ni(x[4],O[0],O[1],E[2]),ni(x[5],O[0],E[1],E[2]),ni(x[6],E[0],O[1],E[2]),ni(x[7],E[0],E[1],E[2])}},getTransformedBoundingBox:(ei=Jt.create(),function(t,e){var n=this.vertices,i=e.array,r=t.min,o=t.max,a=r.array,s=o.array,l=n[0];ri(ei,l,i),ii(a,ei),ii(s,ei);for(var u=1;u<8;u++)l=n[u],ri(ei,l,i),a[0]=oi(ei[0],a[0]),a[1]=oi(ei[1],a[1]),a[2]=oi(ei[2],a[2]),s[0]=ai(ei[0],s[0]),s[1]=ai(ei[1],s[1]),s[2]=ai(ei[2],s[2]);return r._dirty=!0,o._dirty=!0,t})};const li=si;var ui;const hi=ln.extend((function(){return{projectionMatrix:new He,invProjectionMatrix:new He,viewMatrix:new He,frustum:new li}}),(function(){this.update(!0)}),{update:function(t){ln.prototype.update.call(this,t),He.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),He.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){He.copy(this.viewMatrix,t),He.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){He.copy(this.projectionMatrix,t),He.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(ui=Ae.create(),function(t,e){var n=void 0!==e?e:new Me,i=t.array[0],r=t.array[1];return Ae.set(ui,i,r,-1,1),Ae.transformMat4(ui,ui,this.invProjectionMatrix.array),Ae.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(n.origin.array,ui,1/ui[3]),Ae.set(ui,i,r,1,1),Ae.transformMat4(ui,ui,this.invProjectionMatrix.array),Ae.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(ui,ui,1/ui[3]),Jt.sub(n.direction.array,ui,n.origin.array),Jt.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n})});var ci,di,pi=qt.create(),fi=qt.create(),gi={};function mi(t){var e=[],n=Object.keys(t);n.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof Yn&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof hi?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof Yn&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},n=0;n0&&this._doUpdateRenderList(a,e,n,i,r)}},isFrustumCulled:(ci=new rn,di=new He,function(t,e,n){var i=t.boundingBox;if(i||(i=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!i)return!1;if(di.array=n,ci.transformFrom(i,di),t.castShadow&&this.viewBoundingBoxLastFrame.union(ci),t.frustumCulling){if(!ci.intersectBoundingBox(e.frustum.boundingBox))return!0;di.array=e.projectionMatrix.array,ci.max.array[2]>0&&ci.min.array[2]<0&&(ci.max.array[2]=-1e-20),ci.applyProjection(di);var r=ci.min.array,o=ci.max.array;if(o[0]<-1||r[0]>1||o[1]<-1||r[1]>1||o[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(yi);var e=this._lightUniforms;for(var n in e)for(var i in e[n])e[n][i].value.length=0;for(var r=0;r=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new xi(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();var Si=Cn.isPowerOfTwo,Ti=["px","nx","py","ny","pz","nz"],Mi=Sn.extend((function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}}),{textureType:"textureCube",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var r=t.getGLExtension("EXT_texture_filter_anisotropic");if(r&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var o=this.width,a=this.height,s=0;s0&&t.height>0}Object.defineProperty(Mi.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Mi.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ai=Mi,Ii=hi.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=hi.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});var Di="framebuffer",Li="renderbuffer",Pi="renderbuffer_width",Oi="renderbuffer_height",Ei="renderbuffer_attached",Ni="depthtexture_attached",ki=36160,Ri=36161,zi=36096,Bi=g.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},(function(){this._cache=new bn,this._textures={}}),{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(ki,this._getFrameBufferGL(t)),this._boundRenderer=t;var n=this._cache;n.put("viewport",t.viewport);var i,r,o=!1;for(var a in this._textures){o=!0;var s=this._textures[a];s&&(i=s.texture.width,r=s.texture.height,this._doAttach(t,s.texture,a,s.target))}this._width=i,this._height=r,!o&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,i,r,1);var l=n.get("attached_textures");if(l)for(var a in l)if(!this._textures[a]){var u=l[a];this._doDetach(e,a,u)}if(!n.get(Ni)&&this.depthBuffer){n.miss(Li)&&n.put(Li,e.createRenderbuffer());var h=n.get(Li);i===n.get(Pi)&&r===n.get(Oi)||(e.bindRenderbuffer(Ri,h),e.renderbufferStorage(Ri,e.DEPTH_COMPONENT16,i,r),n.put(Pi,i),n.put(Oi,r),e.bindRenderbuffer(Ri,null)),n.get(Ei)||(e.framebufferRenderbuffer(ki,zi,Ri,h),n.put(Ei,!0))}},unbind:function(t){t.__currentFrameBuffer=null,t.gl.bindFramebuffer(ki,null),this._boundRenderer=null,this._cache.use(t.__uid__);var e=this._cache.get("viewport");e&&t.setViewport(e),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var n in this._textures){var i=this._textures[n];if(i){var r=i.texture;if(!r.NPOT&&r.useMipmap&&r.minFilter===Sn.LINEAR_MIPMAP_LINEAR){var o="textureCube"===r.textureType?34067:3553;e.bindTexture(o,r.getWebGLTexture(t)),e.generateMipmap(o),e.bindTexture(o,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(ki)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(Di)&&e.put(Di,t.gl.createFramebuffer()),e.get(Di)},attach:function(t,e,n){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||36064,n=n||3553;var i,r=this._boundRenderer;if(r&&r.gl){var o=this._cache;o.use(r.__uid__),i=o.get("attached_textures")}var a=this._textures[e];if(!a||a.target!==n||a.texture!==t||!i||null==i[e]){var s=!0;r&&(s=this._doAttach(r,t,e,n),this.viewport||r.setViewport(0,0,t.width,t.height,1)),s&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=n)}},_doAttach:function(t,e,n,i){var r=t.gl,o=e.getWebGLTexture(t),a=this._cache.get("attached_textures");if(a&&a[n]){var s=a[n];if(s.texture===e&&s.target===i)return}var l=!0;if(((n=+n)===zi||n===k)&&(t.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==M&&34041!==e.format&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l)){var u=this._cache.get(Li);u&&(r.framebufferRenderbuffer(ki,zi,Ri,null),r.deleteRenderbuffer(u),this._cache.put(Li,!1)),this._cache.put(Ei,!1),this._cache.put(Ni,!0)}return r.framebufferTexture2D(ki,n,i,o,0),a||(a={},this._cache.put("attached_textures",a)),a[n]=a[n]||{},a[n].texture=e,a[n].target=i,l},_doDetach:function(t,e,n){t.framebufferTexture2D(ki,e,n,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),e!==zi&&e!==k||this._cache.put(Ni,!1)},detach:function(t,e){this._textures[t]=null,this._boundRenderer&&(this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e))},dispose:function(t){var e=t.gl,n=this._cache;n.use(t.__uid__);var i=n.get(Li);i&&e.deleteRenderbuffer(i);var r=n.get(Di);r&&e.deleteFramebuffer(r),n.deleteContext(t.__uid__),this._textures={}}});Bi.DEPTH_ATTACHMENT=zi,Bi.COLOR_ATTACHMENT0=36064,Bi.STENCIL_ATTACHMENT=36128,Bi.DEPTH_STENCIL_ATTACHMENT=k;const Zi=Bi;var Fi=["px","nx","py","ny","pz","nz"];const Vi=g.extend((function(){var t={position:new ye,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new Ii({fov:90}),nx:new Ii({fov:90}),py:new Ii({fov:90}),ny:new Ii({fov:90}),pz:new Ii({fov:90}),nz:new Ii({fov:90})};return e.px.lookAt(ye.POSITIVE_X,ye.NEGATIVE_Y),e.nx.lookAt(ye.NEGATIVE_X,ye.NEGATIVE_Y),e.py.lookAt(ye.POSITIVE_Y,ye.POSITIVE_Z),e.ny.lookAt(ye.NEGATIVE_Y,ye.NEGATIVE_Z),e.pz.lookAt(ye.POSITIVE_Z,ye.NEGATIVE_Y),e.nz.lookAt(ye.NEGATIVE_Z,ye.NEGATIVE_Y),t._frameBuffer=new Zi,t}),{getCamera:function(t){return this._cameras[t]},render:function(t,e,n){var i=t.gl;n||e.update();for(var r=this.texture.width,o=2*Math.atan(r/(r-.5))/Math.PI*180,a=0;a<6;a++){var s=Fi[a],l=this._cameras[s];if(ye.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=o,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),Gi=Hn.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,n=this.attributes,i=[],r=[],o=[],a=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var h=u/e;if(i.push([2*h-1,2*l-1,0]),r&&r.push([h,l]),o&&o.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],n)}}),Xi=ji;function Yi(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var qi=Yi("DXT1"),Ki=Yi("DXT3"),Ji=Yi("DXT5");const Qi=function(t,e){var n=new Int32Array(t,0,31);if(542327876!==n[0])return null;if(4&!n(20))return null;var i,r,o=n(21),a=n[4],s=n[3],l=512&n[28],u=131072&n[2];switch(o){case qi:i=8,r=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ki:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ji:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var h=n[1]+4,c=l?6:1,d=1;u&&(d=Math.max(1,n[7]));for(var p=[],f=0;f0){var r=Math.pow(2,t[3]-128-8+i);e[n+0]=t[0]*r,e[n+1]=t[1]*r,e[n+2]=t[2]*r}else e[n+0]=0,e[n+1]=0,e[n+2]=0;return e[n+3]=1,e}function er(t,e,n,i){for(var r,o,a=0,s=0,l=i;l>0;)if(t[s][0]=e[n++],t[s][1]=e[n++],t[s][2]=e[n++],t[s][3]=e[n++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(o=t[s])[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],s++,l--;a+=8}else s++,l--,a=0;return n}function nr(t,e,n,i){if(i<8|i>32767)return er(t,e,n,i);if(2!=(r=e[n++]))return er(t,e,n-1,i);if(t[0][1]=e[n++],t[0][2]=e[n++],r=e[n++],(t[0][2]<<8>>>0|r)>>>0!==i)return null;for(var r=0;r<4;r++)for(var o=0;o128){a=(127&a)>>>0;for(var s=e[n++];a--;)t[o++][r]=s}else for(;a--;)t[o++][r]=e[n++]}return n}const ir=function(t,e,n){null==n&&(n=0);var i=new Uint8Array(t),r=i.length;if("#?"===function(t,e,n){for(var i="",r=0;r<2;r++)i+=$i(t[r]);return i}(i)){for(var o=2;o=r)){o+=2;for(var a="";o20)return console.warn("Given image is not a height map"),t}var d,p,f,g;l%(4*i)==0?(d=a.data[l],f=a.data[l+4]):l%(4*i)==4*(i-1)?(d=a.data[l-4],f=a.data[l]):(d=a.data[l-4],f=a.data[l+4]),l<4*i?(p=a.data[l],g=a.data[l+4*i]):l>i*(r-1)*4?(p=a.data[l-4*i],g=a.data[l]):(p=a.data[l-4*i],g=a.data[l+4*i]),s.data[l]=d-f+127,s.data[l+1]=p-g+127,s.data[l+2]=255,s.data[l+3]=255}return o.putImageData(s,0,0),n},isHeightImage:function(t,e,n){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),r=i.getContext("2d"),o=e||32;n=n||20,i.width=i.height=o,r.drawImage(t,0,0,o,o);for(var a=r.getImageData(0,0,o,o),s=0;sn)return!1}return!0},_fetchTexture:function(t,e,n){F.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:n})},createChessboard:function(t,e,n,i){t=t||512,e=e||64,n=n||"black",i=i||"white";var r=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var a=o.getContext("2d");a.fillStyle=i,a.fillRect(0,0,t,t),a.fillStyle=n;for(var s=0;s=0||(ar.forEach((function(e){t.on(e,this[sr(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),ar.forEach((function(e){t.off(e,this[sr(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}};const ur=lr,hr=hi.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=hi.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});jt.import("\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end");var cr=new Gi,dr=new Mn({geometry:cr,frustumCulling:!1}),pr=new hr;const fr=g.extend((function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}}),(function(){var t=new jt(jt.source("clay.compositor.vertex"),this.fragment),e=new lt({shader:t});e.enableTexturesAll(),this.material=e}),{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||36064,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var n in this.outputs){var i=this.outputs[n];i&&e.attach(i,n)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var n=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var r=[];for(var o in this.outputs)(o=+o)>=n.COLOR_ATTACHMENT0&&o<=n.COLOR_ATTACHMENT0+8&&r.push(o);i.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var a=this.clearDepth?n.DEPTH_BUFFER_BIT:0;if(n.depthMask(!0),this.clearColor){a|=n.COLOR_BUFFER_BIT,n.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&n.clearColor(s[0],s[1],s[2],s[3])}n.clear(a),this.blendWithPrevious?(n.enable(n.BLEND),this.material.transparent=!0):(n.disable(n.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){dr.material=this.material,t.renderPass([dr],pr)},dispose:function(t){}});var gr={},mr=["px","nx","py","ny","pz","nz"];gr.prefilterEnvironmentMap=function(t,e,n,i,r){r&&i||(i=gr.generateNormalDistribution(),r=gr.integrateBRDF(t,i));var o=(n=n||{}).width||64,a=n.height||64,s=n.type||e.type,l=new Ai({width:o,height:a,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(o,a),h=Math.log(u)/Math.log(2)+1,c=new lt({shader:new jt({vertex:jt.source("clay.skybox.vertex"),fragment:"#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"})});c.set("normalDistribution",i),n.encodeRGBM&&c.define("fragment","RGBM_ENCODE"),n.decodeRGBM&&c.define("fragment","RGBM_DECODE");var d,p=new _i;if("texture2D"===e.textureType){var f=new Ai({width:o,height:a,type:s===Sn.FLOAT?Sn.HALF_FLOAT:s});or.panoramaToCubeMap(t,e,f,{encodeRGBM:n.decodeRGBM}),e=f}(d=new ji({scene:p,material:c})).material.set("environmentMap",e);var g=new Vi({texture:l});n.encodeRGBM&&(s=l.type=Sn.UNSIGNED_BYTE);for(var m=new Ln({width:o,height:a,type:s}),v=new Zi({depthBuffer:!1}),y=F[s===Sn.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_ 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"}),r=new Ln({width:512,height:256,type:Sn.HALF_FLOAT,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",e),i.setUniform("viewportSize",[512,256]),i.attachOutput(r),i.render(t,n),n.dispose(t),r},gr.generateNormalDistribution=function(t,e){for(var n=new Ln({width:t=t||256,height:e=e||1024,type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(e*t*4),r=[],o=0;o>>16)>>>0;u=(((16711935&(u=((252645135&(u=((858993459&(u=((1431655765&u)<<1|(2863311530&u)>>>1)>>>0))<<2|(3435973836&u)>>>2)>>>0))<<4|(4042322160&u)>>>4)>>>0))<<8|(4278255360&u)>>>8)>>>0)/4294967296;var h=Math.sqrt((1-u)/(1+(s*s-1)*u));r[l]=h}for(l=0;l65535?Uint32Array:Uint16Array,y=this.indices=new v(e*t*6),_=this.radius,x=this.phiStart,b=this.phiLength,w=this.thetaStart,S=this.thetaLength,T=[],M=[],C=0,A=1/(_=this.radius);for(d=0;d<=t;d++)for(c=0;c<=e;c++)u=c/e,h=d/t,a=-_*Math.cos(x+u*b)*Math.sin(w+h*S),s=_*Math.cos(w+h*S),l=_*Math.sin(x+u*b)*Math.sin(w+h*S),T[0]=a,T[1]=s,T[2]=l,M[0]=u,M[1]=h,n.set(C,T),i.set(C,M),T[0]*=A,T[1]*=A,T[2]*=A,r.set(C,T),C++;var I=e+1,D=0;for(d=0;d255?255:t}function Jr(t){return t<0?0:t>1?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100*255):Kr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Jr(parseFloat(e)/100):Jr(parseFloat(e))}function to(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function eo(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function no(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var io=new wi(20),ro=null;function oo(t,e){ro&&no(ro,e),ro=io.put(t,ro||e.slice())}function ao(t,e){if(t){e=e||[];var n=io.get(t);if(n)return no(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in qr)return no(e,qr[i]),oo(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(eo(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),oo(t,e),e):void eo(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(eo(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),oo(t,e),e):void eo(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?eo(e,+u[0],+u[1],+u[2],1):eo(e,0,0,0,1);h=$r(u.pop());case"rgb":return 3!==u.length?void eo(e,0,0,0,1):(eo(e,Qr(u[0]),Qr(u[1]),Qr(u[2]),h),oo(t,e),e);case"hsla":return 4!==u.length?void eo(e,0,0,0,1):(u[3]=$r(u[3]),so(u,e),oo(t,e),e);case"hsl":return 3!==u.length?void eo(e,0,0,0,1):(so(u,e),oo(t,e),e);default:return}}eo(e,0,0,0,1)}}function so(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),r=$r(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return eo(e=e||[],Kr(255*to(a,o,n+1/3)),Kr(255*to(a,o,n)),Kr(255*to(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}var lo=Object.prototype.toString,uo=Array.prototype,ho=uo.forEach,co=uo.filter,po=uo.slice,fo=uo.map,go=function(){}.constructor,mo=go?go.prototype:null;function vo(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function yo(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ra)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(_o(e)){var r=function(t){return _o(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&No(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=ao(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!No(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&Eo(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var d=h.percent-c.percent;if(0!==d){var p=(e-c.percent)/d,f=i?this._additiveValue:u?Zo:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Ro(f,m,g,v,y,p,p*p,p*p*p):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0?1===l?Lo(f,c[r],h[r],p):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],p),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(ao(t[n],Zo),Po(Zo,Zo,i,1),t[n]=Bo(Zo)):t[n]=t[n]+i:1===e?Po(t[n],t[n],i,1):2===e&&Oo(t[n],t[n],i,1)},t}();const Vo=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?function(){for(var t=[],e=0;e0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),Go={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(t,e){var n;if(this._animators=this._animators||[],t){for(var i=t.split("."),r=this,o=0,a=i.length;o=0&&s.splice(t,1)})),s.push(l),this.__zr&&this.__zr.animation.addAnimator(l),l},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,n=e.length,i=0;i 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.chunk.instancing_header\n#ifdef INSTANCING\nattribute vec4 instanceMat1;\nattribute vec4 instanceMat2;\nattribute vec4 instanceMat3;\n#endif\n@end\n@export clay.chunk.instancing_matrix\nmat4 instanceMat = mat4(\n vec4(instanceMat1.xyz, 0.0),\n vec4(instanceMat2.xyz, 0.0),\n vec4(instanceMat3.xyz, 0.0),\n vec4(instanceMat1.w, instanceMat2.w, instanceMat3.w, 1.0)\n);\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end";function Uo(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}Object.assign(ln.prototype,Go),jt.import(Ho),jt.import(Xt),jt.import("\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"),jt.import("@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\nattribute vec3 normal: NORMAL;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nvarying vec3 v_Normal;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\nvarying vec3 v_Normal;\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"),jt.import("/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"),jt.import("@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end");var Wo=_i.prototype.addToScene,jo=_i.prototype.removeFromScene;_i.prototype.addToScene=function(t){if(Wo.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},_i.prototype.removeFromScene=function(t){jo.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},lt.prototype.setTextureImage=function(t,e,n,i){if(this.shader){var r,o=n.getZr(),a=this;return a.autoUpdateTextureStatus=!1,a.disableTexture(t),!(s=e)||"none"===s||(r=Xo.loadTexture(e,n,i,(function(e){a.enableTexture(t),o&&o.refresh()})),a.set(t,r)),r}var s};var Xo={};Xo.Renderer=he,Xo.Node=ln,Xo.Mesh=Mn,Xo.Shader=jt,Xo.Material=lt,Xo.Texture=Sn,Xo.Texture2D=Ln,Xo.Geometry=Hn,Xo.SphereGeometry=Ar,Xo.PlaneGeometry=Gi,Xo.CubeGeometry=Wi,Xo.AmbientLight=Ir,Xo.DirectionalLight=Dr,Xo.PointLight=Lr,Xo.SpotLight=Pr,Xo.PerspectiveCamera=Ii,Xo.OrthographicCamera=hr,Xo.Vector2=vt,Xo.Vector3=ye,Xo.Vector4=kr,Xo.Quaternion=Xe,Xo.Matrix2=Zr,Xo.Matrix2d=Hr,Xo.Matrix3=Wr,Xo.Matrix4=He,Xo.Plane=ti,Xo.Ray=Me,Xo.BoundingBox=rn,Xo.Frustum=li;var Yo=null;function qo(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function Ko(t){if((t.wrapS===Sn.REPEAT||t.wrapT===Sn.REPEAT)&&t.image){var e=qo(t.width),n=qo(t.height);if(e!==t.width||n!==t.height){var i=document.createElement("canvas");i.width=e,i.height=n,i.getContext("2d").drawImage(t.image,0,0,e,n),t.image=i}}}Xo.loadTexture=function(t,e,n,i){"function"==typeof n&&(i=n,n={}),n=n||{};for(var r=Object.keys(n).sort(),o="",a=0;a3?e[3]=t[3]:e[3]=1,e):((e=i.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},Xo.directionFromAlphaBeta=function(t,e){var n=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,r=[],o=Math.sin(n);return r[0]=o*Math.cos(i),r[1]=-Math.cos(n),r[2]=o*Math.sin(i),r},Xo.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},Xo.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"],Xo.createShader=function(t){"ecgl.shadow"===t&&(t="ecgl.displayShadow");var e=jt.source(t+".vertex"),n=jt.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),n||console.error("Fragment shader of '%s' not exits",t);var i=new jt(e,n);return i.name=t,i},Xo.createMaterial=function(t,e){e instanceof Array||(e=[e]);var n=Xo.createShader(t),i=new lt({shader:n});return e.forEach((function(t){"string"==typeof t&&i.define(t)})),i},Xo.setMaterialFromModel=function(t,e,n,i){e.autoUpdateTextureStatus=!1;var r=n.getModel(t+"Material"),o=r.get("detailTexture"),a=Mr(r.get("textureTiling"),1),s=Mr(r.get("textureOffset"),0);"number"==typeof a&&(a=[a,a]),"number"==typeof s&&(s=[s,s]);var l=a[0]>1||a[1]>1?Xo.Texture.REPEAT:Xo.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,i,u),c=Mr(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,i,u),h=Mr(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",o,i,u),e.setTextureImage("normalMap",d,i,u),e.set({roughness:h,metalness:c,detailUvRepeat:a,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("hatching"===t){var p=r.get("hatchingTextures")||[];p.length;for(var f=0;f<6;f++)e.setTextureImage("hatch"+(f+1),p[f],i,{anisotropic:8,wrapS:Xo.Texture.REPEAT,wrapT:Xo.Texture.REPEAT});e.set({detailUvRepeat:a,detailUvOffset:s})}},Xo.updateVertexAnimation=function(t,e,n,i){var r=i.get("animation"),o=i.get("animationDurationUpdate"),a=i.get("animationEasingUpdate"),s=n.shadowDepthMaterial;if(r&&e&&o>0&&e.geometry.vertexCount===n.geometry.vertexCount){n.material.define("vertex","VERTEX_ANIMATION"),n.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var n=this.zr;t.scene.traverse((function(t){t.__zr=n,t.addAnimatorsToZr&&t.addAnimatorsToZr(n)}))}},$o.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t))}},$o.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},$o.prototype.resize=function(t,e){this.renderer.resize(t,e)},$o.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},$o.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},$o.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},$o.prototype.needsRefresh=function(){this.zr.refresh()},$o.prototype.refresh=function(t){this._backgroundColor=t?Jo.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},$o.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,n=e.viewport,i=this.views.length-1;i>=0;i--){var r=this.views[i];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var o=this._picking.pick(t.offsetX,t.offsetY,!0);if(o)return o.view=r,o}}e.viewport=n},$o.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},$o.prototype.pickObject=function(t,e){for(var n=[],i=this.renderer,r=i.viewport,o=0;o=0&&(c.dataIndex=this._lastDataIndex,c.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0):null!=s&&s!==this._lastEventData&&(null!=this._lastEventData&&(c.eventData=this._lastEventData,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0),this._lastEventData=s,this._lastDataIndex=o,this._lastSeriesIndex=a),c.eventData=s,c.dataIndex=o,c.seriesIndex=a,(null!=s||parseInt(o,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(h,t,e),l&&this.zr.handler.dispatchToElement(h,"mouseover",e))},$o.prototype._dispatchToView=function(t,e){for(var n=0;nt&&a=0&&(function(t){la(t,"itemStyle"),la(t,"lineStyle"),la(t,"areaStyle"),la(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),ua(t.xAxis3D),ua(t.yAxis3D),ua(t.zAxis3D),ua(t.grid3D),la(t.geo3D)}));const ca={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(t){t=t||{},this.option.viewControl=this.option.viewControl||{},null!=t.alpha&&(this.option.viewControl.alpha=t.alpha),null!=t.beta&&(this.option.viewControl.beta=t.beta),null!=t.distance&&(this.option.viewControl.distance=t.distance),null!=t.center&&(this.option.viewControl.center=t.center)}},da={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}},pa={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}};var fa=i.ComponentModel.extend({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.util.merge(fa.prototype,ca),i.util.merge(fa.prototype,da),i.util.merge(fa.prototype,pa);const ga=fa;function ma(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function va(){var t="__ec_inner_"+ya++;return function(e){return e[t]||(e[t]={})}}var ya=Math.round(9*Math.random()),_a={};function xa(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||_a;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||_a).rich;if(n){e=e||{};for(var i=wo(n),r=0;r0&&this._notFirst?this.animateTo({alpha:u,beta:h,center:c,distance:o,orthographicSize:a,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(o),this.setAlpha(u),this.setBeta(h),this.setCenter(c),this.setOrthographicSize(a)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,n=this,i={},r={};return null!=t.distance&&(i.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(i.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(i.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(i.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(i.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,r).during((function(){null!=i.alpha&&n.setAlpha(i.alpha),null!=i.beta&&n.setBeta(i.beta),null!=i.distance&&n.setDistance(i.distance),null!=i.center&&n.setCenter(i.center),null!=i.orthographicSize&&n.setOrthographicSize(i.orthographicSize),n._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),n=this._orthoSize,i=n/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=n/2,e.bottom=-n/2},_updatePan:function(t){var e=this._panVelocity,n=this._distance,i=this.getCamera(),r=i.worldTransform.y,o=i.worldTransform.x;this._center.scaleAndAdd(o,-e.x*n/200).scaleAndAdd(r,-e.y*n/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new ye,n=this._theta+Math.PI/2,i=this._phi+Math.PI/2,r=Math.sin(n);e.x=r*Math.cos(i),e.y=-Math.cos(n),e.z=r*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var n=t.len();(n*=e)<1e-4&&(n=0),t.normalize().scale(n)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),n=Math.atan2(t.x,t.z);this._theta=e,this._phi=-n,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,n=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,n)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===Ca[this.rotateMouseButton]?this._mode="rotate":t.event.button===Ca[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=Aa(this.panSensitivity),n=Aa(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*n[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*n[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var n,i=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(i,r)||(n="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),t}});Object.defineProperty(Ia.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});const Da=Ia,La={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var n in e)t||!e[n].value?e[n].value=[]:e[n].value=Array.prototype.slice.call(e[n].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},Pa={vec2:ft,vec3:Jt,vec4:Ae,mat2:zr,mat2d:Vr,mat3:De,mat4:qt,quat:ke};var Oa=Pa.vec3,Ea=[[0,0],[1,1]],Na=Hn.extend((function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),positionPrev:new Hn.Attribute("positionPrev","float",3),positionNext:new Hn.Attribute("positionNext","float",3),prevPositionPrev:new Hn.Attribute("prevPositionPrev","float",3),prevPosition:new Hn.Attribute("prevPosition","float",3),prevPositionNext:new Hn.Attribute("prevPositionNext","float",3),offset:new Hn.Attribute("offset","float",1),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Oa.dist(t,e)+Oa.dist(n,e)+Oa.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Ea)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Ea)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=n[0],p=n[1],f=n[2],g=i[0],m=i[1],v=i[2],y=this._getCubicCurveApproxStep(t,e,n,i),_=y*y,x=_*y,b=3*y,w=3*_,S=6*_,T=6*x,M=a-2*u+d,C=s-2*h+p,A=l-2*c+f,I=3*(u-d)-a+g,D=3*(h-p)-s+m,L=3*(c-f)-l+v,P=a,O=s,E=l,N=(u-a)*b+M*w+I*x,k=(h-s)*b+C*w+D*x,R=(c-l)*b+A*w+L*x,z=M*S+I*T,B=C*S+D*T,Z=A*S+L*T,F=I*T,V=D*T,G=L*T,H=0,U=0,W=Math.ceil(1/y),j=new Float32Array(3*(W+1)),X=(j=[],0);for(U=0;U1&&(P=N>0?Math.min(P,g):Math.max(P,g),O=k>0?Math.min(O,m):Math.max(O,m),E=R>0?Math.min(E,v):Math.max(E,v));return this.addPolyline(j,r,o)},addLine:function(t,e,n,i){return this.addPolyline([t,e],n,i)},addPolyline:function(t,e,n,i,r){if(t.length){var o="number"!=typeof t[0];if(null==r&&(r=o?t.length:t.length/3),!(r<2)){null==i&&(i=0),null==n&&(n=1),this._itemVertexOffsets.push(this._vertexOffset);var a,s,l=(o="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,p=this.attributes.offset,f=this.indices,g=this._vertexOffset;n=Math.max(n,.01);for(var m=i;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,a),c.set(g-1,a)),u.set(g,a),u.set(g+1,a),d.set(g,s),d.set(g+1,s),p.set(g,n/2),p.set(g+1,-n/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,a),g++;else if(m>0){var _=3*this._triangleOffset;(f=this.indices)[_]=g-4,f[_+1]=g-3,f[_+2]=g-2,f[_+3]=g-3,f[_+4]=g-1,f[_+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=ta&&(r=this._x=0,o+=this._rowHeight+l,this._y=o,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,n),o+n+l>s)return null;t.x+=this.offsetX*this.dpr+r,t.y+=this.offsetY*this.dpr+o,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/a+u[0],o/s+u[1]],[(r+e)/a+u[0],(o+n)/s+u[1]]]},_fitElement:function(t,e,n){var i=t.getBoundingRect(),r=e/i.width,o=n/i.height;t.x=-i.x*r,t.y=-i.y*o,t.scaleX=r,t.scaleY=o,t.update()}},za.prototype={clear:function(){for(var t=0;t=t)){var r=(n+this._nodeWidth)*this._dpr,o=(i+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:o})}catch(t){this._canvas.width=r,this._canvas.height=o}var a=new Ra(this._zr,n,i,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(a),a}},add:function(t,e,n){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,n);if(!i){var r=this._expand();if(!r)return;i=r.add(t,e,n)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}};const Ba=za;function Za(){}Za.prototype={constructor:Za,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new Jo.DirectionalLight({shadowBias:.005}),this.ambientLight=new Jo.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,n=this.ambientLight,i=t.getModel("light"),r=i.getModel("main"),o=i.getModel("ambient");e.intensity=r.get("intensity"),n.intensity=o.get("intensity"),e.color=Jo.parseColor(r.get("color")).slice(0,3),n.color=Jo.parseColor(o.get("color")).slice(0,3);var a=r.get("alpha")||0,s=r.get("beta")||0;e.position.setArray(Jo.directionFromAlphaBeta(a,s)),e.lookAt(Jo.Vector3.ZERO),e.castShadow=r.get("shadow"),e.shadowResolution=Jo.getShadowResolution(r.get("shadowQuality"))},updateAmbientCubemap:function(t,e,n){var i=e.getModel("light.ambientCubemap"),r=i.get("texture");if(r){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[r];if(!o){var a=this;o=this._cubemapLightsCache[r]=Jo.createAmbientCubemap(i.option,t,n,(function(){a._isSkyboxFromAmbientCubemap&&a._skybox.setEnvironmentMap(o.specular.cubemap),n.getZr().refresh()}))}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,n){var r=e.get("environment"),o=this,a=(o._skybox=o._skybox||new ji,o._skybox);if(r&&"none"!==r)if("auto"===r)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var s=this._currentCubemapLights.specular.cubemap;a.setEnvironmentMap(s),this._scene&&a.attachScene(this._scene),a.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof r&&r.colorStops||"string"==typeof r&&i.color.parse(r)){this._isSkyboxFromAmbientCubemap=!1;var l=new Jo.Texture2D({anisotropic:8,flipY:!1});a.setEnvironmentMap(l);var u=l.image=document.createElement("canvas");u.width=u.height=16;var h=u.getContext("2d"),c=new i.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:r}});i.innerDrawElementOnCanvas(h,c),a.attachScene(this._scene)}else this._isSkyboxFromAmbientCubemap=!1,l=Jo.loadTexture(r,n,{anisotropic:8,flipY:!1}),a.setEnvironmentMap(l),a.attachScene(this._scene);else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var d=e.coordinateSystem;if(this._skybox)if(!d||!d.viewGL||"auto"===r||r.match&&r.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var p=d.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[p]("fragment","SRGB_DECODE")}}};const Fa=Za;var Va=Pa.vec3,Ga=Hn.extend((function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,n=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==n&&(e.position.init(n),e.normal.init(n),e.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=Va.create(),e=Va.create(),n=Va.create(),i=[0,3,1,3,2,1];return function(r,o){var a=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;Va.sub(t,r[1],r[0]),Va.sub(e,r[2],r[1]),Va.cross(n,t,e),Va.normalize(n,n);for(var u=0;u<4;u++)a.set(this._vertexOffset+u,r[u]),l.set(this._vertexOffset+u,o),s.set(this._vertexOffset+u,n);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});i.util.defaults(Ga.prototype,La);const Ha=Ga;var Ua=Mr,Wa={x:0,y:2,z:1};function ja(t,e,n){this.rootNode=new Jo.Node;var i=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),r=new Jo.Mesh({geometry:new Ha,material:n,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(r),this.rootNode.add(i),this.faceInfo=t,this.plane=new Jo.Plane,this.linesMesh=i,this.quadsMesh=r}ja.prototype.update=function(t,e,n){var i=t.coordinateSystem,r=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,a=this.quadsMesh.geometry;o.convertToDynamicArray(!0),a.convertToDynamicArray(!0),this._updateSplitLines(o,r,t,n),this._udpateSplitAreas(a,r,t,n),o.convertToTypedArray(),a.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);!function(t,e,n,i){var r=[0,0,0],o=i<0?n.getExtentMin():n.getExtentMax();r[Wa[n.dim]]=o,t.position.setArray(r),t.rotation.identity(),e.distance=-Math.abs(o),e.normal.set(0,0,0),"x"===n.dim?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):"z"===n.dim?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}(this.rootNode,this.plane,s,this.faceInfo[3])},ja.prototype._updateSplitLines=function(t,e,n,r){var o=r.getDevicePixelRatio();e.forEach((function(r,a){var s=r.model,l=e[1-a].getExtent();if(!r.scale.isBlank()){var u=s.getModel("splitLine",n.getModel("splitLine"));if(u.get("show")){var h=u.getModel("lineStyle"),c=h.get("color"),d=Ua(h.get("opacity"),1),p=Ua(h.get("width"),1);c=i.util.isArray(c)?c:[c];for(var f=r.getTicksCoords({tickModel:u}),g=0,m=0;m65535?new Uint32Array(3*n):new Uint16Array(3*n))},setSpriteAlign:function(t,e,n,i,r){var o,a,s,l;switch(null==n&&(n="left"),null==i&&(i="top"),r=r||0,n){case"left":o=r,s=e[0]+r;break;case"center":case"middle":o=-e[0]/2,s=e[0]/2;break;case"right":o=-e[0]-r,s=-r}switch(i){case"bottom":a=r,l=e[1]+r;break;case"middle":a=-e[1]/2,l=e[1]/2;break;case"top":a=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[o,l]),h.set(u+1,[s,l]),h.set(u+2,[s,a]),h.set(u+3,[o,a])},addSprite:function(t,e,n,i,r,o){var a=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,n,i,r,o);for(var s=0;s 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end";var rs=Mr;Jo.Shader.import(is);var os={x:0,y:2,z:1};const as=i.ComponentView.extend({type:"grid3D",__ecgl__:!0,init:function(t,e){var n=new Jo.Material({shader:Jo.createShader("ecgl.color"),depthMask:!1,transparent:!0}),i=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});n.define("fragment","DOUBLE_SIDED"),n.define("both","VERTEX_COLOR"),this.groupGL=new Jo.Node,this._control=new Da({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new Xa(t,i,n);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new ns(t,i);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new Ba({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:i,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new Ba({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new Ja({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,n){this._model=t,this._api=n;var i=t.coordinateSystem;i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(i.viewGL);var o=t.getModel("viewControl");r.setFromViewControlModel(o,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(i){i.update(t,e,n)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,n)}),this)),r.on("update",this._onCameraChange.bind(this,t,n),this),this._sceneHelper.setScene(i.viewGL.scene),this._sceneHelper.updateLight(t),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},showAxisPointer:function(t,e,n,i){this._doShowAxisPointer(),this._updateAxisPointer(i.value)},hideAxisPointer:function(t,e,n,i){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,n=this._model.coordinateSystem,i=n.viewGL,r=i.castRay(t.offsetX,t.offsetY,new Jo.Ray),o=0;oi[1]?0:1,a=this._faces[2*n+o],s=this._faces[2*n+1-o];a.rootNode.invisible=!0,s.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),n=t.getAxis("y"),i=t.getAxis("z"),r=i.getExtentMax(),o=i.getExtentMin(),a=e.getExtentMin(),s=e.getExtentMax(),l=n.getExtentMax(),u=n.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,p=this._faces,f=p[4].rootNode.invisible?u:l,g=p[2].rootNode.invisible?r:o,m=p[0].rootNode.invisible?a:s,v=p[2].rootNode.invisible?r:o,y=p[0].rootNode.invisible?s:a,_=p[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),p[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),p[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),p[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,f),c.position.set(m,v,0),d.position.set(y,0,_),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new Jo.Vector4,new Jo.Vector4],n=new Jo.Vector4;this.groupGL.getWorldPosition(n),n.w=1,n.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),n.x/=n.w,n.y/=n.w,this._axes.forEach((function(i){for(var r=i.axisLineCoords,o=(i.labelsMesh.geometry,0);on.y?"bottom":"top"):(s="middle",a=h>n.x?"left":"right"),i.setSpriteAlign(a,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,n=e.dataToPoint(t),i=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function a(t){return Mr(t.model.get("axisPointer.show"),r.get("show"))}function s(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),n=Jo.parseColor(e.get("color")),i=rs(e.get("width"),1),o=rs(e.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}i.convertToDynamicArray(!0);for(var l=0;lf&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}ms.x=ys.x=n.x,ms.y=_s.y=n.y,vs.x=_s.x=n.x+n.width,vs.y=ys.y=n.y+n.height,ms.transform(i),_s.transform(i),vs.transform(i),ys.transform(i),e.x=fs(ms.x,vs.x,ys.x,_s.x),e.y=fs(ms.y,vs.y,ys.y,_s.y);var l=gs(ms.x,vs.x,ys.x,_s.x),u=gs(ms.y,vs.y,ys.y,_s.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}();function Ss(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}function Ts(t,e,n){n=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}(n||0);var i=e.width,r=e.height,o=ma(t.left,i),a=ma(t.top,r),s=ma(t.right,i),l=ma(t.bottom,r),u=ma(t.width,i),h=ma(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(p>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ws(o+n[3],a+n[0],u,h);return f.margin=n,f}So(Ss,"vertical"),So(Ss,"horizontal");var Ms=function(){this._pool={},this._allocatedTextures=[]};Ms.prototype={constructor:Ms,get:function(t){var e=Is(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var n=this._pool[e];if(!n.length){var i=new Ln(t);return this._allocatedTextures.push(i),i}return n.pop()},put:function(t){var e=Is(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;e 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n #endif\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n #else\n depth += bias;\n #endif\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec4 P = vec4(position, 1.0);\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = skinMatrixWS * P;\n#endif\n#ifdef INSTANCING\n @import clay.chunk.instancing_matrix\n P = instanceMat * P;\n#endif\n gl_Position = worldViewProjection * P;\n v_WorldPosition = (world * P).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end");var Es,Ns,ks,Rs,zs,Bs,Zs,Fs=g.extend((function(){return{softShadow:Fs.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new Zi,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new Ds}}),(function(){this._gaussianPassH=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new fr({fragment:jt.source("clay.sm.debug_depth")})}),{render:function(t,e,n,i){n||(n=e.getMainCamera()),this.trigger("beforerender",this,t,e,n),this._renderShadowPass(t,e,n,i),this.trigger("afterrender",this,t,e,n)},renderDebug:function(t,e){t.saveClear();var n=t.viewport,i=0,r=e||n.width/4,o=r;for(var a in this.softShadow===Fs.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM"),this._textures){var s=this._textures[a];t.setViewport(i,0,r*s.width/s.height,o),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(t),i+=r*s.width/s.height}t.setViewport(n),t.restoreClear()},_updateReceivers:function(t,e){if(e.receiveShadow?(this._receivers.push(e),e.material.set("shadowEnabled",1),e.material.set("pcfKernel",this.kernelPCF)):e.material.set("shadowEnabled",0),this.softShadow===Fs.VSM)e.material.define("fragment","USE_VSM"),e.material.undefine("fragment","PCF_KERNEL_SIZE");else{e.material.undefine("fragment","USE_VSM");var n=this.kernelPCF;n&&n.length?e.material.define("fragment","PCF_KERNEL_SIZE",n.length/2):e.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(t,e){var n=this;e.traverse((function(e){e.isRenderable()&&n._updateReceivers(t,e)}));for(var i=0;i4){console.warn("Support at most 4 cascade");continue}f.shadowCascade>1&&(a=f),this.renderDirectionalLightShadow(t,e,n,f,c,h,u)}else"SPOT_LIGHT"===f.type?this.renderSpotLightShadow(t,e,f,l,s):"POINT_LIGHT"===f.type&&this.renderPointLightShadow(t,e,f,d);this._shadowMapNumber[f.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(p=0;p0?y.define("fragment",v,m):y.isDefined("fragment",v)&&y.undefine("fragment",v))}for(p=0;p0){var x=u.map(T);if(_.directionalLightShadowMaps={value:u,type:"tv"},_.directionalLightMatrices={value:h,type:"m4v"},_.directionalLightShadowMapSizes={value:x,type:"1fv"},a){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),_.shadowCascadeClipsNear={value:b,type:"1fv"},_.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var S=s.map(T);(_=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},_.spotLightMatrices={value:l,type:"m4v"},_.spotLightShadowMapSizes={value:S,type:"1fv"}}d.length>0&&(_.pointLightShadowMaps={value:d,type:"tv"})}function T(t){return t.height}},renderDirectionalLightShadow:(Es=new li,Ns=new He,ks=new rn,Rs=new He,zs=new He,Bs=new He,Zs=new He,function(t,e,n,i,r,o,a){var s=this._getDepthMaterial(i),l={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:Os,getUniform:Ps,ifRender:function(t){return t.castShadow},sortCompare:he.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var u=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(u).applyTransform(n.viewMatrix)}var h=Math.min(-e.viewBoundingBoxLastFrame.min.z,n.far),c=Math.max(-e.viewBoundingBoxLastFrame.max.z,n.near),d=this._getDirectionalLightCamera(i,e,n),p=Bs.array;Zs.copy(d.projectionMatrix),qt.invert(zs.array,d.worldTransform.array),qt.multiply(zs.array,zs.array,n.worldTransform.array),qt.multiply(p,Zs.array,zs.array);for(var f=[],g=n instanceof Ii,m=(n.near+n.far)/(n.near-n.far),v=2*n.near*n.far/(n.near-n.far),y=0;y<=i.shadowCascade;y++){var _=c*Math.pow(h/c,y/i.shadowCascade),x=c+(h-c)*y/i.shadowCascade,b=_*i.cascadeSplitLogFactor+x*(1-i.cascadeSplitLogFactor);f.push(b),r.push(-(-b*m+v)/-b)}var w=this._getTexture(i,i.shadowCascade);a.push(w);var S=t.viewport,T=t.gl;for(this._frameBuffer.attach(w),this._frameBuffer.bind(t),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT),y=0;yd?s>p?f[r>0?"px":"nx"]=!0:f[a>0?"pz":"nz"]=!0:d>p?f[o>0?"py":"ny"]=!0:f[a>0?"pz":"nz"]=!0}for(n=0;n0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}}),Hs=g.extend((function(){return{nodes:[]}}),{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=n.COLOR_ATTACHMENT0&&h<=n.COLOR_ATTACHMENT0+8&&u.push(h);l.drawBuffersEXT(u)}t.saveClear(),t.clearBit=16640,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}}),js=Gs.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),Xs=Gs.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new fr({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var n=t.gl;for(var i in this.inputLinks){var r=(c=this.inputLinks[i]).node.getOutput(t,c.pin);this.pass.setUniform(i,r)}if(this.outputs){this.pass.outputs={};var o={};for(var a in this.outputs){var s=this.updateParameter(a,t);isNaN(s.width)&&this.updateParameter(a,t);var l=this.outputs[a],u=this._compositor.allocateTexture(s);this._outputTextures[a]=u,"string"==typeof(h=l.attachment||n.COLOR_ATTACHMENT0)&&(h=n[h]),o[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),o)this._compositor.getFrameBuffer().attach(o[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var i in this.inputLinks){var c;(c=this.inputLinks[i]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var n,i,r=this.outputs[t],o=r.parameters,a=r._parametersCopy;if(a||(a=r._parametersCopy={}),o)for(var s in o)"width"!==s&&"height"!==s&&(a[s]=o[s]);return n="function"==typeof o.width?o.width.call(this,e):o.width,i="function"==typeof o.height?o.height.call(this,e):o.height,n=Math.ceil(n),i=Math.ceil(i),a.width===n&&a.height===i||this._outputTextures[t]&&this._outputTextures[t].dispose(e),a.width=n,a.height=i,a},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){Gs.prototype.clear.call(this),this.pass.material.disableTexturesAll()}}),Ys="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",qs="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",Ks="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",Js="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",Qs="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",$s="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",tl="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",el="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",nl="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";!function(t){t.import("@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"),t.import(Ys),t.import("@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"),t.import(qs),t.import("@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"),t.import(Ks),t.import(Js),t.import(Qs),t.import($s),t.import(tl),t.import("@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"),t.import(el),t.import(nl)}(jt);var il=/^#source\((.*?)\)/;function rl(t,e,n){var i,r,o,a,s=t.type||"filter";if("filter"===s){var l=t.shader.trim(),u=il.exec(l);if(u?i=jt.source(u[1].trim()):"#"===l.charAt(0)&&(i=e.shaders[l.substr(1)]),i||(i=l),!i)return}if(t.inputs)for(var h in r={},t.inputs)"string"==typeof t.inputs[h]?r[h]=t.inputs[h]:r[h]={node:t.inputs[h].node,pin:t.inputs[h].pin};if(t.outputs)for(var h in o={},t.outputs){var c=t.outputs[h];o[h]={},null!=c.attachment&&(o[h].attachment=c.attachment),null!=c.keepLastFrame&&(o[h].keepLastFrame=c.keepLastFrame),null!=c.outputLastFrame&&(o[h].outputLastFrame=c.outputLastFrame),c.parameters&&(o[h].parameters=sl(c.parameters))}if(a="scene"===s?new Ws({name:t.name,scene:n.scene,camera:n.camera,outputs:o}):"texture"===s?new js({name:t.name,outputs:o}):new Xs({name:t.name,shader:i,inputs:r,outputs:o})){if(t.parameters)for(var h in t.parameters)"string"==typeof(d=t.parameters[h])?"#"===(d=d.trim()).charAt(0)?d=e.textures[d.substr(1)]:a.on("beforerender",ll(h,ul(d))):"function"==typeof d&&a.on("beforerender",d),a.setParameter(h,d);if(t.defines&&a.pass)for(var h in t.defines){var d=t.defines[h];a.pass.material.define("fragment",h,d)}}return a}function ol(t,e){return t}function al(t,e){return e}function sl(t){var e={};if(!t)return e;["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach((function(n){var i=t[n];null!=i&&("string"==typeof i&&(i=Sn[i]),e[n]=i)}));var n=t.scale||1;return["width","height"].forEach((function(i){if(null!=t[i]){var r=t[i];"string"==typeof r?(r=r.trim(),e[i]=(o=ul(r),a=(a=n)||1,function(t){var e=t.getDevicePixelRatio(),n=t.getWidth()*a,i=t.getHeight()*a;return o(n,i,e)})):e[i]=r}var o,a})),e.width||(e.width=ol),e.height||(e.height=al),null!=t.useMipmap&&(e.useMipmap=t.useMipmap),e}function ll(t,e){return function(n){var i=n.getDevicePixelRatio(),r=n.getWidth(),o=n.getHeight(),a=e(r,o,i);this.setParameter(t,a)}}function ul(t){var e=/^expr\((.*)\)$/.exec(t);if(e)try{var n=new Function("width","height","dpr","return "+e[1]);return n(1,1),n}catch(t){throw new Error("Invalid expression.")}}const hl=function(t,e){for(var n=0,i=1/e,r=t;r>0;)n+=i*(r%e),r=Math.floor(r/e),i/=e;return n};function cl(t){for(var e=new Uint8Array(t*t*4),n=0,i=new ye,r=0;r 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"),fl.prototype.setDepthTexture=function(t){this._depthTex=t},fl.prototype.setNormalTexture=function(t){this._normalTex=t,this._ssaoPass.material[t?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},fl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._ssaoPass,a=this._blurPass;o.setUniform("kernel",this._kernels[n%this._kernels.length]),o.setUniform("depthTex",this._depthTex),null!=this._normalTex&&o.setUniform("normalTex",this._normalTex),o.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var s=new He;He.transpose(s,e.worldTransform),o.setUniform("projection",e.projectionMatrix.array),o.setUniform("projectionInv",e.invProjectionMatrix.array),o.setUniform("viewInverseTranspose",s.array);var l=this._ssaoTexture,u=this._blurTexture,h=this._blurTexture2;l.width=i/2,l.height=r/2,u.width=i,u.height=r,h.width=i,h.height=r,this._framebuffer.attach(l),this._framebuffer.bind(t),t.gl.clearColor(1,1,1,1),t.gl.clear(t.gl.COLOR_BUFFER_BIT),o.render(t),a.setUniform("textureSize",[i/2,r/2]),a.setUniform("projection",e.projectionMatrix.array),this._framebuffer.attach(u),a.setUniform("direction",0),a.setUniform("ssaoTexture",l),a.render(t),this._framebuffer.attach(h),a.setUniform("textureSize",[i,r]),a.setUniform("direction",1),a.setUniform("ssaoTexture",u),a.render(t),this._framebuffer.unbind(t);var c=t.clearColor;t.gl.clearColor(c[0],c[1],c[2],c[3])},fl.prototype.getTargetTexture=function(){return this._blurTexture2},fl.prototype.setParameter=function(t,e){"noiseTexSize"===t?this.setNoiseSize(e):"kernelSize"===t?this.setKernelSize(e):"intensity"===t?this._ssaoPass.material.set("intensity",e):this._ssaoPass.setUniform(t,e)},fl.prototype.setKernelSize=function(t){this._kernelSize=t,this._ssaoPass.material.define("fragment","KERNEL_SIZE",t),this._kernels=this._kernels||[];for(var e=0;e<30;e++)this._kernels[e]=pl(t,e*t,!!this._normalTex)},fl.prototype.setNoiseSize=function(t){var e=this._ssaoPass.getUniform("noiseTex");e?(e.data=cl(t),e.width=e.height=t,e.dirty()):(e=dl(t),this._ssaoPass.setUniform("noiseTex",dl(t))),this._ssaoPass.setUniform("noiseTexSize",[t,t])},fl.prototype.dispose=function(t){this._blurTexture.dispose(t),this._ssaoTexture.dispose(t),this._blurTexture2.dispose(t)};const gl=fl;function ml(t){t=t||{},this._ssrPass=new fr({fragment:jt.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new fr({fragment:jt.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",t.normalTexture),this._ssrPass.setUniform("gBufferTexture2",t.depthTexture),this._blurPass1.setUniform("gBufferTexture1",t.normalTexture),this._blurPass1.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.setUniform("gBufferTexture1",t.normalTexture),this._blurPass2.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new Ln({type:Sn.HALF_FLOAT}),this._texture2=new Ln({type:Sn.HALF_FLOAT}),this._texture3=new Ln({type:Sn.HALF_FLOAT}),this._prevTexture=new Ln({type:Sn.HALF_FLOAT}),this._currentTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}jt.import("@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"),ml.prototype.setAmbientCubemap=function(t,e){this._ssrPass.material.set("specularCubemap",t),this._ssrPass.material.set("specularIntensity",e);var n=t&&e;this._ssrPass.material[n?"enableTexture":"disableTexture"]("specularCubemap")},ml.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._ssrTexture,s=this._texture2,l=this._texture3;a.width=this._prevTexture.width=this._currentTexture.width=r/this._downScale,a.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,s.width=l.width=r,s.height=l.height=o;var u=this._frameBuffer,h=this._ssrPass,c=this._blurPass1,d=this._blurPass2,p=this._blendPass,f=new He,g=new He;He.transpose(f,e.worldTransform),He.transpose(g,e.viewMatrix),h.setUniform("sourceTexture",n),h.setUniform("projection",e.projectionMatrix.array),h.setUniform("projectionInv",e.invProjectionMatrix.array),h.setUniform("toViewSpace",f.array),h.setUniform("toWorldSpace",g.array),h.setUniform("nearZ",e.near);var m=i/this._totalSamples*this._samplePerFrame;if(h.setUniform("jitterOffset",m),h.setUniform("sampleOffset",i*this._samplePerFrame),c.setUniform("textureSize",[a.width,a.height]),d.setUniform("textureSize",[r,o]),d.setUniform("sourceTexture",n),c.setUniform("projection",e.projectionMatrix.array),d.setUniform("projection",e.projectionMatrix.array),u.attach(a),u.bind(t),h.render(t),this._physicallyCorrect&&(u.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",a),p.material.set({weight1:i>=1?.95:0,weight2:i>=1?.05:1}),p.render(t)),u.attach(s),c.setUniform("texture",this._physicallyCorrect?this._currentTexture:a),c.render(t),u.attach(l),d.setUniform("texture",s),d.render(t),u.unbind(t),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},ml.prototype.getTargetTexture=function(){return this._texture3},ml.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},ml.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=vr.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},ml.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},ml.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},ml.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};const vl=ml,yl=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925];function _l(t,e,n,i,r){var o=t.gl;e.setUniform(o,"1i",n,r),o.activeTexture(o.TEXTURE0+r),i.isRenderable()?i.bind(t):i.unbind(t)}function xl(t,e,n,i,r){var o,a,s,l,u=t.gl;return function(r,h,c){if(!l||l.material!==r.material){var d=r.material,p=r.__program,f=d.get("roughness");null==f&&(f=1);var g=d.get("normalMap")||e,m=d.get("roughnessMap"),v=d.get("bumpMap"),y=d.get("uvRepeat"),_=d.get("uvOffset"),x=d.get("detailUvRepeat"),b=d.get("detailUvOffset"),w=!!v&&d.isTextureEnabled("bumpMap"),S=!!m&&d.isTextureEnabled("roughnessMap"),T=d.isDefined("fragment","DOUBLE_SIDED");v=v||n,m=m||i,c!==h?(h.set("normalMap",g),h.set("bumpMap",v),h.set("roughnessMap",m),h.set("useBumpMap",w),h.set("useRoughnessMap",S),h.set("doubleSide",T),null!=y&&h.set("uvRepeat",y),null!=_&&h.set("uvOffset",_),null!=x&&h.set("detailUvRepeat",x),null!=b&&h.set("detailUvOffset",b),h.set("roughness",f)):(p.setUniform(u,"1f","roughness",f),o!==g&&_l(t,p,"normalMap",g,0),a!==v&&v&&_l(t,p,"bumpMap",v,1),s!==m&&m&&_l(t,p,"roughnessMap",m,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=_&&p.setUniform(u,"2f","uvOffset",_),null!=x&&p.setUniform(u,"2f","detailUvRepeat",x),null!=b&&p.setUniform(u,"2f","detailUvOffset",b),p.setUniform(u,"1i","useBumpMap",+w),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+T)),o=g,a=v,s=m,l=r}}}function bl(t){t=t||{},this._depthTex=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._normalTex=new Ln({type:Sn.HALF_FLOAT}),this._framebuffer=new Zi,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,Zi.DEPTH_ATTACHMENT),this._normalMaterial=new lt({shader:new jt(jt.source("ecgl.normal.vertex"),jt.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=or.createBlank("#000"),this._defaultBumpMap=or.createBlank("#000"),this._defaultRoughessMap=or.createBlank("#000"),this._debugPass=new fr({fragment:jt.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}jt.import("@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"),bl.prototype.getDepthTexture=function(){return this._depthTex},bl.prototype.getNormalTexture=function(){return this._normalTex},bl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._depthTex,a=this._normalTex,s=this._normalMaterial;o.width=i,o.height=r,a.width=i,a.height=r;var l=e.getRenderList(n).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,n,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:xl(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},bl.prototype.renderDebug=function(t){this._debugPass.render(t)},bl.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)};const wl=bl;function Sl(t){t=t||{},this._edgePass=new fr({fragment:jt.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi,this._frameBuffer.attach(this._targetTexture)}Sl.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._targetTexture;a.width=r,a.height=o;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,o]),this._edgePass.setUniform("texture",n),this._edgePass.render(t),s.unbind(t)},Sl.prototype.getTargetTexture=function(){return this._targetTexture},Sl.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},Sl.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};const Tl=Sl,Ml={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]};function Cl(t,e){return{color:{parameters:{width:t,height:e}}}}jt.import(Ys),jt.import(qs),jt.import(Ks),jt.import(Js),jt.import(Qs),jt.import($s),jt.import(tl),jt.import(el),jt.import(nl),jt.import("@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"),jt.import("@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end");var Al=["composite","FXAA"];function Il(){this._width,this._height,this._dpr,this._sourceTexture=new Ln({type:Sn.HALF_FLOAT}),this._depthTexture=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._framebuffer=new Zi,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,Zi.DEPTH_ATTACHMENT),this._normalPass=new wl,this._compositor=function(t,e){var n=new Us;e=e||{};var i={textures:{},parameters:{}};for(var r in t.parameters){var o=t.parameters[r];i.parameters[r]=sl(o)}return function(t,e,n,i){if(t.textures){var r={},o=0,a=!1,s=n.textureRootPath;p.each(t.textures,(function(t,e){var n,l=t.path,u=sl(t.parameters);if(Array.isArray(l)&&6===l.length)s&&(l=l.map((function(t){return p.relative2absolute(t,s)}))),n=new Ai(u);else{if("string"!=typeof l)return;s&&(l=p.relative2absolute(l,s)),n=new Ln(u)}n.load(l),o++,n.once("success",(function(){r[e]=n,0==--o&&(i(r),a=!0)}))})),0!==o||a||i(r)}else i({})}(t,0,e,(function(r){i.textures=r,function(r,o){for(var a=0;a=this._haltonSequence.length},render:function(t,e,n){var i=this._blendPass;0===this._frame?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),n||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}};const Pl=Ll;function Ol(t){t=t||"perspective",this.layer=null,this.scene=new _i,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new Dl,this._temporalSS=new Pl,this._shadowMapPass=new Vs;for(var e=[],n=0,i=0;i<30;i++){for(var r=[],o=0;o<6;o++)r.push(4*hl(n,2)-2),r.push(4*hl(n,3)-2),n++;e.push(r)}this._pcfKernels=e,this.scene.on("beforerender",(function(t,e,n){this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n)}),this)}Ol.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),"perspective"===t?this.camera instanceof Ii||(this.camera=new Ii,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof hr||(this.camera=new hr,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3},Ol.prototype.setViewport=function(t,e,n,i,r){this.camera instanceof Ii&&(this.camera.aspect=n/i),r=r||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=n,this.viewport.height=i,this.viewport.devicePixelRatio=r,this._compositor.resize(n*r,i*r),this._temporalSS.resize(n*r,i*r)},Ol.prototype.containPoint=function(t,e){var n=this.viewport;return e=this.layer.renderer.getHeight()-e,t>=n.x&&e>=n.y&&t<=n.x+n.width&&e<=n.y+n.height};var El=new vt;Ol.prototype.castRay=function(t,e,n){var i=this.layer.renderer,r=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,El),this.camera.castRay(El,n),i.viewport=r,n},Ol.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},Ol.prototype._doRender=function(t,e,n){var i=this.scene,r=this.camera;n=n||0,this._updateTransparent(t,i,r,n),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,r,!0)),this._updateShadowPCFKernel(n);var o,a=t.clearColor;t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,i,r,this._temporalSS.getFrame())),this._updateSSAO(t,i,r,this._temporalSS.getFrame()),this._enablePostEffect?((o=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,r,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,r,null,0))):this.needsTemporalSS()&&e?((o=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,r,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(i,r,!0,!0))},Ol.prototype._updateTransparent=function(t,e,n,i){for(var r=new ye,o=new He,a=n.getWorldPosition(),s=e.getRenderList(n).transparent,l=0;lthis.camera.far||t80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);u=Math.max(o-i,a-r)}return ru(d,p,n,i,r,u),p}function nu(t,e,n,i,r){var o,a;if(r===Su(t,e,n,i)>0)for(o=e;o=e;o-=i)a=xu(o,t[o],t[o+1],a);return a&&mu(a,a.next)&&(bu(a),a=a.next),a}function iu(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!mu(i,i.next)&&0!==gu(i.prev,i,i.next))i=i.next;else{if(bu(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function ru(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=cu(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?au(t,i,r,o):ou(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),bu(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?ru(t=su(t,e,n),e,n,i,r,o,2):2===a&&lu(t,e,n,i,r,o):ru(iu(t),e,n,i,r,o,1);break}}}function ou(t){var e=t.prev,n=t,i=t.next;if(gu(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(pu(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&gu(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function au(t,e,n,i){var r=t.prev,o=t,a=t.next;if(gu(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,h=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=cu(s,l,e,n,i),d=cu(u,h,e,n,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function su(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!mu(r,o)&&vu(r,i,i.next,o)&&yu(r,o)&&yu(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),bu(i),bu(i.next),i=t=o),i=i.next}while(i!==t);return i}function lu(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&fu(a,s)){var l=_u(a,s);return a=iu(a,a.next),l=iu(l,l.next),ru(a,e,n,i,r,o),void ru(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function uu(t,e){return t.x-e.x}function hu(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=h&&r!==i.x&&pu(on.x)&&yu(i,t)&&(n=i,d=l),i=i.next;return n}(t,e)){var n=_u(e,t);iu(n,n.next)}}function cu(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function du(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function fu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&vu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&yu(t,e)&&yu(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function gu(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function mu(t,e){return t.x===e.x&&t.y===e.y}function vu(t,e,n,i){return!!(mu(t,e)&&mu(n,i)||mu(t,i)&&mu(n,e))||gu(t,e,n)>0!=gu(t,e,i)>0&&gu(n,i,t)>0!=gu(n,i,e)>0}function yu(t,e){return gu(t.prev,t,t.next)<0?gu(t,e,t.next)>=0&&gu(t,t.prev,e)>=0:gu(t,e,t.prev)<0||gu(t,t.next,e)<0}function _u(t,e){var n=new wu(t.i,t.x,t.y),i=new wu(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function xu(t,e,n,i){var r=new wu(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function bu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function wu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Su(t,e,n,i){for(var r=0,o=e,a=n-i;ou&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l}),u=o[a].pivot+1,(l=o[a].right)>u&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l})}o=this._parts=s}else for(a=0;a=2e4},doSortTriangles:function(t,e){var n=this.indices;if(0===e){var i=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new n.constructor(n.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var r,o=0,a=0;a0,n={},r=0;r65535?new Uint32Array(3*a):new Uint16Array(3*a),d.material.shader!==e&&d.material.attachShader(e,!0),Jo.setMaterialFromModel(e.__shading,d.material,t,n),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-i))},_updateRegionMesh:function(t,e,n,i){for(var r=t.getData(),o=0,a=0,s=!1,l=this._polygonMesh,u=this._linesMesh,h=n;h0;w&&(b*=e.getDevicePixelRatio(),this._updateLinesGeometry(u.geometry,t,h,y,b,t.coordinateSystem.transform)),u.invisible=!w,u.material.set({color:m})}(l=this._polygonMesh).material.transparent=s,l.material.depthMask=!s,l.geometry.updateBoundingBox(),l.frontFace=this.extrudeY?Jo.Mesh.CCW:Jo.Mesh.CW,l.material.get("normalMap")&&l.geometry.generateTangents(),l.seriesIndex=t.seriesIndex,l.on("mousemove",this._onmousemove,this),l.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var n=Jo.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=Mr(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",n),r.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,n){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(o=this._groundMaterials.lambert),Jo.setMaterialFromModel(r,o,i,n),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",Jo.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,n){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],o=t.coordinateSystem,a=e;a1?i:0,L[F][m]=C.points[G+2],l.set(r+F,L[F]),s?(N[0]=(C.points[G]*v[0]-y[0])/x,N[1]=(C.points[G+2]*v[m]-y[m])/x):(N[0]=(V?k:k+Z)/x,N[1]=(L[F][g]*v[g]-y[g])/x),h.set(r+F,N)}for(Bu.sub(P,L[1],L[0]),Bu.sub(O,L[3],L[0]),Bu.cross(E,P,O),Bu.normalize(E,E),F=0;F<4;F++)u.set(r+F,E),p&&c.set(r+F,a);for(F=0;F<6;F++)f[3*o+F]=D[F]+r;r+=4,o+=2,k+=Z}}return e.dirty(),{vertexOffset:r,triangleOffset:o}},_getRegionLinesInfo:function(t,e,n){var i=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,o=t.interiors;i+=n.getPolylineVertexCount(e),r+=n.getPolylineTriangleCount(e);for(var a=0;athis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[2*e];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});i.util.merge(nh.prototype,ca),i.util.merge(nh.prototype,da),i.util.merge(nh.prototype,pa),i.util.merge(nh.prototype,Kl);const ih=nh;var rh=Math.PI,oh=Math.sin,ah=Math.cos,sh=Math.tan,lh=Math.asin,uh=Math.atan2,hh=rh/180,ch=23.4397*hh;function dh(t,e){return uh(oh(t)*ah(ch)-sh(e)*oh(ch),ah(t))}function ph(t,e,n){return uh(oh(t),ah(t)*oh(e)-sh(n)*ah(e))}function fh(t,e,n){return lh(oh(e)*oh(n)+ah(e)*ah(n)*ah(t))}var gh={getPosition:function(t,e,n){var i=hh*-n,r=hh*e,o=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),a=function(t){var e,n,i=(n=function(t){return hh*(357.5291+.98560028*t)}(t))+hh*(1.9148*oh(n)+.02*oh(2*n)+3e-4*oh(3*n))+102.9372*hh+rh;return{dec:(e=i,lh(oh(0)*ah(ch)+ah(0)*oh(ch)*oh(e))),ra:dh(i,0)}}(o),s=function(t,e){return hh*(280.16+360.9856235*t)-e}(o,i)-a.ra;return{azimuth:ph(s,r,a.dec),altitude:fh(s,r,a.dec)}}};const mh=gh;Jo.Shader.import(Ho),Jo.Shader.import("@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end");const vh=i.ComponentView.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new Jo.Node,this._sphereGeometry=new Jo.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new Jo.PlaneGeometry,this._earthMesh=new Jo.Mesh({renderNormal:!0}),this._atmosphereMesh=new Jo.Mesh,this._atmosphereGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.atmosphere.vertex"),Jo.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=Jo.Mesh.CW,this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new Da({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,n){var i=t.coordinateSystem,r=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var a="ecgl."+r;o.material&&o.material.shader.name===a||(o.material=Jo.createMaterial(a)),Jo.setMaterialFromModel(r,o.material,t,n),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",Jo.parseColor(t.get("baseColor")));var s=.99*i.radius;if(o.scale.set(s,s,s),t.get("atmosphere.show")){o.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),o.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else o.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),n,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),n,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,n),this._displaceVertices(t,n),this._updateViewControl(t,n),this._updateLayers(t,n)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},_updateLayers:function(t,e){var n=t.coordinateSystem,r=t.get("layers"),o=n.radius,a=[],s=[],l=[],u=[];i.util.each(r,(function(t){var r=new i.Model(t),h=r.get("type"),c=Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8});if(c.surface&&c.surface.attachToMesh(this._earthMesh),"blend"===h){var d=r.get("blendTo"),p=Mr(r.get("intensity"),1);"emission"===d?(l.push(c),u.push(p)):(a.push(c),s.push(p))}else{var f=r.get("id"),g=this._layerMeshes[f];g||(g=this._layerMeshes[f]=new Jo.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===r.get("shading")?(g.material=g.__lambertMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),g.__lambertMaterial=g.material):(g.material=g.__colorMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.color"),transparent:!0,depthMask:!1}),g.__colorMaterial=g.material),g.material.enableTexture("diffuseMap");var m=r.get("distance"),v=o+(null==m?n.radius/100:m);g.scale.set(v,v,v),o=v;var y=this._blankTexture||(this._blankTexture=Jo.createBlankTexture("rgba(255, 255, 255, 0)"));g.material.set("diffuseMap",y),Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(g),g.material.set("diffuseMap",t),e.getZr().refresh()})),r.get("show")?this.groupGL.add(g):this.groupGL.remove(g)}}),this);var h=this._earthMesh.material;h.define("fragment","LAYER_DIFFUSEMAP_COUNT",a.length),h.define("fragment","LAYER_EMISSIVEMAP_COUNT",l.length),h.set("layerDiffuseMap",a),h.set("layerDiffuseIntensity",s),h.set("layerEmissiveMap",l),h.set("layerEmissionIntensity",u);var c=t.getModel("debug.wireframe");if(c.get("show")){h.define("both","WIREFRAME_TRIANGLE");var d=Jo.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)"),p=Mr(c.get("lineStyle.width"),1);h.set("wireframeLineWidth",p),h.set("wireframeLineColor",d)}else h.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var n=t.coordinateSystem,i=t.getModel("viewControl"),r=(n.viewGL.camera,this),o=this._control;o.setViewGL(n.viewGL);var a,s,l=i.get("targetCoord");null!=l&&(s=l[0]+90,a=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:a,beta:s}),o.off("update"),o.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var n=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||n!==this._displacementQuality||i!==this._showDebugWireframe){this._displacementQuality=n,this._showDebugWireframe=i;var o=this._sphereGeometry,a={low:100,medium:200,high:400,ultra:800}[n]||200,s=a/2;(o.widthSegments!==a||i)&&(o.widthSegments=a,o.heightSegments=s,o.build()),this._doDisplaceVertices(o,r),i&&o.generateBarycentric()}},_doDisplaceVertices:function(t,e){var n=t.attributes.position.value,i=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===n.length||((r=new Float32Array(n.length)).set(n),t.__originalPosition=r);for(var o=e.displacementWidth,a=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var a=[];Oh.perspective(a,Nh,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(a),this.viewGL.camera.decomposeProjectionMatrix(),a=Oh.identity([]);var s=this.dataToPoint(this.center);Oh.scale(a,a,[1,-1,1]),Oh.translate(a,a,[0,0,-t]),Oh.rotateX(a,a,e),Oh.rotateZ(a,a,-this.bearing/180*Math.PI),Oh.translate(a,a,[-s[0]*this.getScale()*Rh,-s[1]*this.getScale()*Rh,0]),this.viewGL.camera.viewMatrix.array=a;var l=[];Oh.invert(l,a),this.viewGL.camera.worldTransform.array=l,this.viewGL.camera.decomposeWorldTransform();var u,h=Eh*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var c=this.altitudeExtent[1]-this.altitudeExtent[0];u=this.boxHeight/c*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else u=h/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*Rh;this.viewGL.rootNode.scale.set(this.getScale()*Rh,this.getScale()*Rh,u)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*Eh,e)},projectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1]*kh/180,o=e*(i*kh/180+kh)/(2*kh),a=e*(kh-Math.log(Math.tan(kh/4+.5*r)))/(2*kh);return(n=n||[])[0]=o,n[1]=a,n},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*Eh,e)},unprojectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1],o=i/e*(2*kh)-kh,a=2*(Math.atan(Math.exp(kh-r/e*(2*kh)))-kh/4);return(n=n||[])[0]=180*o/kh,n[1]=180*a/kh,n},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,Eh,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}};const Bh=zh;function Zh(){Bh.apply(this,arguments)}function Fh(t,e,n){function i(t,e){var n=e.getWidth(),i=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,n,i,r),this.width=n,this.height=i,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function r(t,e){if("auto"!==this.model.get("boxHeight")){var n=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=t.coordDimToDataDim("alt")[0];if(i){var r=e.getDataExtent(i,!0);n[0]=Math.min(n[0],r[0]),n[1]=Math.max(n[1],r[1])}}}),this),n&&isFinite(n[1]-n[0])&&(this.altitudeExtent=n)}}return{dimensions:e.prototype.dimensions,create:function(o,a){var s=[];return o.eachComponent(t,(function(t){var n=t.__viewGL;n||(n=t.__viewGL=new Nl).setRootNode(new Jo.Node);var o=new e;o.viewGL=t.__viewGL,o.resize=i,o.resize(t,a),s.push(o),t.coordinateSystem=o,o.model=t,o.update=r})),o.eachSeries((function(e){if(e.get("coordinateSystem")===t){var n=e.getReferringComponents(t).models[0];if(n||(n=o.getComponent(t)),!n)throw new Error(t+' "'+Mr(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=n.coordinateSystem}})),n&&n(s,o,a),s}}}Zh.prototype=new Bh,Zh.prototype.constructor=Zh,Zh.prototype.type="mapbox3D";const Vh=Fh("mapbox3D",Zh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMapboxCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Ch),t.registerComponentView(Ph),t.registerCoordinateSystem("mapbox3D",Vh),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"mapbox3D",query:t},(function(e){e.setMapboxCameraOption(t)}))}))}));var Gh=["zoom","center","pitch","bearing"],Hh=i.ComponentModel.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return Gh.reduce((function(e,n){return e[n]=t.get(n),e}),{})},setMaptalksCameraOption:function(t){null!=t&&Gh.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});i.util.merge(Hh.prototype,da),i.util.merge(Hh.prototype,pa);const Uh=Hh;function Wh(t,e,n,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:n,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}Wh.prototype.setUnpainted=function(){},Wh.prototype.resize=function(){this._maptalks.checkSize()},Wh.prototype.getMaptalks=function(){return this._maptalks},Wh.prototype.clear=function(){},Wh.prototype.refresh=function(){this._maptalks.checkSize()};var jh=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];Wh.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},jh.forEach((function(e){this._handlers[e]=function(n){var i={};for(var r in n)i[r]=n[r];i.bubbles=!1;var o=new n.constructor(n.type,i);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(o):t.firstElementChild.dispatchEvent(o)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},Wh.prototype.dispose=function(){jh.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()};const Xh=Wh;Jo.Shader.import(Lh);const Yh=i.ComponentView.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new Jo.Mesh({geometry:new Jo.PlaneGeometry,material:new Jo.Material({shader:new Jo.Shader({vertex:Jo.Shader.source("ecgl.displayShadow.vertex"),fragment:Jo.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var n=e.getZr();this._zrLayer=new Xh("maptalks3D",n,t.get("center"),t.get("zoom")),n.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach((function(t){i.on(t,r)}))},render:function(t,e,n){this._zrLayer||this._initMaptalksLayer(t,n);var i=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),o=i.getBaseLayer();r!==this._oldUrlTemplate&&(o?o.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(o=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(o))),this._oldUrlTemplate=r,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var a=t.coordinateSystem;a.viewGL.scene.add(this._lightRoot),a.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(a.viewGL.scene),this._sceneHelper.updateLight(t),a.viewGL.setPostEffect(t.getModel("postEffect"),n),a.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,n,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),n.getZr().refresh()},_dispatchInteractAction:function(t,e,n){var i;t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:(i=e.getResolution(),19-Math.log(i/qh)/Math.LN2+1),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var n=new Jo.Plane(new Jo.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new Jo.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new Jo.Vector2(1,1)),o=i.intersectPlane(n),a=r.intersectPlane(n),s=o.dist(a)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),qh=12756274*Math.PI/(256*Math.pow(2,20));function Kh(){Bh.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}Kh.prototype=new Bh,Kh.prototype.constructor=Kh,Kh.prototype.type="maptalks3D";const Jh=Fh("maptalks3D",Kh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMaptalksCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Uh),t.registerComponentView(Yh),t.registerCoordinateSystem("maptalks3D",Jh),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"maptalks3D",query:t},(function(e){e.setMaptalksCameraOption(t)}))}))}));var Qh=Pa.vec3,$h=i.helper.dataStack.isDimensionStacked;function tc(t,e,n){for(var i=t.getDataExtent(e),r=t.getDataExtent(n),o=i[1]-i[0]||i[0],a=r[1]-r[0]||r[0],s=new Uint8Array(2500),l=0;l0&&d>0||c<0&&d<0)),g=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),m=$h(n,g[2]),v=m?n.getCalculationInfo("stackResultDimension"):g[2];n.each(g,(function(t,i,o,a){var s=n.get(v,a),l=m?s-o:f?0:p[0],u=e.dataToPoint([t,i,l]),h=e.dataToPoint([t,i,s]),c=Qh.dist(u,h),d=[0,h[1]"+o.join("
")}(o):i.format.encodeHTML(i.format.addCommas(o)),s=r.getName(e),l=Nu(r,e);i.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=i.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?i.format.encodeHTML(h)+(n?": ":"
"):"",n?u+h+a:h+u+(s?i.format.encodeHTML(s)+": "+a:a)}function sc(t,e,n){n=n||t.getSource();var r=e||i.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],o=i.helper.createDimensions(n,{dimensionsDefine:n.dimensionsDefine||t.get("dimensions"),encodeDefine:n.encodeDefine||t.get("encode"),coordDimensions:r.map((function(e){var n=t.getReferringComponents(e+"Axis3D").models[0];return{type:n&&"category"===n.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&o.forEach((function(e){if(r.indexOf(e.coordDim)>=0){var n=t.getReferringComponents(e.coordDim+"Axis3D").models[0];n&&"category"===n.get("type")&&(e.ordinalMeta=n.getOrdinalMeta())}}));var a=i.helper.dataStack.enableDataStack(t,o,{byIndex:!0,stackedCoordDimension:"z"}),s=new i.List(o,t);return s.setCalculationInfo(a),s.initData(n),s}var lc=i.SeriesModel.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);return null==r&&(r=this.getData().get("z",t)),r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});i.util.merge(lc.prototype,Kl);const uc=lc;var hc,cc,dc,pc,fc,gc,mc,vc,yc=Pa.vec3,_c=Pa.mat3,xc=Hn.extend((function(){return{attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR"),prevPosition:new Hn.Attribute("prevPosition","float",3),prevNormal:new Hn.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,n=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==n&&(this.attributes.position.init(n),e?this.attributes.normal.init(n):this.attributes.normal.value=null,this.attributes.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i),this._dataIndices=new Uint32Array(n))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var n=this.getBarVertexCount(),i=n*(t+1),r=n*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,v);else{yc.copy(r,c),yc.normalize(r,r),yc.cross(o,g,r),yc.normalize(o,o),yc.cross(i,r,o),yc.normalize(o,o),yc.negate(a,i),yc.negate(s,r),yc.negate(l,o),e(u[0],t,i,m[0]/2),e(u[0],u[0],o,m[2]/2),e(u[1],t,i,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,a,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,a,m[0]/2),e(u[3],u[3],o,m[2]/2),e(n,t,r,m[1]),e(u[4],n,i,m[0]/2),e(u[4],u[4],o,m[2]/2),e(u[5],n,i,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],n,a,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],n,a,m[0]/2),e(u[7],u[7],o,m[2]/2);var x=this.attributes;if(this.enableNormal){h[0]=i,h[1]=a,h[2]=r,h[3]=s,h[4]=o,h[5]=l;for(var b=this._vertexOffset,w=0;w0&&(p++,h[3]<.99&&(f=!0))}})),a.geometry.setBarCount(p);var g=n.getLayout("orient"),m=this._barIndexOfData=new Int32Array(n.count());p=0,n.each((function(t){if(n.hasValue(t)){var e=n.getItemLayout(t),i=e[0],r=e[1],a=e[2],s=4*t;h[0]=c[s++],h[1]=c[s++],h[2]=c[s++],h[3]=c[s++],h[3]>0&&(o._barMesh.geometry.addBar(i,r,g,a,h,t),m[t]=p++)}else m[t]=-1})),a.geometry.dirty(),a.geometry.updateBoundingBox();var v=a.material;v.transparent=f,v.depthMask=!f,a.geometry.sortTriangles=f,this._initHandler(t,e)},_initHandler:function(t,e){var n=t.getData(),i=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=i.geometry.getDataIndexOfVertex(t.triangle[0]);a!==o&&(this._downplay(o),this._highlight(a),this._labelsBuilder.updateLabels([a]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",a),n.get("y",a),n.get("z",a,!0)]})),o=a,i.dataIndex=a}),this),i.on("mouseout",(function(t){this._downplay(o),this._labelsBuilder.updateLabels(),o=-1,i.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var r=e.getItemModel(t).getModel("emphasis.itemStyle"),o=r.get("color"),a=r.get("opacity");if(null==o){var s=Nu(e,t);o=i.color.lift(s,-.4)}null==a&&(a=ku(e,t));var l=Jo.parseColor(o);l[3]*=a,this._barMesh.geometry.setColor(n,l),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=Nu(e,t),r=ku(e,t),o=Jo.parseColor(i);o[3]*=r,this._barMesh.geometry.setColor(n,o),this._api.getZr().refresh()}}},highlight:function(t,e,n,i){this._toggleStatus("highlight",t,e,n,i)},downplay:function(t,e,n,i){this._toggleStatus("downplay",t,e,n,i)},_toggleStatus:function(t,e,n,r,o){var a=e.getData(),s=Cr(a,o),l=this;null!=s?i.util.each(oc.normalizeToArray(s),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):a.each((function(e){"highlight"===t?l._highlight(e):l._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Sc),t.registerSeriesModel(uc),rc(t),t.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))}));const Tc=i.SeriesModel.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return sc(this)},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}});function Mc(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||o=0){var m=3*l,v=new ye(this._points[m],this._points[m+1],this._points[m+2]);o.push({dataIndex:l,point:v,pointWorld:v.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(v)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Ac),t.registerSeriesModel(Tc),t.registerLayout((function(t,e){t.eachSeriesByType("line3D",(function(t){var e=t.getData(),n=t.coordinateSystem;if(n){if("cartesian3D"!==n.type)return;var i=new Float32Array(3*e.count()),r=[],o=[],a=n.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]}));n&&e.each(a,(function(t,e,a,s){r[0]=t,r[1]=e,r[2]=a,n.dataToPoint(r,o),i[3*s]=o[0],i[3*s+1]=o[1],i[3*s+2]=o[2]})),e.setLayout("points",i)}}))}))}));const Ic=i.SeriesModel.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function Dc(t,e,n){(e=e||document.createElement("canvas")).width=t,e.height=t;var i=e.getContext("2d");return n&&n(i),e}var Lc={getMarginByStyle:function(t){var e=t.minMargin||0,n=0;t.stroke&&"none"!==t.stroke&&(n=null==t.lineWidth?1:t.lineWidth);var i=t.shadowBlur||0,r=t.shadowOffsetX||0,o=t.shadowOffsetY||0,a={};return a.left=Math.max(n/2,-r+i,e),a.right=Math.max(n/2,r+i,e),a.top=Math.max(n/2,-o+i,e),a.bottom=Math.max(n/2,o+i,e),a},createSymbolSprite:function(t,e,n,r){var o=function(t,e,n,r){i.util.isArray(e)||(e=[e,e]);var o=Lc.getMarginByStyle(n,void 0),a=e[0]+o.left+o.right,s=e[1]+o.top+o.bottom,l=i.helper.createSymbol(t,0,0,e[0],e[1]),u=Math.max(a,s);l.x=o.left,l.y=o.top,a>s?l.y+=(u-s)/2:l.x+=(u-a)/2;var h=l.getBoundingRect();return l.x-=h.x,l.y-=h.y,l.setStyle(n),l.update(),l.__size=u,l}(t,e,n),a=Lc.getMarginByStyle(n);return{image:Dc(o.__size,r,(function(t){i.innerDrawElementOnCanvas(t,o)})),margin:a}},createSDFFromCanvas:function(t,e,n,i){return Dc(e,i,(function(e){var i=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,n){var i=e.width,r=e.height,o=t.canvas.width,a=t.canvas.height,s=i/o,l=r/a;function u(t){return t<128?1:-1}function h(t,o){var a=1/0;t=Math.floor(t*s);for(var h=(o=Math.floor(o*l))*i+t,c=u(e.data[4*h]),d=Math.max(o-n,0);d=2e4},doSortVertices:function(t,e){var n=this.indices,i=Oc.create();if(!n){n=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var r=0;r.05);else for(r=0;r<3;r++)this._progressiveQuickSort(3*e+r);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,n=this.indices;function i(t,n){return e[n]-e[t]}t?Array.prototype.sort.call(n,i):Iu.sort(n,i,0,n.length-1)},_progressiveQuickSort:function(t){var e=this._zList,n=this.indices;this._quickSort=this._quickSort||new Iu,this._quickSort.step(n,(function(t,n){return e[n]-e[t]}),t)}};var Nc=Pa.vec4;Jo.Shader.import("@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end");const kc=Jo.Mesh.extend((function(){var t=new Jo.Geometry({dynamic:!0,attributes:{color:new Jo.Geometry.Attribute("color","float",4,"COLOR"),position:new Jo.Geometry.Attribute("position","float",3,"POSITION"),size:new Jo.Geometry.Attribute("size","float",1),prevPosition:new Jo.Geometry.Attribute("prevPosition","float",3),prevSize:new Jo.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,Ec);var e=new Jo.Material({shader:Jo.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var n=new Jo.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",n),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:Jo.Mesh.POINTS,sizeScale:1}}),{_pick:function(t,e,n,i,r,o){var a=this._positionNDC;if(a)for(var s=n.viewport,l=2/s.width,u=2/s.height,h=this.geometry.vertexCount-1;h>=0;h--){var c,d=a[2*(c=this.geometry.indices?this.geometry.indices[h]:h)],p=a[2*c+1],f=this.geometry.attributes.size.get(c)/this.sizeScale/2;if(t>d-f*l&&tp-f*u&&e2?(f=this._updateSymbolSprite(t,d,h,c),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(r-i);var g=[];if(p){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var m=function(t){const e=t.getVisual("style");if(e)return e[t.getVisual("drawType")]}(a),v=function(t){return t.getVisual("style").opacity}(a);Jo.parseColor(m,g),g[3]*=v,s.set({color:g,u_Size:h.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(r-i),u.color.init(r-i),this._originalOpacity=new Float32Array(r-i);for(var y=a.getLayout("points"),_=u.position.value,x=0;x1?(a[0]=n.maxSize,a[1]=n.maxSize/n.aspect):(a[1]=n.maxSize,a[0]=n.maxSize*n.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===n.type&&(o=a,(r=this._symbolSize)&&o&&r[0]===o[0]&&r[1]===o[1])&&this._lineWidth===e.lineWidth||(Pc.createSymbolSprite(n.type,a,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),Pc.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=n.type,this._symbolSize=a,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/n.maxSize*i},_updateMaterial:function(t,e){var n="lighter"===t.get("blendMode")?Jo.additiveBlend:null,i=this._mesh.material;i.blend=n,i.set("lineWidth",e.lineWidth/20);var r=Jo.parseColor(e.stroke);i.set("strokeColor",r),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,n){var i=t.getData(),r=this._mesh.geometry,o=r.attributes.position.value,a=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(i,e,n),this._labelsBuilder.getLabelPosition=function(t,n,i){var r=3*(t-e);return[o[r],o[r+1],o[r+2]]},this._labelsBuilder.getLabelDistance=function(t,n,i){return r.attributes.size.get(t-e)/a/2+i},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,n){var i,r=t.getData(),o=this._mesh,a=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(i=t.coordinateSystem.model),o.seriesIndex=t.seriesIndex,o.off("mousemove"),o.off("mouseout"),o.on("mousemove",(function(e){var u=e.vertexIndex+a._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&n.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:i.componentIndex})),o.dataIndex=u,s=u}),this),o.on("mouseout",(function(t){var e=t.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,o.dataIndex=-1,l&&n.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:i.componentIndex})}),this)},updateLayout:function(t,e,n){var i=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,o=i.getLayout("points");if(this.is2D)for(var a=0;athis._endDataIndex||ethis._endDataIndex||e 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end");const od=Jo.Mesh.extend((function(){var t=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.trail2.vertex"),Jo.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new ka({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,n){var i=t.hostModel,r=this.geometry,o=i.getModel("effect"),a=o.get("trailWidth")*e.getDevicePixelRatio(),s=o.get("trailLength"),l=i.get("effect.constantSpeed"),u=1e3*i.get("effect.period"),h=null!=l;h?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[h?"define":"undefine"]("vertex","CONSTANT_SPEED");var c=i.get("polyline");r.trailLength=s,this.material.set("trailLength",s),r.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){r.attributes[t].value=n.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){r.attributes[t].init(r.vertexCount)})),r.indices=n.indices;var d=[],p=o.get("trailColor"),f=o.get("trailOpacity"),g=null!=p,m=null!=f;this.updateWorldTransform();var v=this.worldTransform.x.len(),y=this.worldTransform.y.len(),_=this.worldTransform.z.len(),x=0,b=0;t.each((function(e){var i=t.getItemLayout(e),o=m?f:ku(t,e),s=Nu(t,e);null==o&&(o=1),(d=Jo.parseColor(g?p:s,d))[3]*=o;for(var l=c?n.getPolylineVertexCount(i):n.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),w=0,S=[],T=[],M=x;Mx&&(w+=rd.dist(S,T)),r.attributes.dist.set(M,w),rd.copy(T,S);b=Math.max(b,w);var C=Math.random()*(h?w:u);for(M=x;M0?1:-1)*a/2),r.attributes.color.set(M,d);x+=l})),this.material.set("spotSize",.1*b*s),this.material.set("spotIntensity",o.get("spotIntensity")),r.dirty()},setAnimationTime:function(t){this.material.set("time",t)}});Jo.Shader.import(is);const ad=i.ChartView.extend({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this._meshLinesMaterial=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new Jo.Mesh({geometry:new ka,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new od},render:function(t,e,n){this.groupGL.add(this._linesMesh);var i=t.coordinateSystem,r=t.getData();if(i&&i.viewGL){i.viewGL.add(this.groupGL),this._updateLines(t,e,n);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var a=this._trailMesh;if(a.stopAnimation(),t.get("effect.show")){this.groupGL.add(a),a.updateData(r,n,this._linesMesh.geometry),a.__time=a.__time||0;var s=36e5;this._curveEffectsAnimator=a.animate("",{loop:!0}).when(s,{__time:s}).during((function(){a.setAnimationTime(a.__time)})).start()}else this.groupGL.remove(a),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?Jo.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,n){var i=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,a=t.get("polyline");o.expandLine=!0;var s=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=s/20;var l="lineStyle.width".split("."),u=n.getDevicePixelRatio(),h=0;i.each((function(t){var e=i.getItemModel(t).get(l);null==e&&(e=1),i.setItemVisual(t,"lineWidth",e),h=Math.max(e,h)})),o.useNativeLine=!1;var c=0,d=0;i.each((function(t){var e=i.getItemLayout(t);a?(c+=o.getPolylineVertexCount(e),d+=o.getPolylineTriangleCount(e)):(c+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),d+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(c),o.setTriangleCount(d),o.resetOffset();var p=[];i.each((function(t){var e=i.getItemLayout(t),n=Nu(i,t),r=ku(i,t),s=i.getItemVisual(t,"lineWidth")*u;null==r&&(r=1),(p=Jo.parseColor(n,p))[3]*=r,a?o.addPolyline(e,p,s):o.addCubicCurve(e[0],e[1],e[2],e[3],p,s)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function sd(t,e){for(var n=[],i=0;i0;this._updateSurfaceMesh(this._surfaceMesh,t,h,p);var f=this._surfaceMesh.material;p?(f.define("WIREFRAME_QUAD"),f.set("wireframeLineWidth",d),f.set("wireframeLineColor",Jo.parseColor(c.get("lineStyle.color")))):f.undefine("WIREFRAME_QUAD"),this._initHandler(t,n),this._updateAnimation(t)},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new Jo.Mesh({geometry:new Jo.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.sm.depth.vertex"),Jo.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,Eu),t},_initHandler:function(t,e){var n=t.getData(),i=this._surfaceMesh,r=t.coordinateSystem;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=function(t,e){for(var n=1/0,r=-1,o=[],a=0;a=0){var s=[];i.geometry.attributes.position.get(a,s);for(var l=r.pointToData(s),u=1/0,h=-1,c=[],d=0;d65535?Uint32Array:Uint16Array)((f-1)*(g-1)*6),w=function(t,e,n){n[1]=t*g+e,n[0]=t*g+e+1,n[3]=(t+1)*g+e+1,n[2]=(t+1)*g+e},S=!1;if(l){var T=[],M=[],C=0;m?h.init(r.vertexCount):h.value=null;for(var A=[[],[],[]],I=[],D=[],L=pd.create(),P=function(t,e,n){var i=3*e;return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n},O=new Float32Array(a.length),E=new Float32Array(a.length/3*4),N=0;N0;){if(Math.floor(s/h)===s/h)return[h,s/h];h--}return[h=Math.floor(Math.sqrt(s)),h]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function gd(t,e){for(var n=[],i=0;i=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof Cd||(e=this._nodesMap[Td(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}yo(Cd,Id("hostGraph","data")),yo(Ad,Id("hostGraph","edgeData"));const Dd=Md;var Ld=va();function Pd(t,e){if(Ld(this).mainData===this){var n=vo({},Ld(this).datas);n[this.dataType]=e,Rd(e,n,t)}else zd(e,this.dataType,Ld(this).mainData,t);return e}function Od(t,e){return t.struct&&t.struct.update(),e}function Ed(t,e){return xo(Ld(e).datas,(function(n,i){n!==e&&zd(n.cloneShallow(),i,e,t)})),e}function Nd(t){var e=Ld(this).mainData;return null==t||null==e?e:Ld(e).datas[t]}function kd(){var t=Ld(this).mainData;return null==t?[{data:t}]:bo(wo(Ld(t).datas),(function(e){return{type:e,data:Ld(t).datas[e]}}))}function Rd(t,e,n){Ld(t).datas={},xo(e,(function(e,i){zd(e,i,t,n)}))}function zd(t,e,n,i){Ld(n).datas[e]=t,Ld(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Nd,t.getLinkedDataAll=kd}var Bd=i.SeriesModel.extend({type:"series.graphGL",visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,init:function(t){Bd.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){Bd.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},getInitialData:function(t,e){var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&n)return function(t,e,n,r,o){for(var a=new Dd(!0),s=0;s "+f)),c++)}var g=i.helper.createDimensions(t,{coordDimensions:["value"]});(l=new i.List(g,n)).initData(t);var m,v,y,_=new i.List(["value"],n);return _.initData(h,u),o&&o(l,_),v=(m={mainData:l,struct:a,structAttr:"graph",datas:{node:l,edge:_},datasAttr:{node:"data",edge:"edgeData"}}).mainData,(y=m.datas)||(y={main:v},m.datasAttr={main:"data"}),m.datas=m.mainData=null,Rd(v,y,m),xo(y,(function(t){xo(v.TRANSFERABLE_METHODS,(function(e){t.wrapMethod(e,So(Pd,m))}))})),v.wrapMethod("cloneShallow",So(Ed,m)),xo(v.CHANGABLE_METHODS,(function(t){v.wrapMethod(t,So(Od,m))})),function(t,e){if(!t)throw new Error(void 0)}(y[v.dataType]===v),a.update(),a}(r,n,this,0,(function(t,n){t.wrapMethod("getItemModel",(function(t){const e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));const i=e.getModel([]).getModel;function r(t,e){const n=i.call(this,t,e);return n.resolveParentPath=a,n}function a(t){if(t&&("label"===t[0]||"label"===t[1])){const e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=a,t.getModel=r,t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(t,n),a=r.graph.getEdgeByIndex(t),s=r.getName(a.node1.dataIndex),l=r.getName(a.node2.dataIndex),u=[];return null!=s&&u.push(s),null!=l&&u.push(l),u=i.format.encodeHTML(u.join(" > ")),o.value&&(u+=" : "+i.format.encodeHTML(o.value)),u}return Bd.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:Object.assign({value:0},t)})),e=new i.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Fd.dist(t,e)+Fd.dist(n,e)+Fd.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Vd)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Vd)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=e[0],u=e[1],h=n[0],c=n[1],d=i[0],p=i[1],f=this._getCubicCurveApproxStep(t,e,n,i),g=f*f,m=g*f,v=3*f,y=3*g,_=6*g,x=6*m,b=a-2*l+h,w=s-2*u+c,S=3*(l-h)-a+d,T=3*(u-c)-s+p,M=a,C=s,A=(l-a)*v+b*y+S*m,I=(u-s)*v+w*y+T*m,D=b*_+S*x,L=w*_+T*x,P=S*x,O=T*x,E=0,N=0,k=Math.ceil(1/f),R=new Float32Array(3*(k+1)),z=(R=[],0);for(N=0;N1&&(M=A>0?Math.min(M,d):Math.max(M,d),C=I>0?Math.min(C,p):Math.max(C,p));this.addPolyline(R,r,o)},addLine:function(t,e,n,i){this.addPolyline([t,e],n,i)},addPolyline:function(){var t=Fd.create(),e=Fd.create(),n=Fd.create(),i=Fd.create(),r=[],o=[],a=[];return function(s,l,u,h,c){if(s.length){var d="number"!=typeof s[0];if(null==c&&(c=d?s.length:s.length/2),!(c<2)){null==h&&(h=0),null==u&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,f=d?"number"!=typeof l[0]:l.length/4===c,g=this.attributes.position,m=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,_=this.indices,x=this._vertexOffset,b=0;b1&&(g.copy(x,x-1),m.copy(x,x-1),x++);else{var T;if(b0){Fd.sub(t,r,a),Fd.sub(e,o,r),Fd.normalize(t,t),Fd.normalize(e,e),Fd.add(i,t,e),Fd.normalize(i,i);var M=u/2*Math.min(1/Fd.dot(t,i),2);n[0]=-i[1],n[1]=i[0],T=M}else Fd.sub(t,o,r),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;else Fd.sub(t,r,a),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;y.set(x,n),y.set(x+1,n),v.set(x,T),v.set(x+1,-T),Fd.copy(a,r),g.set(x,r),g.set(x+1,r),m.set(x,p),m.set(x+1,p),x+=2}if(this.useNativeLine)m.set(x,p),g.set(x,r),x++;else if(b>0){var C=3*this._faceOffset;(_=this.indices)[C]=x-4,_[C+1]=x-3,_[C+2]=x-2,_[C+3]=x-3,_[C+4]=x-1,_[C+5]=x-2,this._faceOffset+=2}}this._vertexOffset=x}}}}(),setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=t 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end");var Ud={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function Wd(t){var e={type:Jo.Texture.FLOAT,minFilter:Jo.Texture.NEAREST,magFilter:Jo.Texture.NEAREST};this._positionSourceTex=new Jo.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new Jo.Texture2D(e),this._positionPrevTex=new Jo.Texture2D(e),this._forceTex=new Jo.Texture2D(e),this._forcePrevTex=new Jo.Texture2D(e),this._weightedSumTex=new Jo.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new Jo.Texture2D(e),this._globalSpeedPrevTex=new Jo.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new fr({fragment:Jo.Shader.source("clay.compositor.output")});var n=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node1:new Jo.Geometry.Attribute("node1","float",2),node2:new Jo.Geometry.Attribute("node2","float",2),weight:new Jo.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._weightedSumMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._framebuffer=new Zi({depthBuffer:!1}),this._dummyCamera=new Jo.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}Wd.prototype.updateOption=function(t){for(var e in Ud)this[e]=Ud[e];var n=this._nodes.length;if(this.jitterTolerence=n>5e4?10:n>5e3?1:.1,this.scaling=n>100?2:10,t)for(var e in Ud)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,r=0;rt},Wd.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},Wd.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},Wd.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(n){this[n].width=t,this[n].height=e,this[n].dirty()}),this)},Wd.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};const jd=Wd;var Xd=function(){var t=function(){return new Float32Array(2)},e=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},n=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},r=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a=function(t,e,n){return t[0]=e,t[1]=n,t};function s(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var l=s.prototype;function u(){this.position=new Float32Array(2),this.force=t(),this.forcePrev=t(),this.mass=1,this.inDegree=0,this.outDegree=0}function h(t,e){this.source=t,this.target=e,this.weight=1}function c(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new s,this.rootRegion.centerOfMass=t(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}l.beforeUpdate=function(){for(var t=0;t=t&&this.bbox[1]<=e&&this.bbox[3]>=e},l.setBBox=function(t,e,n,i){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=n,this.bbox[3]=i,this.size=(n-t+i-e)/2},l._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new s,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},l._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),n=this.bbox;if(!e){var i=(n[0]+n[2])/2,r=(n[1]+n[3])/2,o=(n[2]-n[0])/2,a=(n[3]-n[1])/2,s=t.position[0]>=i?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*o+n[0],l*a+n[1],(s+1)*o+n[0],(l+1)*a+n[1])}e.addNode(t)},l._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,n=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,n+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=n/this.mass};var d=c.prototype;d.initNodes=function(t,e,n){var i=e.length;this.nodes.length=0;for(var r=void 0!==n,o=0;o0&&(this.strongGravityMode?this.applyNodeStrongGravity(c):this.applyNodeGravity(c))}for(u=0;u0&&(v=Math.min(v/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=v,u=0;u0&&(_=Math.min(x*_,10)/x,i(h.position,h.position,h.force,_))}},d.applyRegionToNodeRepulsion=function(){var e=t();return function(t,n){if(t.node)this.applyNodeToNodeRepulsion(t.node,n,!0);else{o(e,n.position,t.centerOfMass);var r=e[0]*e[0]+e[1]*e[1];if(r>this.barnesHutTheta*t.size*t.size){var a=this.scaling*n.mass*t.mass/r;i(n.force,n.force,e,a)}else for(var s=0;s0)s=this.scaling*t.mass*n.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*n.mass}}else s=this.scaling*t.mass*n.mass/a;i(t.force,t.force,e,s),i(n.force,n.force,e,-s)}}}}(),d.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,a=t.target;o(e,r.position,a.position);var s,l,u=n(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-a.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,i(r.force,r.force,e,l),i(a.force,a.force,e,-l))}}(),d.applyNodeGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position);var r=n(e);i(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),d.applyNodeStrongGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position),i(t.force,t.force,e,this.gravity*t.mass)}}(),d.updateBBox=function(){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,r=0;r5e4?10:o>5e3?1:.1,e.scaling=o>100?2:10,e.barnesHutOptimize=o>1e3,t)for(var n in Yd)null!=t[n]&&(e[n]=t[n]);if(!e.gravityCenter){for(var a=[1/0,1/0],s=[-1/0,-1/0],l=0;lt},qd.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var n=0;n0?1.1:.9,o=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=o/this._zoom;var a=this._convertPos(n,i),s=(a.x-this._dx)*(r-1),l=(a.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=o,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}});var Qd=Pa.vec2;Jo.Shader.import("@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end");var $d=1;const tp=i.ChartView.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this.viewGL=new Nl("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new zc(!0,e),this._forceEdgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2),color:new Jo.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:Jo.Mesh.LINES}),this._edgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Hd({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new Jd({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,n){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=n,this._initLayout(t,e,n),this._pointsBuilder.update(t,e,n),this._forceLayoutInstance instanceof jd||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,n),this._control.off("update"),this._control.on("update",(function(){n.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(Mr(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),n.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?n.getZr().on("click",this._clickHandler):"mouseover"===r&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var n=this._forceEdgesMesh.geometry,i=e.getEdgeData(),r=0,o=this._forceLayoutInstance,a=2*i.count();n.attributes.node.init(a),n.attributes.color.init(a),i.each((function(e){var a=t[e];n.attributes.node.set(r,o.getNodeUV(a.node1)),n.attributes.node.set(r+1,o.getNodeUV(a.node2));var s=Nu(i,a.dataIndex),l=Jo.parseColor(s);l[3]*=Mr(ku(i,a.dataIndex),1),n.attributes.color.set(r,l),n.attributes.color.set(r+1,l),r+=2})),n.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,n=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var i=[],r=[],o=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(a){var s=t.graph.getEdgeByIndex(a),l=2*s.node1.dataIndex,u=2*s.node2.dataIndex;i[0]=n[l],i[1]=n[l+1],r[0]=n[u],r[1]=n[u+1];var h=Nu(t,s.dataIndex),c=Jo.parseColor(h);c[3]*=Mr(ku(t,s.dataIndex),1);var d=t.getItemModel(s.dataIndex),p=Mr(d.get(o),1)*this._api.getDevicePixelRatio();e.addLine(i,r,c,p);for(var f=0;f<4;f++)this._originalEdgeColors[4*s.dataIndex+f]=c[f];this._edgeIndicesMap[s.dataIndex]=a}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),n=[],i=0;i=p&&(l._syncNodePosition(t),d=0),n.getZr().refresh(),Qo((function(){f(e)}))}))};Qo((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),f(u)})),this._layouting=!0}}},stopLayout:function(t,e,n,i){i&&null!=i.from&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,n)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,n){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,n),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData();this._downplayAll();var o=i.dataIndex,a=r.graph,s=[],l=a.getNodeByIndex(o);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,n,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),n=Jo.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=Mr(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);n[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],n)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(ep=[],function(t,e){this._getColor(t,ep),ep[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],ep)}),_getColor:function(t,e){for(var n=0;n<4;n++)e[n]=this._originalEdgeColors[4*t+n];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var n=this.viewGL.camera,i=t.getData().getLayout("points"),r=Qd.create(1/0,1/0),o=Qd.create(-1/0,-1/0),a=[],s=0;sn.left&&un.top)){var h=Math.max(o[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,n.left=r[0],n.top=l-c/2,n.bottom=l+c/2,n.right=h+r[0],n.near=0,n.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});var ep;function np(t){return t instanceof Array||(t=[t,t]),t}(0,i.use)((function(t){function e(){}t.registerChartView(tp),t.registerSeriesModel(Zd),t.registerVisual((function(t){const e={};t.eachSeriesByType("graphGL",(function(t){var n=t.getCategoriesData(),r=t.getData(),o={};n.each((function(i){var r=n.getName(i);o["ec-"+r]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),n.setItemVisual(i,"style",s);var l=["symbol","symbolSize","symbolKeepAspect"];for(let t=0;t65535?new Uint32Array(3*i):new Uint16Array(3*i))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});jt.import("@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n");var op=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Ln({type:Sn.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};op.prototype={constructor:op,init:function(){var t={type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1};this._spawnTexture=new Ln(t),this._particleTexture0=new Ln(t),this._particleTexture1=new Ln(t),this._frameBuffer=new Zi({depthBuffer:!1}),this._particlePass=new fr({fragment:jt.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new fr({fragment:jt.source("clay.compositor.downsample")});var e=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderPoints.vertex"),jt.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:Mn.POINTS,geometry:new Hn({dynamic:!0,mainAttribute:"texcoord0"})}),n=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderLines.vertex"),jt.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new rp,culling:!1}),i=new Mn({material:new lt({shader:new jt(jt.source("ecgl.color.vertex"),jt.source("ecgl.color.fragment"))}),geometry:new Gi});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=n,this._lastFrameFullQuadMesh=i,this._camera=new hr,this._thisFrameTexture=new Ln,this._lastFrameTexture=new Ln},setParticleDensity:function(t,e){for(var n=new Float32Array(t*e*4),i=0,r=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new Ln),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");return n.fillStyle="#fff",n.arc(t/2,t/2,t/2,0,2*Math.PI),n.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var n=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,o=this._width*this._supersampling,a=this._height*this._supersampling,s=0;s=359&&(r[0]>0&&(r[0]=0),o[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=Jo.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=Jo.Mesh.LINES),n=n||0,i=i||r.count(),s.resetOffset();var h=0,c=0,d=[],p=[],f=[],g=[],m=[],v=.3,y=.7;function _(){p[0]=d[0]*y+g[0]*v-(d[1]-g[1])*o,p[1]=d[1]*y+g[1]*v-(g[0]-d[0])*o,f[0]=d[0]*v+g[0]*y-(d[1]-g[1])*o,f[1]=d[1]*v+g[1]*y-(g[0]-d[0])*o}if(a||0!==o)for(var x=n;x{t.exports=i}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(468)})())},125:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Axis:()=>r.RD,ChartView:()=>r.TA,ComponentModel:()=>r.tF,ComponentView:()=>r.Ir,List:()=>r.aV,Model:()=>r.Hn,PRIORITY:()=>r.Hr,SeriesModel:()=>r.wJ,color:()=>r.$_,connect:()=>r.$j,dataTool:()=>r.Ok,dependencies:()=>r.HO,disConnect:()=>r.eU,disconnect:()=>r.zP,dispose:()=>r.B9,env:()=>r.OB,extendChartView:()=>r.Zy,extendComponentModel:()=>r.tv,extendComponentView:()=>r.Sp,extendSeriesModel:()=>r.Zr,format:()=>r.WU,getCoordinateSystemDimensions:()=>r.wL,getInstanceByDom:()=>r.JE,getInstanceById:()=>r.rp,getMap:()=>r.FU,graphic:()=>r.Q,helper:()=>r._y,init:()=>r.S1,innerDrawElementOnCanvas:()=>r.z$,matrix:()=>r.pI,number:()=>r.Rx,parseGeoJSON:()=>r.Nu,parseGeoJson:()=>r.pQ,registerAction:()=>r.zl,registerCoordinateSystem:()=>r.RS,registerLayout:()=>r.qR,registerLoading:()=>r.yn,registerLocale:()=>r.I2,registerMap:()=>r.je,registerPostInit:()=>r.sq,registerPostUpdate:()=>r.Br,registerPreprocessor:()=>r.ds,registerProcessor:()=>r.Pu,registerTheme:()=>r.aW,registerTransform:()=>r.rV,registerUpdateLifecycle:()=>r.YK,registerVisual:()=>r.Og,setCanvasCreator:()=>r.jQ,setPlatformAPI:()=>r.g2,throttle:()=>r.P2,time:()=>r.XV,use:()=>r.D$,util:()=>r.D5,vector:()=>r.xr,version:()=>r.i8,zrUtil:()=>r.gf,zrender:()=>r.x_});var i=n(8023),r=n(9060),o=n(6076);var a=n(12),s=n(655),l=n(8455),u=n(3321),h=n(1525),c=n(8154);const d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new c.Z,n=(0,h.th)("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=(0,h.th)(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(u.Z);var p=n(3051),f=n(8162),g=n(6351),m=n(9936);function v(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:(0,p.isNumber)(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=(0,p.map)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,m.M)(e,c[0])&&(d=!0,c[0]=f),(0,m.M)(e,c[1])&&(d=!0,c[1]=f),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function y(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var _=n(887);var x=n(4438),b=n(9266),w=n(6498),S=n(2234),T=n(327),M=n(4014),C=n(8554),A=Math.min,I=Math.max;function D(t,e){return isNaN(t)||isNaN(e)}function L(t,e,n,i,r,o,a,s,l){for(var u,h,c,d,p,f,g=n,m=0;m=r||g<0)break;if(D(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),c=v,d=y;else{var _=v-u,x=y-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===y&&m=i||D(w,S))p=v,f=y;else{C=w-u,L=S-h;var E=v-u,N=w-v,k=y-h,R=S-y,z=void 0,B=void 0;if("x"===s){var Z=C>0?1:-1;p=v-Z*(z=Math.abs(E))*a,f=y,P=v+Z*(B=Math.abs(N))*a,O=y}else if("y"===s){var F=L>0?1:-1;p=v,f=y-F*(z=Math.abs(k))*a,P=v,O=y+F*(B=Math.abs(R))*a}else z=Math.sqrt(E*E+k*k),p=v-C*a*(1-(M=(B=Math.sqrt(N*N+R*R))/(B+z))),f=y-L*a*(1-M),O=y+L*a*M,P=A(P=v+C*a*M,I(w,v)),O=A(O,I(S,y)),P=I(P,A(w,v)),f=y-(L=(O=I(O,A(S,y)))-y)*z/B,p=A(p=v-(C=P-v)*z/B,I(u,v)),f=A(f,I(h,y)),P=v+(C=v-(p=I(p,A(u,v))))*B/z,O=y+(L=y-(f=I(f,A(h,y))))*B/z}t.bezierCurveTo(c,d,p,f,v,y),c=P,d=O}else t.lineTo(v,y)}u=v,h=y,g+=o}return m}var P=function(){this.smooth=0,this.smoothConstraint=!0},O=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new P},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&D(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(h-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++];var v=a?(0,C.kD)(n,u,c,p,t,s):(0,C.kD)(i,h,d,f,t,s);if(v>0)for(var y=0;y=0){m=a?(0,C.af)(i,h,d,f,_):(0,C.af)(n,u,c,p,_);return a?[t,m]:[m,t]}}n=p,i=f}}},e}(T.ZP),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e}(P),N=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new E},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&D(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=p.map(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord,r=(n-i)/(e.coord-i);return{coord:n,color:(0,H.lerp)(r,[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),f=d.length;if(!f&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";p.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:c[0]||"transparent"});var y=new x.Z(0,0,0,0,d,!0);return y[r]=g,y[r+"2"]=m,y}}}function K(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return p.each(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function J(t,e){return[t[2*e],t[2*e+1]]}function Q(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1);(0,V.A)(f).seriesIndex=t.seriesIndex,(0,B.k5)(f,R,z,Z);var F=X(t.get("smooth")),H=t.get("smoothMonotone");if(f.setShape({smooth:F,smoothMonotone:H,connectNulls:A}),g){var W=a.getCalculationInfo("stackedOnSeries"),j=0;g.useStyle(p.defaults(l.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),W&&(j=X(W.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:H,connectNulls:A}),(0,B.WO)(g,t,"areaStyle"),(0,V.A)(g).seriesIndex=t.seriesIndex,(0,B.k5)(g,R,z,Z)}var J=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=J)})),this._polyline.onHoverStateChange=J,this._data=a,this._coordSys=r,this._stackedOnPoints=M,this._points=u,this._step=P,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,f),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,e){(0,V.A)(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new g.Z(r,o)).x=l,s.y=u,s.setZ(h,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else k.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else k.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,B.Gl)(this._polyline,t),e&&(0,B.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new O({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new N({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");p.isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=p.isFunction(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],d=void 0,f=void 0,g=void 0;if(n)if(r){var m=n,v=e.pointToCoord(c);i?(d=m.startAngle,f=m.endAngle,g=-v[1]/180*Math.PI):(d=m.r0,f=m.r,g=v[0])}else{var y=n;i?(d=y.x,f=y.x+y.width,g=t.x):(d=y.y+y.height,f=y.y,g=t.y)}var _=f===d?0:(g-d)/(f-d);a&&(_=1-_);var x=p.isFunction(u)?u(o):l*_+h,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Q(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new w.ZP({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&((0,Z.ni)(o,(0,Z.k3)(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?(0,F.O)(r,n):(0,F.H)(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),T=w.range,M=T[1]-T[0],C=void 0;if(M>=1){if(M>1&&!c){var A=J(u,T[0]);s.attr({x:A[0]+_,y:A[1]+x}),r&&(C=h.getRawValue(T[0]))}else{(A=l.getPointOn(y,b))&&s.attr({x:A[0]+_,y:A[1]+x});var I=h.getRawValue(T[0]),D=h.getRawValue(T[1]);r&&(C=S.pk(n,d,I,D,w.t))}i.lastFrameIndex=T[0]}else{var L=1===t||i.lastFrameIndex>0?T[0]:0;A=J(u,L);r&&(C=h.getRawValue(L)),s.attr({x:A[0]+_,y:A[1]+x})}r&&(0,Z.qA)(s).setLabelText(C)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],d=[],p=[],f=[],g=[],m=v(r,e,a),x=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w3e3||l&&j(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:p}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),b.D(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),b.D(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],x=h.status,w=0;we&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;(0,p.isString)(r)?f=it[r]:(0,p.isFunction)(r)&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,rt))}}}}}var at=n(9093),st=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(u.Z);u.Z.registerClass(st);const lt=st;var ut=n(2151);const ht=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(){return(0,l.Z)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(lt);var ct=n(1177),dt=n(5151),pt=n(7214),ft=n(270),gt=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},mt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new gt},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,d=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,b.XD)(e,t,(0,V.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(k.Z),Tt={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=bt(e.x,t.x),s=wt(e.x+e.width,r),l=bt(e.y,t.y),u=wt(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=wt(e.r,t.r),o=bt(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Mt={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new dt.Z({shape:(0,p.extend)({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?vt:pt.C,h=new u({shape:i,z2:1});h.name="item";var c,d,p=Ot(r);if(h.calculateTextPosition=(c=p,d=({isRoundCap:u===vt}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return(0,yt.wI)(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,p=(u+h)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(u-h)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(r){case"startArc":x=s+(h-o)*y(m),b=l+(h-o)*_(m),w="center",S="top";break;case"insideStartArc":x=s+(h+o)*y(m),b=l+(h+o)*_(m),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+_t(f,o+v,!1),b=l+p*_(f)+xt(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+_t(f,-o+v,!1),b=l+p*_(f)+xt(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*y(m),b=l+p*_(m),w="center",S="middle";break;case"endArc":x=s+(u+o)*y(m),b=l+(u+o)*_(m),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*y(m),b=l+(u-o)*_(m),w="center",S="top";break;case"endAngle":x=s+p*y(g)+_t(g,o+v,!0),b=l+p*_(g)+xt(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(g)+_t(g,-o+v,!0),b=l+p*_(g)+xt(g,-o+v,!0),w="right",S="middle";break;default:return(0,yt.wI)(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?0:i.startAngle,g[f]=i[f],(s?b.D:b.KZ)(h,{shape:g},o)}return h}};function Ct(t,e,n,i,r,o,a,s){var l,u;o?(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||(a?b.D:b.KZ)(n,{shape:l},e,r,null);var h=e?t.baseAxis.model:null;(a?b.D:b.KZ)(n,{shape:u},h,r)}function At(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Ot(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Et(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=(0,Z.k3)(i);(0,Z.ni)(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:(0,F.H)(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=t.getTextContent();if(s&&d){var f=i.get(["label","position"]);t.textConfig.inside="middle"===f||null,function(t,e,n,i){if((0,p.isNumber)(i))t.setTextConfig({rotation:i});else if((0,p.isArray)(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===f?h:f,Ot(a),i.get(["label","rotate"]))}(0,Z.pe)(d,c,o.getRawValue(n),(function(t){return(0,F.O)(e,t)}));var g=i.getModel(["emphasis"]);(0,B.k5)(t,g.get("focus"),g.get("blurScope"),g.get("disabled")),(0,B.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",(0,p.each)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Nt=function(){},kt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);(0,V.A)(this).dataIndex=e>=0?e:null}),30,!1);function Bt(t,e,n){if(z(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}const Zt=St;var Ft=n(1891),Vt=n(5669),Gt=n(6172),Ht=2*Math.PI,Ut=Math.PI/180;function Wt(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jt(t,e){var n=Wt(t,e),i=t.get("center"),r=t.get("radius");p.isArray(r)||(r=[0,r]),p.isArray(i)||(i=[i,i]);var o=(0,Vt.GM)(n.width,e.getWidth()),a=(0,Vt.GM)(n.height,e.getHeight()),s=Math.min(o,a);return{cx:(0,Vt.GM)(i[0],o)+n.x,cy:(0,Vt.GM)(i[1],a)+n.y,r0:(0,Vt.GM)(r[0],s/2),r:(0,Vt.GM)(r[1],s/2)}}function Xt(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=Wt(t,n),o=jt(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*Ut,c=t.get("minAngle")*Ut,d=0;e.each(i,(function(t){!isNaN(t)&&d++}));var p=e.getSum(i),f=Math.PI/(p||d)*2,g=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),y=e.getDataExtent(i);y[0]=0;var _=Ht,x=0,b=h,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===p&&v?f:t*f:Ht/d)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-c)/2}}}function ne(t){return"center"===t.position}function ie(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*$t,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,d=s.height;function f(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),y=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),x=v.get("alignTo"),b=(0,Vt.GM)(v.get("edgeDistance"),u),w=v.get("bleedMargin"),S=m.getModel("labelLine"),T=S.get("length");T=(0,Vt.GM)(T,u);var M=S.get("length2");if(M=(0,Vt.GM)(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":P>0?"left":"right"}var Z=Math.PI,F=0,V=v.get("rotate");if((0,p.isNumber)(V))F=V*(Z/180);else if("center"===y)F=0;else if("radial"===V||!0===V){F=P<0?-L+Z:-L}else if("tangential"===V&&"outside"!==y&&"outer"!==y){var G=Math.atan2(P,O);G<0&&(G=2*Z+G),O>0&&(G=Z+G),F=G-Z}if(o=!!F,d.x=C,d.y=A,d.rotation=F,d.setStyle({verticalAlign:"middle"}),E){d.setStyle({align:D});var H=d.states.select;H&&(H.x+=d.x,H.y+=d.y)}else{var U=d.getBoundingRect().clone();U.applyTransform(d.getComputedTransform());var W=(d.style.margin||0)+2.1;U.y-=W/2,U.height+=W,r.push({label:d,labelLine:g,position:y,len:T,len2:M,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Kt.Z(P,O),linePoints:I,textAlign:D,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:E})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(k.Z);var se=n(5623),le=n(5101);function ue(t,e,n){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=(0,se.Z)(i,e).dimensions,o=new le.Z(r,t);return o.initData(i,n),o}var he=n(1772),ce=n(2019);const de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=(0,Vt.eJ)(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){S.Cc(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(u.Z);const pe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(u.Z);var fe=n(479),ge=function(){},me=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ge},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const ye=ve;const _e=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=(0,nt.Z)("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ye:new f.Z,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(k.Z);var xe=n(3166),be=n(8071);const we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(be.Z);var Se=n(6650),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",S.C6).models[0]},e.type="cartesian2dAxis",e}(be.Z);p.mixin(Te,Se.W);var Me={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Ce=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Me),Ae=p.merge({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}}},Me);const Ie={category:Ce,value:Ae,time:p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ae),log:p.defaults({logBase:10},Ae)};var De=n(1401),Le={value:1,category:1,time:1,log:1};function Pe(t,e,n,i){(0,p.each)(Le,(function(r,o){var a=(0,p.merge)((0,p.merge)({},Ie[o],!0),i,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return(0,s.ZT)(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,Gt.YD)(this),i=n?(0,Gt.tE)(t):{},r=e.getTheme();(0,p.merge)(t,r.get(o+"Axis")),(0,p.merge)(t,this.getDefaultOption()),t.type=Oe(t),n&&(0,Gt.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=De.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",Oe)}function Oe(t){return t.type||(t.data?"category":"value")}var Ee=n(7947);const Ne=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return p.map(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),p.filter(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var ke=n(2892),Re=n(5280),ze=["x","y"];function Be(t){return"interval"===t.type||"time"===t.type}const Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ze,e}return(0,s.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(Be(t)&&Be(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,d=this._transform=[l,0,0,u,h,c];this._invTransform=(0,ke.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,Re.applyTransform)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return(0,Re.applyTransform)(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new fe.Z(n,i,r,o)},e}(Ne);var Fe=n(2950),Ve=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Fe.Z);const Ge=Ve;var He=n(9069),Ue=n(5021),We=n(103),je=Math.log;function Xe(t,e,n){var i=We.Z.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=(0,Ee.Xv)(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var d=je(t.base);u=[je(u[0])/d,je(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],m=u[1];if(h&&c)f=(m-g)/a;else if(h)for(m=u[0]+f*a;mu[0]&&isFinite(g)&&isFinite(u[0]);)f=(0,Ue.r1)(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=(0,Ue.r1)(f));var v=f*a;m=Math.ceil(u[1]/f)*f,(g=(0,Vt.NM)(m-v))<0&&u[0]>=0?(g=0,m=(0,Vt.NM)(v)):m>0&&u[1]<=0&&(m=0,g=-(0,Vt.NM)(v))}var y=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,m+f*_),i.setInterval.call(t,f),(y||_)&&i.setNiceExtent.call(t,g+f,m-f)}var Ye=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ze,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=(0,p.keys)(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;(0,Ue.lM)(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):((0,Ee.Jk)(l,s),(0,Ue.lM)(l)&&(e=a))}r.length&&(e||(e=r.pop(),(0,Ee.Jk)(e.scale,e.model)),(0,p.each)(r,(function(t){Xe(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};(0,p.each)(n.x,(function(t){Ke(n,"y",t,r)})),(0,p.each)(n.y,(function(t){Ke(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=(0,Gt.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){(0,p.each)(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&((0,p.each)(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,Ee.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);o[n]-=e[n]+i,"top"===t.position?o.y+=e.height+i:"left"===t.position&&(o.x+=e.width+i)}}})),s()),(0,p.each)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,p.isObject)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=p.defaults({color:c.color},a));var f=p.merge(p.clone(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:h},!1);if(p.isString(l)){var g=f.name;f.name=l.replace("{value}",null!=g?g:"")}else p.isFunction(l)&&(f.name=l(f.name,f));var m=new Cn.Z(f,null,this.ecModel);return p.mixin(m,Se.W.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},An.axisLine),axisLabel:In(An.axisLabel,!1),axisTick:In(An.axisTick,!1),splitLine:In(An.splitLine,!0),splitArea:In(An.splitArea,!0),indicator:[]},e}(be.Z);const Ln=Dn;var Pn=n(9538),On=n(5795),En=["axisLine","axisTickLabel","axisName"],Nn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=p.map(n,(function(t){var n=t.model.get("showName")?t.name:"";return new tn.Z(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));p.each(i,(function(t){p.each(En,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),d=p.isArray(h)?h:[h],f=p.isArray(c)?c:[c],g=[],m=[];if("circle"===i)for(var v=n[0].getTicksCoords(),y=e.cx,_=e.cy,x=0;x=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=gi(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new c.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new dt.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=Fn[s];if(u&&(0,p.hasOwn)(Fn,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=ei[s];if(d&&(0,p.hasOwn)(ei,s)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(a&&a.isGroup)for(var m=t.firstChild;m;)1===m.nodeType?this._parseNode(m,a,n,l,r,o):3===m.nodeType&&o&&this._parseText(m,a),m=m.nextSibling},t.prototype._parseText=function(t,e){var n=new Yn.Z({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ri(e,n),ai(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Fn={g:function(t,e){var n=new c.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new dt.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},circle:function(t,e){var n=new Pn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new $e.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},ellipse:function(t,e){var n=new Wn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new _n.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new qt.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new xn.ZP;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,jn.iR)(n);return ri(e,i),ai(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),ei={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new x.Z(e,n,i,r);return ni(t,o),ii(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new Xn.Z(e,n,i);return ni(t,r),ii(t,r),r}};function ni(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function ii(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};fi(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function ri(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,t.__inheritedStyle))}function oi(t){for(var e=hi(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=hi(a);switch(r=r||ke.create(),s){case"translate":ke.translate(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ke.scale(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ke.rotate(r,r,-parseFloat(l[0])*di);break;case"skewX":var u=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,0,u,1,0,0],r);break;case"skewY":var h=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,h,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),fi(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=p.createHashMap(),n=p.createHashMap(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,Z.ni)(e,(0,Z.k3)(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(Fi(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ji(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):(0,V.A)(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function Xi(t,e,n,i,r){t.data||ct.setTooltipConfig({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function Yi(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return(0,B.k5)(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&(0,B.th)(e,r,n),a}function qi(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),p.each(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(u.Z);const tr=$i;function er(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),p.each(e,(function(t,e){for(var n,i,r,o=(n=p.map(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},p.each(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Gt.ME(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var hr=function(){function t(){this.dimensions=or}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new lr(o+r,o,p.extend({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=ur,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),p.each(r,(function(t,r){var o=p.map(t,(function(t){return t.get("nameMap")})),a=new lr(r,r,p.extend({nameMap:p.mergeAll(o)},i(t[0])));a.zoomLimit=p.retrieve.apply(null,p.map(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=ur,a.resize(t[0],e),p.each(t,(function(t){t.coordinateSystem=a,function(t,e){p.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=p.createHashMap(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=Mr(s),o=Cr(o),s&&o;){r=Mr(r),a=Cr(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);d>0&&(Ir(Ar(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!Mr(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!Cr(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function br(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function wr(t){return arguments.length?t:Dr}function Sr(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Tr(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Mr(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Cr(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Ar(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Ir(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Dr(t,e){return t.parentNode===e.parentNode?1:2}var Lr=n(3726),Pr=function(){this.parentPoint=[],this.childPoints=[]},Or=function(t){function e(e){return t.call(this,e)||this}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Pr},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=(0,Vt.GM)(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;dx.x)||(S-=Math.PI);var C=T?"left":"right",A=s.getModel("label"),I=A.get("rotate"),D=I*(Math.PI/180),L=y.getTextContent();L&&(y.setTextConfig({position:A.get("position")||C,rotation:null==I?-S:D,origin:"center"}),L.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),O="relative"===P?p.concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():null;O&&((0,V.A)(n).focus=O),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(m||(m=i.__edge=new _r.Z({shape:Zr(h,c,d,r,r)})),b.D(m,{shape:Zr(h,c,d,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,y=[],_=0;_e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(p.isString(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function jr(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xr(t,e){var n=jr(t);return p.indexOf(n,e)>=0}function Yr(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Cn.Z(n,this,this.ecModel),r=Ur.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(u.Z);const Kr=qr;function Jr(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function Qr(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=Tr(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=wr((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=wr());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:a(u,h)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=Sr(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+p),f=r/(c.depth-1||1),Jr(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function $r(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");(0,p.extend)(i,n)}))}))}var to=["treemapZoomToNode","treemapRender","treemapMove"];var eo=n(5494);function no(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=(0,eo.i)(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var io=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ro(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Cn.Z({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=(0,S.kF)(e.get("color")),o=(0,S.kF)(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],p.each(t,(function(t){var e=new Cn.Z(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=p.map(i||[],(function(t){return new Cn.Z(t,o,e)}),this),s=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return(0,Sn.TX)("nameValue",{name:o,value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(u.Z);function ro(t){var e=0;p.each(t.children,(function(t){ro(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const oo=io;var ao=n(4130),so=function(){function t(t){this.group=new c.Z,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Gt.p$(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=(0,S.U5)(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o=0,a=e.emptyItemWidth,s=t.get(["breadcrumb","height"]),l=Gt.lq(e.pos,e.box),u=e.totalWidth,h=e.renderList,c=h.length-1;c>=0;c--){var d=h[c],f=d.node,g=d.width,m=d.text;u>l.width&&(u-=g-a,g=a,m=null);var v=new _n.Z({shape:{points:lo(o,0,g,s,c===h.length-1,0===c)},style:(0,p.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new w.ZP({style:{text:m,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e4*B.zr,onclick:(0,p.curry)(r,f)});v.disableLabelAnimation=!0,this.group.add(v),uo(v,t,f),o+=g+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function lo(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function uo(t,e,n){(0,V.A)(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Yr(n,e)}}const ho=so;var co=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new fe.Z(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=ke.create();ke.translate(s,s,[-e,-n]),ke.scale(s,s,[t.scale,t.scale]),ke.translate(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&(0,G.MI)(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ho(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Xr(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(k.Z);const Mo=To;var Co=p.each,Ao=p.isObject,Io=-1,Do=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=p.clone(e);this.type=i,this.mappingMethod=n,this._normalizeData=Zo[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Lo(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,p.each(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Co(e,(function(t,e){n[t]=e})),!p.isArray(i)){var r=[];p.isObject(i)?Co(i,(function(t,e){var i=n[e];r[null!=i?i:Io]=t})):r[-1]=i,i=Bo(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):Lo(r,!0):(p.assert("linear"!==n||r.dataExtent),Lo(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},t.listVisualTypes=function(){return p.keys(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){p.isObject(t)?p.each(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=p.isArray(e)?[]:p.isObject(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&Co(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(p.isArray(t))t=t.slice();else{if(!Ao(t))return[];var e=[];Co(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new Vo(c);return Go(d).drColorMappingBy=h,d}(0,r,o,0,u,f);(0,p.each)(f,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=(0,p.extend)({},e);if(r){var s=r.type,l="color"===s&&Go(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,g,i);Uo(t,o,n,i)}}))}else s=Wo(u),h.fill=s}}function Wo(t){var e=jo(t,"color");if(e){var n=jo(t,"colorAlpha"),i=jo(t,"colorSaturation");return i&&(e=(0,H.modifyHSL)(e,null,null,i)),n&&(e=(0,H.modifyAlpha)(e,n)),e}}function jo(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Xo(t,e){var n=t.get(e);return(0,p.isArray)(n)&&n.length?{name:e,range:n}:null}var Yo=Math.max,qo=Math.min,Ko=p.retrieve,Jo=p.each,Qo=["itemStyle","borderWidth"],$o=["itemStyle","gapWidth"],ta=["upperLabel","show"],ea=["upperLabel","height"];const na={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Gt.ME(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=(0,Vt.GM)(Ko(s.width,l[0]),r),h=(0,Vt.GM)(Ko(s.height,l[1]),o),c=i&&i.type,d=Wr(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?i.rootRect:null,g=t.getViewRoot(),m=jr(g);if("treemapMove"!==c){var v="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,d=0,p=c.length;dVt.YM&&(u=Vt.YM),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?Yo(u*i/l,l/(u*r)):1/0}function oa(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,d=t.length;c=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(T.ZP);function ha(t,e){var n=null==t?"":t+"";return e&&((0,p.isString)(e)?n=e.replace("{value}",n):(0,p.isFunction)(e)&&(n=e(t))),n}var ca=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:(0,Vt.GM)(n[0],e.getWidth()),cy:(0,Vt.GM)(n[1],e.getHeight()),r:(0,Vt.GM)(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?vt:pt.C,c=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];(0,M.L)(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:k}),silent:!0}))}if(y.get("show")&&P!==x){O=(O=y.get("distance"))?O+l:l;for(var R=0;R<=b;R++){u=Math.cos(M),h=Math.sin(M);var z=new $e.Z({shape:{x1:u*(f-O)+d,y1:h*(f-O)+p,x2:u*(f-T-O)+d,y2:h*(f-T-O)+p},silent:!0,style:D});"auto"===D.stroke&&z.setStyle({stroke:i((P+R/b)/x)}),c.add(z),M+=A}M-=A}else M+=C}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,f=[],g=t.get(["pointer","show"]),m=t.getModel("progress"),v=m.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),S=[x,w],T=[o,a];function M(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=(0,Vt.GM)(o.get("width"),r.r),s=(0,Vt.GM)(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=(0,Vt.GM)(u[0],r.r),d=(0,Vt.GM)(u[1],r.r),p=o.get("keepAspect");return(i=l?(0,h.th)(l,c-a/2,d-s,a,s,null,p):new ua({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function C(t,e){var n=m.get("roundCap")?vt:pt.C,i=m.get("overlap"),a=i?m.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=w-y.get(_,t)%w),c}(v||g)&&(y.diff(c).add((function(e){var n=y.get(_,e);if(g){var i=M(e,o);b.KZ(i,{rotation:-((isNaN(+n)?T[0]:(0,Vt.NU)(n,S,T,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(v){var r=C(e,o),a=m.get("clip");b.KZ(r,{shape:{endAngle:(0,Vt.NU)(n,S,T,a)}},t),u.add(r),(0,V.Q)(t.seriesIndex,y.dataType,e,r),f[e]=r}})).update((function(e,n){var i=y.get(_,e);if(g){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=M(e,a);s.rotation=a,b.D(s,{rotation:-((isNaN(+i)?T[0]:(0,Vt.NU)(i,S,T,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(v){var l=d[n],h=C(e,l?l.shape.endAngle:o),p=m.get("clip");b.D(h,{shape:{endAngle:(0,Vt.NU)(i,S,T,p)}},t),u.add(h),(0,V.Q)(t.seriesIndex,y.dataType,e,h),f[e]=h}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(g){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof xn.ZP){var h=s.style;s.useStyle((0,p.extend)({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i((0,Vt.NU)(y.get(_,t),S,[0,1],!0))),s.z2EmphasisLift=0,(0,B.WO)(s,e),(0,B.k5)(s,r,o,a)}if(v){var c=f[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,(0,B.WO)(c,e),(0,B.k5)(c,r,o,a)}})),this._progressEls=f)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=(0,h.th)(r,e.cx-i/2+(0,Vt.GM)(o[0],e.r),e.cy-i/2+(0,Vt.GM)(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new c.Z,d=[],p=[],f=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new w.ZP({silent:!0}),p[t]=new w.ZP({silent:!0})})).update((function(t,e){d[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),m=new c.Z,v=i((0,Vt.NU)(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var _=y.get("offsetCenter"),x=r.cx+(0,Vt.GM)(_[0],r.r),b=r.cy+(0,Vt.GM)(_[1],r.r);(D=d[e]).attr({z2:g?0:2,style:(0,Z.Lr)(y,{x,y:b,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),m.add(D)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),T=r.cx+(0,Vt.GM)(S[0],r.r),M=r.cy+(0,Vt.GM)(S[1],r.r),C=(0,Vt.GM)(w.get("width"),r.r),A=(0,Vt.GM)(w.get("height"),r.r),I=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:v,D=p[e],L=w.get("formatter");D.attr({z2:g?0:2,style:(0,Z.Lr)(w,{x:T,y:M,text:ha(o,L),width:isNaN(C)?null:C,height:isNaN(A)?null:A,align:"center",verticalAlign:"middle"},{inheritColor:I})}),(0,Z.pe)(D,{normal:w},o,(function(t){return ha(t,L)})),f&&(0,Z.tD)(D,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return ha(a?a.interpolatedValue:o,L)}}),m.add(D)}h.add(m)})),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(k.Z);const da=ca;const pa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return ue(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(u.Z);var fa=["itemStyle","opacity"],ga=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new qt.Z,a=new w.ZP;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return(0,s.ZT)(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(fa);l=null==l?1:l,n||(0,b.Zi)(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,b.KZ(i,{style:{opacity:l}},r,e)):b.D(i,{style:{opacity:l},shape:{points:a.points}},r,e),(0,B.WO)(i,o),this._updateLabel(t,e),(0,B.k5)(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;(0,Z.ni)(r,(0,Z.k3)(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Kt.Z(h[0][0],h[0][1]):null},b.D(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),(0,Jt.Iu)(n,(0,Jt.$x)(a),{stroke:u})},e}(_n.Z);const ma=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new ga(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){var n=r.getItemGraphicEl(e);b.XD(n,t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(k.Z);var va=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype._defaultLabelLine=function(t){(0,S.Cc)(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(u.Z);const ya=va;function _a(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ea(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Ea(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const Na=Pa;var ka=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&p.merge(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);p.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(be.Z);const Ra=ka;const za=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(Fe.Z);var Ba=n(9233),Za=p.each,Fa=Math.min,Va=Math.max,Ga=Math.floor,Ha=Math.ceil,Ua=Vt.NM,Wa=Math.PI,ja=function(){function t(t,e,n){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Za(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new za(t,Ee.aG(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Za(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Ee.Jk(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=Xa(e.get("axisExpandWidth"),l),c=Xa(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=e.get("axisExpandWindow");p?(t=Xa(p[1]-p[0],l),p[1]=p[0]+t):(t=Xa(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||Ga(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Ga(Ua(p[0]/h,1))+1,Ha(Ua(p[1]/h,1))-1],m=f/h*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Za(n,(function(e,n){var o=(i.axisExpandable?qa:Ya)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Wa/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=ke.create();ke.rotate(h,h,u),ke.translate(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];p.each(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?(0,Ba.Z)(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[Va(0,o[1]*s/d-d/2)])[1]=Fa(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function Xa(t,e){return Fa(Va(t,e[0]),e[1])}function Ya(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function qa(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Vt.dt(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i=0&&(o[r[a].depth]=new Cn.Z(r[a],this,e));if(i&&n){var s=(0,cs.Z)(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value,s=o.source+" -- "+o.target;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return(0,Sn.TX)("nameValue",{name:null!=u?u+"":null,value:l,noValue:i(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(u.Z);const ps=ds;function fs(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){p.each(t,(function(t){var e=Ts(t.outEdges,Ss),n=Ts(t.inEdges,Ss),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,d=0;d=0;y&&v.depth>f&&(f=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_c-1?f:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)vs(s,l*=.99,a),ms(s,r,n,i,a),Ms(s,l,a),ms(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";p.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),p.each(t,(function(t){var e=0,n=0;p.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),p.each(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==p.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function gs(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ms(t,e,n,i,r){var o="vertical"===r?"x":"y";p.each(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function vs(t,e,n){p.each(t.slice().reverse(),(function(t){p.each(t,(function(t){if(t.outEdges.length){var i=Ts(t.outEdges,ys,n)/Ts(t.outEdges,Ss);if(isNaN(i)){var r=t.outEdges.length;i=r?Ts(t.outEdges,_s,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-ws(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-ws(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function ys(t,e){return ws(t.node2,e)*t.getValue()}function _s(t,e){return ws(t.node2,e)}function xs(t,e){return ws(t.node1,e)*t.getValue()}function bs(t,e){return ws(t.node1,e)}function ws(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Ss(t){return t.getValue()}function Ts(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),p.each(e,(function(e){var r=new Vo({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var As=n(381),Is=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[r,o],f=d[u].get("type"),g=d[1-u].get("type"),m=t.data;if(m&&i){var v=[];p.each(m,(function(t,e){var n;p.isArray(t)?(n=t.slice(),t.unshift(e)):p.isArray(t.value)?((n=p.extend({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,v.push(n)})),t.data=v}var y=this.defaultValueDimensions,_=[{name:h,type:(0,As.T)(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,As.T)(g),dimsDef:y.slice()}];return ue(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:p.curry(he.pY,_,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Ds=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return(0,s.ZT)(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(u.Z);(0,p.mixin)(Ds,Is,!0);const Ls=Ds;var Ps=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=Ns(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?((0,b.Zi)(n),ks(s,n,i,t)):n=Ns(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(k.Z),Os=function(){},Es=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Os},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();im){var b=[y,x];i.push(b)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var Us=["color","borderColor"],Ws=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&qs(s,a))return;var l=Ys(a,n,!0);b.KZ(l,{shape:{points:a.ends}},t,n),Ks(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&qs(s,h)?i.remove(u):(u?(b.D(u,{shape:{points:h.ends}},t,a),(0,b.Zi)(u)):u=Ys(h,a),Ks(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),tl(t,this.group);var e=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=Ys(i.getItemLayout(n),n);Ks(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){tl(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(k.Z),js=function(){},Xs=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new js},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(T.ZP);function Ys(t,e,n){var i=t.ends;return new Xs({shape:{points:n?Js(i,t):i},z2:100})}function qs(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(Us);e.useStyle(o),e.style.fill=null,e.style.stroke=r}const nl=Ws;var il=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return(0,s.ZT)(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(u.Z);(0,p.mixin)(il,Is,!0);const rl=il;function ol(t){t&&p.isArray(t.series)&&p.each(t.series,(function(t){p.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}var al=n(5682),sl=["itemStyle","borderColor"],ll=["itemStyle","borderColor0"],ul=["itemStyle","color"],hl=["itemStyle","color0"],cl={seriesType:"candlestick",plan:(0,al.Z)(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?ul:hl)}function i(t,e){return e.get(t>0?sl:ll)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill;var l=e.ensureUniqueItemVisual(r,"style");(0,p.extend)(l,s)}}}}};const dl=cl;var pl={seriesType:"candlestick",plan:(0,al.Z)(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=(0,Vt.GM)((0,p.retrieve2)(t.get("barMaxWidth"),r),r),a=(0,Vt.GM)((0,p.retrieve2)(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?(0,Vt.GM)(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=(0,p.map)(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=(0,_.o)(4*t.count),c=0,d=[],p=[],f=n.getStore();for(;null!=(r=t.next());){var g=f.get(o,r),m=f.get(s,r),v=f.get(l,r),y=f.get(u,r),x=f.get(h,r);isNaN(g)||isNaN(y)||isNaN(x)?(a[c++]=NaN,c+=3):(a[c++]=fl(f,r,m,v,l),d[0]=g,d[1]=y,i=e.dataToPoint(d,null,p),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,d[1]=x,i=e.dataToPoint(d,null,p),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),d=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(h,r),m=Math.min(d,p),v=Math.max(d,p),y=S(m,c),_=S(v,c),x=S(f,c),b=S(g,c),w=[];T(w,_,0),T(w,y,1),w.push(C(b),C(_),C(x),C(y)),n.setItemLayout(r,{sign:fl(a,r,d,p,l),initBaseline:d>p?_[1]:y[1],ends:w,brushRect:M(f,g,c)})}function S(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var r=e.slice(),o=e.slice();r[0]=(0,ct.subPixelOptimize)(r[0]+i/2,1,!1),o[0]=(0,ct.subPixelOptimize)(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=S(t,n),o=S(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=(0,ct.subPixelOptimize)(t[0],1),t}}}}};function fl(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}const gl=pl;var ml=n(3132),vl=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=ml.qW.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p0){var M=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=M[T],_[x++]=M[T+1],_[x++]=M[T+2],_[x++]=M[T+3]*v*256}else x+=4}return c.putImageData(y,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=ml.qW.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();const yl=vl;function _l(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var xl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):_l(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(_l(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=z(u,"cartesian2d");if(h){var c=u.getAxis("x"),d=u.getAxis("y");0,o=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),_=(0,Z.k3)(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),T=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;Ms[1]||Dl[1])continue;var L=u.dataToPoint([I,D]);C=new dt.Z({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:A})}else{if(isNaN(f.get(T[1],M)))continue;C=new dt.Z({z2:1,shape:u.dataToRect([f.get(T[0],M)]).contentShape,style:A})}if(f.hasItemOption){var P=f.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),m=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),y=P.get(["itemStyle","borderRadius"]),b=O.get("focus"),w=O.get("blurScope"),S=O.get("disabled"),_=(0,Z.k3)(P)}C.shape.r=y;var E=t.getRawValue(M),N="-";E&&null!=E[2]&&(N=E[2]+""),(0,Z.ni)(C,_,{labelFetcher:t,labelDataIndex:M,defaultOpacity:A.opacity,defaultText:N}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=m,C.ensureState("select").style=v,(0,B.k5)(C,b,w,S),C.incremental=r,r&&(C.states.emphasis.hoverLayer=!0),p.add(C),f.setItemGraphicEl(M,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new yl;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),g=d-h,m=f-c,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(v,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),_=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(_,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=p.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,d),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),g=t.getItemVisual(e,"symbolSize");h=p.isArray(g)?g.slice():null==g?["100%","100%"]:[g,g];h[d.index]=(0,Vt.GM)(h[d.index],f),h[c.index]=(0,Vt.GM)(h[c.index],i?f:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,d.boundingLength,d.pxSign,u,i,d),function(t,e,n,i,r){var o=t.get(Tl)||0;o&&(Cl.attr({scaleX:e[0],scaleY:e[1],rotation:n}),Cl.updateTransform(),o/=Cl.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var f=d.symbolSize,g=(0,h.Cq)(n.get("symbolOffset"),f);return function(t,e,n,i,r,o,a,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,g=c.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var y=Math.abs(l),_=p.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;_.lastIndexOf("!")===_.length-1&&(x=!0,_=_.slice(0,_.length-1));var b=(0,Vt.GM)(_,e[f.index]),w=Math.max(m+2*b,0),S=x?0:2*b,T=(0,Vt.kE)(i),M=T?i:Hl((y+S)/w);w=m+2*(b=(y-M*m)/2/(x?M:Math.max(M-1,1))),S=x?0:2*b,T||"fixed"===i||(M=u?Hl((Math.abs(u)+S)/w):0),v=M*w-S,c.repeatTimes=M,c.symbolMargin=b}var C=g*(v/2),A=c.pathPosition=[];A[d.index]=n[d.wh]/2,A[f.index]="start"===a?C:"end"===a?l-C:l/2,o&&(A[0]+=o[0],A[1]+=o[1]);var I=c.bundlePosition=[];I[d.index]=n[d.xy],I[f.index]=n[f.xy];var D=c.barRectShape=p.extend({},n);D[f.wh]=g*Math.max(Math.abs(n[f.wh]),Math.abs(A[f.index]+C)),D[d.wh]=n[d.wh];var L=c.clipShape={};L[d.xy]=-n[d.xy],L[d.wh]=h.ecSize[d.wh],L[f.xy]=0,L[f.wh]=n[f.wh]}(n,f,r,o,0,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function Il(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Dl(t){var e=t.symbolPatternSize,n=(0,h.th)(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Ll(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(Fl(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Pl(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?Vl(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=Dl(n),r.add(o),Vl(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function Ol(t,e,n){var i=p.extend({},e.barRectShape),r=t.__pictorialBarRect;r?Vl(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new dt.Z({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function El(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=p.extend({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)b.D(r,{shape:o},s,l);else{o[a.wh]=0,r=new dt.Z({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ct[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Nl(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=kl,n.isAnimationEnabled=Rl,n}function kl(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Rl(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zl(t,e,n,i){var r=new c.Z,o=new c.Z;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?Ll(r,e,n):Pl(r,0,n),Ol(r,n,i),El(r,e,n,i),r.__pictorialShapeStr=Zl(t,n),r.__pictorialSymbolMeta=n,r}function Bl(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Fl(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),p.each(o,(function(t){b.bX(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function Zl(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fl(t,e,n){p.each(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function Vl(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ct[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function Gl(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");Fl(t,(function(t){if(t instanceof xn.ZP){var e=t.style;t.useStyle(p.extend({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var f=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;(0,Z.ni)(g,(0,Z.k3)(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:(0,F.H)(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),(0,B.k5)(t,h,c,o.get("disabled"))}function Hl(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Ul=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Ml[+s],categoryDim:Ml[1-+s]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=Nl(r,t),n=Al(r,t,e,u),o=zl(r,u,n);r.setItemGraphicEl(t,o),i.add(o),Gl(o,u,n)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=Nl(r,t),s=Al(r,t,a,u),l=Zl(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,r=n.dataIndex,o=t.__pictorialBundle;b.D(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?Ll(t,e,n,!0):Pl(t,e,n,!0);Ol(t,n,!0),El(t,e,n,!0)}(n,u,s):n=zl(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),Gl(n,u,s)}else i.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&Bl(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){Bl(i,(0,V.A)(e).dataIndex,t,e)})):n.removeAll()},e.type="pictorialBar",e}(k.Z);const Wl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(lt);var jl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var d=new ao.Z(this._layersSeries||[],a,h,h),f=[];function g(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,d=[],p=[],g=a[n].indices,m=0;mo&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,d=o.length,f=o[0].indices.length,g=0;gMath.PI/2?"right":"left"):T&&"center"!==T?"left"===T?(_=r.r0+S,a>Math.PI/2&&(T="right")):"right"===T&&(_=r.r-S,a>Math.PI/2&&(T="left")):(_=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,T="center"),m.style.align=T,m.style.verticalAlign=g(d,"verticalAlign")||"middle",m.x=_*s+r.cx,m.y=_*l+r.cy;var M=g(d,"rotate"),C=0;"radial"===M?(C=-a)<-Math.PI/2&&(C+=Math.PI):"tangential"===M?(C=Math.PI/2-a)>Math.PI/2?C-=Math.PI:C<-Math.PI/2&&(C+=Math.PI):p.isNumber(M)&&(C=M*Math.PI/180),m.rotation=C})),h.dirtyStyle()},e}(pt.C);const $l=Ql;var tu="sunburstRootToNode",eu="sunburstHighlight";var nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new $l(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new ao.Z(r,i,s,s).add(h).update(h).remove(p.curry(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new $l(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";(0,G.MI)(a,s)}}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tu,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(k.Z);const iu=nu;var ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ou(n);var i=this._levelModels=p.map(t.levels||[],(function(t){return new Cn.Z(t,this,e)}),this),r=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Yr(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(u.Z);function ou(t){var e=0;p.each(t.children,(function(t){ou(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const au=ru;var su=Math.PI/180;function lu(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");p.isArray(i)||(i=[0,i]),p.isArray(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=(0,Vt.GM)(e[0],r),l=(0,Vt.GM)(e[1],o),u=(0,Vt.GM)(i[0],a/2),h=(0,Vt.GM)(i[1],a/2),c=-t.get("startAngle")*su,d=t.get("minAngle")*su,f=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&uu(g,v);var y=0;p.each(g.children,(function(t){!isNaN(t.getValue())&&y++}));var _=g.getValue(),x=Math.PI/(_||y)*2,b=g.depth>0,w=g.height-(b?-1:1),S=(h-u)/(w||1),T=t.get("clockwise"),M=t.get("stillShowZeroSum"),C=T?1:-1,A=function(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===_&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&(0,p.isString)(o)&&(o=(0,H.lift)(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height));var a=n.ensureUniqueItemVisual(r.dataIndex,"style");(0,p.extend)(a,o)}))}))}var cu={color:"fill",borderColor:"stroke"},du={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},pu=(0,S.Yf)();const fu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=pu(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(u.Z);function gu(t,e){return e=e||[0,0],p.map(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function mu(t,e){return e=e||[0,0],p.map([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function vu(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function yu(t,e){return e=e||[0,0],p.map(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function _u(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||(0,p.hasOwn)(t,"text")))}function xu(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},(0,p.hasOwn)(a,"text")&&(o.text=a.text),(0,p.hasOwn)(a,"rich")&&(o.rich=a.rich),(0,p.hasOwn)(a,"textFill")&&(o.fill=a.textFill),(0,p.hasOwn)(a,"textStroke")&&(o.stroke=a.textStroke),(0,p.hasOwn)(a,"fontFamily")&&(o.fontFamily=a.fontFamily),(0,p.hasOwn)(a,"fontSize")&&(o.fontSize=a.fontSize),(0,p.hasOwn)(a,"fontStyle")&&(o.fontStyle=a.fontStyle),(0,p.hasOwn)(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textPosition")&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textOffset")&&(i.offset=a.textOffset),(0,p.hasOwn)(a,"textRotation")&&(i.rotation=a.textRotation),(0,p.hasOwn)(a,"textDistance")&&(i.distance=a.textDistance)}return bu(o,t),(0,p.each)(o.rich,(function(t){bu(t,t)})),{textConfig:i,textContent:r}}function bu(t,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(t.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(t.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(t.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(t.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function wu(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Su(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,(0,p.each)(e.rich,(function(t){Su(t,t)})),i}function Su(t,e){e&&((0,p.hasOwn)(e,"fill")&&(t.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(t.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(t.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(t.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(t.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(t.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(t.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(t.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(t.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(t.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(t.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(t.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Tu=n(5622),Mu=n(7411),Cu={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Au=(0,p.keys)(Cu),Iu=((0,p.reduce)(Mu.dN,(function(t,e){return t[e]=1,t}),{}),Mu.dN.join(", "),["","style","shape","extra"]),Du=(0,S.Yf)();function Lu(t,e,n,i,r){var o=t+"Animation",a=(0,b.ke)(t,i,r)||{},s=Du(e).userDuring;return a.duration>0&&(a.during=s?(0,p.bind)(zu,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),(0,p.extend)(a,n[o]),a}function Pu(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Du(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!r&&(r=i.style={});var f=(0,p.keys)(n);for(u=0;u0&&t.animateFrom(d,f)}else!function(t,e,n,i,r){if(r){var o=Lu("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);Ou(t,e),u?t.dirty():t.markRedraw()}function Ou(t,e){for(var n=Du(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=(0,p.keys)(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:p.bind(yu,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function eh(t){return t instanceof T.ZP}function nh(t){return t instanceof ki.ZP}const ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=lh(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){hh(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);Eu(n,pu(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);hh(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=lh(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=_(i,Wu).getItemStyle(),o=x(i,Wu),a=Z.Lr(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,p.retrieve3)(t.getFormattedLabel(i,Wu),t.getFormattedLabel(i,ju),(0,F.H)(e,i)):null;var l=Z.nC(o,null,!0);return w(n,r),r=wu(r,a,l),n&&b(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),(0,p.hasOwn)(cu,t)){var i=e.getItemVisual(n,"style");return i?i[cu[t]]:null}if((0,p.hasOwn)(du,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){var e=o.getBaseAxis();return(0,at.Gk)((0,p.defaults)({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return Z.qT(t,n)}},a.api||{}),h={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:uh(t.getData())},c={},d={},f={},g={},m=0;m=c;d--){Eu(e.childAt(d),pu(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function dh(t,e,n){var i,r=pu(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&((0,p.hasOwn)(i,"pathData")||(0,p.hasOwn)(i,"d")))&&_h(a)!==r.customPathData||"image"===o&&(0,p.hasOwn)(s,"image")&&s.image!==r.customImagePath}function ph(t,e,n){var i=e?fh(t,e):t,r=e?gh(t,i,Wu):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?fh(s,e):s:null;if(r&&(n.isLegacy||_u(r,o,!!a,!!l))){n.isLegacy=!0;var u=xu(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function fh(t,e){return e?t?t[e]:null:t}function gh(t,e,n){var i=e&&e.style;return null==i&&n===Wu&&t&&(i=t.styleEmphasis),i}function mh(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function vh(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ch(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function yh(t){var e=this.context,n=e.oldChildren[t];Eu(n,pu(n).option,e.seriesModel)}function _h(t){return t&&(t.pathData||t.d)}var xh=n(6026),bh=n(9517),wh=n(241),Sh=n(7037);var Th=n(7329),Mh=n(5539),Ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ah[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=ke.create();ke.rotate(d,d,s),ke.translate(d,d,[i.cx,i.cy]),l=ct.applyTransform([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=tn.Z.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));Mh.$_(t,n,i,r,d)},e}(Th.Z);var Ah={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:Mh.BL(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Mh.Rj(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:Mh.Rj(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}};const Ih=Ch;const Dh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(be.Z);var Lh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",S.C6).models[0]},e.type="polarAxis",e}(be.Z);p.mixin(Lh,Se.W);var Ph=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="angleAxis",e}(Lh),Oh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="radiusAxis",e}(Lh),Eh=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(Fe.Z);Eh.prototype.dataToRadius=Fe.Z.prototype.dataToCoord,Eh.prototype.radiusToData=Fe.Z.prototype.coordToData;const Nh=Eh;var kh=(0,S.Yf)(),Rh=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=yt.lP(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=kh(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-h)<=1&&Math.abs(p-r)<=1&&d>h?h=d:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(Fe.Z);Rh.prototype.dataToAngle=Fe.Z.prototype.dataToCoord,Rh.prototype.angleToData=Fe.Z.prototype.coordToData;const zh=Rh;var Bh=["radius","angle"],Zh=function(){function t(t){this.dimensions=Bh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Nh,this._angleAxis=new zh,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return Fh(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Fh(e)===this?this.pointToData(n):null},t}();function Fh(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const Vh=Zh;function Gh(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();p.each((0,Ee.PY)(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),p.each((0,Ee.PY)(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),(0,Ee.Jk)(i.scale,i.model),(0,Ee.Jk)(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function Hh(t,e){if(t.type=e.get("type"),t.scale=(0,Ee.aG)(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var Uh={dimensions:Bh,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new Vh(i+"");r.update=Gh;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Hh(o,s),Hh(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=(0,Vt.GM)(i[0],r),t.cy=(0,Vt.GM)(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,Vt.GM)(l[0],s),(0,Vt.GM)(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",S.C6).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}};const Wh=Uh;var jh=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xh(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function Yh(t){return t.getRadiusAxis().inverse?0:1}function qh(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var Kh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=p.map(n.getViewLabels(),(function(t){t=p.clone(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));qh(s),qh(o),p.each(jh,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||Jh[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(en.Z),Jh={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=Yh(n),u=l?0:1;(a=0===o[u]?new Pn.Z({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new On.Z({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[Yh(n)],u=p.map(i,(function(t){return new $e.Z({shape:Xh(n,[l,l+s],t.coord)})}));t.add(ct.mergePath(u,{style:p.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[Yh(n)],h=[],c=0;cg?"left":"right",y=Math.abs(f[1]-m)/d<.3?"middle":f[1]>m?"top":"bottom";if(s&&s[c]){var _=s[c];p.isObject(_)&&_.textStyle&&(a=new Cn.Z(_.textStyle,l,l.ecModel))}var x=new w.ZP({silent:tn.Z.isLabelSilent(e),style:(0,Z.Lr)(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:v,verticalAlign:y})});if(t.add(x),h){var b=tn.Z.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,(0,V.A)(x).eventData=b}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",A=b;_&&(i[s][M]||(i[s][M]={p:b,n:b}),A=i[s][M][C]);var I=void 0,D=void 0,L=void 0,P=void 0;if("radius"===c.dim){var O=c.dataToCoord(T)-b,E=o.dataToCoord(M);Math.abs(O)=P})}}}))};var sc={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},lc={splitNumber:5},uc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="polar",e}(xe.Z);function hc(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.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]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),p.retrieve(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var cc=["axisLine","axisTickLabel","axisName"],dc=["splitArea","splitLine"],pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new c.Z;var s=hc(e),l=new tn.Z(e,s);p.each(cc,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),p.each(dc,(function(t){e.get([t,"show"])&&fc[t](this,this.group,this._axisGroup,e)}),this),ct.groupTransition(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){on(this)},e.type="singleAxis",e}(en.Z),fc={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),h=[],c=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return bc(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return bc(e)===this?this.pointToData(n):null},t}();const Sc={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new wc(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",S.C6).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:xc};var Tc=["x","y"],Mc=["width","height"],Cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=Dc(a,1-Ic(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ac[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=hc(n);Mh.gf(e,t,d,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=hc(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=Mh.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=Ic(r),s=Dc(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Dc(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Th.Z),Ac={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:Mh.BL([e,n[0]],[e,n[1]],Ic(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Mh.uE([e-i/2,n[0]],[i,r],Ic(t))}}};function Ic(t){return t.isHorizontal()?0:1}function Dc(t,e){var n=t.getRect();return[n[Tc[e]],n[Tc[e]]+n[Mc[e]]]}const Lc=Cc;var Pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="single",e}(xe.Z);function Oc(t,e){var n,i=t.cellSize;1===(n=p.isArray(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=p.map([0,1],(function(t){return(0,Gt.QM)(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));(0,Gt.dt)(t,e,{type:"box",ignoreSize:r})}const Ec=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e,n,i){var r=(0,Gt.tE)(e);t.prototype.init.apply(this,arguments),Oc(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Oc(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(be.Z);var Nc=n(3917),kc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new dt.Z({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new qt.Z({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return(0,p.isString)(t)&&t?(0,G.wx)(t,e):(0,p.isFunction)(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new w.ZP({z2:30,style:(0,Z.Lr)(r,{text:g})});m.attr(this._yearTextPositionControl(m,c[a],n,a,o)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!(0,p.isString)(o)||(o&&(e=(0,Nc.G8)(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,f=0;f=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/zc)-Math.floor(n[0].time/zc)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function Fc(t,e){var n;return p.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var Vc=["transition","enterFrom","leaveTo"],Gc=Vc.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Hc(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?Vc:Gc,r=0;r=0;l--){var f,g;u=n[l];if(g=null!=(f=S.U5(u.id,null))?r.get(f):null){var m=g.parent,v=(d=jc(m),m===i?{width:o,height:a}:{width:d.width,height:d.height}),y={},_=Gt.p$(g,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!jc(g).isNew&&_){for(var x=u.transition,w={},T=0;T=0)?w[M]=C:g[M]=C}(0,b.D)(g,w,t,0)}else g.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Kc(n,jc(n).option,e,t._lastGraphicModel)})),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xe.Z);function Yc(t){var e=new(p.hasOwn(Wc,t)?Wc[t]:ct.getShapeClass(t))({});return jc(e).type=t,e}function qc(t,e,n,i){var r=Yc(n);return e.add(r),i.set(t,r),jc(r).id=t,jc(r).isNew=!0,r}function Kc(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Kc(t,e,n,i)})),Eu(t,e,i),n.removeKey(jc(t).id))}function Jc(t,e,n,i){t.isGroup||p.each([["cursor",ki.ZP.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];p.hasOwn(e,i)?t[i]=p.retrieve2(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),p.each(p.keys(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=p.isFunction(i)?i:null}})),p.hasOwn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Qc=["rect","polygon","keep","clear"];function $c(t,e){var n=(0,S.kF)(t?t.brush:[]);if(n.length){var i=[];p.each(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;p.isArray(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),o=u,a={},p.each(o,(function(t){a[t]=1})),o.length=0,p.each(a,(function(t,e){o.push(e)})),e&&!u.length&&u.push.apply(u,Qc)}}var td=n(6211),ed=p.each;function nd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function id(t,e,n){var i={};return ed(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);ed(t[e],(function(t,i){if(Vo.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new Vo(r),"opacity"===i&&((r=p.clone(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Vo(r))}}))})),i}function rd(t,e,n){var i;p.each(n,(function(t){e.hasOwnProperty(t)&&nd(e[t])&&(i=!0)})),i&&p.each(n,(function(n){e.hasOwnProperty(n)&&nd(e[n])?t[n]=p.clone(e[n]):delete t[n]}))}var od=n(765);var ad={lineX:sd(0),lineY:sd(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&od.X(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(od.X(i,r,o)||od.X(i,r+a,o)||od.X(i,r,o+s)||od.X(i,r+a,o+s)||fe.Z.create(t).contain(l[0],l[1])||(0,ct.linePolygonIntersect)(r,o,r+a,o,i)||(0,ct.linePolygonIntersect)(r,o,r,o+s,i)||(0,ct.linePolygonIntersect)(r+a,o,r+a,o+s,i)||(0,ct.linePolygonIntersect)(r,o+s,r+a,o+s,i))||void 0}}};function sd(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ld(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&yd(e)}};function yd(t){return new fe.Z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const _d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ts.Z(e.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){pd(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:p.clone(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:p.clone(n),$from:e})},e.type="brush",e}(xe.Z);function xd(t,e){return p.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cn.Z(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const bd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,(function(t){return xd(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=xd(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(be.Z);var wd=n(1806),Sd=["rect","polygon","lineX","lineY","keep","clear"],Td=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,p.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return p.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:Sd.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wd.f1);const Md=Td;const Cd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],(0,p.each)(n,(function(e,n){var i,o=(0,S.U5)((0,S.C4)(e),"");(0,p.isObject)(e)?(i=(0,p.clone)(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new le.Z([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(be.Z);var Ad=n(1219),Id=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline.slider",e.defaultOption=(0,ut.ZL)(Cd.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Cd);(0,p.mixin)(Id,Ad.X.prototype);const Dd=Id;const Ld=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline",e}(xe.Z);const Pd=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return(0,s.ZT)(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(Fe.Z);var Od=n(5043),Ed=n(1618),Nd=Math.PI,kd=(0,S.Yf)(),Rd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return(0,Sn.TX)("nameValue",{noName:!0,value:e})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Nd/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),g=f.get("show",!0),m=g?f.get("itemSize"):0,v=g?f.get("itemGap"):0,y=m+v,_=t.get(["label","rotate"])||0;_=_*Nd/180;var x=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),w=g&&f.get("showPrevBtn",!0),S=g&&f.get("showNextBtn",!0),T=0,M=d;"left"===x||"bottom"===x?(b&&(i=[0,0],T+=y),w&&(r=[T,0],T+=y),S&&(o=[M-m,0],M-=y)):(b&&(i=[M-m,0],M-=y),w&&(r=[0,0],T+=y),S&&(o=[M-m,0],M-=y));var C=[T,M];return t.get("inverse")&&C.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:_,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:C,controlSize:m,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=ke.create(),a=r.x,s=r.y+r.height;ke.translate(o,o,[-a,-s]),ke.rotate(o,o,-Nd/2),ke.translate(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=v(r),u=v(n.getBoundingRect()),h=v(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var f,g=t.labelPosOpt;null==g||(0,p.isString)(g)?(y(c,u,l,1,f="+"===g?0:1),y(d,h,l,1,1-f)):(y(c,u,l,1,f=g>=0?0:1),d[1]=c[1]+g);function m(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,m(n),m(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Od.Z({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Ed.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new We.Z}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new Pd("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new c.Z;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new $e.Z({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:(0,p.extend)({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new $e.Z({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],(0,p.each)(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:(0,p.bind)(r._changeTimeline,r,t.value)},d=zd(s,l,e,c);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=h.getItemStyle(),(0,B.vF)(d);var f=(0,V.A)(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],(0,p.each)(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),d=new w.ZP({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(r._changeTimeline,r,a),silent:!1,style:(0,Z.Lr)(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=(0,Z.Lr)(u),d.ensureState("progress").style=(0,Z.Lr)(h),e.add(d),(0,B.vF)(d),kd(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=(0,yt.GM)((0,p.retrieve2)(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=ct.createIcon(t.get(["controlStyle",e]),i||{},new fe.Z(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),(0,B.vF)(c)}}h(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=(0,p.bind)(s._handlePointerDrag,s),t.ondragend=(0,p.bind)(s._handlePointerDragend,s),Bd(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){Bd(t,s._progressLine,o,n,i)}};this._currentPointer=zd(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=Vt.dt(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var $d={min:(0,p.curry)(Qd,"min"),max:(0,p.curry)(Qd,"max"),average:(0,p.curry)(Qd,"average"),median:(0,p.curry)(Qd,"median")};function tp(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!(0,p.isArray)(e.coord)&&i){var r=i.dimensions,o=ep(e,n,i,t);if((e=(0,p.clone)(e)).type&&$d[e.type]&&o.baseAxis&&o.valueAxis){var a=(0,p.indexOf)(r,o.baseAxis.dim),s=(0,p.indexOf)(r,o.valueAxis.dim),l=$d[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$d[u[h]]&&(u[h]=rp(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function ep(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function np(t,e){return!(t&&t.containData&&e.coord&&!Jd(e))||t.containData(e.coord)}function ip(t,e){return t?function(t,n,i,r){var o=r<2?t.coord&&t.coord[r]:t.value;return(0,Kd.yQ)(o,e[r])}:function(t,n,i,r){return(0,Kd.yQ)(t.value,e[r])}}function rp(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var op=(0,S.Yf)();const ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){op(t).keep=!1})),e.eachSeries((function(t){var r=Yd.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!op(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){op(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;(0,p.each)(t,(function(t){var i=Yd.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?(0,B.SX)(t):(0,B.VP)(t))}))}))},e.type="marker",e}(xe.Z);function sp(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Vt.GM(a.get("x"),n.getWidth()),l=Vt.GM(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}const lp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markPoint");e&&(sp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new f.Z),u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=(0,p.map)(n.get("data"),(0,p.curry)(tp,e));t&&(o=(0,p.filter)(o,(0,p.curry)(np,t)));var a=ip(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),sp(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if((0,p.isFunction)(i)||(0,p.isFunction)(r)||(0,p.isFunction)(o)||(0,p.isFunction)(s)){var h=e.getRawValue(t),c=e.getDataParams(t);(0,p.isFunction)(i)&&(i=i(h,c)),(0,p.isFunction)(r)&&(r=r(h,c)),(0,p.isFunction)(o)&&(o=o(h,c)),(0,p.isFunction)(s)&&(s=s(h,c))}var d=n.getModel("itemStyle").getItemStyle(),f=(0,td.UL)(a,"color");d.fill||(d.fill=f),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ap);const up=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Yd);var hp=n(7145),cp=(0,S.Yf)(),dp=function(t,e,n,i){var r,o=t.getData();if((0,p.isArray)(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=(0,p.retrieve)(i.yAxis,i.xAxis);else{var u=ep(i,o,e,t);s=u.valueAxis,l=rp(o,(0,m.IR)(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,d=(0,p.clone)(i),f={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,f.coord[c]=1/0;var g=n.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=f.coord[h]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var v=[tp(t,r[0]),tp(t,r[1]),(0,p.extend)({},r[2])];return v[2].type=v[2].type||null,(0,p.merge)(v[2],v[0]),(0,p.merge)(v[2],v[1]),v};function pp(t){return!isNaN(t)&&!isFinite(t)}function fp(t,e,n,i){var r=1-t,o=i.dimensions[t];return pp(e[r])&&pp(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function gp(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(fp(1,n,i,t)||fp(0,n,i,t)))return!0}return np(t,e[0])&&np(t,e[1])}function mp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get("x"),r.getWidth()),u=Vt.GM(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if(z(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;pp(t.get(h[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):pp(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}const vp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=cp(e).from,o=cp(e).to;r.each((function(e){mp(r,e,!0,t,n),mp(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new hp.Z);this.group.add(l.group);var u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=new le.Z(i,n),a=new le.Z([],n),s=(0,p.map)(n.get("data"),(0,p.curry)(dp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(gp,t)));var l=ip(!!t,i);return r.initData((0,p.map)(s,(function(t){return t[0]})),null,l),o.initData((0,p.map)(s,(function(t){return t[1]})),null,l),a.initData((0,p.map)(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,d=u.line;cp(e).from=h,cp(e).to=c,e.setData(d);var f=e.get("symbol"),g=e.get("symbolSize"),m=e.get("symbolRotate"),v=e.get("symbolOffset");function y(e,n,r){var o=e.getItemModel(n);mp(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=(0,td.UL)(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:(0,p.retrieve2)(o.get("symbolRotate",!0),m[r?0:1]),symbolSize:(0,p.retrieve2)(o.get("symbolSize"),g[r?0:1]),symbol:(0,p.retrieve2)(o.get("symbol",!0),f[r?0:1]),style:s})}(0,p.isArray)(f)||(f=[f,f]),(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(v)||(v=[v,v]),u.from.each((function(t){y(h,t,!0),y(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){(0,V.A)(t).dataModel=e,t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ap);const yp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Yd);var _p=(0,S.Yf)(),xp=function(t,e,n,i){var r=tp(t,i[0]),o=tp(t,i[1]),a=r.coord,s=o.coord;a[0]=(0,p.retrieve)(a[0],-1/0),a[1]=(0,p.retrieve)(a[1],-1/0),s[0]=(0,p.retrieve)(s[0],1/0),s[1]=(0,p.retrieve)(s[1],1/0);var l=(0,p.mergeAll)([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function bp(t){return!isNaN(t)&&!isFinite(t)}function wp(t,e,n,i){var r=1-t;return bp(e[r])&&bp(n[r])}function Sp(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return z(t,"cartesian2d")?!(!n||!i||!wp(1,n,i)&&!wp(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!Jd(e)&&!Jd(n))||t.containZone(e.coord,n.coord)}(t,r,o):np(t,r)||np(t,o)}function Tp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get(n[0]),r.getWidth()),u=Vt.GM(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[p=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(z(a,"cartesian2d")){var c=a.getAxis("x"),d=a.getAxis("y"),p=t.get(n[0],e),f=t.get(n[1],e);bp(p)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):bp(f)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Mp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Cp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=(0,p.map)(Mp,(function(r){return Tp(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new c.Z});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},i),{name:t,ordinalMeta:null})}));r=(0,p.map)(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new le.Z(r,n)}else r=[{name:"value",type:"float"}],i=new le.Z(r,n);var s=(0,p.map)(n.get("data"),(0,p.curry)(xp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(Sp,t)));var l=t?function(t,e,n,i){var o=t.coord[Math.floor(i/2)][i%2];return(0,Kd.yQ)(o,r[i])}:function(t,e,n,i){return(0,Kd.yQ)(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=(0,p.map)(Mp,(function(n){return Tp(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Vt.dt(c),Vt.dt(d);var f=!!(l[0]>c[1]||l[1]d[1]||h[1]i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),ft.T9(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Np(i,t)}))}))}var Bp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Ep(i,e,{pan:(0,p.bind)(Zp.pan,this),zoom:(0,p.bind)(Zp.zoom,this),scrollMove:(0,p.bind)(Zp.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Op(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return(0,Ba.Z)(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Fp((function(t,e,n,i,r,o){var a=Vp[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:Fp((function(t,e,n,i,r,o){return Vp[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function Fp(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return(0,Ba.Z)(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var Vp={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};const Gp=Bp;var Hp=n(7543);function Up(t){(0,Hp.Z)(t),t.registerComponentModel(Dp),t.registerComponentView(Gp),zp(t)}const Wp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,ut.ZL)(Ip.Z.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Ip.Z);var jp=n(1158),Xp=dt.Z,Yp="horizontal",qp="vertical",Kp=["line","bar","candlestick","scatter"],Jp={easing:"cubicOut",duration:100,delay:0},Qp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),ft.T9(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ft.ZH(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new c.Z;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===Yp?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Gt.tE(t.option);(0,p.each)(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Gt.ME(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===qp&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==Yp||r?n===Yp&&r?{scaleY:a?1:-1,scaleX:-1}:n!==qp||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Xp({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Xp({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(r!==this._shadowData||o!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(y>0&&e%y)v+=m;else{var n=null==t||isNaN(t)||""===t,i=n?0:(0,Vt.NU)(t,l,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,h=n}})),a=this._shadowPolygonPts=f,s=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=o,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var b=w(1===x);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new c.Z,i=new _n.Z({shape:{points:a},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new qt.Z({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){var a=t.getAxisProxy(r,o).getTargetSeriesModels();(0,p.each)(a,(function(t){if(!(n||!0!==e&&(0,p.indexOf)(Kp,t.get("type"))<0)){var a,s=i.getComponent((0,Pp.jQ)(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Xp({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Xp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],(function(e){var o=a.get("handleIcon");!h.Pw[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=(0,h.th)(o,-1,0,2,2,null,!0);s.attr({cursor:$p(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,e),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=(0,Vt.GM)(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,B.vF)(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var d=a.getModel("textStyle");t.add(i[e]=new w.ZP({silent:!0,invisible:!0,style:(0,Z.Lr)(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var f=(0,Vt.GM)(a.get("moveHandleSize"),o[1]),g=e.moveHandle=new dt.Z({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:f}}),m=.8*f,v=e.moveHandleIcon=(0,h.th)(a.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);v.silent=!0,v.y=o[1]+f/2-.5,g.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(f,10));(d=e.moveZone=new dt.Z({invisible:!0,shape:{y:o[1]-y,height:f+y}})).on("mouseover",(function(){s.enterEmphasis(g)})).on("mouseout",(function(){s.leaveEmphasis(g)})),r.add(g),r.add(v),r.add(d)}d.attr({draggable:!0,cursor:$p(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[(0,Vt.NU)(t[0],[0,100],e,!0),(0,Vt.NU)(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];(0,Ba.Z)(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?(0,Vt.NU)(o.minSpan,a,r,!0):null,null!=o.maxSpan?(0,Vt.NU)(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=(0,Vt.dt)([(0,Vt.NU)(i[0],r,a,!0),(0,Vt.NU)(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=(0,Vt.dt)(n.slice()),r=this._size;(0,p.each)([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Kt.Z(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=(0,Vt.dt)([(0,Vt.NU)(n.x,i,r,!0),(0,Vt.NU)(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(jp.sT(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new Xp({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Jp:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=(0,Pp.rg)(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lp.Z);function $p(t){return"vertical"===t?"ns-resize":"ew-resize"}const tf=Qp;function ef(t){t.registerComponentModel(Wp),t.registerComponentView(tf),(0,Hp.Z)(t)}var nf={get:function(t,e,n){var i=p.clone((rf[t]||{})[e]);return n&&p.isArray(i)?i[i.length-1]:i}},rf={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const of=nf;var af=Vo.mapVisual,sf=Vo.eachVisual,lf=p.isArray,uf=p.each,hf=Vt.dt,cf=Vt.NU,df=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=p.bind(t,this),this.controllerVisuals=id(this.option.controller,e,t),this.targetVisuals=id(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=S.kF(t),e},e.prototype.eachTargetSeries=function(t,e){p.each(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],p.isArray(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return p.isString(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):p.isFunction(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=hf([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});p.merge(i,n),p.merge(r,n);var o=this.isCategory();function a(n){lf(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},uf(i,(function(t,e){if(Vo.isValidType(e)){var n=of.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";uf(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&p.clone(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&p.clone(n)||(o?s[0]:[s[0],s[0]])),l.symbol=af(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;sf(u,(function(t){t>h&&(h=t)})),l.symbolSize=af(u,(function(t){return cf(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(be.Z);const pf=df;var ff=[20,140],gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=ff[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=ff[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):p.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Vt.dt((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=mf(this,"outOfRange",this.getExtent()),n=mf(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new c.Z("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();Tf([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=Sf(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var d=ct.applyTransform(n.handleLabelPoints[l],ct.getTransform(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=Sf(t,o,s,!0),p=a[0]-c/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=ct.applyTransform(l.indicatorLabelPoint,ct.getTransform(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:p,y:d,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),m.animateTo(x,b)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||Df(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=S.XI(h,c);this._dispatchHighDown("downplay",wf(d[0],n)),this._dispatchHighDown("highlight",wf(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=(0,V.A)(e).dataIndex){var i=(0,V.A)(e),r=this.ecModel.getSeriesByIndex(i.seriesIndex);if(n.isTargetSeries(r)){var o=r.getData(i.dataType),a=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function kf(t,e,n,i){for(var r=e.targetVisuals[i],o=Vo.prepareVisualTypes(r),a={color:(0,td.UL)(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(Of,Ef),(0,p.each)(Nf,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(zf))}function Vf(t){t.registerComponentModel(vf),t.registerComponentView(Pf),Ff(t)}var Gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Hf[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=p.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p.map(this._pieceList,(function(t){return t=p.clone(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=Vo.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}p.each(e.pieces,(function(t){p.each(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),p.each(n,(function(t,n){var i=!1;p.each(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&p.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=of.get(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var e=Vo.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){Vo.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return p.each(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=(0,ut.ZL)(pf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(pf),Hf={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function Uf(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const Wf=Gf;const jf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=p.retrieve(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),p.each(l.viewPieceList,(function(i){var l=i.piece,u=new c.Z;u.onclick=p.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),h){var f=this.visualMapModel.getValueState(d);u.add(new w.ZP({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===f?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Gt.BZ(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:wf(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return bf(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new c.Z,a=this.visualMapModel.textStyleModel;o.add(new w.ZP({style:(0,Z.Lr)(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=p.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add((0,h.th)(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=p.clone(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,p.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(_f);function Xf(t){t.registerComponentModel(Wf),t.registerComponentView(jf),Ff(t)}var Yf={label:{enabled:!0},decal:{show:!1}},qf=(0,S.Yf)(),Kf={};function Jf(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=p.clone(Yf);p.merge(i.label,t.getLocaleModel().get("aria"),!1),p.merge(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=p.createHashMap();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),qf(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(p.isFunction(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=(0,eo.i)(e.ecModel,e.name,Kf,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=qf(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=(0,eo.i)(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?p.extend(p.extend({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=p.defaults(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(d){var f=o.get(["general","withTitle"]);s=r(f,{title:d})}else s=o.get(["general","withoutTitle"]);var g=[],m=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(m,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),d=o.get(["data","separator","end"]),p=[],f=0;f":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tg=function(){function t(t){if(null==(this._condVal=(0,p.isString)(t)?new RegExp(t):(0,p.isRegExp)(t)?t:null)){0,(0,Vs._y)("")}}return t.prototype.evaluate=function(t){var e=typeof t;return(0,p.isString)(e)?this._condVal.test(t):!!(0,p.isNumber)(e)&&this._condVal.test(t+"")},t}(),eg=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),ng=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){yg(t,i)&&yg(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nT:A2&&l.push(e),l}function xg(t,e,n,i,r,o,a,s,l,u){if(yg(t,n)&&yg(e,i)&&yg(r,a)&&yg(o,s))l.push(a,s);else{var h=2/u,c=h*h,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,m=i-e,v=r-a,y=o-s,_=g*g+m*m,x=v*v+y*y;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],T=[];(0,C.Vz)(t,n,r,a,.5,S),(0,C.Vz)(e,i,o,s,.5,T),xg(S[0],T[0],S[1],T[1],S[2],T[2],S[3],T[3],l,u),xg(S[4],T[4],S[5],T[5],S[6],T[6],S[7],T[7],l,u)}}}}function bg(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=bg([l,u],h?0:1,e),d=(h?s:u)/c.length,p=0;p1?null:new Kt.Z(p*l+t,p*u+e)}function Mg(t,e,n){var i=new Kt.Z;Kt.Z.sub(i,n,e),i.normalize();var r=new Kt.Z;return Kt.Z.sub(r,t,e),r.dot(i)}function Cg(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function Ag(t){var e=t.points,n=[],i=[];(0,Lr.zk)(e,n,i);var r=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Kt.Z,h=new Kt.Z;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=bg([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,d=0;d0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),T=Math.cos(w),M=0;for(_=0;_0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function Hg(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=(0,p.map)(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return(0,p.map)(o,(function(o,a){return{cp:o,z:Gg(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function Ug(t){return Dg(t.path,t.count)}function Wg(t){return(0,p.isArray)(t[0])}function jg(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var Xg={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);Wg(t)&&(s=t,l=e),Wg(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?jg(l,s):jg(c?e:t,[c?t:e]),f=0,g=0;g1e4))for(var i=n.getIndices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof T.ZP&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function nm(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function im(t){return(0,p.isArray)(t)?t.sort().join(","):t}function rm(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function om(t,e){for(var n=0;n=0&&r.push({data:e.oldData[n],divide:rm(e.oldData[n]),dim:t.dimension})})),(0,p.each)((0,S.kF)(t.to),(function(t){var e=om(n.updatedSeries,t);if(e>=0){var i=n.updatedSeries[e].getData();o.push({data:i,divide:rm(i),dim:t.dimension})}})),r.length>0&&o.length>0&&em(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=(0,p.createHashMap)(),i=(0,p.createHashMap)(),r=(0,p.createHashMap)();return(0,p.each)(t.oldSeries,(function(e,n){var o=t.oldData[n],a=nm(e),s=im(a);i.set(s,o),(0,p.isArray)(a)&&(0,p.each)(a,(function(t){r.set(t,{data:o,key:s})}))})),(0,p.each)(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.getData(),o=nm(t),a=im(o),s=i.get(a);if(s)n.set(a,{oldSeries:[{divide:rm(s),data:s}],newSeries:[{divide:rm(e),data:e}]});else if((0,p.isArray)(o)){var l=[];(0,p.each)(o,(function(t){var e=i.get(t);e&&l.push({divide:rm(e),data:e})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:e,divide:rm(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldSeries:[{data:u.data,divide:rm(u.data)}],newSeries:[]},n.set(u.key,h)),h.newSeries.push({data:e,divide:rm(e)})}}}})),n}(i,n);(0,p.each)(o.keys(),(function(t){var n=o.get(t);em(n.oldSeries,n.newSeries,e)}))}(0,p.each)(n.updatedSeries,(function(t){t[u.V]&&(t[u.V]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldData=[],h=0;h{"use strict";function i(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function r(t,e,n,r){var o=t.getZoom(),a=t.getCenter(),s=e.zoom,l=t.projectedToPoint?t.projectedToPoint(a):t.dataToPoint(a);if(null!=e.dx&&null!=e.dy&&(l[0]-=e.dx,l[1]-=e.dy,t.setCenter(i(t,l),r)),null!=s){if(n){var u=n.min||0,h=n.max||1/0;s=Math.max(Math.min(o*s,h),u)/o}t.scaleX*=s,t.scaleY*=s;var c=(e.originX-t.x)*(s-1),d=(e.originY-t.y)*(s-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(i(t,l),r),t.setZoom(s*o)}return{center:t.getCenter(),zoom:t.getZoom()}}n.d(e,{A:()=>r})},9266:(t,e,n)=>{"use strict";n.d(e,{D:()=>s,KZ:()=>l,XD:()=>d,Zi:()=>p,_W:()=>f,bX:()=>h,eq:()=>u,ke:()=>o});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e,n,r,o){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var l="update"===t;if(e&&e.isAnimationEnabled()){var u=void 0,h=void 0,c=void 0;return r?(u=(0,i.retrieve2)(r.duration,200),h=(0,i.retrieve2)(r.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(u=a.duration),null!=a.easing&&(h=a.easing),null!=a.delay&&(c=a.delay)),(0,i.isFunction)(c)&&(c=c(n,o)),(0,i.isFunction)(u)&&(u=u(n)),{duration:u||0,delay:c,easing:h}}return null}function a(t,e,n,r,a,s,l){var u,h=!1;(0,i.isFunction)(a)?(l=s,s=a,a=null):(0,i.isObject)(a)&&(s=a.cb,l=a.during,h=a.isFrom,u=a.removeOpt,a=a.dataIndex);var c="leave"===t;c||e.stopAnimation("leave");var d=o(t,r,a,c?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(e,a):null);if(d&&d.duration>0){var p={duration:d.duration,delay:d.delay||0,easing:d.easing,done:s,force:!!s||!!l,setToFinal:!c,scope:t,during:l};h?e.animateFrom(n,p):e.animateTo(n,p)}else e.stopAnimation(),!h&&e.attr(n),l&&l(1),s&&s()}function s(t,e,n,i,r,o){a("update",t,e,n,i,r,o)}function l(t,e,n,i,r,o){a("enter",t,e,n,i,r,o)}function u(t){if(!t.__zr)return!0;for(var e=0;e{"use strict";n.d(e,{N:()=>v});var i=n(655),r=n(8162),o=n(1525),a=n(8154),s=n(6357),l=n(6351);function u(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var h=function(t){function e(e,n){var i=t.call(this)||this,r=new l.Z(e,n),o=new a.Z;return i.add(r),i.add(o),i.updateData(e,n),i}return(0,i.ZT)(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),a=0;a{"use strict";n.d(e,{N:()=>dt});var i=n(3051);function r(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),r=t.getGraph().data,o=n.mapArray(n.getName);r.filterSelf((function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){(0,i.isNumber)(n)&&(n=o[n]);for(var a=0;ar&&(r=e);var a=r%2?r+2:r+3;o=[];for(var s=0;s=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Y(t,e){var n=[],i=F.Lx,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[l.clone(u[0]),l.clone(u[1])],u[2]&&u.__original.push(l.clone(u[2])));var d=u.__original;if(null!=u[2]){if(l.copy(r[0],d[0]),l.copy(r[1],d[2]),l.copy(r[2],d[1]),h&&"none"!==h){var p=x(t.node1),f=X(r,d[0],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){p=x(t.node2),f=X(r,d[1],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]}l.copy(u[0],r[0]),l.copy(u[1],r[2]),l.copy(u[2],r[1])}else{if(l.copy(o[0],d[0]),l.copy(o[1],d[1]),l.sub(a,o[1],o[0]),l.normalize(a,a),h&&"none"!==h){p=x(t.node1);l.scaleAndAdd(o[0],o[0],a,p*e)}if(c&&"none"!==c){p=x(t.node2);l.scaleAndAdd(o[1],o[1],a,-p*e)}l.copy(u[0],o[0]),l.copy(u[1],o[1])}}))}var q=n(5797),K=n(106);function J(t){return"view"===t.type}var Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,E.ZT)(e,t),e.prototype.init=function(t,e){var n=new N.Z,i=new k.Z,r=this.group;this._controller=new R.Z(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,s=this._lineDraw,l=this.group;if(J(o)){var u={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?l.attr(u):Z.D(l,u,t)}Y(t.getGraph(),_(t));var h=t.getData();a.updateData(h);var c=t.getEdgeData();s.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p),h.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){d&&(d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,p),d.setFixed(e),h.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(e)})),n.setDraggable(o&&!!d,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&((0,K.A)(n).focus=t.getAdjacentDataIndices())}})),h.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&((0,K.A)(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),m=h.getLayout("cy");h.eachItemGraphicEl((function(t,e){var n=h.getItemModel(e).get(["label","rotate"])||0,r=t.getSymbolPath();if(f){var o=h.getItemLayout(e),a=Math.atan2(o[1]-m,o[0]-g);a<0&&(a=2*Math.PI+a);var s=o[0] "),value:r.value,noValue:null==r.value})}return(0,st.w)({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=i.map(this.option.categories||[],(function(t){return null!=t.value?t:i.extend({value:0},t)})),e=new tt.Z(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ot.Z);const ut=lt;var ht=n(553),ct={type:"graphRoam",event:"graphRoam",update:"none"};function dt(t){t.registerChartView($),t.registerSeriesModel(ut),t.registerProcessor(r),t.registerVisual(o),t.registerVisual(s),t.registerLayout(y),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,M),t.registerLayout(I),t.registerCoordinateSystem("graphView",{dimensions:D.Z.dimensions,create:O}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},i.noop),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},i.noop),t.registerAction(ct,(function(t,e,n){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,r=(0,ht.A)(i,t,void 0,n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom)}))}))}},9971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>M});var i=n(655),r=n(3051),o=n(5280),a=n(1525),s=n(2095),l=n(4174),u=n(327),h=s.Z.prototype,c=l.Z.prototype,d=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}(0,i.ZT)(e,t)}(d);function p(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}const f=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new d},e.prototype.buildPath=function(t,e){p(e)?h.buildPath.call(this,t,e):c.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return p(this.shape)?h.pointAt.call(this,t):c.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=p(e)?[e.x2-e.x1,e.y2-e.y1]:c.tangentAt.call(this,t);return o.normalize(n,n)},e}(u.ZP);var g=n(9266),m=n(8154),v=n(6357),y=n(6006),_=n(5669),x=["fromSymbol","toSymbol"];function b(t){return"_"+t+"Type"}function w(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),s=e.getItemVisual(n,t+"Offset"),l=e.getItemVisual(n,t+"KeepAspect"),u=a.zp(r),h=a.Cq(s||0,u),c=a.th(i,-u[0]/2+h[0],-u[1]/2+h[1],u[0],u[1],null,l);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=t,c}}function S(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var T=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return(0,i.ZT)(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new f({name:"line",subPixelOptimize:!0});return S(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,g.KZ(o,{shape:{percent:1}},i,e),this.add(o),(0,r.each)(x,(function(n){var i=w(n,t,e);this.add(i),this[b(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),s={shape:{}};S(s.shape,a),g.D(o,s,i,e),(0,r.each)(x,(function(n){var i=t.getItemVisual(e,n),r=b(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=w(n,t,e);this.add(o)}this[r]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,l=n&&n.selectLineStyle,u=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),f=p.getModel("emphasis");a=f.getModel("lineStyle").getLineStyle(),s=p.getModel(["blur","lineStyle"]).getLineStyle(),l=p.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),d=f.get("blurScope"),u=(0,y.k3)(p)}var g=t.getItemVisual(e,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=a,o.ensureState("blur").style=s,o.ensureState("select").style=l,(0,r.each)(x,(function(t){var e=this.childOfName(t);if(e){e.setColor(m),e.style.opacity=g.opacity;for(var n=0;n0&&(_[0]=-_[0],_[1]=-_[1]);var b=y[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(y[1],y[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*g+u[0],i.y=-c[1]*m+u[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=g*b+u[0],i.y=u[1]+S,d=y[0]<0?"right":"left",i.originX=-g*b,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-g*b+h[0],i.y=h[1]+S,d=y[0]>=0?"right":"left",i.originX=g*b,i.originY=-S}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}}}function T(t,e){var n=t.__specifiedRotation;if(null==n){var i=s.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(m.Z);const M=T},7145:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(8154),r=n(1177),o=n(9971),a=n(6006);function s(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:(0,a.k3)(e)}}function l(t){return isNaN(t[0])||isNaN(t[1])}function u(t){return t&&!l(t[0])&&!l(t[1])}const h=function(){function t(t){this.group=new i.Z,this._LineCtor=t||o.Z}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=s(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=s(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i{"use strict";n.d(e,{Z:()=>f});var i=n(655),r=n(1525),o=n(9266),a=n(8154),s=n(106),l=n(6357),u=n(3140),h=n(3051),c=n(6006),d=n(4535);function p(t,e){this.parent.drift(t,e)}const f=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,i.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var a=(0,r.th)(t,-1,-1,2,2,null,o);a.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=p,this._symbolType=t,this.add(a)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,l.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,l.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var a=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=a!==this._symbolType,h=r&&r.disableAnimation;if(u){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,t,n,l,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?p.attr(d):o.D(p,d,s,n),(0,o.Zi)(p)}if(this._updateCommon(t,n,l,i,r),u){var p=this.childAt(0);if(!h){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,o.KZ(p,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,o){var a,s,p,f,g,m,v,y,_,x=this.childAt(0),b=t.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,p=i.selectItemStyle,f=i.focus,g=i.blurScope,v=i.labelStatesModels,y=i.hoverScale,_=i.cursorStyle,m=i.emphasisDisabled),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");a=S.getModel("itemStyle").getItemStyle(),p=w.getModel(["select","itemStyle"]).getItemStyle(),s=w.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),g=S.get("blurScope"),m=S.get("disabled"),v=(0,c.k3)(w),y=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0);var M=(0,r.Cq)(t.getItemVisual(e,"symbolOffset"),n);M&&(x.x=M[0],x.y=M[1]),_&&x.attr("cursor",_);var C=t.getItemVisual(e,"style"),A=C.fill;if(x instanceof d.ZP){var I=x.style;x.useStyle((0,h.extend)({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},C))}else x.__isEmptyBrush?x.useStyle((0,h.extend)({},C)):x.useStyle(C),x.style.decal=null,x.setColor(A,o&&o.symbolInnerColor),x.style.strokeNoScale=!0;var D=t.getItemVisual(e,"liftZ"),L=this._z2;null!=D?null==L&&(this._z2=x.z2,x.z2+=D):null!=L&&(x.z2=L,this._z2=null);var P=o&&o.useNameLabel;(0,c.ni)(x,v,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return P?t.getName(e):(0,u.H)(t,e)},inheritColor:A,defaultOpacity:C.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=x.ensureState("emphasis");if(O.style=a,x.ensureState("select").style=p,x.ensureState("blur").style=s,y){var E=Math.max((0,h.isNumber)(y)?y:1.1,3/this._sizeY);O.scaleX=this._sizeX*E,O.scaleY=this._sizeY*E}this.setSymbolScale(1),(0,l.k5)(this,f,g,m)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=(0,s.A)(this).dataIndex,a=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&o.bX(l,{style:{opacity:0}},e,{dataIndex:r,removeOpt:a,cb:function(){i.removeTextContent()}})}else i.removeTextContent();o.bX(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:a})},e.getSymbolSize=function(t,e){return(0,r.zp)(t.getItemVisual(e,"symbolSize"))},e}(a.Z)},8162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(8154),r=n(9266),o=n(1177),a=n(6351),s=n(3051),l=n(6006);function u(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function h(t){return null==t||(0,s.isObject)(t)||(t={isIgnore:t}),t||{}}function c(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:(0,l.k3)(e),cursorStyle:e.get("cursor")}}const d=function(){function t(t){this.group=new i.Z,this._SymbolCtor=t||a.Z}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=h(e);var n=this.group,i=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=c(t),d={disableAnimation:s},p=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var r=p(i);if(u(t,r,i,e)){var o=new a(t,i,l,d);o.setPosition(r),t.setItemGraphicEl(i,o),n.add(o)}})).update((function(h,c){var f=o.getItemGraphicEl(c),g=p(h);if(u(t,g,h,e)){var m=t.getItemVisual(h,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)n.remove(f),(f=new a(t,h,l,d)).setPosition(g);else{f.updateData(t,h,l,d);var y={x:g[0],y:g[1]};s?f.attr(y):r.D(f,y,i)}n.add(f),t.setItemGraphicEl(h,f)}else n.remove(f)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=p,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=c(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=h(n);for(var r=t.start;r{"use strict";n.d(e,{ID:()=>l,X0:()=>u,lQ:()=>h});var i=n(5151),r=n(9266),o=n(7214),a=n(5669),s=n(3051);function l(t,e,n,o,a){var l=t.getArea(),u=l.x,h=l.y,c=l.width,d=l.height,p=n.get(["lineStyle","width"])||2;u-=p/2,h-=p/2,c+=p,d+=p,u=Math.floor(u),c=Math.round(c);var f=new i.Z({shape:{x:u,y:h,width:c,height:d}});if(e){var g=t.getBaseAxis(),m=g.isHorizontal(),v=g.inverse;m?(v&&(f.shape.x+=c),f.shape.width=0):(v||(f.shape.y+=d),f.shape.height=0);var y=(0,s.isFunction)(a)?function(t){a(t,f)}:null;r.KZ(f,{shape:{width:c,height:d,x:u,y:h}},n,null,o,y)}return f}function u(t,e,n){var i=t.getArea(),s=(0,a.NM)(i.r0,1),l=(0,a.NM)(i.r,1),u=new o.C({shape:{cx:(0,a.NM)(t.cx,1),cy:(0,a.NM)(t.cy,1),r0:s,r:l,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?u.shape.endAngle=i.startAngle:u.shape.r=s,r.KZ(u,{shape:{endAngle:i.endAngle,r:l}},n));return u}function h(t,e,n,i,r){return t?"polar"===t.type?u(t,e,n):"cartesian2d"===t.type?l(t,e,n,i,r):null:null}},1764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101);function o(t){return"_EC_"+t}var a=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[o(t)]){var i=new s(t,e);return i.hostGraph=this,this.nodes.push(i),n[o(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[o(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,a=this._edgesMap;if(i.isNumber(t)&&(t=this.nodes[t]),i.isNumber(e)&&(e=this.nodes[e]),t instanceof s||(t=r[o(t)]),e instanceof s||(e=r[o(e)]),t&&e){var u=t.id+"-"+e.id,h=new l(t,e,n);return h.hostGraph=this,this._directed&&(t.outEdges.push(h),e.inEdges.push(h)),t.edges.push(h),t!==e&&e.edges.push(h),this.edges.push(h),a[u]=h,h}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof s&&(t=t.id),e instanceof s&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof s||(e=this._nodesMap[o(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}i.mixin(s,u("hostGraph","data")),i.mixin(l,u("hostGraph","edgeData"));const h=a;var c=n(9344),d=n(5623),p=n(4267),f=n(8455),g=n(2234);function m(t,e,n,o,a){for(var s=new h(o),l=0;l "+x)),v++)}var b,w=n.get("coordinateSystem");if("cartesian2d"===w||"polar"===w)b=(0,f.Z)(t,n);else{var S=p.Z.get(w),T=S&&S.dimensions||[];i.indexOf(T,"value")<0&&T.concat(["value"]);var M=(0,d.Z)(t,{coordDimensions:T,encodeDefine:n.getEncode()}).dimensions;(b=new r.Z(M,n)).initData(t)}var C=new r.Z(["value"],n);return C.initData(m,u),a&&a(b,C),(0,c.Z)({mainData:b,struct:s,structAttr:"graph",datas:{node:b,edge:C},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},5682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2234);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},8455:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101),o=n(5623),a=n(381),s=n(2234),l=n(4267),u=function(t){this.coordSysDims=[],this.axisMap=(0,i.createHashMap)(),this.categoryAxisMap=(0,i.createHashMap)(),this.coordSysName=t};var h={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",s.C6).models[0],o=t.getReferringComponents("yAxis",s.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),c(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),c(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",s.C6).models[0];e.coordSysDims=["single"],n.set("single",r),c(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",s.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),c(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),c(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.each)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),c(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function c(t){return"category"===t.get("type")}var d=n(9574),p=n(9936),f=n(1772),g=n(4279);const m=function(t,e,n){n=n||{};var c,m=e.getSourceManager(),v=!1;t?(v=!0,c=(0,d.nx)(t)):v=(c=m.getSource()).sourceFormat===g.cy;var y=function(t){var e=t.get("coordinateSystem"),n=new u(e),i=h[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),_=function(t,e){var n,r=t.get("coordinateSystem"),o=l.Z.get(r);return e&&e.coordSysDims&&(n=i.map(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=(0,a.T)(r)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(e,y),x=n.useEncodeDefaulter,b=i.isFunction(x)?x:x?i.curry(f.pY,_,e):null,w={coordDimensions:_,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!v},S=(0,o.Z)(c,w),T=function(t,e,n){var r,o;return n&&i.each(t,(function(t,i){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==r||(t[r].otherDims.itemName=0),r}(S.dimensions,n.createInvertedIndices,y),M=v?null:m.getSharedDataStore(S),C=(0,p.BM)(e,{schema:S,store:M}),A=new r.Z(S,e);A.setCalculationInfo(C);var I=null!=T&&function(t){if(t.sourceFormat===g.cy){var e=function(t){var e=0;for(;e{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(8540),r=n(3051);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=(0,i.hk)(t,e,n[0]);return null!=o?o+"":null}if(r){for(var a=[],s=0;s=0&&i.push(e[a])}return i.join(" ")}},241:(t,e,n)=>{"use strict";n.d(e,{N:()=>B});var i=n(655),r=n(7145),o=n(8154),a=n(9971),s=n(3051),l=n(1525),u=n(5280),h=n(8554);const c=function(t){function e(e,n,i){var r=t.call(this)||this;return r.add(r.createLine(e,n,i)),r._updateEffectSymbol(e,n),r}return(0,i.ZT)(e,t),e.prototype.createLine=function(t,e,n){return new a.Z(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");s.isArray(i)||(i=[i,i]);var o=t.getItemVisual(e,"style"),a=n.get("color")||o&&o.stroke,u=this.childAt(1);this._symbolType!==r&&(this.remove(u),(u=(0,l.th)(r,-.5,-.5,1,1,a)).z2=100,u.culling=!0,this.add(u)),u&&(u.setStyle("shadowColor",a),u.setStyle(n.getItemStyle(["color"])),u.scaleX=i[0],u.scaleY=i[1],u.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=t.getItemLayout(n),o=1e3*e.get("period"),a=e.get("loop"),l=e.get("constantSpeed"),u=s.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3}));if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop){i.stopAnimation();var h=void 0;h=s.isFunction(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a)}this._period=o,this._loop=a}},e.prototype._animateSymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getLineLength=function(t){return u.dist(t.__p1,t.__cp1)+u.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=h.Zm,l=h.AZ;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var c=l(e[0],i[0],n[0],r),d=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(c);var y=n(479),_=n(327),x=n(3640),b=n(5674),w=n(106),S=function(){this.polyline=!1,this.curveness=0,this.segs=[]},T=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,i.ZT)(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new S},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,d=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){var f=(u+d)/2-(h-p)*r,g=(h+p)/2-(d-u)*r;if(b.m(u,h,f,g,d,p,o,t,e))return a}else if(x.m(u,h,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const C={seriesType:"lines",plan:(0,n(5682).Z)(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&(0,A.lQ)(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=C.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),s=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&s===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=s?new M:new r.Z(o?i?v:m:i?c:a.Z),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(n(5797).Z);var D=n(3321),L=n(5101),P=n(5685),O="undefined"==typeof Uint32Array?Array:Uint32Array,E="undefined"==typeof Float64Array?Array:Float64Array;function N(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=(0,s.map)(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),(0,s.mergeAll)([e,t[0],t[1]])})))}const k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return(0,i.ZT)(e,t),e.prototype.init=function(e){e.data=e.data||[],N(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(N(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=(0,s.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=(0,s.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(D.Z);function R(t){return t instanceof Array||(t=[t,t]),t}const z={seriesType:"lines",reset:function(t){var e=R(t.get("symbol")),n=R(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=R(n.getShallow("symbol",!0)),r=R(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};function B(t){t.registerChartView(I),t.registerSeriesModel(k),t.registerLayout(C),t.registerVisual(z)}},8608:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var i=n(3051),r=n(8154),o=n(2095),a=n(6498),s=n(1177),l=n(106),u=n(6006),h=n(1497),c=n(5669),d=n(1525),p=n(2892),f=n(5280),g=n(7947),m=n(4162),v=Math.PI,y=function(){function t(t,e){this.group=new r.Z,this.opt=e,this.axisModel=t,(0,i.defaults)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Z({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!_[t]},t.prototype.add=function(t){_[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,c.wW)(e-t);return(0,c.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,c.mW)(o-v)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),_={axisLine:function(t,e,n,r){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=r.transform,u=[s[0],0],h=[s[1],0];l&&((0,f.applyTransform)(u,u,l),(0,f.applyTransform)(h,h,l));var c=(0,i.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new o.Z({subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});p.anid="line",n.add(p);var g=e.get(["axisLine","symbol"]);if(null!=g){var m=e.get(["axisLine","symbolSize"]);(0,i.isString)(g)&&(g=[g,g]),((0,i.isString)(m)||(0,i.isNumber)(m))&&(m=[m,m]);var v=(0,d.Cq)(e.get(["axisLine","symbolOffset"])||0,m),y=m[0],_=m[1];(0,i.each)([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-h[0])*(u[0]-h[0])+(u[1]-h[1])*(u[1]-h[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,d.th)(g[i],-y/2,-_/2,y,_,c.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:u[0]+o*Math.cos(t.rotation),y:u[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,r){var o=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");"auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick"));if(!s||o.scale.isBlank())return;for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),h=S(o.getTicksCoords(),e.transform,u,(0,i.defaults)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c_[1]?-1:1,b=["start"===p?_[0]-x*m:"end"===p?_[1]+x*m:(_[0]+_[1])/2,w(p)?t.labelOffset+f*m:0],S=e.get("nameRotate");null!=S&&(S=S*v/180),w(p)?h=y.innerTextLayout(t.rotation,null!=S?S:t.rotation,f):(h=function(t,e,n,i){var r,o,a=(0,c.wW)(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;(0,c.mW)(a-v/2)?(o=l?"bottom":"top",r="center"):(0,c.mW)(a-1.5*v)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*v&&a>v/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,S||0,_),null!=(d=t.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var T=g.getFont(),M=e.get("nameTruncate",!0)||{},C=M.ellipsis,A=(0,i.retrieve)(t.nameTruncateMaxWidth,M.maxWidth,d),I=new a.ZP({x:b[0],y:b[1],rotation:h.rotation,silent:y.isLabelSilent(e),style:(0,u.Lr)(g,{text:o,font:T,overflow:"truncate",width:A,ellipsis:C,fill:g.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:g.get("align")||h.textAlign,verticalAlign:g.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(s.setTooltipConfig({el:I,componentModel:e,itemName:o}),I.__fullText=o,I.anid="name",e.get("triggerEvent")){var D=y.makeAxisEventDataBase(e);D.targetType="axisName",D.name=o,(0,l.A)(I).eventData=D}r.add(I),I.updateTransform(),n.add(I),I.decomposeTransform()}}};function x(t){t&&(t.ignore=!0)}function b(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=p.identity([]);return p.rotate(r,r,-t.rotation),n.applyTransform(p.mul([],r,t.getLocalTransform())),i.applyTransform(p.mul([],r,e.getLocalTransform())),n.intersect(i)}}function w(t){return"middle"===t||"center"===t}function S(t,e,n,i,r){for(var a=[],s=[],l=[],u=0;u{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(8490),o=n(3166),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(1177),a=n(6498),s=n(9266),l=n(8490),u=n(1158),h=n(270),c=(0,n(2234).Yf)(),d=i.clone,p=i.bind,f=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,o){var a=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,o||this._lastValue!==a||this._lastStatus!==s){this._lastValue=a,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var h={};this.makeElOption(h,a,t,e,n);var c=h.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var p=i.curry(g,e,d);this.updatePointerEl(l,h,p),this.updateLabelEl(l,h,p,e)}else l=this._group=new r.Z,this.createPointerEl(l,h,t,e),this.createLabelEl(l,h,t,e),n.getZr().add(l);_(l,e,!0),this._renderHandle(a)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=l.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var a=c(t).pointerEl=new o[r.type](d(e.pointer));t.add(a)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=c(t).labelEl=new a.ZP(d(e.label));t.add(r),v(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=c(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=c(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),v(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),a=this._handle,s=n.getModel("handle"),l=n.get("status");if(!s.get("show")||!l||"hide"===l)return a&&r.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=o.createIcon(s.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){u.sT(t.event)},onmousedown:p(this._onHandleDragMove,this,0,0),drift:p(this._onHandleDragMove,this),ondragend:p(this._onHandleDragEnd,this)}),r.add(a)),_(a,n,!1),a.setStyle(s.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var c=s.get("size");i.isArray(c)||(c=[c,c]),a.scaleX=c[0]/2,a.scaleY=c[1]/2,h.T9(this,"_doDispatchAxisPointer",s.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){g(this._axisPointerModel,!e&&this._moveAnimation,this._handle,y(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(y(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(y(i)),c(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),h.ZH(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function g(t,e,n,i){m(c(n).lastProp,i)||(c(n).lastProp=i,e?s.D(n,i,t):(n.stopAnimation(),n.attr(i)))}function m(t,e){if(i.isObject(t)&&i.isObject(e)){var n=!0;return i.each(e,(function(e,i){n=n&&m(t[i],e)})),!!n}return t===e}function v(t,e){t[e.get(["label","show"])?"show":"hide"]()}function y(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const x=f},2448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r=n(2234);function o(t,e){var n,o=[],a=t.seriesIndex;if(null==a||!(n=e.getSeriesByIndex(a)))return{point:[]};var s=n.getData(),l=r.gO(s,t);if(null==l||l<0||i.isArray(l))return{point:[]};var u=s.getItemGraphicEl(l),h=n.coordinateSystem;if(n.getTooltipPosition)o=n.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)if(t.isStacked){var c=h.getBaseAxis(),d=h.getOtherAxis(c).dim,p=c.dim,f="x"===d||"radius"===d?1:0,g=s.mapDimension(p),m=[];m[f]=s.get(g,l),m[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),o=h.dataToPoint(m)||[]}else o=h.dataToPoint(s.getValues(i.map(h.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var v=u.getBoundingRect().clone();v.applyTransform(u.transform),o=[v.x+v.width/2,v.y+v.height/2]}return{point:o,el:u}}},6996:(t,e,n)=>{"use strict";n.d(e,{E:()=>h,z:()=>s});var i=n(3051),r=n(6387),o=(0,n(2234).Yf)(),a=i.each;function s(t,e,n){if(!r.default.node){var s=e.getZr();o(s).records||(o(s).records={}),function(t,e){if(o(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);a(o(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}o(t).initialized=!0,n("click",i.curry(u,"click")),n("mousemove",i.curry(u,"mousemove")),n("globalout",l)}(s,e),(o(s).records[t]||(o(s).records[t]={})).handler=n}}function l(t,e,n){t.handler("leave",null,n)}function u(t,e,n,i){e.handler(t,n,i)}function h(t,e){if(!r.default.node){var n=e.getZr();(o(n).records||{})[t]&&(o(n).records[t]=null)}}},7037:(t,e,n)=>{"use strict";n.d(e,{N:()=>A});var i=n(1726),r=n(655),o=n(7329),a=n(5539),s=n(9069),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,l=o.grid,c=i.get("type"),d=u(l,o).getOtherAxis(o).getGlobalExtent(),p=o.toGlobalCoord(o.dataToCoord(e,!0));if(c&&"none"!==c){var f=a.fk(i),g=h[c](o,p,d);g.style=f,t.graphicKey=g.type,t.pointer=g}var m=s.bK(l.model,n);a.gf(e,t,m,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=s.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=a.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=u(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=h[l];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(o.Z);function u(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var h={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:a.BL([e,n[0]],[e,n[1]],c(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:a.uE([e-i/2,n[0]],[i,r],c(t))}}};function c(t){return"x"===t.dim?0:1}const d=l;const p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(n(8071).Z);var f=n(6996);const g=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";f.z("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){f.E("axisPointer",e)},e.prototype.dispose=function(t,e){f.E("axisPointer",e)},e.type="axisPointer",e}(n(3166).Z);var m=n(3051),v=n(8490),y=n(2234),_=n(2448),x=(0,y.Yf)();function b(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||(0,m.bind)(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){C(r)&&(r=(0,_.Z)({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=C(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||C(r),d={},p={},f={list:[],map:{}},g={showPointer:(0,m.curry)(S,p),showTooltip:(0,m.curry)(T,f)};(0,m.each)(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);(0,m.each)(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&w(t,a,g,!1,d)}}))}));var v={};return(0,m.each)(h,(function(t,e){var n=t.linkGroup;n&&!p[e]&&(0,m.each)(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,M(e),M(t)))),v[t.key]=o}}))})),(0,m.each)(v,(function(t,e){w(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];(0,m.each)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,h,d),function(t,e,n,i){if(C(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=x(i)[r]||{},a=x(i)[r]={};(0,m.each)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,m.each)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];(0,m.each)(o,(function(t,e){!a[e]&&l.push(t)})),(0,m.each)(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),d}}function w(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return(0,m.each)(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),(0,m.each)(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&(0,m.extend)(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function S(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function T(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=v.zm(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function M(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function C(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function A(t){i.Z.registerAxisPointerClass("CartesianAxisPointer",d),t.registerComponentModel(p),t.registerComponentView(g),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!(0,m.isArray)(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=(0,v.KM)(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},b)}},8490:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,np:()=>u,r:()=>l,zm:()=>c});var i=n(1497),r=n(3051);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.each)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var d=c(n.model),p=t.coordSysAxesInfo[d]={};t.coordSysMap[d]=n;var f=n.model.getModel("tooltip",o);if((0,r.each)(n.getAxes(),(0,r.curry)(y,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),m="cross"===f.get(["axisPointer","type"]),v=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||m)&&(0,r.each)(v.baseAxes,(0,r.curry)(y,!m||"cross",g)),m&&(0,r.each)(v.otherAxes,(0,r.curry)(y,"cross",!1))}}function y(o,d,g){var m=g.model.getModel("axisPointer",s),v=m.get("show");if(v&&("auto"!==v||o||h(m))){null==d&&(d=m.get("triggerTooltip")),m=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],h={};(0,r.each)(u,(function(t){h[t]=(0,r.clone)(l.get(t))})),h.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===a){var d=l.get(["label","show"]);if(c.show=null==d||d,!s){var p=h.lineStyle=l.get("crossStyle");p&&(0,r.defaults)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(h,n,o))}(g,f,s,e,o,d):m;var y=m.get("snap"),_=c(g.model),x=d||y||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:m,triggerTooltip:d,involveSeries:x,snap:y,useHandle:h(m),seriesModels:[],linkGroup:null};p[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=h(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a{"use strict";n.d(e,{$_:()=>d,BL:()=>m,Rj:()=>y,Zh:()=>f,fk:()=>c,gf:()=>g,gk:()=>p,uE:()=>v});var i=n(3051),r=n(1177),o=n(423),a=n(8988),s=n(2892),l=n(7947),u=n(8608),h=n(6006);function c(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function d(t,e,n,i,r){var s=p(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),u=a.MY(l.get("padding")||0),c=l.getFont(),d=o.lP(s,c),f=r.position,g=d.width+u[1]+u[3],m=d.height+u[0]+u[2],v=r.align;"right"===v&&(f[0]-=g),"center"===v&&(f[0]-=g/2);var y=r.verticalAlign;"bottom"===y&&(f[1]-=m),"middle"===y&&(f[1]-=m/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,g,m,i);var _=l.get("backgroundColor");_&&"auto"!==_||(_=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:(0,h.Lr)(l,{text:s,font:c,fill:l.getTextColor(),padding:u,backgroundColor:_}),z2:10}}function p(t,e,n,r,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var u={value:l.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};i.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&u.seriesData.push(r)})),i.isString(s)?a=s.replace("{value}",a):i.isFunction(s)&&(a=s(u))}return a}function f(t,e,n){var i=s.create();return s.rotate(i,i,n.rotation),s.translate(i,i,n.position),r.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function g(t,e,n,i,r,o){var a=u.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),d(e,i,r,o,{position:f(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function m(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function v(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function y(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}},2719:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(3051),o=n(8071),a=n(6398),s=n(2234),l=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function u(t){var e={};return(0,r.each)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const h=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=u(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=u(t);(0,r.merge)(this.option,t,!0),(0,r.merge)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.createHashMap)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.each)(a.I,(function(n){var i=this.getReferringComponents((0,a.jQ)(n),s.iP);if(i.specified){e=!0;var o=new l;(0,r.each)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";u(n.findComponents({mainType:o+"Axis"}),o)}i&&u(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function u(e,n){var o=e[0];if(o){var a=new l;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var u=o.getReferringComponents("grid",s.C6).models[0];u&&(0,r.each)(e,(function(t){o.componentIndex!==t.componentIndex&&u===t.getReferringComponents("grid",s.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&(0,r.each)(a.I,(function(e){if(i){var r=n.findComponents({mainType:(0,a.jQ)(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new l;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.each)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent((0,a.jQ)(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.each)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent((0,a.jQ)(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.each)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(n(3166).Z)},6398:(t,e,n)=>{"use strict";n.d(e,{BL:()=>l,I:()=>r,jQ:()=>s,kc:()=>a,rg:()=>u});var i=n(3051),r=["x","y","radius","angle","single"],o=["cartesian2d","polar","singleAxis"];function a(t){var e=t.get("coordinateSystem");return(0,i.indexOf)(o,e)>=0}function s(t){return t+"Axis"}function l(t,e){var n,r=(0,i.createHashMap)(),o=[],a=(0,i.createHashMap)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var i=r.get(t);i&&i[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return o}function u(t){var e=t.ecModel,n={infoList:[],infoMap:(0,i.createHashMap)()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(s(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,l=n.infoMap.get(a);l||(l={model:o,axisModels:[]},n.infoList.push(l),n.infoMap.set(a,l)),l.axisModels.push(r)}}})),n}},7543:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(3051),r=n(6398),o=n(5669),a=n(9233),s=n(7947),l=n(8986),u=n(2234),h=i.each,c=o.dt;const d=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if((0,r.kc)(e)){var n=(0,r.jQ)(this._dimName),i=e.getReferringComponents(n,u.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return i.clone(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];h(["start","end"],(function(a,h){var c=t[a],d=t[a+"Value"];"percent"===r[h]?(null==c&&(c=s[h]),d=i.parse(o.NU(c,s,n))):(e=!0,d=null==d?n[h]:i.parse(d),c=o.NU(d,n,s)),u[h]=d,l[h]=c})),c(u),c(l);var d=this._minMaxSpan;function p(t,e,n,r,s){var l=s?"Span":"ValueSpan";(0,a.Z)(0,t,n,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=o.NU(t[u],n,r,!0),s&&(e[u]=i.parse(e[u]))}return e?p(u,l,n,s,!1):p(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];h(n,(function(t){(0,s.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,l.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&h(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var s=e.getStore(),l=i.map(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,o=0;oa[1];if(h&&!c&&!d)return!0;h&&(i=!0),c&&(e=!0),d&&(n=!0)}return i&&e&&n}))}else h(r,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));h(r,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;h(["min","max"],(function(i){var r=e.get(i+"Span"),a=e.get(i+"ValueSpan");null!=a&&(a=this.getAxisModel().axis.scale.parse(a)),null!=a?r=o.NU(n[0]+a,n,[0,100],!0):null!=r&&(a=o.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=a}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=o.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();const p={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var a=t.getComponent((0,r.jQ)(i),o);e(i,o,a,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new d(e,i,o,t),n.push(r.__dzAxisProxy))}));var o=(0,i.createHashMap)();return(0,i.each)(n,(function(t){(0,i.each)(t.getTargetSeriesModels(),(function(t){o.set(t.uid,t)}))})),o},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var f=!1;function g(t){f||(f=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,p),function(t){t.registerAction("dataZoom",(function(t,e){var n=(0,r.BL)(e,t);(0,i.each)(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}},7240:(t,e,n)=>{"use strict";n.d(e,{N:()=>h});var i=n(655),r=n(8071),o=n(3166),a=n(4279),s=n(6437),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new s.U(this),(0,s.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,s.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:a.fY},e}(r.Z),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(o.Z);function h(t){t.registerComponentModel(l),t.registerComponentView(u)}},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>$});var i=n(655),r=n(3051),o=n(3510),a=n(8154),s=n(5151),l=n(1177),u=n(2514),h=n(5094),c=n(582),d=n(4130),p=!0,f=Math.min,g=Math.max,m=Math.pow,v="globalPan",y={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},x={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},b=0,w=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new a.Z,n._uid="brushController_"+b++,(0,r.each)(q,(function(t,e){this._handlers[e]=(0,r.bind)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||c.qn(e,v,this._uid),(0,r.each)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.merge)((0,r.clone)(x),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;c.Ar(t,v,this._uid),(0,r.each)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.each)(t,(function(t){e[t.panelId]=(0,r.clone)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.map)(t,(function(t){return(0,r.merge)((0,r.clone)(x),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new d.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):T(i,S(i,s));A(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(o.Z);function S(t,e){var n=J[e.brushType].createCover(t,e);return n.__brushOption=e,C(n,e),t.group.add(n),n}function T(t,e){var n=I(e);return n.endCreating&&(n.endCreating(t,e),C(e,e.__brushOption)),e}function M(t,e){var n=e.__brushOption;I(e).updateCoverShape(t,e,n.range,n)}function C(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function A(t,e){I(e).updateCommon(t,e),M(t,e)}function I(t){return J[t.__brushOption.brushType]}function D(t,e,n){var i,o=t._panels;if(!o)return p;var a=t._transform;return(0,r.each)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function L(t,e){var n=t._panels;if(!n)return p;var i=e.__brushOption.panelId;return null!=i?n[i]:p}function P(t){var e=t._covers,n=e.length;return(0,r.each)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function O(t,e){var n=(0,r.map)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.clone)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function E(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function N(t,e,n,i){var o=new a.Z;return o.add(new s.Z({name:"main",style:B(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.curry)(V,t,e,o,["n","s","w","e"]),ondragend:(0,r.curry)(O,e,{isEnd:!0})})),(0,r.each)(i,(function(n){o.add(new s.Z({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.curry)(V,t,e,o,n),ondragend:(0,r.curry)(O,e,{isEnd:!0})}))})),o}function k(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=g(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,p=c-o+r/2,f=h-a,m=c-s,v=f+r,y=m+r;z(t,e,"main",a,s,f,m),i.transformable&&(z(t,e,"w",l,u,o,y),z(t,e,"e",d,u,o,y),z(t,e,"n",l,u,v,o),z(t,e,"s",l,p,v,o),z(t,e,"nw",l,u,o,o),z(t,e,"ne",d,u,o,o),z(t,e,"sw",l,p,o,o),z(t,e,"se",d,p,o,o))}function R(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(B(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?F(t,n[0]):function(t,e){var n=[F(t,e[0]),F(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?_[o]+"-resize":null})}))}function z(t,e,n,i,r,o,a){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=U(t,e,[[i,r],[i+o,r+a]]),l=f(s[0][0],s[1][0]),u=f(s[0][1],s[1][1]),h=g(s[0][0],s[1][0]),c=g(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function B(t){return(0,r.defaults)({strokeNoScale:!0},t.brushStyle)}function Z(t,e,n,i){var r=[f(t,n),f(e,i)],o=[g(t,n),g(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function F(t,e){var n=l.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return l.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function V(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=H(e,o,a);(0,r.each)(i,(function(t){var e=y[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(Z(l[0][0],l[1][0],l[0][1],l[1][1])),A(e,n),O(e,{isEnd:!1})}function G(t,e,n,i){var o=e.__brushOption.range,a=H(t,n,i);(0,r.each)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),A(t,e),O(t,{isEnd:!1})}function H(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function U(t,e,n){var i=L(t,e);return i&&i!==p?i.clipPath(n,t._transform):(0,r.clone)(n)}function W(t){var e=t.event;e.preventDefault&&e.preventDefault()}function j(t,e,n){return t.childOfName("main").contain(e,n)}function X(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return m(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&P(t);var u=(0,r.clone)(l);u.brushType=Y(u.brushType,s),u.panelId=s===p?null:s.panelId,a=t._creatingCover=S(t,u),t._covers.push(a)}if(a){var h=J[Y(t._brushType,s)];a.__brushOption.range=h.getCreatingRange(U(t,a,t._track)),i&&(T(t,a),h.updateCommon(t,a)),M(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&D(t,e,n)&&P(t)&&(o={isEnd:i,removeOnClick:!0});return o}function Y(t,e){return"auto"===t?e.defaultBrushType:t}var q={mousedown:function(t){if(this._dragging)K(this,t);else if(!t.target||!t.target.draggable){W(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=D(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=D(t,e,n);if(!t._dragging)for(var a=0;a{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(1177),o=n(1463),a=n(2234),s=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],l=function(){function t(t,e,n){var r=this;this._targetInfoList=[];var o=h(e,t);(0,i.each)(c,(function(t,e){(!n||!n.include||(0,i.indexOf)(n.include,e)>=0)&&t(o,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=f[t.brushType](0,n,e);t.__rangeOffset={offset:m[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,i.each)(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&(0,i.each)(r.coordSyses,(function(i){var r=f[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,i.each)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=f[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?m[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=y(n),o=y(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,i.map)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:o.x0(i),isTargetByCursor:o.G(i,t,n.coordSysModel),getLinearBrushOtherExtent:o.VM(i)}}))},t.prototype.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&(0,i.indexOf)(r.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=h(e,t),r=0;rt[1]&&t.reverse(),t}function h(t,e){return(0,a.pm)(t,e,{includeMainTypes:s})}var c={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,o=t.gridModels,a=(0,i.createHashMap)(),s={},l={};(n||r||o)&&((0,i.each)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,i.each)(r,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,i.each)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,i.each)(o.getCartesians(),(function(t,e){((0,i.indexOf)(n,t.getAxis("x").model)>=0||(0,i.indexOf)(r,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:p.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,i.each)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:p.geo})}))}},d=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],p={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(r.getTransform(t)),e}},f={lineX:(0,i.curry)(g,0),lineY:(0,i.curry)(g,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[u([r[0],o[0]]),u([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,i.map)(n,(function(n){var i=t?e.pointToData(n,r):e.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function g(t,e,n,r){var o=n.getAxis(["x","y"][t]),a=u((0,i.map)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(r[t]),!0):o.toGlobalCoord(o.dataToCoord(r[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var m={lineX:(0,i.curry)(v,0),lineY:(0,i.curry)(v,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,i.map)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function v(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function y(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const _=l},9176:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(3510),o=n(1158),a=n(582),s=n(3051);function l(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(o.sT(i.event),u(t,e,n,i,r))}function u(t,e,n,i,r){r.isAvailableBehavior=(0,s.bind)(h,null,n,i),t.trigger(e,r)}function h(t,e,n){var i=n[t];return!t||i&&(!(0,s.isString)(i)||e.event[i+"Key"])}const c=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=(0,s.bind)(n._mousedownHandler,n),r=(0,s.bind)(n._mousemoveHandler,n),o=(0,s.bind)(n._mouseupHandler,n),a=(0,s.bind)(n._mousewheelHandler,n),l=(0,s.bind)(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=(0,s.defaults)((0,s.clone)(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",l)},n}return(0,i.ZT)(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(o.x1(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&h("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!a.Tf(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,s=e-i,l=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&o.sT(t.event),u(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){o.x1(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=h("zoomOnMouseWheel",t,this._opt),n=h("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;l(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i);l(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){a.Tf(this._zr,"globalPan")||l(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(r.Z)},1463:(t,e,n)=>{"use strict";n.d(e,{G:()=>l,VM:()=>s,x0:()=>a});var i=n(479),r=n(1485),o=n(1177);function a(t){return t=u(t),function(e){return o.clipPointsByRect(e,t)}}function s(t,e){return t=u(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function l(t,e,n){var i=u(t);return function(t,o){return i.contain(o[0],o[1])&&!(0,r.l)(t,e,n)}}function u(t){return i.Z.create(t)}},1485:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});var i={axisPointer:1,tooltip:1,brush:1};function r(t,e,n){var r=e.getComponentByElement(t.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!i.hasOwnProperty(r.mainType)&&o&&o.model!==n}},582:(t,e,n)=>{"use strict";n.d(e,{Ar:()=>s,Tf:()=>l,qn:()=>a});var i=n(1615),r=n(3051),o="\0_ec_interaction_mutex";function a(t,e,n){u(t)[e]=n}function s(t,e,n){var i=u(t);i[e]===n&&(i[e]=null)}function l(t,e){return!!u(t)[e]}function u(t){return t[o]||(t[o]={})}i.zl({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r.noop)},9337:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(6172),r=n(8988),o=n(5151);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new o.Z({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},1194:(t,e,n)=>{"use strict";function i(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function r(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}n.d(e,{H:()=>r,e:()=>i})},9233:(t,e,n)=>{"use strict";function i(t,e,n,i,a,s){t=t||0;var l=n[1]-n[0];if(null!=a&&(a=o(a,[0,l])),null!=s&&(s=Math.max(s,null!=a?a:0)),"all"===i){var u=Math.abs(e[1]-e[0]);u=o(u,[0,l]),a=s=o(u,[a,s]),i=0}e[0]=o(e[0],n),e[1]=o(e[1],n);var h=r(e,i);e[i]+=t;var c,d=a||0,p=n.slice();return h.sign<0?p[0]+=d:p[1]-=d,e[i]=o(e[i],p),c=r(e,i),null!=a&&(c.sign!==h.sign||c.spans&&(e[1-i]=e[i]+c.sign*s),e}function r(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function o(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}n.d(e,{Z:()=>i})},3450:(t,e,n)=>{"use strict";n.d(e,{N:()=>G});var i=n(8023),r=n(655),o=n(3051),a=n(1497),s=n(2234),l=n(8071);const u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.isArray(e)&&o.each(e,(function(t,i){o.isString(t)&&(t={type:t}),e[i]=o.merge(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);var h=n(1092),c=n(1177),d=n(8154),p=n(6498),f=n(5151),g=n(6357),m=n(6006),v=n(9337),y=n(6172),_=n(3166),x=n(1525),b=n(8625),w=o.curry,S=o.each,T=d.Z;function M(t,e,n,i){I(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),A(t,e,n,i)}function C(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0),S(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?(0,b.I)(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=A||u||"roundRect",i,s,l,v,w,d),D=new T,L=i.getModel("textStyle");if(!o.isFunction(t.getLegendIcon)||A&&"inherit"!==A){var P="inherit"===A&&t.getData().getVisual("symbol")?"inherit"===M?t.getData().getVisual("symbolRotate"):M:0;D.add(function(t){var e=t.icon||"roundRect",n=(0,x.th)(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:y,itemHeight:_,icon:u,iconRotate:P,itemStyle:I.itemStyle,lineStyle:I.lineStyle,symbolKeepAspect:C}))}else D.add(t.getLegendIcon({itemWidth:y,itemHeight:_,icon:u,iconRotate:M,itemStyle:I.itemStyle,lineStyle:I.lineStyle,symbolKeepAspect:C}));var O="left"===a?y+5:-5,E=a,N=r.get("formatter"),k=e;o.isString(N)&&N?k=N.replace("{name}",null!=e?e:""):o.isFunction(N)&&(k=N(e));var R=i.get("inactiveColor");D.add(new p.ZP({style:(0,m.Lr)(L,{text:k,x:O,y:_/2,fill:w?L.getTextColor():R,align:E,verticalAlign:"middle"})}));var z=new f.Z({shape:D.getBoundingRect(),invisible:!0}),B=i.getModel("tooltip");return B.get("show")&&c.setTooltipConfig({el:z,componentModel:r,itemName:e,itemTooltipOption:B.option}),D.add(z),D.eachChild((function(t){t.silent=!0})),z.silent=!h,this.getContentGroup().add(D),(0,g.vF)(D),D.__legendDataIndex=n,D},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();y.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){y.BZ("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+h[f],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(_.Z);function L(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;nn[r],m=[-d.x,-d.y];e||(m[i]=u[l]);var v=[0,0],_=[-p.x,-p.y],x=o.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[i]+=n[r]-p[r]:v[i]+=p[r]+x);_[1-i]+=d[a]/2-p[a]/2,u.setPosition(m),h.setPosition(v),c.setPosition(_);var b={x:0,y:0};if(b[r]=g?n[r]:d[r],b[a]=Math.max(d[a],p[a]),b[s]=Math.min(0,p[s]+_[1-i]),h.__rectSize=n[r],g){var w={x:0,y:0};w[r]=Math.max(n[r]-p[r]-x,0),w[a]=b[a],h.setClipPath(new f.Z({shape:w})),h.__rectSize=w[r]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&R.D(u,{x:S.contentPosition[0],y:S.contentPosition[1]},g?t:null),this._updatePageInfoView(t,S),b},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;o.each(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,s=null!=a?a+1:0,l=e.pageCount;i&&r&&i.setStyle("text",o.isString(r)?r.replace("{current}",null==s?"":s+"").replace("{total}",null==l?"":l+""):r({current:s,total:l}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=B[r],a=Z[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=h;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(D);function V(t){(0,i.D)(O),t.registerComponentModel(k),t.registerComponentView(F),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}function G(t){(0,i.D)(O),(0,i.D)(V)}},8690:(t,e,n)=>{"use strict";n.d(e,{N:()=>g});var i=n(655),r=n(3051),o=n(6498),a=n(5151),s=n(106),l=n(6006),u=n(6172),h=n(8071),c=n(3166),d=n(8988),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(h.Z),f=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,h=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),f=r.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),g=new o.ZP({style:(0,l.Lr)(h,{text:t.get("text"),fill:h.getTextColor()},{disableBox:!0}),z2:10}),m=g.getBoundingRect(),v=t.get("subtext"),y=new o.ZP({style:(0,l.Lr)(c,{text:v,fill:c.getTextColor(),y:m.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),_=t.get("link"),x=t.get("sublink"),b=t.get("triggerEvent",!0);g.silent=!_&&!b,y.silent=!x&&!b,_&&g.on("click",(function(){(0,d.MI)(_,"_"+t.get("target"))})),x&&y.on("click",(function(){(0,d.MI)(x,"_"+t.get("subtarget"))})),(0,s.A)(g).eventData=(0,s.A)(y).eventData=b?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(g),v&&i.add(y);var w=i.getBoundingRect(),S=t.getBoxLayoutParams();S.width=w.width,S.height=w.height;var T=(0,u.ME)(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?T.x+=T.width:"center"===p&&(T.x+=T.width/2)),f||("center"===(f=t.get("top")||t.get("bottom"))&&(f="middle"),"bottom"===f?T.y+=T.height:"middle"===f&&(T.y+=T.height/2),f=f||"top"),i.x=T.x,i.y=T.y,i.markRedraw();var M={align:p,verticalAlign:f};g.setStyle(M),y.setStyle(M),w=i.getBoundingRect();var C=T.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var I=new a.Z({shape:{x:w.x-C[3],y:w.y-C[0],width:w.width+C[1]+C[3],height:w.height+C[0]+C[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});i.add(I)}},e.type="title",e}(c.Z);function g(t){t.registerComponentModel(p),t.registerComponentView(f)}},1806:(t,e,n)=>{"use strict";n.d(e,{Bm:()=>a,f1:()=>i,ls:()=>o});var i=function(){},r={};function o(t,e){r[t]=e}function a(t){return r[t]}},5045:(t,e,n)=>{"use strict";n.d(e,{N:()=>et});var i=n(8023),r=n(655);const o=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2719).Z);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2159).Z);var s=n(7543);function l(t){t.registerComponentModel(o),t.registerComponentView(a),(0,s.Z)(t)}var u=n(3051),h=n(1806);const c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u.each(this.option.feature,(function(t,n){var i=h.Bm(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),u.merge(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(n(8071).Z);var d=n(423),p=n(1177),f=n(6357),g=n(1497),m=n(4130),v=n(9337),y=n(3166),_=n(2151),x=n(6498);const b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),c=[];u.each(s,(function(t,e){c.push(e)})),new m.Z(this._featureNames||[],c).add(y).update(y).remove(u.curry(y,null)).execute(),this._featureNames=c,v.b(r,t,n),r.add(v.l(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!u.isFunction(l)&&e){var h=l.style||(l.style={}),c=d.lP(e,x.ZP.makeFont(h)),p=t.x+r.x,f=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",f=!0);var g=f?-5-c.height:o+10;p+c.width/2>n.getWidth()?(a.position=["100%",g],h.align="right"):p-c.width/2<0&&(a.position=[0,g],h.align="left")}}))}function y(d,m){var v,y=c[d],b=c[m],w=s[y],S=new g.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===y&&(w.title=i.newTitle),y&&!b){if(function(t){return 0===t.indexOf("my")}(y))v={onclick:S.option.onclick,featureName:y};else{var T=(0,h.Bm)(y);if(!T)return;v=new T}l[y]=v}else if(!(v=l[b]))return;v.uid=(0,_.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n;var M=v instanceof h.f1;y||!b?!S.get("show")||M&&v.unusable?M&&v.remove&&v.remove(e,n):(!function(i,s,l){var c,d,g=i.getModel("iconStyle"),m=i.getModel(["emphasis","iconStyle"]),v=s instanceof h.f1&&s.getIcons?s.getIcons():i.get("icon"),y=i.get("title")||{};u.isString(v)?(c={})[l]=v:c=v;u.isString(y)?(d={})[l]=y:d=y;var _=i.iconPaths={};u.each(c,(function(l,h){var c=p.createIcon(l,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(g.getItemStyle()),c.ensureState("emphasis").style=m.getItemStyle();var v=new x.ZP({style:{text:d[h],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v),p.setTooltipConfig({el:c,componentModel:t,itemName:h,formatterParamsExtra:{title:d[h]}}),c.__title=d[h],c.on("mouseover",(function(){var e=m.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";v.setStyle({fill:m.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),c.setTextConfig({position:m.get("textPosition")||i}),v.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",h])&&n.leaveEmphasis(this),v.hide()})),("emphasis"===i.get(["iconStatus",h])?f.fD:f.Mh)(c),r.add(c),c.on("click",u.bind(s.onclick,s,e,n,h)),_[h]=c}))}(S,v,y),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?f.fD:f.Mh)(i[t])},v instanceof h.f1&&v.render&&v.render(S,e,n,i)):M&&v.dispose&&v.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){u.each(this._features,(function(t){t instanceof h.f1&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);var w=n(6387);const S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=w.default.browser;if((0,u.isFunction)(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),d=c[0].indexOf("base64")>-1,p=r?decodeURIComponent(c[1]):c[1];d&&(p=window.atob(p));var f=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,f)}else{var y=document.createElement("iframe");document.body.appendChild(y);var _=y.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,f),document.body.removeChild(y)}}else{var b=n.get("lang"),S='',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(h.f1);var T=n(1615),M=n(2234),C="__ec_magicType_stack__",A=[["line","bar"],["stack"]],I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return u.each(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(D[n]){var o,a={series:[]};u.each(A,(function(t){u.indexOf(t,n)>=0&&u.each(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=D[n](e,r,t,i);o&&(u.defaults(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",c=t.getReferringComponents(h,M.C6).models[0].componentIndex;a[h]=a[h]||[];for(var d=0;d<=c;d++)a[h][c]=a[h][c]||{};a[h][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=u.merge({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(h.f1),D={line:function(t,e,n,i){if("bar"===t)return u.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return u.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===C;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),u.merge({id:e,stack:r?"":C},i.get(["option","stack"])||{},!0)}};T.zl({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const L=I;var P=n(1158),O=new Array(60).join("-"),E="\t";function N(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var k=new RegExp("[\t]+","g");function R(t,e){var n=t.split(new RegExp("\n*"+O+"\n*","g")),i={series:[]};return u.each(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(E)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=N(e.shift()).split(k),i=[],r=u.map(n,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){Q[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new j.Z($(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=G(t);F(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=(0,X.Z)(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];q(t,(function(t,n){e.push(u.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(h.f1),Q={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=G(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return F(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function $(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}(0,Y.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=$(i),a=(0,M.pm)(t,o);return q(a.xAxisModels,(function(t){return s(t,"xAxis","xAxisIndex")})),q(a.yAxisModels,(function(t){return s(t,"yAxis","yAxisIndex")})),r}function s(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:K+e+o};a[n]=o,r.push(a)}}));const tt=J;function et(t){t.registerComponentModel(c),t.registerComponentView(b),(0,h.ls)("saveAsImage",S),(0,h.ls)("magicType",L),(0,h.ls)("dataView",Z),(0,h.ls)("dataZoom",tt),(0,h.ls)("restore",U),(0,i.D)(l)}},7813:(t,e,n)=>{"use strict";n.d(e,{N:()=>$});var i=n(7037),r=n(8023),o=n(655);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(n(8071).Z);var s=n(3051),l=n(6387),u=n(1158),h=n(4058),c=n(8988);function d(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function p(t){if(l.default.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(h+="top:50%",d+="translateY(-50%) rotate("+(a="left"===l?-225:-45)+"deg)"):(h+="left:50%",d+="translateX(-50%) rotate("+(a="top"===l?225:45)+"deg)");var p=a*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),m=e+" solid "+r+"px;";return'
'}(n,i,r)),(0,s.isString)(t))o.innerHTML=t+a;else if(t){o.innerHTML="",(0,s.isArray)(t)||(t=[t]);for(var l=0;l=0;o--){var a=t[o];a&&(a instanceof z.Z&&(a=a.get("tooltip",!0)),(0,s.isString)(a)&&(a={formatter:a}),a&&(i=new z.Z(a,i,r)))}return i}function K(t,e){return t.dispatchAction||(0,s.bind)(e.dispatchAction,e)}function J(t){return"center"===t||"middle"===t}const Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.prototype.init=function(t,e){if(!l.default.node&&e.getDom()){var n=t.getComponent("tooltip"),i=this._renderMode=(0,V.U9)(n.get("renderMode"));this._tooltipContent="richText"===i?new O(e):new M(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!l.default.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?(0,X.T9)(this,"_updatePosition",50,"fixRate"):(0,X.ZH)(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");B.z("itemTooltip",this._api,(0,s.bind)((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!l.default.node&&n.getDom()){var r=K(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=(0,V.zH)(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=(0,V.HZ)(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=(0,U.A)(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Y;u.x=i.x,u.y=i.y,u.update(),(0,U.A)(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=(0,k.Z)(i,e),c=h.point[0],d=h.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:h.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(K(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===q([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,(0,j.o)(n,(function(t){return null!=(0,U.A)(t).dataIndex?(r=t,!0):null!=(0,U.A)(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=(0,s.bind)(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=q([e.tooltipOption],i),a=this._renderMode,l=[],u=(0,v.TX)("section",{blocks:[],noHeader:!0}),h=[],d=new v.iv;(0,s.each)(t,(function(t){(0,s.each)(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=F.gk(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),p=(0,v.TX)("section",{header:o,noHeader:!(0,s.trim)(o),sortBlocks:!0,blocks:[]});u.blocks.push(p),(0,s.each)(t.seriesDataIndices,(function(u){var f=n.getSeriesByIndex(u.seriesIndex),g=u.dataIndexInside,m=f.getDataParams(g);if(!(m.dataIndex<0)){m.axisDim=t.axisDim,m.axisIndex=t.axisIndex,m.axisType=t.axisType,m.axisId=t.axisId,m.axisValue=Z.DX(e.axis,{value:r}),m.axisValueLabel=o,m.marker=d.makeTooltipMarker("item",(0,c.Lz)(m.color),a);var v=(0,W.f)(f.formatTooltip(g,!0,null)),y=v.frag;if(y){var _=q([f],i).get("valueFormatter");p.blocks.push(_?(0,s.extend)({valueFormatter:_},y):y)}v.text&&h.push(v.text),l.push(m)}}))}}))})),u.blocks.reverse(),h.reverse();var p=e.position,f=o.get("order"),g=(0,v.BY)(u,d,a,f,n.get("useUTC"),o.get("textStyle"));g&&h.unshift(g);var m="richText"===a?"\n\n":"
",y=h.join(m);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(o,p,r[0],r[1],this._tooltipContent,l):this._showTooltipContent(o,y,l,Math.random()+"",r[0],r[1],p,null,d)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=(0,U.A)(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),l=r.dataModel||a,u=r.dataIndex,h=r.dataType,d=l.getData(h),p=this._renderMode,f=t.positionDefault,g=q([d.getItemModel(u),l,a&&(a.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=g.get("trigger");if(null==m||"item"===m){var y=l.getDataParams(u,h),_=new v.iv;y.marker=_.makeTooltipMarker("item",(0,c.Lz)(y.color),p);var x=(0,W.f)(l.formatTooltip(u,!1,h)),b=g.get("order"),w=g.get("valueFormatter"),S=x.frag,T=S?(0,v.BY)(w?(0,s.extend)({valueFormatter:w},S):S,_,p,b,i.get("useUTC"),g.get("textStyle")):x.text,M="item_"+l.name+"_"+u;this._showOrMove(g,(function(){this._showTooltipContent(g,T,y,M,t.offsetX,t.offsetY,t.position,t.target,_)})),n({type:"showTip",dataIndexInside:u,dataIndex:d.getRawIndex(u),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=(0,U.A)(e),r=i.tooltipConfig.option||{};if((0,s.isString)(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var l=t.positionDefault,u=q(o,this._tooltipModel,l?{position:l}:null),h=u.get("content"),c=Math.random()+"",d=new v.iv;this._showOrMove(u,(function(){var n=(0,s.clone)(u.get("formatterParams")||{});this._showTooltipContent(u,h,n,c,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");a=a||t.get("position");var p=e,f=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(d)if((0,s.isString)(d)){var g=t.ecModel.get("useUTC"),m=(0,s.isArray)(n)?n[0]:n;p=d,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=(0,H.WU)(m.axisValue,p,g)),p=(0,c.kF)(p,n,!0)}else if((0,s.isFunction)(d)){var v=(0,s.bind)((function(e,i){e===this._ticket&&(h.setContent(i,u,t,f,a),this._updatePosition(t,a,r,o,h,n,l))}),this);this._ticket=i,p=d(n,i,v)}else p=d;h.setContent(p,u,t,f,a),h.show(t,f),this._updatePosition(t,a,r,o,h,n,l)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||(0,s.isArray)(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:(0,s.isArray)(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),c=t.get("align"),p=t.get("verticalAlign"),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),(0,s.isFunction)(e)&&(e=e([n,i],o,r.el,f,{viewSize:[l,u],contentSize:h.slice()})),(0,s.isArray)(e))n=(0,E.GM)(e[0],l),i=(0,E.GM)(e[1],u);else if((0,s.isObject)(e)){var g=e;g.width=h[0],g.height=h[1];var m=(0,R.ME)(g,{width:l,height:u});n=m.x,i=m.y,c=null,p=null}else if((0,s.isString)(e)&&a){var v=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,f,h,t.get("borderWidth"));n=v[0],i=v[1]}else{v=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,l,u,c?null:20,p?null:20);n=v[0],i=v[1]}if(c&&(n-=J(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=J(p)?h[1]/2:"bottom"===p?h[1]:0),d(t)){v=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,l,u);n=v[0],i=v[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&(0,s.each)(n,(function(n,o){var a=n.dataByAxis||[],l=(t[o]||{}).dataByAxis||[];(r=r&&a.length===l.length)&&(0,s.each)(a,(function(t,n){var o=l[n]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&(0,s.each)(a,(function(t,e){var n=u[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&(0,s.each)(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!l.default.node&&e.getDom()&&((0,X.ZH)(this,"_updatePosition"),this._tooltipContent.dispose(),B.E("itemTooltip",e))},e.type="tooltip",e}(G.Z);function $(t){(0,r.D)(i.N),t.registerComponentModel(a),t.registerComponentView(Q),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},s.noop),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},s.noop)}},3993:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var i=n(3051),r=n(5685),o=n(8540),a=n(2234);function s(t){var e,n,s,l,u=t.series,h=t.dataIndex,c=t.multipleSeries,d=u.getData(),p=d.mapDimensionsAll("defaultedTooltip"),f=p.length,g=u.getRawValue(h),m=(0,i.isArray)(g),v=(0,r.jT)(u,h);if(f>1||m&&!f){var y=function(t,e,n,a,s){var l=e.getData(),u=(0,i.reduce)(t,(function(t,e,n){var i=l.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),h=[],c=[],d=[];function p(t,e){var n=l.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(u?d.push((0,r.TX)("nameValue",{markerType:"subItem",markerColor:s,name:n.displayName,value:t,valueType:n.type})):(h.push(t),c.push(n.type)))}return a.length?(0,i.each)(a,(function(t){p((0,o.hk)(l,n,t),t)})):(0,i.each)(t,p),{inlineValues:h,inlineValueTypes:c,blocks:d}}(g,u,h,p,v);e=y.inlineValues,n=y.inlineValueTypes,s=y.blocks,l=y.inlineValues[0]}else if(f){var _=d.getDimensionInfo(p[0]);l=e=(0,o.hk)(d,h,p[0]),n=_.type}else l=e=m?g[0]:g;var x=(0,a.yu)(u),b=x&&u.name||"",w=d.getName(h),S=c?b:w;return(0,r.TX)("section",{header:b,noHeader:c||!x,sortParam:l,blocks:[(0,r.TX)("nameValue",{markerType:"item",markerColor:v,name:S,noName:!(0,i.trim)(S),value:e,valueType:n})].concat(s||[])})}},5685:(t,e,n)=>{"use strict";n.d(e,{BY:()=>m,TX:()=>h,d_:()=>x,iv:()=>b,jT:()=>_});var i=n(8988),r=n(3051),o=n(8407),a=n(5669);function s(t,e){var n=t.color||"#6e7079",r=t.fontSize||12,o=t.fontWeight||"400",a=t.color||"#464646",s=t.fontSize||14,l=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+(0,i.F1)(r+"")+"px;color:"+(0,i.F1)(n)+";font-weight:"+(0,i.F1)(o+""),valueStyle:"font-size:"+(0,i.F1)(s+"")+"px;color:"+(0,i.F1)(a)+";font-weight:"+(0,i.F1)(l+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:s,fill:a,fontWeight:l}}}var l=[0,10,20,30],u=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function c(t){return"section"===t.type}function d(t){return c(t)?f:g}function p(t){if(c(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return(0,r.each)(t.blocks,(function(t){var n=p(t);n>=e&&(e=n+ +(i&&(!n||c(t)&&!t.noHeader)))})),e}return 0}function f(t,e,n,a){var h,c=e.noHeader,f=(h=p(e),{html:l[h],richText:u[h]}),g=[],m=e.blocks||[];(0,r.assert)(!m||(0,r.isArray)(m)),m=m||[];var _=t.orderMode;if(e.sortBlocks&&_){m=m.slice();var x={valueAsc:"asc",valueDesc:"desc"};if((0,r.hasOwn)(x,_)){var b=new o.ID(x[_],null);m.sort((function(t,e){return b.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===_&&m.reverse()}(0,r.each)(m,(function(n,i){var o=e.valueFormatter,s=d(n)(o?(0,r.extend)((0,r.extend)({},t),{valueFormatter:o}):t,n,i>0?f.html:0,a);null!=s&&g.push(s)}));var w="richText"===t.renderMode?g.join(f.richText):v(g.join(""),c?n:f.html);if(c)return w;var S=(0,i.uX)(e.header,"ordinal",t.useUTC),T=s(a,t.renderMode).nameStyle;return"richText"===t.renderMode?y(t,S,T)+f.richText+w:v('
'+(0,i.F1)(S)+"
"+w,n)}function g(t,e,n,o){var a=t.renderMode,l=e.noName,u=e.noValue,h=!e.markerType,c=e.name,d=t.useUTC,p=e.valueFormatter||t.valueFormatter||function(t){return t=(0,r.isArray)(t)?t:[t],(0,r.map)(t,(function(t,e){return(0,i.uX)(t,(0,r.isArray)(m)?m[e]:m,d)}))};if(!l||!u){var f=h?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),g=l?"":(0,i.uX)(c,"ordinal",d),m=e.valueType,_=u?[]:p(e.value),x=!h||!l,b=!h&&l,w=s(o,a),S=w.nameStyle,T=w.valueStyle;return"richText"===a?(h?"":f)+(l?"":y(t,g,S))+(u?"":function(t,e,n,i,o){var a=[o],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle((0,r.isArray)(e)?e.join(" "):e,a)}(t,_,x,b,T)):v((h?"":f)+(l?"":function(t,e,n){return''+(0,i.F1)(t)+""}(g,!h,S))+(u?"":function(t,e,n,o){var a=n?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=(0,r.isArray)(t)?t:[t],''+(0,r.map)(t,(function(t){return(0,i.F1)(t)})).join("  ")+""}(_,x,b,T)),n)}}function m(t,e,n,i,r,o){if(t)return d(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function v(t,e){return'
'+t+'
'}function y(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function _(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function x(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var b=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.isString)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.isArray)(e)?(0,r.each)(e,(function(t){return(0,r.extend)(n,t)})):(0,r.extend)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},2950:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(5669),o=n(423),a=n(2234),s=n(7947),l=(0,a.Yf)();function u(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:i.map(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function h(t,e){return"category"===t.type?function(t,e){var n,r,o=d(t,"ticks"),a=(0,s.rk)(e),l=p(o,a);if(l)return l;e.get("show")&&!t.scale.isBlank()||(n=[]);if(i.isFunction(a))n=m(t,a,!0);else if("auto"===a){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,n=i.map(u.labels,(function(t){return t.tickValue}))}else n=g(t,r=a,!0);return f(o,a,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:i.map(t.scale.getTicks(),(function(t){return t.value}))}}function c(t,e){var n,r,o=d(t,"labels"),a=(0,s.rk)(e),u=p(o,a);return u||(i.isFunction(a)?n=m(t,a):(r="auto"===a?function(t){var e=l(t).autoInterval;return null!=e?e:l(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=g(t,r)),f(o,a,{labels:n,labelCategoryInterval:r}))}function d(t,e){return l(t)[e]||(l(t)[e]=[])}function p(t,e){for(var n=0;n1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=(0,s.WY)(t),p=a.get("showMinLabel")||d,f=a.get("showMaxLabel")||d;p&&h!==o[0]&&m(o[0]);for(var g=h;g<=o[1];g+=u)m(g);function m(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&m(o[1]),l}function m(t,e,n){var r=t.scale,o=(0,s.J9)(t),a=[];return i.each(r.getTicks(),(function(t){var i=r.getLabel(t),s=t.value;e(t.value,i)&&a.push(n?s:{formattedLabel:o(t),rawLabel:i,tickValue:s})})),a}var v=[0,1];function y(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const _=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,r.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count()),(0,r.NU)(t,v,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count());var o=(0,r.NU)(t,n,v,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=h(this,e).ticks,o=(0,i.map)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,o){var a=e.length;if(!t.onBand||n||!a)return;var s,l,u=t.getExtent();if(1===a)e[0].coord=u[0],s=e[1]={coord:u[0]};else{var h=e[a-1].tickValue-e[0].tickValue,c=(e[a-1].coord-e[0].coord)/h;(0,i.each)(e,(function(t){t.coord-=c/2})),l=1+t.scale.getExtent()[1]-e[a-1].tickValue,s={coord:e[a-1].coord+c*l},e.push(s)}var d=u[0]>u[1];p(e[0].coord,u[0])&&(o?e[0].coord=u[0]:e.shift());o&&p(u[0],e[0].coord)&&e.unshift({coord:u[0]});p(u[1],s.coord)&&(o?s.coord=u[1]:e.pop());o&&p(s.coord,u[1])&&e.push({coord:u[1]});function p(t,e){return t=(0,r.NM)(t),e=(0,r.NM)(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,i.map)(e,(function(t){return(0,i.map)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return u(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),u=r.count();if(a[1]-a[0]<1)return 0;var h=1;u>40&&(h=Math.max(1,Math.floor(u/40)));for(var c=a[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),p=Math.abs(d*Math.cos(i)),f=Math.abs(d*Math.sin(i)),g=0,m=0;c<=a[1];c+=h){var v,y,_=o.lP(n({value:c}),e.font,"center","top");v=1.3*_.width,y=1.3*_.height,g=Math.max(g,v,7),m=Math.max(m,y,7)}var x=g/p,b=m/f;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=l(t.model),T=t.getExtent(),M=S.lastAutoInterval,C=S.lastTickCount;return null!=M&&null!=C&&Math.abs(M-w)<=1&&Math.abs(C-u)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=u,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}()},3845:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(5280),o=n(2892),a=n(479),s=n(7411),l=n(5669),u=r.applyTransform;function h(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const c=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new s.ZP,n._rawTransformable=new s.ZP,n.name=e,n}return(0,i.ZT)(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new a.Z(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new a.Z(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new a.Z(t,e,n,i));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[(0,l.GM)(t[0],e.getWidth()),(0,l.GM)(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=r.applyTransform([],i,t),n=r.applyTransform([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),o.copy(this.transform||(this.transform=[]),e.transform||o.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],o.invert(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new s.ZP;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?u(n,t,i):r.copy(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?u([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=h(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=h(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(s.ZP)},7947:(t,e,n)=>{"use strict";n.d(e,{aG:()=>I,Do:()=>O,DX:()=>P,PY:()=>k,rk:()=>E,Xv:()=>C,Yb:()=>D,J9:()=>L,Jk:()=>A,WY:()=>N,AH:()=>R});var i=n(3051),r=n(5043),o=n(103),a=n(379),s=n(9093),l=n(479),u=n(1618),h=n(655),c=n(5669),d=n(5021),p=a.Z.prototype,f=o.Z.prototype,g=c.NM,m=Math.floor,v=Math.ceil,y=Math.pow,_=Math.log,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new o.Z,e._interval=0,e}return(0,h.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=f.getTicks.call(this,t);return i.map(o,(function(t){var e=t.value,i=c.NM(y(this.base,e));return i=e===n[0]&&this._fixMin?w(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?w(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=_(t)/_(n),e=_(e)/_(n),f.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=p.getExtent.call(this);e[0]=y(t,e[0]),e[1]=y(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=w(e[0],n[0])),this._fixMax&&(e[1]=w(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=_(t[0])/_(e),t[1]=_(t[1])/_(e),p.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=c.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[c.NM(v(e[0]/i)*i),c.NM(m(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){f.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_(t)/_(this.base),d.XS(t,this._extent)},e.prototype.normalize=function(t){return t=_(t)/_(this.base),d.Fv(t,this._extent)},e.prototype.scale=function(t){return t=d.bA(t,this._extent),y(this.base,t)},e.type="log",e}(a.Z),b=x.prototype;function w(t,e){return g(t,c.p8(e))}b.getMinorTicks=f.getMinorTicks,b.getLabel=f.getLabel,a.Z.registerClass(x);const S=x;var T=n(9936),M=n(8986);function C(t,e){var n=t.type,r=(0,M.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,l=e.ecModel;if(l&&"time"===n){var u=(0,s.Ge)("bar",l),h=!1;if(i.each(u,(function(t){h=h||t.getBaseAxis()===e.axis})),h){var c=(0,s.My)(u),d=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],l=(0,s.G_)(r,n.axis);if(void 0===l)return{min:t,max:e};var u=1/0;i.each(l,(function(t){u=Math.min(t.offset,u)}));var h=-1/0;i.each(l,(function(t){h=Math.max(t.offset+t.width,h)})),u=Math.abs(u),h=Math.abs(h);var c=u+h,d=e-t,p=d/(1-(u+h)/a)-d;return{min:t-=p*(u/c),max:e+=p*(h/c)}}(o,a,e,c);o=d.min,a=d.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function A(t,e){var n=e,i=C(t,n),r=i.extent,o=n.get("splitNumber");t instanceof S&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function I(t,e){if(e=e||t.get("type"))switch(e){case"category":return new r.Z({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new u.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(a.Z.getClass(e)||o.Z)}}function D(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function L(t){var e,n,r=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):i.isString(r)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(r):i.isFunction(r)?(e=r,function(n,i){return null!=o&&(i=n.value-o),e(P(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function P(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function O(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,a=n.getExtent();o=n instanceof r.Z?n.count():(i=n.getTicks()).length;var s,u,h,c,d,p,f,g,m=t.getLabelModel(),v=L(t),y=1;o>40&&(y=Math.ceil(o/40));for(var _=0;_t[1]&&(t[1]=i[1])}))}},6650:(t,e,n)=>{"use strict";n.d(e,{W:()=>i});var i=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}()},9069:(t,e,n)=>{"use strict";n.d(e,{Mk:()=>s,Yh:()=>a,bK:()=>o});var i=n(3051),r=n(2234);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,h=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===h?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(s){var m=s.toGlobalCoord(s.dataToCoord(0));g[p.onZero]=Math.max(Math.min(m,g[1]),g[0])}a.position=["y"===h?g[p[u]]:d[0],"x"===h?g[p[u]]:d[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[p[l]]-g[p.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.retrieve(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-v:v,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.each(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},4215:(t,e,n)=>{"use strict";n.d(e,{Im:()=>m,Ni:()=>g,Qh:()=>p,jM:()=>f});var i=n(655),r=n(479),o=n(5280),a=n(765),s=n(2892),l=n(3051),u=[];function h(t,e){for(var n=0;nn&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s{"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(4215);function o(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function s(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var r=e.features;return i.each(r,(function(t){var e=t.geometry,r=e.encodeOffsets,s=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=a(s,r,n);break;case"Polygon":case"MultiLineString":o(s,r,n);break;case"MultiPolygon":i.each(s,(function(t,e){return o(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t),i.map(i.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,o=t.geometry,a=[];switch(o.type){case"Polygon":var s=o.coordinates;a.push(new r.Qh(s[0],s.slice(1)));break;case"MultiPolygon":i.each(o.coordinates,(function(t){t[0]&&a.push(new r.Qh(t[0],t.slice(1)))}));break;case"LineString":a.push(new r.jM([o.coordinates]));break;case"MultiLineString":a.push(new r.jM(o.coordinates))}var l=new r.Ni(n[e||"name"],a,n.cp);return l.properties=n,l}))}},8986:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(3051),r=n(423),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(s=d,u=!0),null!=p&&(l=p,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.eqNaN)(e)?NaN:t.parse(e)}},4267:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.each(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},1615:(t,e,n)=>{"use strict";n.d(e,{Hr:()=>xe,$j:()=>hn,Ok:()=>Nn,HO:()=>ve,eU:()=>cn,zP:()=>dn,B9:()=>pn,wL:()=>Tn,JE:()=>fn,rp:()=>gn,FU:()=>On,S1:()=>un,zl:()=>wn,RS:()=>Sn,qR:()=>Mn,yn:()=>Dn,I2:()=>ue.I2,je:()=>Pn,sq:()=>_n,Br:()=>xn,ds:()=>vn,Pu:()=>yn,aW:()=>mn,OB:()=>En,YK:()=>bn,Og:()=>Cn,jQ:()=>Ln,i8:()=>me});var i=n(655),r=n(9448),o=n(3051),a=n(6387),s=n(9455),l=n(3510),u=n(2234),h=n(1497),c=n(8071),d="";"undefined"!=typeof navigator&&(d=navigator.platform||"");var p="rgba(0, 0, 0, 0.2)";const f={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:p,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:p,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:p,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:p,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:p,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:p,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:d.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 g,m,v,y=n(1772),_=n(2468),x=n(5494);var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new h.Z(i),this._locale=new h.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=T(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,T(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):v(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.each)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.createHashMap)(),l=e&&e.replaceMergeMainTypeMap;(0,y.md)(this),(0,o.each)(t,(function(t,e){null!=t&&(c.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.clone)(t):(0,o.merge)(n[e],t,!0))})),l&&l.each((function(t,e){c.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),c.Z.topologicalTravel(a,c.Z.getAllClassMainTypes(),(function(e){var a=(0,_.R)(this,e,u.kF(t[e])),s=i.get(e),h=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=u.ab(s,a,h);u.O0(d,e,c.Z),n[e]=null,i.set(e,null),r.set(e,0);var p,f=[],m=[],v=0;(0,o.each)(d,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a="series"===e,s=c.Z.getClass(e,t.keyInfo.subType,!a);if(!s)return;if("tooltip"===e){if(p)return void 0;p=!0}if(i&&i.constructor===s)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var l=(0,o.extend)({componentIndex:n},t.keyInfo);i=new s(r,this,this,l),(0,o.extend)(i,l),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(f.push(i.option),m.push(i),v++):(f.push(void 0),m.push(void 0))}),this),n[e]=f,i.set(e,m),r.set(e,v),"series"===e&&g(this)}),this),this._seriesIndices||g(this)},e.prototype.getOption=function(){var t=(0,o.clone)(this.option);return(0,o.each)(t,(function(e,n){if(c.Z.hasClass(n)){for(var i=u.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!u.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const O=L;var E=o.each,N=o.isObject,k=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function R(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=k.length;n=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=(0,$.S$)(p,v),f=v;break}}}return i[0]=p,i[1]=f,i}))}))}var et=n(3321),nt=n(3166),it=n(5797),rt=n(5151),ot=n(4535),at=n(9266),st=n(327),lt=n(106),ut=n(6357),ht=n(270),ct=n(9066),dt=n(9887),pt=n(7515),ft=(0,u.Yf)(),gt={itemStyle:(0,ct.Z)(dt.t,!0),lineStyle:(0,ct.Z)(pt.v,!0)},mt={lineStyle:"stroke",itemStyle:"fill"};function vt(t,e){var n=t.visualStyleMapper||gt[e];return n||(console.warn("Unkown style type '"+e+"'."),gt.itemStyle)}function yt(t,e){var n=t.visualDrawType||mt[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var _t={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=vt(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=yt(t,i),u=a[l],h=(0,o.isFunction)(u)?u:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[l]||h||c){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||(0,o.isFunction)(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||(0,o.isFunction)(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.extend)({},a);r[l]=h(i),e.setItemVisual(n,"style",r)}}}},xt=new h.Z,bt={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=vt(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){xt.option=n[i];var s=r(xt),l=t.ensureUniqueItemVisual(e,"style");(0,o.extend)(l,s),xt.option.decal&&(t.setItemVisual(e,"decal",xt.option.decal),xt.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},wt={performRawSeries:!0,overallReset:function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),ft(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ft(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=yt(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},St=n(8154),Tt=n(6498),Mt=n(4826),Ct=Math.PI;var At=n(8674),It=n(2151),Dt=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.createHashMap)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.createHashMap)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.each)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.assert)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.each)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),a.updatePayload(h,n);var p=a.getPerformArgs(h,i.block);d.each((function(t){t.perform(p)})),h.perform(p)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.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)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.createHashMap)(),l=t.seriesType,u=t.getTargetSeries;function h(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,At.v)({plan:Nt,reset:kt,count:Bt}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,At.v)({reset:Lt});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.createHashMap)(),u=t.seriesType,h=t.getTargetSeries,c=!0,d=!1;function p(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(d=!0,(0,At.v)({reset:Pt,onDirty:Et})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,r._pipe(t,n)}(0,o.assert)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,p):h?h(n,i).each(p):(c=!1,(0,o.each)(n.getSeries(),p)),d&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.isFunction)(t)&&(t={overallReset:t,seriesType:Zt(t)}),t.uid=(0,It.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function Lt(t){t.overallReset(t.ecModel,t.api,t.payload)}function Pt(t){return t.overallProgress&&Ot}function Ot(){this.agent.dirty(),this.getDownstream().dirty()}function Et(){this.agent&&this.agent.dirty()}function Nt(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function kt(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,u.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.map)(e,(function(t,e){return zt(e)})):Rt}var Rt=zt(0);function zt(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),ee=["symbol","symbolSize","symbolRotate","symbolOffset"],ne=ee.concat(["symbolKeepAspect"]),ie={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},a=!1,s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{var i,r,a;if((0,o.isObject)(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,a=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var s=new O(this._api),l=this._theme,u=this._model=new M;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:r},$e);var h={seriesTransition:a,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:h},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{Ce(this),De.update.call(this,null,h)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.setTheme=function(){(0,ae.Sh)("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ge&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(a.default.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return(0,o.each)(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;(0,o.each)(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return(0,o.each)(i,(function(t){t.group.ignore=!1})),a}qe(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(on[n]){var l=s,u=s,h=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();(0,o.each)(rn,(function(r,s){if(r.group===n){var p=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas((0,o.clone)(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),h=a(f.right,h),c=a(f.bottom,c),d.push({dom:p,left:f.left,top:f.top})}}));var f=(h*=p)-(l*=p),g=(c*=p)-(u*=p),m=pe.qW.createCanvas(),v=r.init(m,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:g}),e){var y="";return(0,o.each)(d,(function(t){var e=t.left-l,n=t.top-u;y+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new rt.Z({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),(0,o.each)(d,(function(t){var e=new ot.ZP({style:{x:t.left*p-l,y:t.top*p-u,image:t.dom}});v.add(e)})),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}qe(this.id)},e.prototype.convertToPixel=function(t,e){return Le(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Le(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=u.pm(i,t);return(0,o.each)(r,(function(t,i){i.indexOf("Models")>=0&&(0,o.each)(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}qe(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=u.pm(n,t,{defaultMainType:"series"});var r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?(0,oe.Or)(r,o,e):(0,oe.UL)(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;(0,o.each)(Ye,(function(e){var n=function(n){var i,r=t.getModel(),a=n.target;if("globalout"===e?i={}:a&&(0,he.o)(a,(function(t){var e=(0,lt.A)(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=(0,o.extend)({},e.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:a,packedEvent:i,model:u,view:h},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),(0,o.each)(Je,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),(0,o.each)(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),(0,se.s)(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?qe(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)qe(this.id);else{this._disposed=!0,this.getDom()&&u.P$(this.getDom(),ln,"");var t=this,e=t._api,n=t._model;(0,o.each)(t._componentsViews,(function(t){t.dispose(n,e)})),(0,o.each)(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete rn[t.id]}},e.prototype.resize=function(t){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&Ce(this),De.update.call(this,{type:"resize",animation:(0,o.extend)({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nn[t]){var n=nn[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?qe(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=(0,o.extend)({},t);return e.type=Je[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(e)||(e={silent:!!e}),Ke[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Oe.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.default.browser.weChat&&this._throttledZrFlush(),Ee.call(this,n),Ne.call(this,n)}},e.prototype.updateLabelLayout=function(){de.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)qe(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(at.eq(t))return;if(t instanceof st.ZP&&(0,ut.e9)(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ce=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ae(t,!0),Ae(t,!1),e.plan()},Ae=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.default.node&&!a.default.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),de.trigger("series:afterupdate",e,i,s)},Ge=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},He=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){at.eq(t)||e(t)})),t.__needsUpdateStatus=!1)},Fe=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,ut.fD)(e,n),Ge(t)},n.prototype.leaveEmphasis=function(e,n){(0,ut.Mh)(e,n),Ge(t)},n.prototype.enterBlur=function(e){(0,ut.SX)(e),Ge(t)},n.prototype.leaveBlur=function(e){(0,ut.VP)(e),Ge(t)},n.prototype.enterSelect=function(e){(0,ut.XX)(e),Ge(t)},n.prototype.leaveSelect=function(e){(0,ut.SJ)(e),Ge(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(A))(t)},Ve=function(t){function e(t,e){for(var n=0;n=0)){An.push(n);var a=Ut.wrapStageHandler(n,r);a.__prio=e,a.__raw=n,t.push(a)}}function Dn(t,e){nn[t]=e}function Ln(t){(0,pe.g2)({createCanvas:t})}function Pn(t,e,n){var i=(0,fe.C)("registerMap");i&&i(t,e,n)}function On(t){var e=(0,fe.C)("getMap");return e&&e(t)}var En=le.DA;Cn(ye,_t),Cn(_e,bt),Cn(_e,wt),Cn(ye,ie),Cn(_e,re),Cn(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=(0,ce.I)(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=(0,ce.I)(r,e)}}))})),vn(Q),yn(900,(function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(tt)})),Dn("default",(function(t,e){e=e||{},o.defaults(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new St.Z,i=new rt.Z({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=new Tt.ZP({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),s=new rt.Z({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Mt.Z({shape:{startAngle:-Ct/2,endAngle:-Ct/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Ct/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Ct/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=a.getBoundingRect().width,o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:o),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),wn({type:ut.Ki,event:ut.Ki,update:ut.Ki},o.noop),wn({type:ut.yx,event:ut.yx,update:ut.yx},o.noop),wn({type:ut.Hg,event:ut.Hg,update:ut.Hg},o.noop),wn({type:ut.JQ,event:ut.JQ,update:ut.JQ},o.noop),wn({type:ut.iK,event:ut.iK,update:ut.iK},o.noop),mn("light",jt),mn("dark",Qt);var Nn={}},9428:(t,e,n)=>{"use strict";n.d(e,{C:()=>o,M:()=>r});var i={};function r(t,e){i[t]=e}function o(t){return i[t]}},3917:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>g,G8:()=>f,I2:()=>d});var i=n(1497),r=n(6387);var o=n(3051),a="ZH",s="EN",l=s,u={},h={},c=r.default.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:l;function d(t,e){t=t.toUpperCase(),h[t]=new i.Z(e),u[t]=e}function p(t){if((0,o.isString)(t)){var e=u[t.toUpperCase()]||{};return t===a||t===s?(0,o.clone)(e):(0,o.merge)((0,o.clone)(e),(0,o.clone)(u.EN),!1)}return(0,o.merge)((0,o.clone)(t),(0,o.clone)(u.EN),!1)}function f(t){return h[t]}function g(){return h.EN}d(s,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),d(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},8674:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(3051);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=c(this._modBy),l=this._modDataCount||0,u=c(t&&t.modBy),h=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}s===u&&l===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=h;var d=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(a||p1&&i>0?s:a}};return o;function a(){return e=t?null:o{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a1){var h=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(h,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s1&&1===d)this._updateManyToOne&&this._updateManyToOne(h,u),r[l]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(h,u),r[l]=null;else if(1===c&&1===d)this._update&&this._update(h,u),r[l]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(h,u),r[l]=null;else if(c>1)for(var p=0;p1)for(var s=0;s{"use strict";n.d(e,{ZP:()=>g,hG:()=>h});var i,r=n(3051),o=n(8407),a=n(9574),s="undefined",l=typeof Uint32Array===s?Array:Uint32Array,u=typeof Uint16Array===s?Array:Uint16Array,h=typeof Int32Array===s?Array:Int32Array,c=typeof Float64Array===s?Array:Float64Array,d={float:c,int:h,ordinal:Array,number:Array,time:c};function p(t){return t>65535?l:u}function f(t,e,n,i,r){var o=d[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=(0,r.map)(a,(function(t){return t.property})),h=0;hy[1]&&(y[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=h&&b<=c||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){m=d[i[0]];var y=d[i[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=h&&b<=c||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=h&&b<=c||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[C][1])&&(T=!1)}T&&(s[l++]=e.getRawIndex(v))}return lm[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(p(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var d=1;dn&&(n=i,r=C)}M>0&&Mu-f&&(s=u-f,a.length=s);for(var g=0;gh[1]&&(h[1]=v),c[d++]=y}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return(0,o.yQ)(t[i],this._dimensions[i])}i={arrayRows:t,objectRows:function(t,e,n,i){return(0,o.yQ)(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return(0,o.yQ)(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}()},1401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3051),r=0;function o(t){return(0,i.isObject)(t)&&null!=t.value?t.value:t+""}const a=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++r}return t.createByAxisModel=function(e){var n=e.option,r=n.data,a=r&&(0,i.map)(r,o);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!(0,i.isString)(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.createHashMap)(this.categories))},t}()},5101:(t,e,n)=>{"use strict";n.d(e,{Z:()=>A});var i,r,o,a,s,l,u,h=n(3051),c=n(1497),d=n(4130),p=n(8540),f=n(381),g=n(5440),m=n(4279),v=n(2234),y=n(106),_=n(9574),x=n(3834),b=n(1029),w=h.isObject,S=h.map,T="undefined"==typeof Int32Array?Array:Int32Array,M=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],C=["_approximateExtent"];const A=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;(0,b.bB)(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===m.cy&&!n.pure)for(var a=[],s=t;s0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),h.isArray(r)?r=r.slice():w(r)&&(r=h.extend({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,w(e)?h.extend(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){w(t)?h.extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?h.extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;(0,y.Q)(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){h.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:S(this.dimensions,this._getDimInfo,this),this.hostModel)),s(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];h.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(h.slice(arguments)))})},t.internalField=(i=function(t){var e=t._invertedIndicesMap;h.each(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new T(o.categories.length);for(var s=0;s1&&(l+="__ec__"+h),i[e]=l}})),t}()},5440:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);const r=function(t){this.otherDims={},null!=t&&i.extend(this,t)}},9574:(t,e,n)=>{"use strict";n.d(e,{Kp:()=>d,Ld:()=>l,ML:()=>c,QY:()=>g,_P:()=>u,nx:()=>h});var i=n(3051),r=n(4279),o=n(2234),a=n(1772),s=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n{"use strict";n.d(e,{Eo:()=>l,Jj:()=>c,Jl:()=>d,bB:()=>u,v5:()=>h});var i=n(3051),r=n(2234),o=n(9574),a=(0,r.Yf)(),s={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},l=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=c(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return(0,i.retrieve2)(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=(0,o.QY)(this.source),n=!d(t),i="",r=[],a=0,l=0;a30}},5623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d,q:()=>c});var i=n(4279),r=n(5440),o=n(3051),a=n(9574),s=n(3834),l=n(2234),u=n(1772),h=n(1029);function c(t,e){return d(t,e).dimensions}function d(t,e){(0,a.Ld)(t)||(t=(0,a.nx)(t));var n=(e=e||{}).coordDimensions||[],c=e.dimensionsDefine||t.dimensionsDefine||[],d=(0,o.createHashMap)(),f=[],g=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return(0,o.each)(e,(function(t){var e;(0,o.isObject)(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,c,e.dimensionsCount),m=e.canOmitUnusedDimensions&&(0,h.Jl)(g),v=c===t.dimensionsDefine,y=v?(0,h.Jj)(t):(0,h.v5)(c),_=e.encodeDefine;!_&&e.encodeDefaulter&&(_=e.encodeDefaulter(t,g));for(var x=(0,o.createHashMap)(_),b=new s.hG(g),w=0;w0&&(i.name=r+(a-1)),a++,e.set(r,a)}}(f),new h.Eo({source:t,dimensions:f,fullDimensionCount:g,dimensionOmitted:m})}function p(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}},8540:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>d,_j:()=>g,a:()=>y,hk:()=>S,tB:()=>b});var i,r,o,a,s,l=n(3051),u=n(2234),h=n(9574),c=n(4279),d=function(){function t(t,e){var n=(0,h.Ld)(t)?t:(0,h.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===c.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,h=o.startIndex,d=o.dimensionsDefine,p=a[w(s,u)];if((0,l.extend)(t,p),s===c.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.bind)(f,null,r,h,d);var m=y(s,u);t.count=(0,l.bind)(m,null,r,h,d)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;ou&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e{"use strict";n.d(e,{BM:()=>o,IR:()=>s,M:()=>a});var i=n(3051),r=n(1029);function o(t,e,n){var o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension;!function(t){return!(0,r.bB)(t.schema)}(e)?(a=e.schema,o=a.dimensions,s=e.store):o=e;var h,c,d,p,f=!(!t||!t.get("stack"));if((0,i.each)(o,(function(t,e){(0,i.isString)(t)&&(o[e]=t={name:t}),f&&!t.isExtraCoord&&(l||h||!t.ordinalMeta||(h=t),c||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(c=t))})),!c||l||h||(l=!0),c){d="__\0ecstackresult_"+t.id,p="__\0ecstackedover_"+t.id,h&&(h.createInvertedIndices=!0);var g=c.coordDim,m=c.type,v=0;(0,i.each)(o,(function(t){t.coordDim===g&&v++}));var y={name:d,coordDim:g,coordDimIndex:v,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},_={name:p,coordDim:p,coordDimIndex:v+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(y.storeDimIndex=s.ensureCalculationDimension(p,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),a.appendCalculationDimension(y),a.appendCalculationDimension(_)):(o.push(y),o.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:h&&h.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:d}}function a(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function s(t,e){return a(t,e)?t.getCalculationInfo("stackResultDimension"):e}},8407:(t,e,n)=>{"use strict";n.d(e,{ID:()=>c,o2:()=>l,tR:()=>p,yQ:()=>a});var i=n(5669),r=n(3051),o=n(175);function a(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||(0,r.isNumber)(t)||null==t||"-"===t||(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t)}var s=(0,r.createHashMap)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return(0,r.isString)(t)?(0,r.trim)(t):t}});function l(t){return s.get(t)}var u={lt:function(t,e){return te},gte:function(t,e){return t>=e}},h=function(){function t(t,e){if(!(0,r.isNumber)(e)){0,(0,o._y)("")}this._opFn=u[t],this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){return(0,r.isNumber)(t)?this._opFn(t,this._rvalFloat):this._opFn((0,i.FK)(t),this._rvalFloat)},t}(),c=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=(0,r.isNumber)(t)?t:(0,i.FK)(t),o=(0,r.isNumber)(e)?e:(0,i.FK)(e),a=isNaN(n),s=isNaN(o);if(a&&(n=this._incomparable),s&&(o=this._incomparable),a&&s){var l=(0,r.isString)(t),u=(0,r.isString)(e);l&&(n=u?t:0),u&&(o=l?e:0)}return no?-this._resultLT:0},t}(),d=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=(0,i.FK)(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function p(t,e){return"eq"===t||"ne"===t?new d("eq"===t,e):(0,r.hasOwn)(u,t)?new h(t,e):null}},381:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,y:()=>a});var i=n(3051),r=n(4279),o=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function a(t,e){var n={},a=n.encode={},l=(0,i.createHashMap)(),u=[],h=[],c={};(0,i.each)(t.dimensions,(function(e){var n,i=t.getDimensionInfo(e),o=i.coordDim;if(o){0;var d=i.coordDimIndex;s(a,o)[d]=e,i.isExtraCoord||(l.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(u[0]=e),s(c,o)[d]=t.getDimensionIndex(i.name)),i.defaultTooltip&&h.push(e)}r.f7.each((function(t,e){var n=s(a,e),r=i.otherDims[e];null!=r&&!1!==r&&(n[r]=i.name)}))}));var d=[],p={};l.each((function(t,e){var n=a[e];p[e]=n[0],d=d.concat(n)})),n.dataDimsOnCoord=d,n.dataDimIndicesOnCoord=(0,i.map)(d,(function(e){return t.getDimensionInfo(e).storeDimIndex})),n.encodeFirstDimNotExtra=p;var f=a.label;f&&f.length&&(u=f.slice());var g=a.tooltip;return g&&g.length?h=g.slice():h.length||(h=u.slice()),a.defaultedLabel=u,a.defaultedTooltip=h,n.userOutput=new o(c,e),n}function s(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function l(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},9344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e){if(r(o=this).mainData===o){var n=(0,i.extend)({},r(this).datas);n[this.dataType]=e,h(e,n,t)}else c(e,this.dataType,r(this).mainData,t);var o;return e}function a(t,e){return t.struct&&t.struct.update(),e}function s(t,e){return(0,i.each)(r(e).datas,(function(n,i){n!==e&&c(n.cloneShallow(),i,e,t)})),e}function l(t){var e=r(this).mainData;return null==t||null==e?e:r(e).datas[t]}function u(){var t=r(this).mainData;return null==t?[{data:t}]:(0,i.map)((0,i.keys)(r(t).datas),(function(e){return{type:e,data:r(t).datas[e]}}))}function h(t,e,n){r(t).datas={},(0,i.each)(e,(function(e,i){c(e,i,t,n)}))}function c(t,e,n,i){r(n).datas[e]=t,r(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=l,t.getLinkedDataAll=u}const d=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,h(e,n,t),(0,i.each)(n,(function(n){(0,i.each)(e.TRANSFERABLE_METHODS,(function(e){n.wrapMethod(e,(0,i.curry)(o,t))}))})),e.wrapMethod("cloneShallow",(0,i.curry)(s,t)),(0,i.each)(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,(0,i.curry)(a,t))})),(0,i.assert)(n[e.dataType]===e)}},1772:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,JT:()=>d,Ss:()=>h,Wd:()=>c,md:()=>l,pY:()=>u,u7:()=>p});var i=n(2234),r=n(3051),o=n(4279),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.createHashMap)()}function u(t,e,n){var i={},o=c(e);if(!o||!t)return i;var a,l,u=[],h=[],d=e.ecModel,p=s(d).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.each)(t,(function(e,n){var o=(0,r.isObject)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=v(o)),i[o.name]=[]}));var g=p.get(f)||p.set(f,{categoryWayDim:l,valueWayDim:0});function m(t,e,n){for(var i=0;i{"use strict";n.d(e,{U:()=>h,t:()=>c});var i=n(3051),r=n(9574),o=n(4279),a=n(1772),s=n(437),l=n(3834),u=n(8540),h=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;if(d(n)){var l=n,u=void 0,h=void 0,c=void 0;if(s){var p=a[0];p.prepareSource(),u=(c=p.getSource()).data,h=c.sourceFormat,e=[p._getVersionSign()]}else u=l.get("data",!0),h=(0,i.isTypedArray)(u)?o.J5:o.cy,e=[];var f=this._getSourceMetaRawOption()||{},g=c&&c.metaRawOption||{},m=(0,i.retrieve2)(f.seriesLayoutBy,g.seriesLayoutBy)||null,v=(0,i.retrieve2)(f.sourceHeader,g.sourceHeader),y=(0,i.retrieve2)(f.dimensions,g.dimensions);t=m!==g.seriesLayoutBy||!!v!=!!g.sourceHeader||y?[(0,r._P)(u,{seriesLayoutBy:m,sourceHeader:v,dimensions:y},h)]:[]}else{var _=n;if(s){var x=this._applyTransform(a);t=x.sourceList,e=x.upstreamSignList}else{var b=_.get("source",!0);t=[(0,r._P)(b,this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(null!=a){1!==t.length&&p("")}var l=[],u=[];return(0,i.each)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||p(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e{"use strict";n.d(e,{DA:()=>m,vK:()=>v});var i=n(4279),r=n(2234),o=n(3051),a=n(8540),s=n(8407),l=n(175),u=n(9574),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function c(t){if(!_(t.sourceFormat)){0,(0,l._y)("")}return t.data}function d(t){var e=t.sourceFormat,n=t.data;if(!_(e)){0,(0,l._y)("")}if(e===i.XD){for(var r=[],a=0,s=n.length;a{"use strict";n.d(e,{RD:()=>dt.Z,TA:()=>p.Z,tF:()=>h.Z,Ir:()=>c.Z,aV:()=>f.Z,Hn:()=>T.Z,Hr:()=>u.Hr,wJ:()=>d.Z,$_:()=>_,$j:()=>u.$j,Ok:()=>u.Ok,HO:()=>u.HO,eU:()=>u.eU,zP:()=>u.zP,B9:()=>u.B9,OB:()=>ct.default,Zy:()=>vt,tv:()=>ft,Sp:()=>gt,Zr:()=>mt,WU:()=>s,wL:()=>u.wL,JE:()=>u.JE,rp:()=>u.rp,FU:()=>u.FU,Q:()=>a,_y:()=>i,S1:()=>u.S1,z$:()=>pt.RV,pI:()=>m,Rx:()=>r,Nu:()=>Z.Z,pQ:()=>Z.Z,zl:()=>u.zl,RS:()=>u.RS,qR:()=>u.qR,yn:()=>u.yn,I2:()=>u.I2,je:()=>u.je,sq:()=>u.sq,Br:()=>u.Br,ds:()=>u.ds,Pu:()=>u.Pu,aW:()=>u.aW,rV:()=>u.OB,YK:()=>u.YK,Og:()=>u.Og,jQ:()=>u.jQ,g2:()=>B.g2,P2:()=>x.P2,XV:()=>o,D$:()=>z.D,D5:()=>l,xr:()=>v,i8:()=>u.i8,gf:()=>y,x_:()=>g});var i={};n.r(i),n.d(i,{createDimensions:()=>D.q,createList:()=>O,createScale:()=>N,createSymbol:()=>L.th,createTextStyle:()=>R,dataStack:()=>E,enableHoverEmphasis:()=>P.vF,getECData:()=>A.A,getLayoutRect:()=>M.ME,mixinAxisModelCommonMethods:()=>k});var r={};n.r(r),n.d(r,{MAX_SAFE_INTEGER:()=>F.YM,asc:()=>F.dt,getPercentWithPrecision:()=>F.eJ,getPixelPrecision:()=>F.M9,getPrecision:()=>F.p8,getPrecisionSafe:()=>F.ZB,isNumeric:()=>F.kE,isRadianAroundZero:()=>F.mW,linearMap:()=>F.NU,nice:()=>F.kx,numericToNumber:()=>F.FK,parseDate:()=>F.sG,quantile:()=>F.VR,quantity:()=>F.Xd,quantityExponent:()=>F.xW,reformIntervals:()=>F.nR,remRadian:()=>F.wW,round:()=>F.NM});var o={};n.r(o),n.d(o,{format:()=>V.WU,parse:()=>F.sG});var a={};n.r(a),n.d(a,{Arc:()=>nt.Z,BezierCurve:()=>et.Z,BoundingRect:()=>st.Z,Circle:()=>X.Z,CompoundPath:()=>rt.Z,Ellipse:()=>Y.Z,Group:()=>U.Z,Image:()=>W.ZP,IncrementalDisplayable:()=>it.Z,Line:()=>tt.Z,LinearGradient:()=>ot.Z,Polygon:()=>J.Z,Polyline:()=>Q.Z,RadialGradient:()=>at.Z,Rect:()=>$.Z,Ring:()=>K.Z,Sector:()=>q.C,Text:()=>j.ZP,clipPointsByRect:()=>G.clipPointsByRect,clipRectByRect:()=>G.clipRectByRect,createIcon:()=>G.createIcon,extendPath:()=>G.extendPath,extendShape:()=>G.extendShape,getShapeClass:()=>G.getShapeClass,getTransform:()=>G.getTransform,initProps:()=>H.KZ,makeImage:()=>G.makeImage,makePath:()=>G.makePath,mergePath:()=>G.mergePath,registerShape:()=>G.registerShape,resizePath:()=>G.resizePath,updateProps:()=>H.D});var s={};n.r(s),n.d(s,{addCommas:()=>lt.OD,capitalFirst:()=>lt.ew,encodeHTML:()=>lt.F1,formatTime:()=>lt.mr,formatTpl:()=>lt.kF,getTextRect:()=>ht,getTooltipMarker:()=>lt.A0,normalizeCssArray:()=>lt.MY,toCamelCase:()=>lt.zW,truncateText:()=>ut.aF});var l={};n.r(l),n.d(l,{bind:()=>y.bind,clone:()=>y.clone,curry:()=>y.curry,defaults:()=>y.defaults,each:()=>y.each,extend:()=>y.extend,filter:()=>y.filter,indexOf:()=>y.indexOf,inherits:()=>y.inherits,isArray:()=>y.isArray,isFunction:()=>y.isFunction,isObject:()=>y.isObject,isString:()=>y.isString,map:()=>y.map,merge:()=>y.merge,reduce:()=>y.reduce});var u=n(1615),h=n(8071),c=n(3166),d=n(3321),p=n(5797),f=n(5101),g=n(9448),m=n(2892),v=n(5280),y=n(3051),_=n(1092),x=n(270),b=n(8455),w=n(7947),S=n(6650),T=n(1497),M=n(6172),C=n(9936),A=n(106),I=n(6006),D=n(5623),L=n(1525),P=n(6357);function O(t){return(0,b.Z)(null,t)}var E={isDimensionStacked:C.M,enableDataStack:C.BM,getStackedDimension:C.IR};function N(t,e){var n=e;e instanceof T.Z||(n=new T.Z(e));var i=w.aG(n);return i.setExtent(t[0],t[1]),w.Jk(i,n),i}function k(t){y.mixin(t,S.W)}function R(t,e){return e=e||{},(0,I.Lr)(t,null,null,"normal"!==e.state)}var z=n(8023),B=n(3132),Z=n(6672),F=n(5669),V=n(5015),G=n(1177),H=n(9266),U=n(8154),W=n(4535),j=n(6498),X=n(9538),Y=n(2797),q=n(7214),K=n(5795),J=n(5094),Q=n(2514),$=n(5151),tt=n(2095),et=n(4174),nt=n(4826),it=n(1754),rt=n(2776),ot=n(4438),at=n(6369),st=n(479),lt=n(8988),ut=n(6918);function ht(t,e,n,i,r,o,a,s){return new j.ZP({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var ct=n(6387),dt=n(2950),pt=n(7772);function ft(t){var e=h.Z.extend(t);return h.Z.registerClass(e),e}function gt(t){var e=c.Z.extend(t);return c.Z.registerClass(e),e}function mt(t){var e=d.Z.extend(t);return d.Z.registerClass(e),e}function vt(t){var e=p.Z.extend(t);return p.Z.registerClass(e),e}var yt=n(7164);(0,z.D)(yt.T)},8023:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var i=n(1615),r=n(3166),o=n(5797),a=n(8071),s=n(3321),l=n(3051),u=n(9428),h=n(9448),c=[],d={registerPreprocessor:i.ds,registerProcessor:i.Pu,registerPostInit:i.sq,registerPostUpdate:i.Br,registerUpdateLifecycle:i.YK,registerAction:i.zl,registerCoordinateSystem:i.RS,registerLayout:i.qR,registerVisual:i.Og,registerTransform:i.OB,registerLoading:i.yn,registerMap:i.je,registerImpl:u.M,PRIORITY:i.Hr,ComponentModel:a.Z,ComponentView:r.Z,SeriesModel:s.Z,ChartView:o.Z,registerComponentModel:function(t){a.Z.registerClass(t)},registerComponentView:function(t){r.Z.registerClass(t)},registerSeriesModel:function(t){s.Z.registerClass(t)},registerChartView:function(t){o.Z.registerClass(t)},registerSubTypeDefaulter:function(t,e){a.Z.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){(0,h.registerPainter)(t,e)}};function p(t){(0,l.isArray)(t)?(0,l.each)(t,(function(t){p(t)})):(0,l.indexOf)(c,t)>=0||(c.push(t),(0,l.isFunction)(t)&&(t={install:t}),t.install(d))}},7164:(t,e,n)=>{"use strict";n.d(e,{T:()=>S});var i=n(2234),r=n(479),o=n(9266),a=n(106),s=n(5669),l=n(7411),u=n(7377),h=n(3051),c=n(4162),d=n(6006);function p(t){if(t){for(var e=[],n=0;n=0&&n.attr(b.oldLayoutSelect),(0,h.indexOf)(p,"emphasis")>=0&&n.attr(b.oldLayoutEmphasis)),(0,o.D)(n,u,e,l)}else if(n.attr(u),!(0,d.qA)(n).valueAnimation){var f=(0,h.retrieve2)(n.style.opacity,1);n.style.opacity=0,(0,o.KZ)(n,{style:{opacity:f}},e,l)}if(b.oldLayout=u,n.states.select){var g=b.oldLayoutSelect={};_(g,u,x),_(g,n.states.select,x)}if(n.states.emphasis){var m=b.oldLayoutEmphasis={};_(m,u,x),_(m,n.states.emphasis,x)}(0,d.tD)(n,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){r=(b=y(i)).oldLayout;var b,w={points:i.shape.points};r?(i.attr({shape:r}),(0,o.D)(i,{shape:w},e)):(i.setShape(w),i.style.strokePercent=0,(0,o.KZ)(i,{style:{strokePercent:1}},e)),b.oldLayout=w}},t}();var w=(0,i.Yf)();function S(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=w(e).labelManager;i||(i=w(e).labelManager=new b),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=w(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}},7377:(t,e,n)=>{"use strict";n.d(e,{$x:()=>R,Iu:()=>k,_A:()=>O,d:()=>I,qK:()=>P});var i=n(1610),r=n(327),o=n(2514),a=n(4014),s=n(3266),l=n(8554),u=n(3051),h=n(2892),c=n(5280),d=n(6357),p=2*Math.PI,f=a.Z.CMD,g=["top","right","bottom","left"];function m(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function v(t,e,n,i,r,o,a,l,u){a-=t,l-=e;var h=Math.sqrt(a*a+l*l),c=(a/=h)*n+t,d=(l/=h)*n+e;if(Math.abs(i-r)%p<1e-4)return u[0]=c,u[1]=d,h-n;if(o){var f=i;i=(0,s.m)(r),r=(0,s.m)(f)}else i=(0,s.m)(i),r=(0,s.m)(r);i>r&&(r+=p);var g=Math.atan2(l,a);if(g<0&&(g+=p),g>=i&&g<=r||g+p>=i&&g+p<=r)return u[0]=c,u[1]=d,h-n;var m=n*Math.cos(i)+t,v=n*Math.sin(i)+e,y=n*Math.cos(r)+t,_=n*Math.sin(r)+e,x=(m-a)*(m-a)+(v-l)*(v-l),b=(y-a)*(y-a)+(_-l)*(_-l);return x0){e=e/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(C,S,T),i.Z.sub(A,M,T);var n=C.len(),r=A.len();if(!(n<.001||r<.001)){C.scale(1/n),A.scale(1/r);var o=C.dot(A);if(Math.cos(e)1&&i.Z.copy(L,M),L.toArray(t[1])}}}}function O(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(C,T,S),i.Z.sub(A,M,T);var r=C.len(),o=A.len();if(!(r<.001||o<.001))if(C.scale(1/r),A.scale(1/o),C.dot(e)=s)i.Z.copy(L,M);else{L.scaleAndAdd(A,a/Math.tan(Math.PI/2-l));var u=M.x!==T.x?(L.x-T.x)/(M.x-T.x):(L.y-T.y)/(M.y-T.y);if(isNaN(u))return;u<0?i.Z.copy(L,T):u>1&&i.Z.copy(L,M)}L.toArray(t[1])}}}function E(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function N(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=c.dist(i[0],i[1]),o=c.dist(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=c.lerp([],i[1],i[0],a/r),l=c.lerp([],i[1],i[2],a/o),u=c.lerp([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h{"use strict";n.d(e,{GI:()=>l,VT:()=>o,WE:()=>s,yl:()=>u});var i=n(1587),r=n(479);function o(t){for(var e=[],n=0;n0&&o&&w(-c/a,0,a);var m,v,y=t[0],_=t[a-1];return x(),m<0&&S(-m,.8),v<0&&S(v,.8),x(),b(m,v,1),b(v,m,-1),x(),m<0&&T(-m),v<0&&T(v),u}function x(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){w(-(o[l-1]*c),l,a)}}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}function s(t,e,n,i){return a(t,"x","width",e,n,i)}function l(t,e,n,i){return a(t,"y","height",e,n,i)}function u(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new r.Z(0,0,0,0);function o(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var a=0;a{"use strict";n.d(e,{Lr:()=>p,k3:()=>d,nC:()=>f,ni:()=>c,pe:()=>b,qA:()=>x,qT:()=>_,tD:()=>w});var i=n(6498),r=n(3051),o=n(6357),a=n(2234),s=n(9266),l={};function u(t,e){for(var n=0;n{"use strict";n.d(e,{Bk:()=>v,G_:()=>g,Ge:()=>d,Gk:()=>c,My:()=>p,bK:()=>m});var i=n(3051),r=n(5669),o=n(9936),a=n(5682),s=n(887),l="__ec_stack_";function u(t){return t.get("stack")||l+t.seriesIndex}function h(t){return t.dim+t.index}function c(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),a=0;a0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return(0,i.each)(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],c=Math.abs(a[1]-a[0]),d=o.scale.getExtent(),p=Math.abs(d[1]-d[0]);i=l?c/p*l:c}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),m=(0,r.GM)(t.get("barMaxWidth"),i),v=(0,r.GM)(t.get("barMinWidth")||(_(t)?.5:1),i),y=t.get("barGap"),x=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:m,barMinWidth:v,barGap:y,barCategoryGap:x,axisKey:h(o),stackId:u(t)})})),f(n)}function f(t){var e={};(0,i.each)(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return(0,i.each)(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=(0,i.keys)(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),h=(0,r.GM)(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,p=(c-u)/(d+(d-1)*h);p=Math.max(p,0),(0,i.each)(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+h*i,d--}else{var i=p;e&&ei&&(i=n),i!==p&&(t.width=i,c-=i+h*i,d--)}})),p=(c-u)/(d+(d-1)*h),p=Math.max(p,0);var f,g=0;(0,i.each)(o,(function(t,e){t.width||(t.width=p),f=t,g+=t.width*(1+h)})),f&&(g-=f.width*h);var m=-g/2;(0,i.each)(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:m,width:t.width},m+=t.width*(1+h)}))})),n}function g(t,e,n){if(t&&e){var i=t[h(e)];return null!=i&&null!=n?i[u(n)]:i}}function m(t,e){var n=d(t,e),r=p(n);(0,i.each)(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=u(t),o=r[h(n)][i],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function v(t){return{seriesType:t,plan:(0,a.Z)(),reset:function(t){if(y(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.getDimensionIndex(e.mapDimension(r.dim)),l=e.getDimensionIndex(e.mapDimension(i.dim)),u=t.get("showBackground",!0),h=e.mapDimension(r.dim),c=e.getCalculationInfo("stackResultDimension"),d=(0,o.M)(e,h)&&!!e.getCalculationInfo("stackedOnSeries"),p=r.isHorizontal(),f=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),g=_(t),m=t.get("barMinHeight")||0,v=c&&e.getDimensionIndex(c),x=e.getLayout("size"),b=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,o=g&&(0,s.o)(3*r),h=g&&u&&(0,s.o)(3*r),c=g&&(0,s.o)(r),y=n.master.getRect(),_=p?y.width:y.height,w=e.getStore(),S=0;null!=(i=t.next());){var T=w.get(d?v:a,i),M=w.get(l,i),C=f,A=void 0;d&&(A=+T-w.get(a,i));var I=void 0,D=void 0,L=void 0,P=void 0;if(p){var O=n.dataToPoint([T,M]);if(d)C=n.dataToPoint([A,M])[0];I=C,D=O[1]+b,L=O[0]-C,P=x,Math.abs(L){"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(5682),o=n(9936),a=n(887);function s(t,e){return{seriesType:t,plan:(0,r.Z)(),reset:function(t){var n=t.getData(),r=t.coordinateSystem,s=t.pipelineContext,l=e||s.large;if(r){var u=(0,i.map)(r.dimensions,(function(t){return n.mapDimension(t)})).slice(0,2),h=u.length,c=n.getCalculationInfo("stackResultDimension");(0,o.M)(n,u[0])&&(u[0]=c),(0,o.M)(n,u[1])&&(u[1]=c);var d=n.getStore(),p=n.getDimensionIndex(u[0]),f=n.getDimensionIndex(u[1]);return h&&{progress:function(t,e){for(var n=t.end-t.start,i=l&&(0,a.o)(n*h),o=[],s=[],u=t.start,c=0;u{"use strict";n.d(e,{s:()=>s,y:()=>o});var i=n(3051),r=n(2234);function o(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}(0,i.each)([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,r,o){e=(0,i.extend)({},e),o.dispatchAction((0,i.extend)(e,{type:t[1],seriesIndex:n(r,e)}))}))}))}function a(t,e,n,o,a){var s=t+e;n.isSilent(s)||o.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,o=t.option.selectedMap,l=a.selected,u=0;u{"use strict";n.d(e,{Z:()=>d});var i=n(655),r=n(3051),o=n(1497),a=n(2151),s=n(4251),l=n(2234),u=n(6172),h=(0,l.Yf)(),c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.merge(t,o.get(this.mainType)),r.merge(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.merge(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=h(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.merge(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(c,o.Z),(0,s.au)(c),a.cj(c),a.jS(c,(function(t){var e=[];r.each(c.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.map(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e}));const d=c},1497:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(6387),r=n(4251),o=(0,n(9066).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(6006),l=n(6498),u=["textStyle","color"],h=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],c=new l.ZP;const d=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n{"use strict";n.d(e,{V:()=>v,Z:()=>C});var i=n(655),r=n(3051),o=n(6387),a=n(2234),s=n(8071),l=n(5494),u=n(1219),h=n(6172),c=n(8674),d=n(4251),p=n(6437),f=n(3993),g=a.Yf();function m(t,e){return t.getName(e)||t.getId(e)}var v="__universalTransitionEnabled",y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,c.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(g(this).sourceManager=new p.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,g(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,h.YD)(this),i=n?(0,h.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,h.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,h.YD)(this);n&&(0,h.dt)(this.option,t,n);var i=g(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,g(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[m(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[v])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r.isObject(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.each(r.concatArray(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.curry(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.mixin(y,u.X),r.mixin(y,l._),(0,d.pw)(y,s.Z);const C=y},2468:(t,e,n)=>{"use strict";n.d(e,{R:()=>a,f:()=>o});var i=n(3051),r=(0,i.createHashMap)();function o(t,e){(0,i.assert)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},1219:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(3051),r=n(8540),o=n(8988),a=/\{@(.+?)\}/g,s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,h=this.mainType,c="series"===h,d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var h=this.getData(n),c=this.getDataParams(t,n);(u&&(c.value=u.interpolatedValue),null!=s&&i.isArray(c.value)&&(c.value=c.value[s]),l)||(l=h.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return i.isFunction(l)?(c.status=e,c.dimensionIndex=s,l(c)):i.isString(l)?(0,o.kF)(l,c).replace(a,(function(e,n){var o=n.length,a=n;"["===a.charAt(0)&&"]"===a.charAt(o-1)&&(a=+a.slice(1,o-1));var s=(0,r.hk)(h,t,a);if(u&&i.isArray(u.interpolatedValue)){var l=h.getDimensionIndex(a);l>=0&&(s=u.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.isObject(t)?t.type&&(n=t):e=t,{text:e,frag:n}}},9887:(t,e,n)=>{"use strict";n.d(e,{D:()=>a,t:()=>r});var i=n(9066),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},7515:(t,e,n)=>{"use strict";n.d(e,{K:()=>a,v:()=>r});var i=n(9066),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},9066:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);function r(t,e){for(var n=0;n=0||o&&i.indexOf(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},5494:(t,e,n)=>{"use strict";n.d(e,{_:()=>a,i:()=>s});var i=n(2234),r=(0,i.Yf)(),o=(0,i.Yf)(),a=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return l(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t,e;(e=r)(t=this).paletteIdx=0,e(t).paletteNameMap={}},t}();function s(t,e,n,r){var a=(0,i.kF)(t.get(["aria","decal","decals"]));return l(t,o,a,null,e,n,r)}function l(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var h=null!=a&&i?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}},12:(t,e,n)=>{"use strict";n.d(e,{N:()=>b});var i=n(4990),r=n(3051),o=n(655),a=n(3510),s=n(5787),l=n(7772),u=n(479),h=n(4414),c=n(3132);function d(t,e,n){var i=c.qW.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}const p=function(t){function e(e,n,o){var a,s=t.call(this)||this;s.motionBlur=!1,s.lastFrameAlpha=.7,s.dpr=1,s.virtual=!1,s.config={},s.incremental=!1,s.zlevel=0,s.maxRepaintRectCount=5,s.__dirty=!0,s.__firstTimePaint=!0,s.__used=!1,s.__drawIndex=0,s.__startIndex=0,s.__endIndex=0,s.__prevStartIndex=null,s.__prevEndIndex=null,o=o||i.KL,"string"==typeof e?a=d(e,n,o):r.isObject(e)&&(e=(a=e).id),s.id=e,s.dom=a;var l=a.style;return l&&(r.disableUserSelect(a),a.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),s.painter=n,s.dpr=o,s}return(0,o.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=d("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new u.Z(0,0,0,0);function c(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new u.Z(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,h=0;h=a)}}for(var d=this.__startIndex;d15)break}n.prevElClipPaths&&u.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var x=p.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?y:0),this._needsManuallyCompositing),c.__builtin__||r.logError("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),l.__dirty&h.YV&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,r.each(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?r.merge(n[t],e,!0):n[t]=e;for(var i=0;i{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(5669),o=n(8988),a=n(379),s=n(5021),l=r.NM,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return s.XS(t,this._extent)},e.prototype.normalize=function(t){return s.Fv(t,this._extent)},e.prototype.scale=function(t){return s.bA(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=s.lb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:l(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&c{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(379),o=n(1401),a=n(5021),s=n(3051),l=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new o.Z({})),(0,s.isArray)(i)&&(i=new o.Z({categories:(0,s.map)(i,(function(t){return(0,s.isObject)(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return null==t?NaN:(0,s.isString)(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),a.XS(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),a.Fv(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(a.bA(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(r.Z);r.Z.registerClass(l);const u=l},379:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4251),r=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();i.au(r);const o=r},1618:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(655),r=n(5669),o=n(5015),a=n(5021),s=n(103),l=n(379),u=n(3051),h=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,i.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,o.WU)(t.value,o.V8[(0,o.xC)((0,o.Tj)(this._minLevelUnit))]||o.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,o.k7)(t,e,n,r,i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),a=function(t,e,n,i){var a=1e4,s=o.FW,l=0;function h(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===c&&s.unshift({value:s[0].value-x})}}for(c=0;c=i[0]&&C<=i[1]&&x++)}var A=(i[1]-i[0])/e;if(x>1.5*A&&b>A/1.5)break;if(y.push(T),x>A||t===s[w])break}_=[]}}0;var I=(0,u.filter)((0,u.map)(y,(function(t){return(0,u.filter)(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),D=[],L=I.length-1;for(w=0;wn&&(this._approxInterval=n);var o=c.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function p(t){return(t/=30*o.s2)>6?6:t>3?3:t>2?2:1}function f(t){return(t/=o.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function g(t,e){return(t/=e?o.yR:o.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function m(t){return r.kx(t,!0)}function v(t,e,n){var i=new Date(t);switch((0,o.Tj)(e)){case"year":case"month":i[(0,o.vh)(n)](0);case"day":i[(0,o.f5)(n)](1);case"hour":i[(0,o.En)(n)](0);case"minute":i[(0,o.eN)(n)](0);case"second":i[(0,o.rM)(n)](0),i[(0,o.cb)(n)](0)}return i.getTime()}l.Z.registerClass(h);const y=h},5021:(t,e,n)=>{"use strict";n.d(e,{Fv:()=>h,Qf:()=>o,XS:()=>u,bA:()=>c,lM:()=>r,lb:()=>s,r1:()=>a});var i=n(5669);function r(t){return"interval"===t.type||"log"===t.type}function o(t,e,n,r){var o={},a=t[1]-t[0],u=o.interval=(0,i.kx)(a/e,!0);null!=n&&ur&&(u=o.interval=r);var h=o.intervalPrecision=s(u);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),l(t,0,e),l(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[(0,i.NM)(Math.ceil(t[0]/u)*u,h),(0,i.NM)(Math.floor(t[1]/u)*u,h)],t),o}function a(t){var e=Math.pow(10,(0,i.xW)(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,(0,i.NM)(n*e)}function s(t){return(0,i.p8)(t)+2}function l(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function u(t,e){return t>=e[0]&&t<=e[1]}function h(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function c(t,e){return t*(e[1]-e[0])+e[0]}},4251:(t,e,n)=>{"use strict";n.d(e,{PT:()=>l,Qj:()=>d,au:()=>g,dm:()=>u,pw:()=>h,u9:()=>s});var i=n(655),r=n(3051),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e,n,o=this;return n=o,r.isFunction(n)&&/^class\s/.test(Function.prototype.toString.call(n))?e=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o):(e=function(){(t.$constructor||o).apply(this,arguments)},r.inherits(e,this)),r.extend(e.prototype,t),e[a]=!0,e.extend=this.extend,e.superCall=p,e.superApply=f,e.superClass=o,e}}function h(t,e){t.extend=e.extend}var c=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",c++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function p(t,e){for(var n=[],i=2;i{"use strict";n.d(e,{Kr:()=>a,ZL:()=>u,cj:()=>s,jS:()=>l});var i=n(3051),r=n(4251),o=Math.round(10*Math.random());function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.each(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.each(t,(function(t){i.indexOf(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.each(l,(function(t){i.indexOf(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,h={};for(i.each(t,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(o.call(a,c,d.originalDeps.slice()),delete h[c]),i.each(d.successor,p?g:f)}i.each(h,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}}}function u(t,e){return i.merge(i.merge({},t,!0),e,!0)}},8625:(t,e,n)=>{"use strict";n.d(e,{I:()=>g});var i=Math.round(9*Math.random()),r="function"==typeof Object.defineProperty;const o=function(){function t(){this._id="__ec_inner_"+i++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return r?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var a=n(2528),s=n(3051),l=n(5669),u=n(1525),h=n(7772),c=n(3132),d=new o,p=new a.ZP(100),f=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function g(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&d.delete(t);var o=d.get(t);if(o)return o;var a=(0,s.defaults)(t,{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});"none"===a.backgroundColor&&(a.backgroundColor=null);var g={repeat:"repeat"};return function(t){for(var e,o=[n],d=!0,g=0;g{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},8988:(t,e,n)=>{"use strict";n.d(e,{A0:()=>v,F1:()=>c,Lz:()=>x,MI:()=>b,MY:()=>l,OD:()=>a,ew:()=>_,kF:()=>g,mr:()=>y,uX:()=>d,wx:()=>m,zW:()=>s});var i=n(3051),r=n(5669),o=n(5015);function a(t){if(!(0,r.kE)(t))return i.isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var l=i.normalizeCssArray,u=/([&<>"'])/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"};function c(t){return null==t?"":(t+"").replace(u,(function(t,e){return h[e]}))}function d(t,e,n){function s(t){return t&&i.trim(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,h=t instanceof Date;if(u||h){var c=u?(0,r.sG)(t):t;if(!isNaN(+c))return(0,o.WU)(c,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(h)return"-"}if("ordinal"===e)return i.isStringSafe(t)?s(t):i.isNumber(t)&&l(t)?t+"":"-";var d=(0,r.FK)(t);return l(d)?a(d):i.isStringSafe(t)?s(t):"boolean"==typeof t?t+"":"-"}var p=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(0,r.sG)(e),a=n?"getUTC":"get",s=i[a+"FullYear"](),l=i[a+"Month"]()+1,u=i[a+"Date"](),h=i[a+"Hours"](),c=i[a+"Minutes"](),d=i[a+"Seconds"](),p=i[a+"Milliseconds"]();return t=t.replace("MM",(0,o.vk)(l,2)).replace("M",l).replace("yyyy",s).replace("yy",(0,o.vk)(s%100+"",2)).replace("dd",(0,o.vk)(u,2)).replace("d",u).replace("hh",(0,o.vk)(h,2)).replace("h",h).replace("mm",(0,o.vk)(c,2)).replace("m",c).replace("ss",(0,o.vk)(d,2)).replace("s",d).replace("SSS",(0,o.vk)(p,3))}function _(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function x(t,e){return e=e||"transparent",i.isString(t)?t:i.isObject(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function b(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},1177:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Arc:()=>x.Z,BezierCurve:()=>_.Z,BoundingRect:()=>T.Z,Circle:()=>c.Z,CompoundPath:()=>b.Z,Ellipse:()=>d.Z,Group:()=>u.Z,Image:()=>l.ZP,IncrementalDisplayable:()=>A.Z,Line:()=>y.Z,LinearGradient:()=>w.Z,OrientedBoundingRect:()=>M.Z,Path:()=>a.ZP,Point:()=>C.Z,Polygon:()=>g.Z,Polyline:()=>m.Z,RadialGradient:()=>S.Z,Rect:()=>v.Z,Ring:()=>f.Z,Sector:()=>p.C,Text:()=>h.ZP,applyTransform:()=>q,clipPointsByRect:()=>$,clipRectByRect:()=>tt,createIcon:()=>et,extendPath:()=>z,extendShape:()=>k,getShapeClass:()=>Z,getTransform:()=>Y,groupTransition:()=>Q,initProps:()=>P.KZ,isElementRemoved:()=>P.eq,lineLineIntersect:()=>it,linePolygonIntersect:()=>nt,makeImage:()=>V,makePath:()=>F,mergePath:()=>H,registerShape:()=>B,removeElement:()=>P.bX,removeElementWithFadeOut:()=>P.XD,resizePath:()=>U,setTooltipConfig:()=>ot,subPixelOptimize:()=>X,subPixelOptimizeLine:()=>W,subPixelOptimizeRect:()=>j,transformDirection:()=>K,traverseElements:()=>st,updateProps:()=>P.D});var i=n(7494),r=n(2892),o=n(5280),a=n(327),s=n(7411),l=n(4535),u=n(8154),h=n(6498),c=n(9538),d=n(2797),p=n(7214),f=n(5795),g=n(5094),m=n(2514),v=n(5151),y=n(2095),_=n(4174),x=n(4826),b=n(2776),w=n(4438),S=n(6369),T=n(479),M=n(1587),C=n(1610),A=n(1754),I=n(4111),D=n(3051),L=n(106),P=n(9266),O=Math.max,E=Math.min,N={};function k(t){return a.ZP.extend(t)}var R=i.Pc;function z(t,e){return R(t,e)}function B(t,e){N[t]=e}function Z(t){if(N.hasOwnProperty(t))return N[t]}function F(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=G(n,o.getBoundingRect())),U(o,n)),o}function V(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(G(e,r))}}});return i}function G(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var H=i.AA;function U(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function W(t){return I._3(t.shape,t.shape,t.style),t}function j(t){return I.Pw(t.shape,t.shape,t.style),t}var X=I.vu;function Y(t,e){for(var n=r.identity([]);t&&t!==e;)r.mul(n,t.getLocalTransform(),n),t=t.parent;return n}function q(t,e,n){return e&&!(0,D.isArrayLike)(e)&&(e=s.ZP.getLocalTransform(e)),n&&(e=r.invert([],e)),o.applyTransform([],t,e)}function K(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=q(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function J(t){return!t.isGroup}function Q(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){J(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(J(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),(0,P.D)(t,i,n,(0,L.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,D.extend)({},t.shape)),e}}function $(t,e){return(0,D.map)(t,(function(t){var n=t[0];n=O(n,e.x),n=E(n,e.x+e.width);var i=t[1];return i=O(i,e.y),[n,i=E(i,e.y+e.height)]}))}function tt(t,e){var n=O(t.x,e.x),i=E(t.x+t.width,e.x+e.width),r=O(t.y,e.y),o=E(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function et(t,e,n){var i=(0,D.extend)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,D.defaults)(r,n),new l.ZP(i)):F(t.replace("path://",""),i,n,"center")}function nt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,m=rt(f,g,u,h)/p;if(m<0||m>1)return!1;var v=rt(f,g,c,d)/p;return!(v<0||v>1)}function rt(t,e,n,i){return t*i-n*e}function ot(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=(0,D.isString)(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&(0,D.each)((0,D.keys)(l),(function(t){(0,D.hasOwn)(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=(0,L.A)(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:(0,D.defaults)({content:i,formatterParams:s},r)}}function at(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function st(t,e){if(t)if((0,D.isArray)(t))for(var n=0;n{"use strict";n.d(e,{A:()=>i,Q:()=>r});var i=(0,n(2234).Yf)(),r=function(t,e,n,r){if(r){var o=i(r);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var o=i(r);o.seriesIndex=t,o.dataIndex=n,o.dataType=e}))}}},6172:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>c,ME:()=>p,QM:()=>g,QT:()=>_,YD:()=>m,dt:()=>v,gN:()=>l,lq:()=>d,p$:()=>f,tE:()=>y});var i=n(3051),r=n(479),o=n(5669),a=n(8988),s=i.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var c=h;i.curry(h,"vertical"),i.curry(h,"horizontal");function d(t,e,n){var i=e.width,r=e.height,s=(0,o.GM)(t.left,i),l=(0,o.GM)(t.top,r),u=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,r);return(isNaN(s)||isNaN(parseFloat(t.left)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.right)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.top)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.bottom)))&&(h=r),n=a.MY(n||0),{width:Math.max(u-s-n[1]-n[3],0),height:Math.max(h-l-n[0]-n[2],0)}}function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),h=(0,o.GM)(t.right,i),c=(0,o.GM)(t.bottom,s),d=(0,o.GM)(t.width,i),p=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],m=t.aspect;switch(isNaN(d)&&(d=i-h-g-l),isNaN(p)&&(p=s-c-f-u),null!=m&&(isNaN(d)&&isNaN(p)&&(m>i/s?d=.8*i:p=.8*s),isNaN(d)&&(d=m*p),isNaN(p)&&(p=d/m)),isNaN(l)&&(l=i-h-d-g),isNaN(u)&&(u=s-c-p-f),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-p/2-n[0];break;case"bottom":u=s-p-f}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(h||0)),isNaN(p)&&(p=s-f-u-(c||0));var v=new r.Z(l+n[3],u+n[0],d,p);return v.margin=n,v}function f(t,e,n,o,a,s){var l,u=!a||!a.hv||a.hv[0],h=!a||!a.hv||a.hv[1],c=a&&a.boundingMode||"all";if((s=s||t).x=t.x,s.y=t.y,!u&&!h)return!1;if("raw"===c)l="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var d=t.getLocalTransform();(l=l.clone()).applyTransform(d)}var f=p(i.defaults({width:l.width,height:l.height},e),n,o),g=u?f.x-l.x:0,m=h?f.y-l.y:0;return"raw"===c?(s.x=g,s.y=m):(s.x+=g,s.y+=m),s===t&&t.markRedraw(),!0}function g(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]}function m(t){var e=t.layoutMode||t.constructor.layoutMode;return i.isObject(e)?e:e?{type:e}:null}function v(t,e,n){var r=n&&n.ignoreSize;!i.isArray(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){h(e,t)&&(o[t]=l[t]=e[t]),c(o,t)&&a++,c(l,t)&&u++})),r[i])return c(e,n[1])?l[n[2]]=null:c(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var d=0;d{"use strict";n.d(e,{Sh:()=>s,ZK:()=>a,_y:()=>l});var i={},r="undefined"!=typeof console&&console.warn&&console.log;function o(t,e,n){if(r){if(n){if(i[e])return;i[e]=!0}console[t]("[ECharts] "+e)}}function a(t,e){o("warn",t,e)}function s(t){0}function l(t){throw new Error(t)}},2234:(t,e,n)=>{"use strict";n.d(e,{C4:()=>d,C6:()=>I,Cc:()=>h,Co:()=>p,HZ:()=>L,IL:()=>O,O0:()=>b,P$:()=>P,Td:()=>c,U5:()=>v,U9:()=>E,XI:()=>w,Yf:()=>T,ab:()=>f,g0:()=>x,gO:()=>S,iP:()=>D,kF:()=>u,lY:()=>_,pk:()=>k,pm:()=>C,pv:()=>N,yu:()=>y,zH:()=>A});var i=n(3051),r=n(6387),o=n(5669);function a(t,e,n){return(e-t)*n+t}var s="series\0",l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function h(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i{"use strict";n.d(e,{FK:()=>T,GM:()=>a,M9:()=>c,NM:()=>s,NU:()=>o,S$:()=>p,VR:()=>w,Xd:()=>_,YM:()=>f,ZB:()=>h,dt:()=>l,eJ:()=>d,jj:()=>C,kE:()=>M,kx:()=>b,mW:()=>m,nR:()=>S,nl:()=>I,p8:()=>u,sG:()=>y,wW:()=>g,xW:()=>x});var i=n(3051),r=1e-4;function o(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function a(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return i.isString(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function s(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function l(t){return t.sort((function(t,e){return t-e})),t}function u(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return h(t)}function h(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function c(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function d(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var o=Math.pow(10,n),a=i.map(t,(function(t){return(isNaN(t)?0:t)/r*o*100})),s=100*o,l=i.map(a,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),h=i.map(a,(function(t,e){return t-l[e]}));uc&&(c=h[p],d=p);++l[d],h[d]=0,++u}return l[e]/o}function p(t,e){var n=Math.max(u(t),u(e)),i=t+e;return n>20?i:s(i,n)}var f=9007199254740991;function g(t){var e=2*Math.PI;return(t%e+e)%e}function m(t){return t>-1e-4&&t=10&&e++,e}function b(t,e){var n=x(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function w(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function S(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i{"use strict";n.d(e,{$l:()=>Q,Av:()=>ht,C5:()=>nt,CX:()=>p,Gl:()=>k,Hg:()=>x,Ib:()=>ot,JQ:()=>b,Ki:()=>y,L1:()=>g,MA:()=>z,Mh:()=>V,Nj:()=>ut,RW:()=>dt,SJ:()=>W,SX:()=>G,T5:()=>X,UL:()=>K,VP:()=>H,WO:()=>lt,XX:()=>U,aG:()=>pt,ci:()=>et,e9:()=>gt,fD:()=>F,iK:()=>w,k5:()=>rt,oJ:()=>J,og:()=>tt,qc:()=>m,th:()=>ct,vF:()=>it,wU:()=>f,xp:()=>ft,xr:()=>$,yx:()=>_,zI:()=>q,zr:()=>v});var i=n(2528),r=n(3051),o=n(106),a=n(1092),s=n(2234),l=n(327),u=1,h={},c=(0,s.Yf)(),d=(0,s.Yf)(),p=1,f=2,g=["emphasis","blur","select"],m=["normal","emphasis","blur","select"],v=10,y="highlight",_="downplay",x="select",b="unselect",w="toggleSelect";function S(t){return null!=t&&"none"!==t}var T=new i.ZP(100);function M(t){if((0,r.isString)(t)){var e=T.get(t);return e||(e=a.lift(t,-.1),T.put(t,e)),e}if((0,r.isGradientObject)(t)){var n=(0,r.extend)({},t);return n.colorStops=(0,r.map)(t.colorStops,(function(t){return{offset:t.offset,color:a.lift(t.color,-.1)}})),n}return t}function C(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function A(t){C(t,"emphasis",f)}function I(t){t.hoverState===f&&C(t,"normal",0)}function D(t){C(t,"blur",p)}function L(t){t.hoverState===p&&C(t,"normal",0)}function P(t){t.selected=!0}function O(t){t.selected=!1}function E(t,e,n){e(t,n)}function N(t,e,n){E(t,e,n),t.isGroup&&t.traverse((function(t){E(t,e,n)}))}function k(t,e){switch(e){case"emphasis":t.hoverState=f;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.indexOf)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=c(t),u=o&&s.selectFill||s.normalFill,h=o&&s.selectStroke||s.normalStroke;if(S(u)||S(h)){var d=(i=i||{}).style||{};"inherit"===d.fill?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=u):!S(d.fill)&&S(u)?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=M(u)):!S(d.stroke)&&S(h)&&(a||(i=(0,r.extend)({},i),d=(0,r.extend)({},d)),d.stroke=M(h)),i.style=d}}if(i&&null==i.z2){a||(i=(0,r.extend)({},i));var p=t.z2EmphasisLift;i.z2=t.z2+(null!=p?p:v)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.indexOf)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function it(t,e,n){ut(t,!0),N(t,z),ot(t,e,n)}function rt(t,e,n,i){i?function(t){ut(t,!1)}(t):it(t,e,n)}function ot(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var at=["emphasis","blur","select"],st={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function lt(t,e,n,i){n=n||"itemStyle";for(var r=0;r{"use strict";n.d(e,{Cq:()=>S,Pw:()=>y,th:()=>b,zp:()=>w});var i=n(3051),r=n(327),o=n(2095),a=n(5151),s=n(9538),l=n(1177),u=n(479),h=n(423),c=n(5669),d=r.ZP.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),p=r.ZP.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),f=r.ZP.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),g=r.ZP.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),m={line:o.Z,rect:a.Z,roundRect:a.Z,square:a.Z,circle:s.Z,diamond:p,pin:f,arrow:g,triangle:d},v={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},y={};(0,i.each)(m,(function(t,e){y[e]=new t}));var _=r.ZP.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,h.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=y[i];r||(r=y[i="rect"]),v[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function x(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function b(t,e,n,i,r,o,a){var s,h=0===t.indexOf("empty");return h&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?l.makeImage(t.slice(8),new u.Z(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?l.makePath(t.slice(7),{},new u.Z(e,n,i,r),a?"center":"cover"):new _({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=h,s.setColor=x,o&&s.setColor(o),s}function w(t){return(0,i.isArray)(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function S(t,e){if(null!=t)return(0,i.isArray)(t)||(t=[t,t]),[(0,c.GM)(t[0],e[0])||0,(0,c.GM)((0,i.retrieve2)(t[1],t[0]),e[1])||0]}},270:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s,ZH:()=>l});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,h=l[o];if(l[r]!==n||h!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}function l(t,e){var n=t[e];n&&n[i]&&(n.clear&&n.clear(),t[e]=n[i])}},5015:(t,e,n)=>{"use strict";n.d(e,{$K:()=>_,CW:()=>C,En:()=>k,FW:()=>m,MV:()=>L,P5:()=>c,RZ:()=>P,Tj:()=>y,V8:()=>f,WT:()=>s,WU:()=>b,Wp:()=>I,cb:()=>B,dV:()=>u,eN:()=>R,f5:()=>N,fn:()=>D,k7:()=>w,q5:()=>T,rM:()=>z,s2:()=>h,sx:()=>M,vh:()=>E,vk:()=>v,xC:()=>x,xL:()=>O,xz:()=>A,yR:()=>l});var i=n(3051),r=n(5669),o=n(3917),a=n(1497),s=1e3,l=60*s,u=60*l,h=24*u,c=365*h,d={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}"},p="{yyyy}-{MM}-{dd}",f={year:"{yyyy}",month:"{yyyy}-{MM}",day:p,hour:"{yyyy}-{MM}-{dd} "+d.hour,minute:"{yyyy}-{MM}-{dd} "+d.minute,second:"{yyyy}-{MM}-{dd} "+d.second,millisecond:d.none},g=["year","month","day","hour","minute","second","millisecond"],m=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function _(t){return t===y(t)}function x(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function b(t,e,n,i){var s=r.sG(t),l=s[M(n)](),u=s[C(n)]()+1,h=Math.floor((u-1)/3)+1,c=s[A(n)](),d=s["get"+(n?"UTC":"")+"Day"](),p=s[I(n)](),f=(p-1)%12+1,g=s[D(n)](),m=s[L(n)](),y=s[P(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,h+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(c,2)).replace(/{d}/g,c+"").replace(/{eeee}/g,w[d]).replace(/{ee}/g,S[d]).replace(/{e}/g,d+"").replace(/{HH}/g,v(p,2)).replace(/{H}/g,p+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(m,2)).replace(/{s}/g,m+"").replace(/{SSS}/g,v(y,3)).replace(/{S}/g,y+"")}function w(t,e,n,r,o){var a=null;if(i.isString(n))a=n;else if(i.isFunction(n))a=n(t.value,e,{level:t.level});else{var s=i.extend({},d);if(t.level>0)for(var l=0;l=0;--l)if(u[h]){a=u[h];break}a=a||s.none}if(i.isArray(a)){var c=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[c=Math.min(c,a.length-1)]}}return b(new Date(t.value),a,o,r)}function S(t,e){var n=r.sG(t),i=n[C(e)]()+1,o=n[A(e)](),a=n[I(e)](),s=n[D(e)](),l=n[L(e)](),u=0===n[P(e)](),h=u&&0===l,c=h&&0===s,d=c&&0===a,p=d&&1===o;return p&&1===i?"year":p?"month":d?"day":c?"hour":h?"minute":u?"second":"millisecond"}function T(t,e,n){var o=i.isNumber(t)?r.sG(t):t;switch(e=e||S(t,n)){case"year":return o[M(n)]();case"half-year":return o[C(n)]()>=6?1:0;case"quarter":return Math.floor((o[C(n)]()+1)/4);case"month":return o[C(n)]();case"day":return o[A(n)]();case"half-day":return o[I(n)]()/24;case"hour":return o[I(n)]();case"minute":return o[D(n)]();case"second":return o[L(n)]();case"millisecond":return o[P(n)]()}}function M(t){return t?"getUTCFullYear":"getFullYear"}function C(t){return t?"getUTCMonth":"getMonth"}function A(t){return t?"getUTCDate":"getDate"}function I(t){return t?"getUTCHours":"getHours"}function D(t){return t?"getUTCMinutes":"getMinutes"}function L(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"getUTCMilliseconds":"getMilliseconds"}function O(t){return t?"setUTCFullYear":"setFullYear"}function E(t){return t?"setUTCMonth":"setMonth"}function N(t){return t?"setUTCDate":"setDate"}function k(t){return t?"setUTCHours":"setHours"}function R(t){return t?"setUTCMinutes":"setMinutes"}function z(t){return t?"setUTCSeconds":"setSeconds"}function B(t){return t?"setUTCMilliseconds":"setMilliseconds"}},4279:(t,e,n)=>{"use strict";n.d(e,{J5:()=>l,RA:()=>u,Wc:()=>c,XD:()=>o,cy:()=>r,f7:()=>i,fY:()=>h,hL:()=>s,qb:()=>a});var i=(0,n(3051).createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",h="column",c="row"},887:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});var i=n(3051),r="undefined"!=typeof Float32Array,o=r?Float32Array:Array;function a(t){return(0,i.isArray)(t)?r?new Float32Array(t):t:new o(t)}},5797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(2151),a=n(4251),s=n(2234),l=n(6357),u=n(8674),h=n(5682),c=n(1177),d=s.Yf(),p=(0,h.Z)(),f=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){(0,c.traverseElements)(this.group,t)},t.markUpdateMethod=function(t,e){d(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function g(t,e,n){t&&(0,l.Av)(t)&&("emphasis"===e?l.fD:l.Mh)(t,n)}function m(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.each)(s.kF(r),(function(e){g(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){g(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&d(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),_[l]}a.dm(f,["dispose"]),a.au(f);var _={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const x=f},3166:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8154),r=n(2151),o=n(4251),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();o.dm(a),o.au(a);const s=a},2019:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}()},6211:(t,e,n)=>{"use strict";function i(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function r(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function o(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}n.d(e,{LZ:()=>o,Or:()=>i,UL:()=>r})},531:function(t,e){ /* @preserve * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t){"use strict";function e(t){for(var e,n,i=1,r=arguments.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>=e.x&&i.x<=n.x;return t=t.y>=e.y&&i.y<=n.y,r&&t},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>=e.lat&&i.lat<=n.lat;return t=t.lng>=e.lng&&i.lng<=n.lng,r&&t},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>e.lat&&i.late.lng&&i.lng","http://www.w3.org/2000/svg"===(At.firstChild&&At.firstChild.namespaceURI));function Ct(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Dt={ie:J,ielt9:Q,edge:$,webkit:tt,android:et,android23:nt,androidStock:it,opera:rt,chrome:ot,gecko:at,safari:st,phantom:lt,opera12:ut,win:ht,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:pt,mobile:jn,mobileWebkit:ft,mobileWebkit3d:gt,msPointer:mt,pointer:vt,touch:_t,touchNative:yt,mobileOpera:xt,mobileGecko:bt,retina:wt,passiveEvents:St,canvas:Tt,svg:Mt,vml:!Mt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:At},It=Dt.msPointer?"MSPointerDown":"pointerdown",Lt=Dt.msPointer?"MSPointerMove":"pointermove",Pt=Dt.msPointer?"MSPointerUp":"pointerup",Ot=Dt.msPointer?"MSPointerCancel":"pointercancel",Et={touchstart:It,touchmove:Lt,touchend:Pt,touchcancel:Ot},Nt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Oe(e),Vt(t,e)},touchmove:Vt,touchend:Vt,touchcancel:Vt},kt={},Rt=!1;function zt(t,e,n){return"touchstart"!==e||Rt||(document.addEventListener(It,Bt,!0),document.addEventListener(Lt,Zt,!0),document.addEventListener(Pt,Ft,!0),document.addEventListener(Ot,Ft,!0),Rt=!0),Nt[e]?(n=Nt[e].bind(this,n),t.addEventListener(Et[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Bt(t){kt[t.pointerId]=t}function Zt(t){kt[t.pointerId]&&(kt[t.pointerId]=t)}function Ft(t){delete kt[t.pointerId]}function Vt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],kt)e.touches.push(kt[n]);e.changedTouches=[e],t(e)}}var Gt=200;function Ht(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){var r;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((r=Date.now())-i<=Gt?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return(t=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r)}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}var Ut,Wt,jt,Xt,Yt,qt,Kt=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:n}function ee(t,e,n){return(t=document.createElement(t)).className=e||"",n&&n.appendChild(t),t}function ne(t){var e=t.parentNode;e&&e.removeChild(t)}function ie(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function oe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ae(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=he(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var n;if(void 0!==t.classList)for(var i=d(e),r=0,o=i.length;rthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter();return t=this._limitCenter(n,this._zoom,B(t)),n.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=N((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=N(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=(t=this.project(t),(n=R([(o=this.getPixelBounds()).min.add(n),o.max.subtract(i)])).getSize());return n.contains(t)||(this._enforcingBounds=!0,i=t.subtract(n.getCenter()),n=n.extend(t).getSize().subtract(o),r.x+=i.x<0?-n.x:n.x,r.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),o=n.divideBy(2).round(),a=i.divideBy(2).round();return(o=o.subtract(a)).x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,n,i=new Z(t.coords.latitude,t.coords.longitude),r=i.toBounds(2*t.coords.accuracy),o=this._locateOptions,a=(o.setView&&(e=this.getBoundsZoom(r),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e)),{latlng:i,bounds:r,timestamp:t.timestamp});for(n in t.coords)"number"==typeof t.coords[n]&&(a[n]=t.coords[n]);this.fire("locationfound",a)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ne(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ne(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=N(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=(t=t.getSouthEast(),n=this.getSize().subtract(n),t=R(this.project(t,i),this.project(a,i)).getSize(),a=Dt.any3d?this.options.zoomSnap:1,n.x/t.x);return n=n.y/t.y,t=e?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(t,i),a&&(i=Math.round(i/(a/100))*(a/100),i=e?Math.ceil(i/a)*a:Math.floor(i/a)*a),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new k(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,t=n.zoom(t*n.scale(e)),isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(N(t),e)},layerPointToLatLng:function(t){return t=N(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return N(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return N(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(N(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=$t(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&Dt.any3d,se(t,"leaflet-container"+(Dt.touch?" leaflet-touch":"")+(Dt.retina?" leaflet-retina":"")+(Dt.ielt9?" leaflet-oldie":"")+(Dt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),te(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fe(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){fe(this._mapPane,new O(0,0));var n=!this._loaded,i=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){fe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Te:we;e((this._targets[a(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Dt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!ze(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)?i:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,n=t.target||t.srcElement;!this._loaded||n._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(n)||("mousedown"===(e=t.type)&&ye(n),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){"click"===t.type&&((l=e({},t)).type="preclick",this._fireDOMEvent(l,l.type,i));var r=this._findEventTargets(t,n);if(i){for(var o=[],a=0;athis.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e);return i=this._getCenterOffset(t)._divideBy(1-1/i),!(!0!==n.animate&&!this.getSize().contains(i)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fe(t){return new Ge(t)}var Ve,Ge=D.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition();return t=t._controlCorners[n],se(e,"leaflet-control"),-1!==n.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ne(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer),r=((t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),we(e,"click",this._onInputClick,this),i=document.createElement("span")).innerHTML=" "+t.name,document.createElement("span"));return n.appendChild(r),r.appendChild(e),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ue=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ee("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){return(n=ee("a",n,i)).innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),Pe(n),we(n,"click",Ee),we(n,"click",r,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";le(this._zoomInButton,e),le(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),We=(Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ue,this.addControl(this.zoomControl))})),Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ee("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ee("div",e,n)),t.imperial&&(this._iScale=ee("div",e,n))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n;5280<(t*=3.2808399)?(n=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,n+" mi",n/e)):(n=this._getRoundNum(t),this._updateScale(this._iScale,n+" ft",n/t))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t/=e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),je=Ge.extend({options:{position:"bottomright",prefix:''+(Dt.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),Pe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' ')}}}),Xe=(Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook((function(){this.options.attributionControl&&(new je).addTo(this)})),Ge.Layers=He,Ge.Zoom=Ue,Ge.Scale=We,Ge.Attribution=je,Fe.layers=function(t,e,n){return new He(t,e,n)},Fe.zoom=function(t){return new Ue(t)},Fe.scale=function(t){return new We(t)},Fe.attribution=function(t){return new je(t)},$=D.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}),$.addTo=function(t,e){return t.addHandler(e,this),this},tt={Events:I},Dt.touch?"touchstart mousedown":"mousedown"),Ye=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(we(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ye._dragging===this&&this.finishDrag(!0),Te(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;this._enabled&&(this._moved=!1,ae(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Ye._dragging===this&&this.finishDrag():Ye._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Ye._dragging=this)._preventOutline&&ye(this._element),me(),jt(),this._moving||(this.fire("down"),n=t.touches?t.touches[0]:t,e=xe(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=ge(this._element),this._parentScale=be(e),n="mousedown"===t.type,we(document,n?"mousemove":"touchmove",this._onMove,this),we(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function tn(t,e,n,i){var r=e.x,o=(e=e.y,n.x-r),a=n.y-e,s=o*o+a*a;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||gn.prototype._containsPoint.call(this,t,!0)}}),vn=sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;ea.x&&(s=i.x+l-a.x+o.x),i.x-s-r.x<(l=0)&&(s=i.x-r.x),i.y+n+o.y>a.y&&(l=i.y+n-a.y+o.y),i.y-l-r.y<0&&(l=i.y-r.y),(s||l)&&e.fire("autopanstart").panBy([s,l],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),On=(Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return this._initOverlay(Pn,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Pn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ee(t),e=t.layer||t.target,this._popup._source!==e||e instanceof dn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ln.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,i=this._container,r=n.latLngToContainerPoint(n.getCenter()),o=(n=n.layerPointToContainerPoint(t),this.options.direction),a=i.offsetWidth,s=i.offsetHeight,l=N(this.options.offset),u=this._getAnchor();n="top"===o?(e=a/2,s):"bottom"===o?(e=a/2,0):(e="center"===o?a/2:"right"===o?0:"left"===o?a:n.xthis.options.maxZoom||ithis.options.maxZoom||void 0!==this.options.minZoom&&rn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),B(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n);return n=i.add(n),[e.unproject(i,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){return t=new z((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new O(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(ne(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Dt.ielt9&&this.options.opacity<1&&ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(r(this._tileReady,this,t,null,o)),fe(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(ce(n.el,0),A(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(se(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Dt.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),kn=Nn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Dt.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn=(dt={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Bn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vn("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ne(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e=e||(t._stroke=Vn("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n=n||(t._fill=Vn("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){oe(t._container)}},Dt.vml?Vn:Y),Hn=Bn.extend({_initContainer:function(){this._container=Gn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ne(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(Bn.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),fe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Gn("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ne(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options,e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ",this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){oe(t._path)}});function Un(t){return Dt.svg||Dt.vml?new Hn(t):null}Dt.vml&&Hn.include(dt),Ze.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Fn(t)||Un(t)}});var Wn=mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Hn.create=Gn,Hn.pointsToPath=q,vn.geometryToLayer=yn,vn.coordsToLatLng=xn,vn.coordsToLatLngs=bn,vn.latLngToCoords=wn,vn.latLngsToCoords=Sn,vn.getFeature=Tn,vn.asFeature=Mn,Ze.mergeOptions({boxZoom:!0}),K=$.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ne(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),jt(),me(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new k(this._point,this._startPoint)).getSize();fe(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ne(this._box),le(this._container,"leaflet-crosshair")),Xt(),ve(),Te(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ze.addInitHook("addHandler","boxZoom",K),Ze.mergeOptions({doubleClickZoom:!0}),pt=$.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta;n=t.originalEvent.shiftKey?n-i:n+i,"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});var jn=(Ze.addInitHook("addHandler","doubleClickZoom",pt),Ze.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),$.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Ye(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=B(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=((r=this._draggable._newPos.x)-e+n)%t+e-n,r=(r+e+n)%t-e-n;t=Math.abs(i+n)e.getMaxZoom()&&1{"use strict";n.d(e,{ZT:()=>r}); +!function(t){"use strict";function e(t){for(var e,n,i=1,r=arguments.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>=e.x&&i.x<=n.x;return t=t.y>=e.y&&i.y<=n.y,r&&t},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>=e.lat&&i.lat<=n.lat;return t=t.lng>=e.lng&&i.lng<=n.lng,r&&t},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>e.lat&&i.late.lng&&i.lng","http://www.w3.org/2000/svg"===(Ct.firstChild&&Ct.firstChild.namespaceURI));function At(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var It={ie:J,ielt9:Q,edge:$,webkit:tt,android:et,android23:nt,androidStock:it,opera:rt,chrome:ot,gecko:at,safari:st,phantom:lt,opera12:ut,win:ht,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:pt,mobile:jn,mobileWebkit:ft,mobileWebkit3d:gt,msPointer:mt,pointer:vt,touch:_t,touchNative:yt,mobileOpera:xt,mobileGecko:bt,retina:wt,passiveEvents:St,canvas:Tt,svg:Mt,vml:!Mt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Ct},Dt=It.msPointer?"MSPointerDown":"pointerdown",Lt=It.msPointer?"MSPointerMove":"pointermove",Pt=It.msPointer?"MSPointerUp":"pointerup",Ot=It.msPointer?"MSPointerCancel":"pointercancel",Et={touchstart:Dt,touchmove:Lt,touchend:Pt,touchcancel:Ot},Nt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Oe(e),Vt(t,e)},touchmove:Vt,touchend:Vt,touchcancel:Vt},kt={},Rt=!1;function zt(t,e,n){return"touchstart"!==e||Rt||(document.addEventListener(Dt,Bt,!0),document.addEventListener(Lt,Zt,!0),document.addEventListener(Pt,Ft,!0),document.addEventListener(Ot,Ft,!0),Rt=!0),Nt[e]?(n=Nt[e].bind(this,n),t.addEventListener(Et[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Bt(t){kt[t.pointerId]=t}function Zt(t){kt[t.pointerId]&&(kt[t.pointerId]=t)}function Ft(t){delete kt[t.pointerId]}function Vt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],kt)e.touches.push(kt[n]);e.changedTouches=[e],t(e)}}var Gt=200;function Ht(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){var r;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((r=Date.now())-i<=Gt?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return(t=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r)}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}var Ut,Wt,jt,Xt,Yt,qt,Kt=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:n}function ee(t,e,n){return(t=document.createElement(t)).className=e||"",n&&n.appendChild(t),t}function ne(t){var e=t.parentNode;e&&e.removeChild(t)}function ie(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function oe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ae(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=he(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var n;if(void 0!==t.classList)for(var i=d(e),r=0,o=i.length;rthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter();return t=this._limitCenter(n,this._zoom,B(t)),n.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=N((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=N(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=(t=this.project(t),(n=R([(o=this.getPixelBounds()).min.add(n),o.max.subtract(i)])).getSize());return n.contains(t)||(this._enforcingBounds=!0,i=t.subtract(n.getCenter()),n=n.extend(t).getSize().subtract(o),r.x+=i.x<0?-n.x:n.x,r.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),o=n.divideBy(2).round(),a=i.divideBy(2).round();return(o=o.subtract(a)).x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,n,i=new Z(t.coords.latitude,t.coords.longitude),r=i.toBounds(2*t.coords.accuracy),o=this._locateOptions,a=(o.setView&&(e=this.getBoundsZoom(r),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e)),{latlng:i,bounds:r,timestamp:t.timestamp});for(n in t.coords)"number"==typeof t.coords[n]&&(a[n]=t.coords[n]);this.fire("locationfound",a)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ne(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ne(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=N(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=(t=t.getSouthEast(),n=this.getSize().subtract(n),t=R(this.project(t,i),this.project(a,i)).getSize(),a=It.any3d?this.options.zoomSnap:1,n.x/t.x);return n=n.y/t.y,t=e?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(t,i),a&&(i=Math.round(i/(a/100))*(a/100),i=e?Math.ceil(i/a)*a:Math.floor(i/a)*a),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new k(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,t=n.zoom(t*n.scale(e)),isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(N(t),e)},layerPointToLatLng:function(t){return t=N(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return N(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return N(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(N(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=$t(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&It.any3d,se(t,"leaflet-container"+(It.touch?" leaflet-touch":"")+(It.retina?" leaflet-retina":"")+(It.ielt9?" leaflet-oldie":"")+(It.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),te(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fe(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){fe(this._mapPane,new O(0,0));var n=!this._loaded,i=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){fe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Te:we;e((this._targets[a(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),It.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!ze(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)?i:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,n=t.target||t.srcElement;!this._loaded||n._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(n)||("mousedown"===(e=t.type)&&ye(n),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){"click"===t.type&&((l=e({},t)).type="preclick",this._fireDOMEvent(l,l.type,i));var r=this._findEventTargets(t,n);if(i){for(var o=[],a=0;athis.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e);return i=this._getCenterOffset(t)._divideBy(1-1/i),!(!0!==n.animate&&!this.getSize().contains(i)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fe(t){return new Ge(t)}var Ve,Ge=I.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition();return t=t._controlCorners[n],se(e,"leaflet-control"),-1!==n.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ne(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer),r=((t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),we(e,"click",this._onInputClick,this),i=document.createElement("span")).innerHTML=" "+t.name,document.createElement("span"));return n.appendChild(r),r.appendChild(e),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ue=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ee("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){return(n=ee("a",n,i)).innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),Pe(n),we(n,"click",Ee),we(n,"click",r,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";le(this._zoomInButton,e),le(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),We=(Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ue,this.addControl(this.zoomControl))})),Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ee("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ee("div",e,n)),t.imperial&&(this._iScale=ee("div",e,n))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n;5280<(t*=3.2808399)?(n=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,n+" mi",n/e)):(n=this._getRoundNum(t),this._updateScale(this._iScale,n+" ft",n/t))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t/=e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),je=Ge.extend({options:{position:"bottomright",prefix:''+(It.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),Pe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' ')}}}),Xe=(Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook((function(){this.options.attributionControl&&(new je).addTo(this)})),Ge.Layers=He,Ge.Zoom=Ue,Ge.Scale=We,Ge.Attribution=je,Fe.layers=function(t,e,n){return new He(t,e,n)},Fe.zoom=function(t){return new Ue(t)},Fe.scale=function(t){return new We(t)},Fe.attribution=function(t){return new je(t)},$=I.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}),$.addTo=function(t,e){return t.addHandler(e,this),this},tt={Events:D},It.touch?"touchstart mousedown":"mousedown"),Ye=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(we(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ye._dragging===this&&this.finishDrag(!0),Te(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;this._enabled&&(this._moved=!1,ae(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Ye._dragging===this&&this.finishDrag():Ye._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Ye._dragging=this)._preventOutline&&ye(this._element),me(),jt(),this._moving||(this.fire("down"),n=t.touches?t.touches[0]:t,e=xe(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=ge(this._element),this._parentScale=be(e),n="mousedown"===t.type,we(document,n?"mousemove":"touchmove",this._onMove,this),we(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function tn(t,e,n,i){var r=e.x,o=(e=e.y,n.x-r),a=n.y-e,s=o*o+a*a;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||gn.prototype._containsPoint.call(this,t,!0)}}),vn=sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;ea.x&&(s=i.x+l-a.x+o.x),i.x-s-r.x<(l=0)&&(s=i.x-r.x),i.y+n+o.y>a.y&&(l=i.y+n-a.y+o.y),i.y-l-r.y<0&&(l=i.y-r.y),(s||l)&&e.fire("autopanstart").panBy([s,l],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),On=(Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return this._initOverlay(Pn,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Pn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ee(t),e=t.layer||t.target,this._popup._source!==e||e instanceof dn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ln.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,i=this._container,r=n.latLngToContainerPoint(n.getCenter()),o=(n=n.layerPointToContainerPoint(t),this.options.direction),a=i.offsetWidth,s=i.offsetHeight,l=N(this.options.offset),u=this._getAnchor();n="top"===o?(e=a/2,s):"bottom"===o?(e=a/2,0):(e="center"===o?a/2:"right"===o?0:"left"===o?a:n.xthis.options.maxZoom||ithis.options.maxZoom||void 0!==this.options.minZoom&&rn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),B(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n);return n=i.add(n),[e.unproject(i,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){return t=new z((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new O(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(ne(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,It.ielt9&&this.options.opacity<1&&ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(r(this._tileReady,this,t,null,o)),fe(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(ce(n.el,0),C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(se(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),It.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),kn=Nn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&It.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn=(dt={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Bn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vn("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ne(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e=e||(t._stroke=Vn("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n=n||(t._fill=Vn("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){oe(t._container)}},It.vml?Vn:Y),Hn=Bn.extend({_initContainer:function(){this._container=Gn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ne(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(Bn.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),fe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Gn("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ne(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options,e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ",this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){oe(t._path)}});function Un(t){return It.svg||It.vml?new Hn(t):null}It.vml&&Hn.include(dt),Ze.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Fn(t)||Un(t)}});var Wn=mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Hn.create=Gn,Hn.pointsToPath=q,vn.geometryToLayer=yn,vn.coordsToLatLng=xn,vn.coordsToLatLngs=bn,vn.latLngToCoords=wn,vn.latLngsToCoords=Sn,vn.getFeature=Tn,vn.asFeature=Mn,Ze.mergeOptions({boxZoom:!0}),K=$.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ne(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),jt(),me(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new k(this._point,this._startPoint)).getSize();fe(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ne(this._box),le(this._container,"leaflet-crosshair")),Xt(),ve(),Te(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ze.addInitHook("addHandler","boxZoom",K),Ze.mergeOptions({doubleClickZoom:!0}),pt=$.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta;n=t.originalEvent.shiftKey?n-i:n+i,"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});var jn=(Ze.addInitHook("addHandler","doubleClickZoom",pt),Ze.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),$.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Ye(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=B(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=((r=this._draggable._newPos.x)-e+n)%t+e-n,r=(r+e+n)%t-e-n;t=Math.abs(i+n)e.getMaxZoom()&&1{"use strict";n.d(e,{ZT:()=>r}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -18,5 +18,5 @@ 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 i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;Object.create},5823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(7411),r=n(5622),o=n(479),a=n(3510),s=n(423),l=n(3051),u=n(4990),h=n(1092),c=n(4414),d="__zr_normal__",p=i.dN.concat(["ignore"]),f=(0,l.reduce)(i.dN,(function(t,e){return t[e]=!0,t}),{ignore:!1}),g={},m=new o.Z(0,0,0,0),v=function(){function t(t){this.id=(0,l.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.copyTransform(e),null!=n.position){var h=m;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,h):(0,s.wI)(g,n,h),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*h.width,f=.5*h.height):(p=(0,s.GM)(d[0],h.width),f=(0,s.GM)(d[1],h.height)),u=!0,r.originX=-r.x+p+(i?0:h.x),r.originY=-r.y+f+(i?0:h.y)}}null!=n.rotation&&(r.rotation=n.rotation);var v=n.offset;v&&(r.x+=v[0],r.y+=v[1],u||(r.originX=-v[0],r.originY=-v[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,_=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),x=void 0,b=void 0,w=void 0;y&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,null!=x&&"auto"!==x||(x=this.getInsideTextFill()),null!=b&&"auto"!==b||(b=this.getInsideTextStroke(x),w=!0)):(x=n.outsideFill,b=n.outsideStroke,null!=x&&"auto"!==x||(x=this.getOutsideFill()),null!=b&&"auto"!==b||(b=this.getOutsideStroke(x),w=!0)),(x=x||"#000")===_.fill&&b===_.stroke&&w===_.autoStroke&&o===_.align&&a===_.verticalAlign||(l=!0,_.fill=x,_.stroke=b,_.autoStroke=w,_.align=o,_.verticalAlign=a,e.setDefaultTextStyle(_)),e.__dirty|=c.YV,l&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,h.parse)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,h.stringify)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.isObject)(t))for(var n=t,i=(0,l.keys)(n),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(d,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===d;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.indexOf)(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||i);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,p=this._textGuide;return h&&h.useState(t,e,n,u),p&&p.useState(t,e,n,u),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV),s}(0,l.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,f);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,e,d),m&&m.useStates(t,e,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.indexOf)(i,t),o=(0,l.indexOf)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||o.force&&!s.length){var A,C=void 0,D=void 0,I=void 0;if(u){D={},f&&(C={});for(T=0;T{"use strict";n.d(e,{V:()=>v,Z:()=>S});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i;var o=n(3051),a=n(5188);const s=function(){function t(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||o.noop,this.ondestroy=t.ondestroy||o.noop,this.onrestart=t.onrestart||o.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=(0,o.isFunction)(t)?t:r[t]||(0,a.H)(t)},t}();var l=n(1092),u=n(4839),h=Array.prototype.slice;function c(t,e,n){return(e-t)*n+t}function d(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,s=i.length,h=!1,c=6,d=e;if((0,o.isArrayLike)(e)){var p=function(t){return(0,o.isArrayLike)(t&&t[0])?2:1}(e);c=p,(1===p&&!(0,o.isNumber)(e[0])||2===p&&!(0,o.isNumber)(e[0][0]))&&(h=!0)}else if((0,o.isNumber)(e)&&!(0,o.eqNaN)(e))c=0;else if((0,o.isString)(e))if(isNaN(+e)){var f=l.parse(e);f&&(d=f,c=3)}else c=0;else if((0,o.isGradientObject)(e)){var g=(0,o.extend)({},d);g.colorStops=(0,o.map)(e.colorStops,(function(t){return{offset:t.offset,color:l.parse(t.color)}})),(0,u.I1)(e)?c=4:(0,u.gO)(e)&&(c=5),d=g}0===s?this.valType=c:c===this.valType&&6!==c||(h=!0),this.discrete=this.discrete||h;var m={time:t,value:d,rawValue:e,percent:0};return n&&(m.easing=n,m.easingFunc=(0,o.isFunction)(n)?n:r[n]||(0,a.H)(n)),i.push(m),m},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=x(i),l=_(i),u=0;u=0&&!(u[n].percent<=e);n--);n=m(n,h-2)}else{for(n=g;ne);n++);n=m(n-1,h-2)}r=u[n+1],i=u[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var v=r.percent-i.percent,w=0===v?1:m((e-i.percent)/v,1);r.easingFunc&&(w=r.easingFunc(w));var S=a?this._additiveValue:f?b:t[p];if(!x(l)&&!f||S||(S=this._additiveValue=[]),this.discrete)t[p]=w<1?i.rawValue:r.rawValue;else if(x(l))1===l?d(S,i[s],r[s],w):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,v(l),i),this._trackKeys.push(a)}s.addKeyframe(t,v(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var s=a.pop();r.addKeyframe(s.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}()},5188:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var i=n(8554),r=n(3051),o=/cubic-bezier\(([0-9,\.e ]+)\)/;function a(t){var e=t&&o.exec(t);if(e){var n=e[1].split(","),a=+(0,r.trim)(n[0]),s=+(0,r.trim)(n[1]),l=+(0,r.trim)(n[2]),u=+(0,r.trim)(n[3]);if(isNaN(a+s+l+u))return;var h=[];return function(t){return t<=0?0:t>=1?1:(0,i.kD)(0,a,l,1,t,h)&&(0,i.af)(0,s,u,1,h[0])}}}},2795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6387).default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)}},810:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(3051);function r(t){var e,n,r=t.style,o=r.lineDash&&r.lineWidth>0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:(0,i.isNumber)(e)?[e]:(0,i.isArray)(e)?e:null:null),a=r.lineDashOffset;if(o){var s=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(o=(0,i.map)(o,(function(t){return t/s})),a/=s)}return[o,a]}},7772:(t,e,n)=>{"use strict";n.d(e,{Dm:()=>I,RV:()=>D,RZ:()=>x});var i=n(7719),r=n(4014),o=n(8007),a=n(5787),s=n(327),l=n(4535),u=n(1505),h=n(3051),c=n(810),d=n(4414),p=n(3132),f=new r.Z(!0);function g(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function m(t){return"string"==typeof t&&"none"!==t}function v(t){var e=t.fill;return null!=e&&"none"!==e}function y(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function _(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function x(t,e,n){var i=(0,o.Gq)(e.image,e.__image,n);if((0,o.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*h.RADIAN_TO_DEGREE),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}var b=["shadowBlur","shadowOffsetX","shadowOffsetY"],w=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function S(t,e,n,r,o){var a=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){A(t,o),a=!0;var s=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(s)?i.tj.opacity:s}(r||e.blend!==n.blend)&&(a||(A(t,o),a=!0),t.globalCompositeOperation=e.blend||i.tj.blend);for(var l=0;l{"use strict";function i(t){return isFinite(t)}function r(t,e,n){for(var r="radial"===e.type?function(t,e,n){var r=n.width,o=n.height,a=Math.min(r,o),s=null==e.x?.5:e.x,l=null==e.y?.5:e.y,u=null==e.r?.5:e.r;return e.global||(s=s*r+n.x,l=l*o+n.y,u*=a),s=i(s)?s:.5,l=i(l)?l:.5,u=u>=0&&i(u)?u:.5,t.createRadialGradient(s,l,0,s,l,u)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,s=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,s=s*n.height+n.y),r=i(r)?r:0,o=i(o)?o:1,a=i(a)?a:0,s=i(s)?s:0,t.createLinearGradient(r,a,o,s)}(t,e,n),o=e.colorStops,a=0;ar,ap:()=>s,cF:()=>o})},4990:(t,e,n)=>{"use strict";n.d(e,{Ak:()=>o,GD:()=>s,KL:()=>r,iv:()=>l,vU:()=>a});var i=1;n(6387).default.hasGlobalWindow&&(i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},3640:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oi})},765:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var i=n(7637);function r(t,e){return Math.abs(t-e)<1e-8}function o(t,e,n){var o=0,a=t[0];if(!a)return!1;for(var s=1;s{"use strict";n.d(e,{m:()=>r});var i=n(8554);function r(t,e,n,r,o,a,s,l,u){if(0===s)return!1;var h=s;return!(u>e+h&&u>r+h&&u>a+h||ut+h&&l>n+h&&l>o+h||l{"use strict";n.d(e,{Dp:()=>d,GM:()=>p,M3:()=>h,dz:()=>s,lP:()=>u,mU:()=>c,wI:()=>f});var i=n(479),r=n(2528),o=n(3132),a={};function s(t,e){e=e||o.Uo;var n=a[e];n||(n=a[e]=new r.ZP(500));var i=n.get(t);return null==i&&(i=o.qW.measureText(t,e).width,n.put(t,i)),i}function l(t,e,n,r){var o=s(t,e),a=d(e),l=h(0,o,n),u=c(0,a,r);return new i.Z(l,u,o,a)}function u(t,e,n,r){var o=((t||"")+"").split("\n");if(1===o.length)return l(o[0],e,n,r);for(var a=new i.Z(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function f(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=p(i[0],n.width),u+=p(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}},3266:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},7637:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}n.d(e,{Z:()=>i})},479:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(2892),r=n(1610),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,h=new r.Z,c=new r.Z,d=new r.Z;const p=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.create();return i.translate(o,o,[-e.x,-e.y]),i.scale(o,o,[n,r]),i.translate(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,h=e.x+e.width,p=e.y,f=e.y+e.height,g=!(av&&(v=w,y<_?r.Z.set(d,-y,0):r.Z.set(d,_,0)):wv&&(v=S,x=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],c=i[3],d=i[4],p=i[5];return e.x=n.x*r+d,e.y=n.y*c+p,e.width=n.width*r,e.height=n.height*c,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=h.y=n.y,l.x=h.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),h.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,h.x),e.y=o(s.y,l.y,u.y,h.y);var f=a(s.x,l.x,u.x,h.x),g=a(s.y,l.y,u.y,h.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},3510:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},1587:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(1610),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,h=0;h<2;h++){var c=this._axes[h];if(this._getProjMinMaxOnAxis(h,t._corners,r),this._getProjMinMaxOnAxis(h,e._corners,o),r[1]o[1]){if(u=!1,s)return u;var d=Math.abs(o[0]-r[1]),p=Math.abs(r[0]-o[1]);Math.min(d,p)>a.len()&&(d{"use strict";n.d(e,{L:()=>M,Z:()=>A});var i=n(5280),r=n(479),o=n(4990),a=n(3726),s=n(8554),l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],p=[],f=[],g=Math.min,m=Math.max,v=Math.cos,y=Math.sin,_=Math.abs,x=Math.PI,b=2*x,w="undefined"!=typeof Float32Array,S=[];function T(t){return Math.round(t/x*1e8)/1e8%2*x}function M(t,e){var n=T(t[0]);n<0&&(n+=b);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=b?r=n+b:e&&n-r>=b?r=n-b:!e&&n>r?r=n+(b-T(n-r)):e&&n0&&(this._ux=_(n/o.KL/t)||0,this._uy=_(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=_(t-this._xi),i=_(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(l.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(l.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(l.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),S[0]=i,S[1]=r,M(S,o),i=S[0];var a=(r=S[1])-i;return this.addData(l.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=v(r)*n+t,this._yi=y(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(l.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!w||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){c[0]=c[1]=p[0]=p[1]=Number.MAX_VALUE,d[0]=d[1]=f[0]=f[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,s=0,u=0;for(t=0;tn||_(T)>i||p===e-1)&&(w=Math.sqrt(z*z+T*T),r=S,o=C);break;case l.C:var M=t[p++],A=t[p++],C=(S=t[p++],t[p++]),D=t[p++],I=t[p++];w=(0,s.Ci)(r,o,M,A,S,C,D,I,10),r=D,o=I;break;case l.Q:M=t[p++],A=t[p++],S=t[p++],C=t[p++];w=(0,s.wQ)(r,o,M,A,S,C,10),r=S,o=C;break;case l.A:var L=t[p++],P=t[p++],O=t[p++],E=t[p++],N=t[p++],k=t[p++],R=k+N;p+=1;t[p++];x&&(a=v(N)*O+L,u=y(N)*E+P),w=m(O,E)*g(b,Math.abs(k)),r=v(R)*O+L,o=y(R)*E+P;break;case l.R:a=r=t[p++],u=o=t[p++],w=2*t[p++]+2*t[p++];break;case l.Z:var z=a-r;T=u-o;w=Math.sqrt(z*z+T*T),r=a,o=u}w>=0&&(h[d++]=w,c+=w)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,c,d,p,f,x,b=this.data,w=this._ux,S=this._uy,T=this._len,M=e<1,A=0,C=0,D=0;if(!M||(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=e*this._pathLen))t:for(var I=0;I0&&(t.lineTo(f,x),D=0),L){case l.M:n=r=b[I++],i=o=b[I++],t.moveTo(r,o);break;case l.L:a=b[I++],c=b[I++];var O=_(a-r),E=_(c-o);if(O>w||E>S){if(M){if(A+(it=d[C++])>p){var N=(p-A)/it;t.lineTo(r*(1-N)+a*N,o*(1-N)+c*N);break t}A+=it}t.lineTo(a,c),r=a,o=c,D=0}else{var k=O*O+E*E;k>D&&(f=a,x=c,D=k)}break;case l.C:var R=b[I++],z=b[I++],B=b[I++],Z=b[I++],F=b[I++],V=b[I++];if(M){if(A+(it=d[C++])>p){N=(p-A)/it;(0,s.Vz)(r,R,B,F,N,u),(0,s.Vz)(o,z,Z,V,N,h),t.bezierCurveTo(u[1],h[1],u[2],h[2],u[3],h[3]);break t}A+=it}t.bezierCurveTo(R,z,B,Z,F,V),r=F,o=V;break;case l.Q:R=b[I++],z=b[I++],B=b[I++],Z=b[I++];if(M){if(A+(it=d[C++])>p){N=(p-A)/it;(0,s.Lx)(r,R,B,N,u),(0,s.Lx)(o,z,Z,N,h),t.quadraticCurveTo(u[1],h[1],u[2],h[2]);break t}A+=it}t.quadraticCurveTo(R,z,B,Z),r=B,o=Z;break;case l.A:var G=b[I++],H=b[I++],U=b[I++],W=b[I++],j=b[I++],X=b[I++],Y=b[I++],q=!b[I++],K=U>W?U:W,J=_(U-W)>.001,Q=j+X,$=!1;if(M)A+(it=d[C++])>p&&(Q=j+X*(p-A)/it,$=!0),A+=it;if(J&&t.ellipse?t.ellipse(G,H,U,W,Y,j,Q,q):t.arc(G,H,K,j,Q,q),$)break t;P&&(n=v(j)*U+G,i=y(j)*W+H),r=v(Q)*U+G,o=y(Q)*W+H;break;case l.R:n=r=b[I],i=o=b[I+1],a=b[I++],c=b[I++];var tt=b[I++],et=b[I++];if(M){if(A+(it=d[C++])>p){var nt=p-A;t.moveTo(a,c),t.lineTo(a+g(nt,tt),c),(nt-=tt)>0&&t.lineTo(a+tt,c+g(nt,et)),(nt-=et)>0&&t.lineTo(a+m(tt-nt,0),c+et),(nt-=tt)>0&&t.lineTo(a,c+m(et-nt,0));break t}A+=it}t.rect(a,c,tt,et);break;case l.Z:if(M){var it;if(A+(it=d[C++])>p){N=(p-A)/it;t.lineTo(r*(1-N)+n*N,o*(1-N)+i*N);break t}A+=it}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=l,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}()},1610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},7411:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>g,dN:()=>p,kY:()=>f});var i=n(2892),r=n(5280),o=i.identity,a=5e-5;function s(t){return t>a||t<-5e-5}var l=[],u=[],h=i.create(),c=Math.abs,d=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return s(this.rotation)||s(this.x)||s(this.y)||s(this.scaleX-1)||s(this.scaleY-1)||s(this.skewX)||s(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||i.create(),e?this.getLocalTransform(n):o(n),t&&(e?i.mul(n,t,n):i.copy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&o(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(l);var n=l[0]<0?-1:1,r=l[1]<0?-1:1,o=((l[0]-n)*e+n)/l[0]||0,a=((l[1]-r)*e+r)/l[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var n=this.originX,r=this.originY;(n||r)&&(h[4]=n,h[5]=r,i.mul(u,e,h),u[4]-=n,u[5]-=r,e=u),this.setLocalTransform(e)}},t.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)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.applyTransform(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.applyTransform(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){f(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,o=t.scaleX,a=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,d=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||r||s||l){var f=n+s,g=r+l;e[4]=-f*o-d*g*a,e[5]=-g*a-p*f*o}else e[4]=e[5]=0;return e[0]=o,e[3]=a,e[1]=p*o,e[2]=d*a,u&&i.rotate(e,e,u),e[4]+=n+h,e[5]+=r+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),p=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f(t,e){for(var n=0;n{"use strict";n.d(e,{H9:()=>v,mJ:()=>y,qL:()=>_,u4:()=>f,zk:()=>p});var i=n(5280),r=n(8554),o=Math.min,a=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,h=i.create(),c=i.create(),d=i.create();function p(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],s=i[0],l=i[1],u=i[1],h=1;h1e-4)return f[0]=t-n,f[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(h[0]=l(o)*n+t,h[1]=s(o)*r+e,c[0]=l(a)*n+t,c[1]=s(a)*r+e,m(f,h,c),v(g,h,c),(o%=u)<0&&(o+=u),(a%=u)<0&&(a+=u),o>a&&!p?a+=u:oo&&(d[0]=l(x)*n+t,d[1]=s(x)*r+e,m(f,d,f),v(g,d,g))}},8554:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>S,Ci:()=>b,Jz:()=>T,Lx:()=>A,QC:()=>M,Vz:()=>_,Wr:()=>C,X_:()=>m,Zm:()=>w,af:()=>g,kD:()=>v,pP:()=>y,t1:()=>x,wQ:()=>D});var i=n(5280),r=Math.pow,o=Math.sqrt,a=1e-8,s=1e-4,l=o(3),u=1/3,h=(0,i.create)(),c=(0,i.create)(),d=(0,i.create)();function p(t){return t>-1e-8&&ta||t<-1e-8}function g(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function m(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,s){var h=i+3*(e-n)-t,c=3*(n-2*e+t),d=3*(e-t),f=t-a,g=c*c-3*h*d,m=c*d-9*h*f,v=d*d-3*c*f,y=0;if(p(g)&&p(m)){if(p(c))s[0]=0;else(I=-d/c)>=0&&I<=1&&(s[y++]=I)}else{var _=m*m-4*g*v;if(p(_)){var x=m/g,b=-x/2;(I=-c/h+x)>=0&&I<=1&&(s[y++]=I),b>=0&&b<=1&&(s[y++]=b)}else if(_>0){var w=o(_),S=g*c+1.5*h*(-m+w),T=g*c+1.5*h*(-m-w);(I=(-c-((S=S<0?-r(-S,u):r(S,u))+(T=T<0?-r(-T,u):r(T,u))))/(3*h))>=0&&I<=1&&(s[y++]=I)}else{var M=(2*g*c-3*h*m)/(2*o(g*g*g)),A=Math.acos(M)/3,C=o(g),D=Math.cos(A),I=(-c-2*C*D)/(3*h),L=(b=(-c+C*(D+l*Math.sin(A)))/(3*h),(-c+C*(D-l*Math.sin(A)))/(3*h));I>=0&&I<=1&&(s[y++]=I),b>=0&&b<=1&&(s[y++]=b),L>=0&&L<=1&&(s[y++]=L)}}return y}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s)){if(f(a))(c=-l/a)>=0&&c<=1&&(r[u++]=c)}else{var h=a*a-4*s*l;if(p(h))r[0]=-a/(2*s);else if(h>0){var c,d=o(h),g=(-a-d)/(2*s);(c=(-a+d)/(2*s))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function _(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function x(t,e,n,r,a,l,u,p,f,m,v){var y,_,x,b,w,S=.005,T=1/0;h[0]=f,h[1]=m;for(var M=0;M<1;M+=.05)c[0]=g(t,n,a,u,M),c[1]=g(e,r,l,p,M),(b=(0,i.distSquare)(h,c))=0&&b=0&&c<=1&&(r[u++]=c)}else{var h=s*s-4*a*l;if(p(h))(c=-s/(2*a))>=0&&c<=1&&(r[u++]=c);else if(h>0){var c,d=o(h),g=(-s-d)/(2*a);(c=(-s+d)/(2*a))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function M(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function A(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function C(t,e,n,r,a,l,u,p,f){var g,m=.005,v=1/0;h[0]=u,h[1]=p;for(var y=0;y<1;y+=.05){c[0]=w(t,n,a,y),c[1]=w(e,r,l,y),(S=(0,i.distSquare)(h,c))=0&&S{"use strict";n.d(e,{UK:()=>h,A4:()=>u,YB:()=>l});var i=n(6387),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),u=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,p=c.left,f=c.top;s.push(p,f),u=u&&o&&p===o[d]&&f===o[d+1],l.push(t[h].offsetLeft,t[h].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(l,s,o);if(u)return u(t,n,r),!0}return!1}function h(t){return"CANVAS"===t.nodeName.toUpperCase()}},6387:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);const o=r},1158:(t,e,n)=>{"use strict";n.d(e,{OD:()=>c,Oo:()=>d,eV:()=>l,iP:()=>h,sT:()=>f,x1:()=>g,xg:()=>p});var i=n(6387),r=n(4058),o=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,a=[],s=i.default.browser.firefox&&+i.default.browser.version.split(".")[0]<39;function l(t,e,n,i){return n=n||{},i?u(t,e,n):s&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.default.domSupported&&t.getBoundingClientRect){var o=e.clientX,s=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=s-l.top)}if((0,r.A4)(a,t,o,s))return n.zrX=a[0],void(n.zrY=a[1])}n.zrX=n.zrY=0}function h(t){return t||window.event}function c(t,e,n){if(null!=(e=h(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var a=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&o.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function d(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var f=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function g(t){return 2===t.which||3===t.which}},2892:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function h(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function c(t){var e=[1,0,0,1,0,0];return o(e,t),e}n.r(e),n.d(e,{clone:()=>c,copy:()=>o,create:()=>i,identity:()=>r,invert:()=>h,mul:()=>a,rotate:()=>l,scale:()=>u,translate:()=>s})},3132:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>o,g2:()=>h,n5:()=>i,qW:()=>u,rk:()=>r});var i=12,r="sans-serif",o=i+"px "+r;var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)c=h*t.length;else for(var d=0;d{"use strict";n.d(e,{Z:()=>l});function i(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function r(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function o(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function a(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function s(t,e){var n,i,r,s=7,l=0;n=t.length;var u=[];function h(n){var h=i[n],c=r[n],d=i[n+1],p=r[n+1];r[n]=c+p,n===l-3&&(i[n+1]=i[n+2],r[n+1]=r[n+2]),l--;var f=a(t[d],t,h,c,0,e);h+=f,0!==(c-=f)&&0!==(p=o(t[h+c-1],t,d,p,p-1,e))&&(c<=p?function(n,i,r,l){var h=0;for(h=0;h=7||g>=7);if(m)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===i){for(h=0;h=0;h--)t[g+h]=t[f+h];return void(t[p]=u[d])}var m=s;for(;;){var v=0,y=0,_=!1;do{if(e(u[d],t[c])<0){if(t[p--]=t[c--],v++,y=0,0==--i){_=!0;break}}else if(t[p--]=u[d--],y++,v=0,1==--l){_=!0;break}}while((v|y)=0;h--)t[g+h]=t[f+h];if(0===i){_=!0;break}}if(t[p--]=u[d--],1==--l){_=!0;break}if(0!==(y=l-o(t[c],u,0,l,l-1,e))){for(l-=y,g=(p-=y)+1,f=(d-=y)+1,h=0;h=7||y>=7);if(_)break;m<0&&(m=0),m+=2}(s=m)<1&&(s=1);if(1===l){for(g=(p-=i)+1,f=(c-=i)+1,h=i-1;h>=0;h--)t[g+h]=t[f+h];t[p]=u[d]}else{if(0===l)throw new Error;for(f=p-(l-1),h=0;h1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;h(t)}},forceMergeRuns:function(){for(;l>1;){var t=l-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((l=i(t,n,o,e))h&&(c=h),r(t,n,n+c,n+l,e),l=c}u.pushRun(n,l),u.mergeRuns(),a-=l,n+=l}while(0!==a);u.forceMergeRuns()}}}},3051:(t,e,n)=>{"use strict";n.r(e),n.d(e,{HashMap:()=>ot,RADIAN_TO_DEGREE:()=>dt,assert:()=>tt,bind:()=>N,clone:()=>y,concatArray:()=>st,createCanvas:()=>S,createHashMap:()=>at,createObject:()=>lt,curry:()=>k,defaults:()=>w,disableUserSelect:()=>ut,each:()=>D,eqNaN:()=>Y,extend:()=>b,filter:()=>P,find:()=>O,guid:()=>m,hasOwn:()=>ht,indexOf:()=>T,inherits:()=>M,isArray:()=>R,isArrayLike:()=>C,isBuiltInObject:()=>G,isDom:()=>U,isFunction:()=>z,isGradientObject:()=>W,isImagePatternObject:()=>j,isNumber:()=>F,isObject:()=>V,isPrimitive:()=>rt,isRegExp:()=>X,isString:()=>B,isStringSafe:()=>Z,isTypedArray:()=>H,keys:()=>E,logError:()=>v,map:()=>I,merge:()=>_,mergeAll:()=>x,mixin:()=>A,noop:()=>ct,normalizeCssArray:()=>$,reduce:()=>L,retrieve:()=>q,retrieve2:()=>K,retrieve3:()=>J,setAsPrimitive:()=>it,slice:()=>Q,trim:()=>et});var i=n(3132),r=L(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),o=L(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),a=Object.prototype.toString,s=Array.prototype,l=s.forEach,u=s.filter,h=s.slice,c=s.map,d=function(){}.constructor,p=d?d.prototype:null,f="__proto__",g=2311;function m(){return g++}function v(){for(var t=[],e=0;e{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t){return[t[0],t[1]]}function a(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function l(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t){return Math.sqrt(d(t))}n.r(e),n.d(e,{add:()=>s,applyTransform:()=>M,clone:()=>o,copy:()=>r,create:()=>i,dist:()=>x,distSquare:()=>w,distance:()=>_,distanceSquare:()=>b,div:()=>g,dot:()=>m,len:()=>h,lenSquare:()=>d,length:()=>c,lengthSquare:()=>p,lerp:()=>T,max:()=>C,min:()=>A,mul:()=>f,negate:()=>S,normalize:()=>y,scale:()=>v,scaleAndAdd:()=>l,set:()=>a,sub:()=>u});var c=h;function d(t){return t[0]*t[0]+t[1]*t[1]}var p=d;function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function g(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function m(t,e){return t[0]*e[0]+t[1]*e[1]}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function y(t,e){var n=h(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function _(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var x=_;function b(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var w=b;function S(t,e){return t[0]=-e[0],t[1]=-e[1],t}function T(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function M(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function A(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function C(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},2776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(655),r=n(327);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n{"use strict";n.d(e,{ZP:()=>m,ik:()=>h,tj:()=>u});var i=n(655),r=n(5823),o=n(479),a=n(3051),s=n(4414),l="__zr_style_"+Math.round(10*Math.random()),u={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},h={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};u[l]=!0;var c=["z","z2","invisible"],d=["invisible"],p=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.keys)(e),i=0;i{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},8154:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(3051),o=n(5823),a=n(479),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=r.indexOf(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.indexOf(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n{"use strict";n.d(e,{ZP:()=>h});var i=n(655),r=n(7719),o=n(479),a=n(3051),s=(0,a.defaults)({x:0,y:0},r.tj),l={style:(0,a.defaults)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)};var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.createObject)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const h=u},1754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(7719),o=n(479),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(1797).Z)},327:(t,e,n)=>{"use strict";n.d(e,{$t:()=>C,ZP:()=>L});var i=n(655),r=n(7719),o=n(4014),a=n(3640),s=n(8554);function l(t,e,n,i,r,o,a,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>i+d&&c>o+d&&c>l+d||ct+d&&h>n+d&&h>r+d&&h>a+d||hn||d+ur&&(r+=c);var f=Math.atan2(l,s);return f<0&&(f+=c),f>=i&&f<=r||f+c>=i&&f+c<=r}var p=n(7637),f=o.Z.CMD,g=2*Math.PI;var m=[-1,-1,-1],v=[-1,-1];function y(t,e,n,i,r,o,a,l,u,h){if(h>e&&h>i&&h>o&&h>l||h1&&(c=void 0,c=v[0],v[0]=v[1],v[1]=c),g=s.af(e,i,o,l,v[0]),f>1&&(y=s.af(e,i,o,l,v[1]))),2===f?xe&&l>i&&l>o||l=0&&h<=1){for(var c=0,d=s.Zm(e,i,o,h),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);m[0]=-l,m[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=g-1e-4){i=0,r=g;var h=o?1:-1;return a>=m[0]+t&&a<=m[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=g,r+=g);for(var d=0,p=0;p<2;p++){var f=m[p];if(f+t>a){var v=Math.atan2(s,f);h=o?1:-1;v<0&&(v=g+v),(v>=i&&v<=r||v+g>=i&&v+g<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(h=-h),d+=h)}}return d}function b(t,e,n,i,r){for(var o,s,h,c,g=t.data,m=t.len(),v=0,b=0,w=0,S=0,T=0,M=0;M1&&(n||(v+=(0,p.Z)(b,w,S,T,i,r))),C&&(S=b=g[M],T=w=g[M+1]),A){case f.M:b=S=g[M++],w=T=g[M++];break;case f.L:if(n){if(a.m(b,w,g[M],g[M+1],e,i,r))return!0}else v+=(0,p.Z)(b,w,g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.C:if(n){if(l(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=y(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.Q:if(n){if(u.m(b,w,g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=_(b,w,g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.A:var D=g[M++],I=g[M++],L=g[M++],P=g[M++],O=g[M++],E=g[M++];M+=1;var N=!!(1-g[M++]);o=Math.cos(O)*L+D,s=Math.sin(O)*P+I,C?(S=o,T=s):v+=(0,p.Z)(b,w,o,s,i,r);var k=(i-D)*P/L+D;if(n){if(d(D,I,P,O,O+E,N,e,k,r))return!0}else v+=x(D,I,P,O,O+E,N,k,r);b=Math.cos(O+E)*L+D,w=Math.sin(O+E)*P+I;break;case f.R:if(S=b=g[M++],T=w=g[M++],o=S+g[M++],s=T+g[M++],n){if(a.m(S,T,o,T,e,i,r)||a.m(o,T,o,s,e,i,r)||a.m(o,s,S,s,e,i,r)||a.m(S,s,S,T,e,i,r))return!0}else v+=(0,p.Z)(o,T,o,s,i,r),v+=(0,p.Z)(S,s,S,T,i,r);break;case f.Z:if(n){if(a.m(b,w,S,T,e,i,r))return!0}else v+=(0,p.Z)(b,w,S,T,i,r);b=S,w=T}}return n||(h=w,c=T,Math.abs(h-c)<1e-4)||(v+=(0,p.Z)(b,w,S,T,i,r)||0),0!==v}var w=n(3051),S=n(1092),T=n(4990),M=n(4414),A=n(7411),C=(0,w.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),D={style:(0,w.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},I=A.dN.concat(["invisible","culling","z","z2","zlevel","parent"]);const L=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?T.vU:e>.2?T.iv:T.GD}if(t)return T.GD}return T.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,w.isString)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===(0,S.lum)(t,0)0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&M.RH)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return b(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return b(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=M.RH,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,w.extend)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&M.RH)},e.prototype.createStyle=function(t){return(0,w.createObject)(C,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,w.extend)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,w.extend)({},i.shape),(0,w.extend)(s,n.shape)):(s=(0,w.extend)({},r?this.shape:i.shape),(0,w.extend)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,w.extend)({},this.shape);for(var u={},h=(0,w.keys)(s),c=0;c{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(1797).Z)},1505:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(7719),o=n(423),a=n(327),s=n(3051),l=n(3132),u=(0,s.defaults)({strokeFirst:!0,font:l.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.createObject)(u,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);h.prototype.type="tspan";const c=h},6498:(t,e,n)=>{"use strict";n.d(e,{VG:()=>_,Y1:()=>b,ZP:()=>D});var i=n(655),r=n(6918),o=n(1505),a=n(3051),s=n(423),l=n(4535),u=n(5151),h=n(479),c=n(7719),d=n(3132),p={fill:"#000"},f={style:(0,a.defaults)({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},c.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=p,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,z=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),B=a.calculatedLineHeight,Z=0;Z=0&&"right"===(O=w[P]).align;)this._placeToken(O,t,T,v,L,"right",_),M-=O.width,L-=O.width,P--;for(I+=(i-(I-m)-(y-L)-M)/2;D<=P;)O=w[D],this._placeToken(O,t,T,v,I+O.width/2,"center",_),I+=O.width,D++;v+=T}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var c=e.rich[t.styleName]||{};c.text=t.text;var p=t.verticalAlign,f=i+n/2;"top"===p?f=i+t.height/2:"bottom"===p&&(f=i+n-t.height/2),!t.isLineHolder&&C(c)&&this._renderBackground(c,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,f-t.height/2,t.width,t.height);var g=!!c.backgroundColor,m=t.textPadding;m&&(r=M(r,l,m),f-=t.height/2-m[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var _=this._defaultStyle,b=!1,w=0,A=T("fill"in c?c.fill:"fill"in e?e.fill:(b=!0,_.fill)),D=S("stroke"in c?c.stroke:"stroke"in e?e.stroke:g||u||_.autoStroke&&!b?null:(w=2,_.stroke)),I=c.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=f,I&&(y.shadowBlur=c.textShadowBlur||e.textShadowBlur||0,y.shadowColor=c.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=c.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=c.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||d.Uo,y.opacity=(0,a.retrieve3)(c.opacity,e.opacity,1),x(y,c),D&&(y.lineWidth=(0,a.retrieve3)(c.lineWidth,e.lineWidth,w),y.lineDash=(0,a.retrieve2)(c.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=D),A&&(y.fill=A);var L=t.contentWidth,P=t.contentHeight;v.setBoundingRect(new h.Z((0,s.M3)(y.x,L,y.textAlign),(0,s.mU)(y.y,P,y.textBaseline),L,P))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,h,c,d=t.backgroundColor,p=t.borderWidth,f=t.borderColor,g=d&&d.image,m=d&&!g,v=t.borderRadius,y=this;if(m||t.lineHeight||p&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var _=s.shape;_.x=n,_.y=i,_.width=r,_.height=o,_.r=v,s.dirtyShape()}if(m)(c=s.style).fill=d||null,c.fillOpacity=(0,a.retrieve2)(t.fillOpacity,1);else if(g){(h=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var x=h.style;x.image=d.image,x.x=n,x.y=i,x.width=r,x.height=o}p&&f&&((c=s.style).lineWidth=p,c.stroke=f,c.strokeOpacity=(0,a.retrieve2)(t.strokeOpacity,1),c.lineDash=t.borderDash,c.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var b=(s||h).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=(0,a.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return b(t)&&(e=[t.fontStyle,t.fontWeight,_(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&(0,a.trim)(e)||t.textFont||t.font},e}(c.ZP),m={left:!0,right:1,center:1},v={top:1,bottom:1,middle:1},y=["fontStyle","fontWeight","fontSize","fontFamily"];function _(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?d.n5+"px":t+"px":t}function x(t,e){for(var n=0;n{"use strict";n.d(e,{RH:()=>o,SE:()=>r,YV:()=>i});var i=1,r=2,o=4},8007:(t,e,n)=>{"use strict";n.d(e,{Gq:()=>s,ko:()=>a,v5:()=>u});var i=n(2528),r=n(3132),o=new i.ZP(50);function a(t){if("string"==typeof t){var e=o.get(t);return e&&e.image}return t}function s(t,e,n,i,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var s=o.get(t),h={hostEl:n,cb:i,cbPayload:a};return s?!u(e=s.image)&&s.pending.push(h):((e=r.qW.loadImage(t,l,l)).__zrImageSrc=t,o.put(t,e.__cachedImgObj={image:e,pending:[h]})),e}return t}return e}function l(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e{"use strict";n.d(e,{$F:()=>g,NY:()=>c,aF:()=>s});var i=n(8007),r=n(3051),o=n(423),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a=l;h++)u-=l;var c=(0,o.dz)(n,e);return c>u&&(n="",c=0),u=t-c,a.ellipsis=n,a.ellipsisWidth=c,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?h(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function h(t,e,n,i){for(var r=0,o=0,a=t.length;ov&&f){var y=Math.floor(v/d);n=n.slice(0,y)}if(t&&h&&null!=g)for(var x=l(g,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b=0;bp&&m(n,t.substring(p,g),e,d),m(n,l[2],e,d,l[1]),p=a.lastIndex}ph){D>0?(M.tokens=M.tokens.slice(0,D),S(M,C,A),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var N=I.width,k=null==N||"auto"===N;if("string"==typeof N&&"%"===N.charAt(N.length-1))Z.percentWidth=N,v.push(Z),Z.contentWidth=(0,o.dz)(Z.text,O);else{if(k){var R=I.backgroundColor,z=R&&R.image;z&&(z=i.ko(z),i.v5(z)&&(Z.width=Math.max(Z.width,z.width*E/z.height)))}var B=b&&null!=u?u-C:null;null!=B&&B0&&v+i.accumWidth>i.width&&(a=e.split("\n"),f=!0),i.accumWidth=v}else{var y=_(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=y.accumWidth+m,s=y.linesWidths,a=y.lines}}else a=e.split("\n");for(var x=0;x=33&&e<=383}(t)||!!v[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",h=0,c=0,d=0;dn:r+c+f>n)?c?(l||u)&&(g?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=p,l="",c=h+=f):(u&&(l+=u,u="",h=0),a.push(l),s.push(c),l=p,c=f)):g?(a.push(u),s.push(h),u=p,h=f):(a.push(p),s.push(f)):(c+=f,g?(u+=p,h+=f):(u&&(l+=u,u="",h=0),l+=p))}else u&&(l+=u,c+=h),a.push(l),s.push(c),l="",u="",h=0,c=0}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=r),{accumWidth:c,lines:a,linesWidths:s}}},924:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var i=n(5280);function r(t,e,n){var r=e.smooth,o=e.points;if(o&&o.length>=2){if(r){var a=function(t,e,n,r){var o,a,s,l,u=[],h=[],c=[],d=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var p=0,f=t.length;p{"use strict";n.d(e,{Pw:()=>o,_3:()=>r,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},4826:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},4174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(327),o=n(5280),a=n(8554),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var h=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,h=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(n,i),null==h||null==c?(d<1&&((0,a.Lx)(n,l,r,d,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,d,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(d<1&&((0,a.Vz)(n,l,h,r,d,s),l=s[1],h=s[2],r=s[3],(0,a.Vz)(i,u,c,o,d,s),u=s[1],c=s[2],o=s[3]),t.bezierCurveTo(l,u,h,c,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.normalize(e,e)},e}(r.ZP);h.prototype.type="bezier-curve";const c=h},9538:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},2797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},2095:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327),o=n(4111),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},5094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},2514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},5151:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327);var o=n(4111),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},5795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},7214:(t,e,n)=>{"use strict";n.d(e,{C:()=>b});var i=n(655),r=n(327),o=n(3051),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,h=Math.acos,c=Math.atan2,d=Math.abs,p=Math.sqrt,f=Math.max,g=Math.min,m=1e-4;function v(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/p(s*s+l*l),h=u*l,c=-u*s,d=t+h,g=e+c,m=n+h,v=i+c,y=(d+m)/2,_=(g+v)/2,x=m-d,b=v-g,w=x*x+b*b,S=r-o,T=d*v-m*g,M=(b<0?-1:1)*p(f(0,S*S*w-T*T)),A=(T*b-x*M)/w,C=(-T*x-b*M)/w,D=(T*b+x*M)/w,I=(-T*x+b*M)/w,L=A-y,P=C-_,O=D-y,E=I-_;return L*L+P*P>O*O+E*E&&(A=D,C=I),{cx:A,cy:C,x0:-h,y0:-c,x1:A*(r/S-1),y1:C*(r/S-1)}}function y(t,e){var n,i=f(e.r,0),r=f(e.r0||0,0),y=i>0;if(y||r>0){if(y||(i=r,r=0),r>i){var _=i;i=r,r=_}var x=e.startAngle,b=e.endAngle;if(!isNaN(x)&&!isNaN(b)){var w=e.cx,S=e.cy,T=!!e.clockwise,M=d(b-x),A=M>s&&M%s;if(A>m&&(M=A),i>m)if(M>s-m)t.moveTo(w+i*u(x),S+i*l(x)),t.arc(w,S,i,x,b,!T),r>m&&(t.moveTo(w+r*u(b),S+r*l(b)),t.arc(w,S,r,b,x,T));else{var C=void 0,D=void 0,I=void 0,L=void 0,P=void 0,O=void 0,E=void 0,N=void 0,k=void 0,R=void 0,z=void 0,B=void 0,Z=void 0,F=void 0,V=void 0,G=void 0,H=i*u(x),U=i*l(x),W=r*u(b),j=r*l(b),X=M>m;if(X){var Y=e.cornerRadius;Y&&(C=(n=function(t){var e;if((0,o.isArray)(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(Y))[0],D=n[1],I=n[2],L=n[3]);var q=d(i-r)/2;if(P=g(q,I),O=g(q,L),E=g(q,C),N=g(q,D),z=k=f(P,O),B=R=f(E,N),(k>m||R>m)&&(Z=i*u(b),F=i*l(b),V=r*u(x),G=r*l(x),Mm){var it=g(I,z),rt=g(L,z),ot=v(V,G,H,U,i,it,T),at=v(Z,F,W,j,i,rt,T);t.moveTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),z0&&t.arc(w+ot.cx,S+ot.cy,it,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,i,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),!T),rt>0&&t.arc(w+at.cx,S+at.cy,rt,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.moveTo(w+H,S+U),t.arc(w,S,i,x,b,!T);else t.moveTo(w+H,S+U);if(r>m&&X)if(B>m){it=g(C,B),ot=v(W,j,Z,F,r,-(rt=g(D,B)),T),at=v(H,U,V,G,r,-it,T);t.lineTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),B0&&t.arc(w+ot.cx,S+ot.cy,rt,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,r,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),T),it>0&&t.arc(w+at.cx,S+at.cy,it,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.lineTo(w+W,S+j),t.arc(w,S,r,b,x,T);else t.lineTo(w+W,S+j)}else t.moveTo(w,S);t.closePath()}}}var _=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},x=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new _},e.prototype.buildPath=function(t,e){y(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);x.prototype.type="sector";const b=x},6076:(t,e,n)=>{"use strict";n.d(e,{Z:()=>wt});var i=n(4839),r=n(327),o=n(4535),a=n(423),s=n(1505),l=Math.sin,u=Math.cos,h=Math.PI,c=2*Math.PI,d=180/h;const p=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,r,o,a,s,p){var f=s-a,g=!p,m=Math.abs(f),v=(0,i.zT)(m-c)||(g?f>=c:-f>=c),y=f>0?f%c:f%c+c,_=!1;_=!!v||!(0,i.zT)(m)&&y>=h==!!g;var x=t+n*u(a),b=e+r*l(a);this._start&&this._add("M",x,b);var w=Math.round(o*d);if(v){var S=1/this._p,T=(g?1:-1)*(c-S);this._add("A",n,r,w,1,+g,t+n*u(a+T),e+r*l(a+T)),S>.01&&this._add("A",n,r,w,0,+g,x,b)}else{var M=t+n*u(s),A=e+r*l(s);this._add("A",n,r,w,+_,+g,M,A)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+(0,g.map)(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function A(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function C(t,e,n,i){return T("svg","root",{width:t,height:e,xmlns:b,"xmlns:xlink":w,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var D=n(8007),I=n(7411),L=n(4014),P=n(2776),O=n(5188),E={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"},N="transform-origin";function k(t,e,n){var r=(0,g.extend)({},t.shape);(0,g.extend)(r,e),t.buildPath(n,r);var o=new p;return o.reset((0,i.Gk)(t)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function R(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[N]=n+"px "+i+"px")}var z={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function B(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Z(t){return(0,g.isString)(t)?E[t]?"cubic-bezier("+E[t]+")":(0,O.H)(t)?t:"":""}function F(t,e,n,r){var o=t.animators,a=o.length,s=[];if(t instanceof P.Z){var l=function(t,e,n){var i,r,o=t.shape.paths,a={};if((0,g.each)(o,(function(t){var e=A(n.zrId);e.animation=!0,F(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=(0,g.keys)(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var d=h[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=B(a,n);return i.replace(r,s)}}(t,e,n);if(l)s.push(l);else if(!a)return}else if(!a)return;for(var u={},h=0;h0})).length)return B(c,n)+" "+o[0]+" both"}for(var y in u){(l=v(u[y]))&&s.push(l)}if(s.length){var _=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+_]={animation:s.join(",")},e.class=_}}var V=n(6498),G=n(3132),H=Math.round;function U(t){return t&&(0,g.isString)(t.src)}function W(t){return t&&(0,g.isFunction)(t.toDataURL)}function j(t,e,n,r){x((function(o,a){var s="fill"===o||"stroke"===o;s&&(0,i.H3)(a)?function(t,e,n,r){var o,a=t[n],s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if((0,i.I1)(a))o="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else{if(!(0,i.gO)(a))return void 0;o="radialGradient",s.cx=(0,g.retrieve2)(a.x,.5),s.cy=(0,g.retrieve2)(a.y,.5),s.r=(0,g.retrieve2)(a.r,.5)}for(var l=a.colorStops,u=[],h=0,c=l.length;hl?mt(t,null==n[c+1]?null:n[c+1].elm,n,s,c):vt(t,e,a,l))}(n,i,r):dt(r)?(dt(t.text)&&ut(n,""),mt(n,null,r,0,r.length-1)):dt(i)?vt(n,i,0,i.length-1):dt(t.text)&&ut(n,""):t.text!==e.text&&(dt(i)&&vt(n,i,0,i.length-1),ut(n,e.text)))}var xt=n(5787),bt=0;const wt=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=n=(0,g.extend)({},n),this.root=t,this._id="zr"+bt++,this._oldVNode=C(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=S("svg");yt(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(ft(t,e))_t(t,e);else{var n=t.elm,i=st(n);gt(e),null!==i&&(rt(i,e.elm,lt(n)),vt(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return et(t,A(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,r=this._width,o=this._height,a=A(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var s=[];if(n&&"none"!==n){var l=(0,i.ut)(n),u=l.color,h=l.opacity;this._bgVNode=T("rect","bg",{width:r,height:o,x:"0",y:"0",id:"0",fill:u,"fill-opacity":h}),s.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=T("g","main",{},[]);this._paintList(e,a,c?c.children:s),c&&s.push(c);var d=(0,g.map)((0,g.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&s.push(T("defs","defs",{},d)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=(0,g.map)((0,g.keys)(t),(function(e){return e+r+(0,g.map)((0,g.keys)(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=(0,g.map)((0,g.keys)(e),(function(t){return"@keyframes "+t+r+(0,g.map)((0,g.keys)(e[t]),(function(n){return n+r+(0,g.map)((0,g.keys)(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(a.cssNodes,a.cssAnims,{newline:!0});if(p){var f=T("style","stl",{},[],p);s.push(f)}}return C(r,o,s,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},M(this.renderToVNode({animation:(0,g.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:(0,g.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=(0,i.ut)(t),r=n.color,o=n.opacity;e.elm.setAttribute("fill",r),o<1&&e.elm.setAttribute("fill-opacity",o)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m{"use strict";n.d(e,{Cv:()=>v,Gk:()=>S,H3:()=>b,I1:()=>_,Pn:()=>c,R:()=>y,gA:()=>T,gO:()=>x,i2:()=>g,jY:()=>p,m1:()=>w,mU:()=>f,n1:()=>m,oF:()=>M,qV:()=>d,ut:()=>s,zT:()=>u});var i=n(3051),r=n(1092),o=n(6387),a=Math.round;function s(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=(0,r.parse)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var l=1e-4;function u(t){return t-1e-4}function h(t){return a(1e3*t)/1e3}function c(t){return a(1e4*t)/1e4}function d(t){return"matrix("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+c(t[4])+","+c(t[5])+")"}var p={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function g(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function m(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(t){return t&&!!t.image}function y(t){return v(t)||function(t){return t&&!!t.svgElement}(t)}function _(t){return"linear"===t.type}function x(t){return"radial"===t.type}function b(t){return t&&("linear"===t.type||"radial"===t.type)}function w(t){return"url(#"+t+")"}function S(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function T(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*i.RADIAN_TO_DEGREE,o=(0,i.retrieve2)(t.scaleX,1),s=(0,i.retrieve2)(t.scaleY,1),l=t.skewX||0,u=t.skewY||0,h=[];return(e||n)&&h.push("translate("+e+"px,"+n+"px)"),r&&h.push("rotate("+r+")"),1===o&&1===s||h.push("scale("+o+","+s+")"),(l||u)&&h.push("skew("+a(l*i.RADIAN_TO_DEGREE)+"deg, "+a(u*i.RADIAN_TO_DEGREE)+"deg)"),h.join(" ")}var M=o.default.hasGlobalWindow&&(0,i.isFunction)(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}},1092:(t,e,n)=>{"use strict";n.r(e),n.d(e,{fastLerp:()=>x,fastMapToColor:()=>b,lerp:()=>w,lift:()=>y,lum:()=>C,mapToColor:()=>S,modifyAlpha:()=>M,modifyHSL:()=>T,parse:()=>m,random:()=>D,stringify:()=>A,toHex:()=>_});var i=n(2528),r={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function h(t,e,n){return t+(e-t)*n}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),f=null;function g(t,e){f&&d(f,e),f=p.put(t,f||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return d(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return d(e,r[i]),g(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),g(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),g(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),h=i.indexOf(")");if(-1!==u&&h+1===a){var f=i.substr(0,u),m=i.substr(u+1,h-(u+1)).split(","),y=1;switch(f){case"rgba":if(4!==m.length)return 3===m.length?c(e,+m[0],+m[1],+m[2],1):c(e,0,0,0,1);y=l(m.pop());case"rgb":return 3!==m.length?void c(e,0,0,0,1):(c(e,s(m[0]),s(m[1]),s(m[2]),y),g(t,e),e);case"hsla":return 4!==m.length?void c(e,0,0,0,1):(m[3]=l(m[3]),v(m,e),g(t,e),e);case"hsl":return 3!==m.length?void c(e,0,0,0,1):(v(m,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return A(n,4===n.length?"rgba":"rgb")}}function _(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=e[r],u=e[s],c=i-r;return n[0]=o(h(l[0],u[0],c)),n[1]=o(h(l[1],u[1],c)),n[2]=o(h(l[2],u[2],c)),n[3]=a(h(l[3],u[3],c)),n}}var b=x;function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=m(e[r]),u=m(e[s]),c=i-r,d=A([o(h(l[0],u[0],c)),o(h(l[1],u[1],c)),o(h(l[2],u[2],c)),a(h(l[3],u[3],c))],"rgba");return n?{color:d,leftIndex:r,rightIndex:s,value:i}:d}}var S=w;function T(t,e,n,i){var r,o=m(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=l(n)),null!=i&&(o[2]=l(i)),A(v(o),"rgba")}function M(t,e){var n=m(t);if(n&&null!=e)return n[3]=a(e),A(n,"rgba")}function A(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function C(t,e){var n=m(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function D(){return A([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},7494:(t,e,n)=>{"use strict";n.d(e,{U5:()=>I,iR:()=>A,Pc:()=>C,AA:()=>D});var i=n(655),r=n(327),o=n(4014),a=n(5280),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,h=Math.atan2;function c(t,e){if(e){var n,i,r,o,c,d,p=t.data,f=t.len(),g=s.M,m=s.C,v=s.L,y=s.R,_=s.A,x=s.Q;for(r=0,o=0;r1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(v*v)-s*s*(d*d))/(a*a*(v*v)+s*s*(d*d)))||0,w=b*a*v/s,S=b*-s*d/a,T=(t+n)/2+g(c)*w-f(c)*S,M=(e+i)/2+f(c)*w+g(c)*S,A=_([1,0],[(d-w)/a,(v-S)/s]),C=[(d-w)/a,(v-S)/s],D=[(-1*d-w)/a,(-1*v-S)/s],I=_(C,D);if(y(C,D)<=-1&&(I=m),y(C,D)>=1&&(I=0),I<0){var L=Math.round(I/m*1e6)/1e6;I=2*m+L%2*m}h.addData(u,T,M,a,s,A,I,c,o)}var b=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,w=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function T(t){return null!=t.setData}function M(t,e){var n=function(t){var e=new o.Z;if(!t)return e;var n,i=0,r=0,a=i,s=r,l=o.Z.CMD,u=t.match(b);if(!u)return e;for(var h=0;h{"use strict";n.r(e),n.d(e,{dispose:()=>ot,disposeAll:()=>at,getInstance:()=>st,init:()=>rt,registerPainter:()=>lt,version:()=>ut});var i=n(6387),r=n(3051),o=n(655),a=n(5280),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.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 s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(3510),h=n(1158),c=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=d(r)/d(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){h.sT(this.event)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,o.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),v=function(t,e){this.x=t,this.y=e},y=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new v(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new m,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,o.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(r.each(y,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new v(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new v(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new v(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new c);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new v;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(9455),T=n(4414),M=!1;function A(){M||(M=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function C(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const D=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=C}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(A(),u.z=0),isNaN(u.z2)&&(A(),u.z2=0),isNaN(u.zlevel)&&(A(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();var I=n(2795),L=n(5622);function P(){return(new Date).getTime()}const O=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return(0,o.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=P()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,(0,I.Z)((function e(){t._running&&((0,I.Z)(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=P(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=P(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=P()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new L.Z(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var E,N,k=i.default.domSupported,R=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:E=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:r.map(E,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),z=["mousemove","mouseup"],B=["pointermove","pointerup"],Z=!1;function F(t){var e=t.pointerType;return"pen"===e||"touch"===e}function V(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var H=function(t,e){this.stopPropagation=r.noop,this.stopImmediatePropagation=r.noop,this.preventDefault=r.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},U={mousedown:function(t){t=(0,h.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,h.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,h.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){G(this,(t=(0,h.OD)(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Z=!0,t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Z||(t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){V(t=(0,h.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),U.mousemove.call(this,t),U.mousedown.call(this,t)},touchmove:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"change"),U.mousemove.call(this,t)},touchend:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"end"),U.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&U.click.call(this,t)},pointerdown:function(t){U.mousedown.call(this,t)},pointermove:function(t){F(t)||U.mousemove.call(this,t)},pointerup:function(t){U.mouseup.call(this,t)},pointerout:function(t){F(t)||U.mouseout.call(this,t)}};r.each(["click","dblclick","contextmenu"],(function(t){U[t]=function(e){e=(0,h.OD)(this.dom,e),this.trigger(t,e)}}));var W={pointermove:function(t){F(t)||W.mousemove.call(this,t)},pointerup:function(t){W.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function j(t,e){var n=e.domHandlers;i.default.pointerEventsSupported?r.each(R.pointer,(function(i){Y(e,i,(function(e){n[i].call(t,e)}))})):(i.default.touchEventsSupported&&r.each(R.touch,(function(i){Y(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),r.each(R.mouse,(function(i){Y(e,i,(function(r){r=(0,h.iP)(r),e.touching||n[i].call(t,r)}))})))}function X(t,e){function n(n){Y(e,n,(function(i){i=(0,h.iP)(i),G(t,i.target)||(i=function(t,e){return(0,h.OD)(t.dom,new H(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}i.default.pointerEventsSupported?r.each(B,n):i.default.touchEventsSupported||r.each(z,n)}function Y(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,h.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,h.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new K(e,U),k&&(i._globalHandlerScope=new K(document,W)),j(i,i._localHandlerScope),i}return(0,o.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),k&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,k&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?X(this,e):q(e)}},e}(u.Z);var Q=n(1092),$=n(4990),tt=n(8154),et={},nt={};var it=function(){function t(t,e,n){var o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new D,s=n.renderer||"canvas";et[s]||(s=r.keys(et)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var l=new et[s](e,a,n,t),u=n.ssr||l.ssrOnly;this.storage=a,this.painter=l;var h=i.default.node||i.default.worker||u?null:new J(l.getViewportRoot(),l.root);this.handler=new w(a,l,h,l.root),this.animation=new O({stage:{update:u?null:function(){return o._flush(!0)}}}),u||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,Q.lum)(t,1)<$.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{Axis:()=>a.RD,ChartView:()=>a.TA,ComponentModel:()=>a.tF,ComponentView:()=>a.Ir,List:()=>a.aV,Model:()=>a.Hn,PRIORITY:()=>a.Hr,SeriesModel:()=>a.wJ,color:()=>a.$_,connect:()=>a.$j,dataTool:()=>a.Ok,default:()=>d,dependencies:()=>a.HO,disConnect:()=>a.eU,disconnect:()=>a.zP,dispose:()=>a.B9,env:()=>a.OB,extendChartView:()=>a.Zy,extendComponentModel:()=>a.tv,extendComponentView:()=>a.Sp,extendSeriesModel:()=>a.Zr,format:()=>a.WU,getCoordinateSystemDimensions:()=>a.wL,getInstanceByDom:()=>a.JE,getInstanceById:()=>a.rp,getMap:()=>a.FU,graphic:()=>a.Q,helper:()=>a._y,init:()=>a.S1,innerDrawElementOnCanvas:()=>a.z$,matrix:()=>a.pI,number:()=>a.Rx,parseGeoJSON:()=>a.Nu,parseGeoJson:()=>a.pQ,registerAction:()=>a.zl,registerCoordinateSystem:()=>a.RS,registerLayout:()=>a.qR,registerLoading:()=>a.yn,registerLocale:()=>a.I2,registerMap:()=>a.je,registerPostInit:()=>a.sq,registerPostUpdate:()=>a.Br,registerPreprocessor:()=>a.ds,registerProcessor:()=>a.Pu,registerTheme:()=>a.aW,registerTransform:()=>a.rV,registerUpdateLifecycle:()=>a.YK,registerVisual:()=>a.Og,setCanvasCreator:()=>a.jQ,setPlatformAPI:()=>a.g2,throttle:()=>a.P2,time:()=>a.XV,use:()=>a.D$,util:()=>a.D5,vector:()=>a.xr,version:()=>a.i8,zrUtil:()=>a.gf,zrender:()=>a.x_});const e={...{metadata:!0,svgRender:!1,echartsOption:{title:{text:"NetJSONGraph",link:"",textStyle:{color:"grey",fontWeight:"bold",fontSize:30},left:"center",top:"5%"},aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}},color:["#d66b30","#a3c7dd","#5c9660","#d66b30"]},graphConfig:{layout:"force",label:{show:!0,color:"#000000",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,focusNodeAdjacency:!1,hoverAnimation:!0,legendHoverLink:!0},mapOptions:{roam:!0},mapTileConfig:[],mapLinkConfig:[{}],mapNodeConfig:{label:{show:!0,color:"#000000",position:"top",formatter:"{b}"}},nodeSize:25,nodeStyleProperty:(()=>{const t=[{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#a3c7dd"},{offset:.7,color:"#a3c7dd"},{offset:.71,color:"#e3edf6"},{offset:1,color:"#e3edf6"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#5c9660"},{offset:.7,color:"#5c9660"},{offset:.71,color:"#aecbb0"},{offset:1,color:"#aecbb0"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}}];let e=0;return()=>(e+=1,t[e%t.length])})(),linkStyleProperty:()=>({width:5,color:"#999",shadowColor:"rgba(0, 0, 0, 0.5)",shadowBlur:10}),prepareData(t){},onClickElement(t,e){const n=document.getElementsByClassName("njg-overlay")[0];n.style.visibility="visible",n.innerHTML=`\n
\n ${"link"===t?this.utils.linkInfo(e):this.utils.nodeInfo(e)}\n
\n `;const i=document.createElement("a");i.setAttribute("class","njg-close"),i.setAttribute("id","nodelinkOverlay-close"),i.onclick=()=>{n.style.visibility="hidden"},n.appendChild(i)}}};const i=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json?t.json():t)).catch((t=>{console.error(t)})):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:n=(new Date).getTimezoneOffset()/60}){const i=e.exec(t);if(!i||i.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],o={},a=i[1]%4==0&&i[1]%100!=0||i[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,a?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t-=1)o[r[t-1]]=parseInt(i[t],10);let l,u=-n;for(let t=r.length;t>0;t-=1){if("dateYear"===r[t-1]){o[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[o.dateMonth-1]:s.get(r[t-1]);let e=o[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(o[r[t-1]]+10)%11]),e+=l),o[r[t-1]]=e}return`${o.dateYear}.${this.numberMinDigit(o.dateMonth)}.${this.numberMinDigit(o.dateDay)} ${this.numberMinDigit(o.dateHour)}:${this.numberMinDigit(i[5])}:${this.numberMinDigit(i[6])}${i[7]?`.${this.numberMinDigit(i[7],3)}`:""}`}numberMinDigit(t,e=2,n="0"){return(Array(e).join(n)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),n=e.length;for(let t=0;t{i[t]&&this.isObject(i[t])&&this.isObject(n[t])?this.deepMergeObj(i[t],n[t]):i[t]=n[t]})):i||(e[t+1]=n)}return e[n-1]}NetJSONMetadata(){const t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("a");return t.setAttribute("class","njg-metadata njg-container"),t.setAttribute("style","display: block"),e.setAttribute("class","njg-inner"),e.setAttribute("id","metadata-innerDiv"),n.setAttribute("class","njg-close"),n.setAttribute("id","metadata-close"),n.onclick=()=>{t.style.visibility="hidden"},e.innerHTML=this.utils.getMetadata.call(this),t.appendChild(e),t.appendChild(n),t}updateMetadata(){this.config.metadata&&(document.getElementsByClassName("njg-metadata")[0].style.visibility="visible",document.getElementById("metadata-innerDiv").innerHTML=this.utils.getMetadata.call(this))}getMetadata(){const t=this.data;let e="";return t.label&&(e+=`

${t.label}

`),["protocol","version","revision","metric","router_id","topology_id"].forEach((n=>{t[n]&&(e+=`

${n}: ${t[n]}

`)})),e+=`\n

nodes: ${t.nodes.length}

\n

links: ${t.links.length}

\n `,e}nodeInfo(t){let e=`

id: ${t.id}

`;return t.label&&"string"==typeof t.label&&(e+=`

label: ${t.label}

`),t.properties&&Object.keys(t.properties).forEach((n=>{e+="location"===n?`

location:
lat: ${t.properties.location.lat}
lng: ${t.properties.location.lng}

`:"time"===n?`

time: ${this.dateParse({dateString:t.properties[n]})}

`:`

${n.replace(/_/g," ")}: ${t.properties[n]}

`})),t.linkCount&&(e+=`

links: ${t.linkCount}

`),t.local_addresses&&(e+=`

local addresses:
${t.local_addresses.join("
")}

`),e}linkInfo(t){let e=`

source: ${t.source}

target: ${t.target}

cost: ${t.cost}

`;return t.properties&&Object.keys(t.properties).forEach((n=>{e+="time"===n?`

time: ${this.dateParse({dateString:t.properties[n]})}

`:`

${n.replace(/_/g," ")}: ${t.properties[n]}

`})),e}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...n){t.set(e,[...t.get(e)||[],...n])},once(t,...n){e.set(t,[...e.get(t)||[],...n])},emit(n){const i=t.get(n)||[],r=e.get(n)||[],o=i.map((t=>t())),a=r.map((t=>t()));return e.delete(n),[...o,...a]},delete(n){t.delete(n),e.delete(n)}}}};const r=class extends i{searchElements(t){const e=this,n={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=i=>{n[i.state.searchValue]?e.utils.JSONDataUpdate.call(e,n[i.state.searchValue].data).then((()=>{e.JSONParam=n[i.state.searchValue].param})):e.utils.JSONDataUpdate.call(e,t+i.state.searchValue)},function(i,r=!0,o=!0){const a=i.trim();if(!window.history.state||window.history.state&&window.history.state.searchValue!==a)return window.history.pushState({searchValue:a},""),e.utils.JSONDataUpdate.call(e,t+a,r,o).then((()=>{n[a]={data:{...e.data},param:[...e.JSONParam]}}))}}JSONDataUpdate(t,e=!0,n=!0){const i=this;return i.config.onUpdate.call(i),i.utils.JSONParamParse(t).then((r=>{function o(){e?(i.JSONParam=[t],i.utils.overrideData(r,i)):(i.JSONParam.push(t),i.config.render===i.utils.mapRender?i.utils.appendData(r,i):i.utils.addData(r,i)),i.utils.updateMetadata.call(i)}return n?(i.config.prepareData.call(i,r),i.config.dealDataByWorker?i.utils.dealDataByWorker.call(i,r,i.config.dealDataByWorker,o):o()):o(),r})).catch((t=>{console.error(t)}))}dealDataByWorker(t,e,n){const i=new Worker(e),r=this;i.postMessage(t),i.addEventListener("error",(t=>{console.error(t),console.error("Error in dealing JSONData!")})),i.addEventListener("message",(t=>{n?n():(r.utils.overrideData(t.data,r),r.utils.updateMetadata.call(r))}))}overrideData(t,e){e.data=t,e.utils.render(),e.config.afterUpdate.call(e)}};const o=class{constructor(t,n){this.utils=new r,this.config={...e},this.setConfig(n),this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.body,this.el&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then((t=>{this.config.prepareData.call(this,t),this.data=t,function(t){const e=document.createElement("div");e.setAttribute("class","njg-overlay njg-container"),t.el.appendChild(e)}(this),this.config.metadata&&this.el.appendChild(this.utils.NetJSONMetadata.call(this)),this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils.render())})).catch((t=>{console.error(t)})),e.length){const n=function(){e.map((t=>this.utils.JSONDataUpdate.call(this,t,!1)))};this.JSONParam=[t],this.event.once("renderArray",n.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}};var a=n(9060),s=n(8023),l=n(1615),u=n(12),h=n(7240),c=n(7164);(0,s.D)([u.N,h.N]);const d={init:function(){return l.S1.apply(null,arguments)}};(0,s.D)(c.T);var p=n(6026);(0,s.D)(p.N);var f=n(9517);(0,s.D)(f.N);var g=n(241);(0,s.D)(g.N);var m=n(7813);(0,s.D)(m.N);var v=n(8690);(0,s.D)(v.N);var y=n(5045);(0,s.D)(y.N);var _=n(3450);(0,s.D)(_.N);var x=n(9448),b=n(6076);(0,x.registerPainter)("svg",b.Z);n(3721);var w=n(531),S=n.n(w);class T{echartsSetOption(t,e){const n=e.config,i=e.echarts,r=e.utils.deepMergeObj({tooltip:{confine:!0,position:(t,e,n,i,r)=>{let o="right";return r.viewSize[0]-t[0]"graph"===t.componentSubType?"edge"===t.dataType?e.utils.linkInfo(t.data):e.utils.nodeInfo(t.data):"graphGL"===t.componentSubType?e.utils.nodeInfo(t.data):"lines"===t.componentSubType?e.utils.linkInfo(t.data.link):e.utils.nodeInfo(t.data.node)}},n.echartsOption);return i.setOption(e.utils.deepMergeObj(r,t)),i.on("click",(t=>{const i=n.onClickElement.bind(e);return"graph"===t.componentSubType?i("edge"===t.dataType?"link":"node",t.data):"graphGL"===t.componentSubType?i("node",t.data):"lines"===t.componentSubType?i("link",t.data.link):i("node",t.data.node)}),{passive:!0}),i}generateGraphOption(t,e){const n=[],i=e.config,r=t.nodes.map((t=>{const e=JSON.parse(JSON.stringify(t));return e.itemStyle="function"==typeof i.nodeStyleProperty?i.nodeStyleProperty(t):i.nodeStyleProperty,e.symbolSize="function"==typeof i.nodeSize?i.nodeSize(t):i.nodeSize,e.name="string"==typeof t.label?t.label:t.id,t.properties&&t.properties.category&&(e.category=String(t.properties.category)),e.category&&-1===n.indexOf(e.category)&&n.push(e.category),e})),o=t.links.map((t=>{const e=JSON.parse(JSON.stringify(t));return e.lineStyle="function"==typeof i.linkStyleProperty?i.linkStyleProperty(t):i.linkStyleProperty,e})),a=[Object.assign(i.graphConfig,{type:"graphGL"===i.graphConfig.type?"graphGL":"graph",layout:"graphGL"===i.graphConfig.type?"forceAtlas2":i.graphConfig.layout,nodes:r,links:o,categories:n.map((t=>({name:t})))})];return{legend:n.length?{data:n}:void 0,series:a}}generateMapOption(t,e){const n=e.config,{nodes:i,links:r}=t,o=t.flatNodes||{},a=[],s=[];i.forEach((e=>{if(e.properties){const{location:i}=e.properties;i&&i.lng&&i.lat?(s.push({name:"string"==typeof e.label?e.label:e.id,value:[i.lng,i.lat],symbolSize:"function"==typeof n.nodeSize?n.nodeSize(e):n.nodeSize,itemStyle:"function"==typeof n.nodeStyleProperty?n.nodeStyleProperty(e):n.nodeStyleProperty,node:e}),t.flatNodes||(o[e.id]=JSON.parse(JSON.stringify(e)))):console.error(`Node ${e.id} position is undefined!`)}else console.error(`Node ${e.id} position is undefined!`)})),r.forEach((t=>{o[t.source]?o[t.target]?a.push({coords:[[o[t.source].properties.location.lng,o[t.source].properties.location.lat],[o[t.target].properties.location.lng,o[t.target].properties.location.lat]],lineStyle:"function"==typeof n.linkStyleProperty?n.linkStyleProperty(t):n.linkStyleProperty,link:t}):console.error(`Node ${t.target} is not exist!`):console.error(`Node ${t.source} is not exist!`)}));const l=[Object.assign(n.mapNodeConfig,{type:"effectScatter"===n.mapNodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s,animationDuration:1e3}),...n.mapLinkConfig.map((t=>Object.assign(t,{type:"lines",coordinateSystem:"leaflet",data:a})))];return{leaflet:{tiles:n.mapTileConfig,mapOptions:n.mapOptions},toolbox:{show:!1},series:l}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.leaflet._zoomAnimated=!1,e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach(((t,n)=>{e.echarts.appendData({seriesIndex:n,data:t.data})})),e.utils.mergeData(t,e),e.config.afterUpdate.call(e)}addData(t,e){e.utils.mergeData(t,e),e.utils.render(),e.config.afterUpdate.call(e)}mergeData(t,e){const n=e.data.nodes.concat(t.nodes),i=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:n,links:i})}}const M=function(t,e){const{util:n,graphic:i,matrix:r}=t,o=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container)},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function a(t,n){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=n,this._projection=e.Projection.Mercator}function s(t,e,n,i){const{leafletModel:r,seriesModel:o}=n,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}return a.dimensions=["lng","lat"],a.prototype.dimensions=["lng","lat"],a.prototype.setZoom=function(t){this._zoom=t},a.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},a.prototype.setMapOffset=function(t){this._mapOffset=t},a.prototype.getLeaflet=function(){return this._map},a.prototype.getViewRect=function(){const t=this._api;return new i.BoundingRect(0,0,t.getWidth(),t.getHeight())},a.prototype.getRoamTransform=function(){return r.create()},a.prototype.dataToPoint=function(t){const n=new e.LatLng(t[1],t[0]),i=this._map.latLngToLayerPoint(n),r=this._mapOffset;return[i.x-r[0],i.y-r[1]]},a.prototype.pointToData=function(t){const e=this._mapOffset,n=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[n.lng,n.lat]},a.prototype.convertToPixel=n.curry(s,"dataToPoint"),a.prototype.convertFromPixel=n.curry(s,"pointToData"),a.create=function(t,n){let i;const r=[],s=n.getDom();return t.eachComponent("leaflet",(t=>{const l=n.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(i)throw new Error("Only one leaflet component can exist");if(!t.__map){let n=s.querySelector(".ec-extension-leaflet");n&&(l.style.left="0px",l.style.top="0px",s.removeChild(n)),n=document.createElement("div"),n.style.cssText="width:100%;height:100%",n.classList.add("ec-extension-leaflet"),s.appendChild(n),t.__map=e.map(n,t.get("mapOptions"));const i=t.__map,r=t.get("tiles"),a={};let u=!1;if(r.forEach((t=>{const n=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(n.addTo(i),u=!0),a[t.label]=n):n.addTo(i)})),r.length>1){const n=t.get("layerControl");e.control.layers(a,{},n).addTo(i)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new o(h).addTo(i)}const u=t.__map;i=new a(u,n),r.push(i),i.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(i.setZoom(c),i.setCenter(h)),t.coordinateSystem=i})),t.eachSeries((t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=i)})),r},a};function A(t,e){t.extendComponentView({type:"leaflet",render(t,n,i){let r=!0;const o=t.getLeaflet(),a=i.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};function u(t,e){const n=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*n[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*n[1]),t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`}function h(t){[...t.childNodes].forEach((e=>{u(e,t),e.childNodes.length&&h(e)}))}function c(t){const n=e.DomUtil.getPosition(t.getPanes().mapPane);if(n)return n;console.error("Can't get the map offset!")}this._oldMoveStartHandler&&o.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&o.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&o.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&o.off("resize",this._oldResizeHandler);const{roam:d}=t.get("mapOptions");function p(){if(r)return;const t=c(o);t&&Object.assign(l,{x:t.x,y:t.y})}function f(){if(r)return;const n=function(){const n=c(o);if(n){const{x:i,y:r}=n,o=i-l.x,u=r-l.y;return Object.assign(l,{x:i,y:r}),e.DomUtil.setPosition(a,{x:-i,y:-r}),s.setMapOffset([-i,-r]),t.__mapOffset=[-i,-r],{dx:o,dy:u}}}();if(n){const{dx:t,dy:e}=n;i.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function g(){r||i.dispatchAction({type:"leafletZoom"})}function m(){const t=i.getDom();u(a,t),h(a),i.dispatchAction({type:"leafletZoom"})}d&&"scale"!==d?o.dragging.enable():o.dragging.disable(),d&&"move"!==d?(o.scrollWheelZoom.enable(),o.doubleClickZoom.enable(),o.touchZoom.enable()):(o.scrollWheelZoom.disable(),o.doubleClickZoom.disable(),o.touchZoom.disable()),o.on("movestart",p),o.on("move",f),o.on("zoomend",g),o.on("resize",m),this._oldMoveStartHandler=p,this._oldMoveHandler=f,this._oldZoomEndHandler=g,this._oldResizeHandler=m,r=!1}})}function C(t,e,n){const{target:i}=t,r=i.position;r[0]+=e,r[1]+=n,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(i)}function D(t,e){const n=this._model,i=this._api,r=this._zr,o=this._coordSysMgr,a=this._scheduler,{colorTool:s,each:l,env:u}=e;if(!n)return;a.restoreData(n,t),a.performSeriesTasks(n),o.create(n,i),a.performDataProcessorTasks(n,t),function(t,e){const n=t._chartsMap,i=t._scheduler;e.eachSeries((t=>{i.updateStreamModes(t,n[t.__viewId])}))}(this,n),o.update(n,i),function(t){t.clearColorPalette(),t.eachSeries((t=>{t.clearColorPalette()}))}(n),a.performVisualTasks(n,t),function(t,e,n,i){(function(t,e,n,i,r){l(r||t._componentsViews,(t=>{const r=t.__model;t.render(r,e,n,i),c(r,t)}))})(t,e,n,i),l(t._chartsViews,(t=>{t.__alive=!1})),function(t,e,n,i,r){const o=t._scheduler;let a;e.eachSeries((e=>{const n=t._chartsMap[e.__viewId];n.__alive=!0;const s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),c(e,n),function(t,e){const n=t.get("blendMode")||null;e.group.traverse((t=>{t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((t=>{t.setStyle("blend",n)}))}))}(e,n)})),o.unfinished|=a,function(t,e){const n=t.storage;let i=0;n.traverse((t=>{t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!u.node&&n.traverse((t=>{t.isGroup||(t.useHoverLayer=!0)}))}(t._zr,e)}(t,e,0,i),l(t._chartsViews,(t=>{t.__alive||t.remove(e,n)}))}(this,n,i,t),r.refreshImmediately();let h=n.get("backgroundColor")||"transparent";if(u.canvasSupported)r.setBackgroundColor(h);else{const t=s.parse(h);h=s.stringify(t,"rgb"),0===t[3]&&(h="transparent")}function c(t,e){const n=t.get("z"),i=t.get("zlevel");e.group.traverse((t=>{"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}}function I(t,e,n){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:n}=this;return i=t,r=n.center,!(i&&r&&i[0]===r[0]&&i[1]===r[1]&&e===n.zoom);var i,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),A(t,e),t.registerCoordinateSystem("leaflet",M(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},((t,e)=>{e.scheduler.ecInstance._chartsViews.forEach((({group:e})=>{C({target:e},t.dx,t.dy)})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))})),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},((t,e)=>{const i=e.scheduler.ecInstance;D.call(i,t,n),i._chartsViews.forEach((({group:t})=>{C({target:t},-t.position[0],-t.position[1])})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))}))}I.version="1.0.0";const L=I,P=n(1092),{each:O}=n(3051),E=n(6387);L(t,S(),{colorTool:P,each:O,env:E}),window.NetJSONGraph=class{constructor(t,e){e&&"map"===e.render?e.render=T.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=T.prototype.graphRender);const n=new o(t);return Object.setPrototypeOf(T.prototype,n.utils),n.utils=new T,n.setUtils(),n.event=n.utils.createEvent(),n.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){return this.utils.hideLoading.call(this),this.config},...e}),n.echarts=a.S1(n.el,null,{renderer:n.config.svgRender?"svg":"canvas"}),n.config.onInit.call(n),n}},window.echarts=t,window.L=S()})()})(); +var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;Object.create},5823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(7411),r=n(5622),o=n(479),a=n(3510),s=n(423),l=n(3051),u=n(4990),h=n(1092),c=n(4414),d="__zr_normal__",p=i.dN.concat(["ignore"]),f=(0,l.reduce)(i.dN,(function(t,e){return t[e]=!0,t}),{ignore:!1}),g={},m=new o.Z(0,0,0,0),v=function(){function t(t){this.id=(0,l.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.copyTransform(e),null!=n.position){var h=m;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,h):(0,s.wI)(g,n,h),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*h.width,f=.5*h.height):(p=(0,s.GM)(d[0],h.width),f=(0,s.GM)(d[1],h.height)),u=!0,r.originX=-r.x+p+(i?0:h.x),r.originY=-r.y+f+(i?0:h.y)}}null!=n.rotation&&(r.rotation=n.rotation);var v=n.offset;v&&(r.x+=v[0],r.y+=v[1],u||(r.originX=-v[0],r.originY=-v[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,_=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),x=void 0,b=void 0,w=void 0;y&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,null!=x&&"auto"!==x||(x=this.getInsideTextFill()),null!=b&&"auto"!==b||(b=this.getInsideTextStroke(x),w=!0)):(x=n.outsideFill,b=n.outsideStroke,null!=x&&"auto"!==x||(x=this.getOutsideFill()),null!=b&&"auto"!==b||(b=this.getOutsideStroke(x),w=!0)),(x=x||"#000")===_.fill&&b===_.stroke&&w===_.autoStroke&&o===_.align&&a===_.verticalAlign||(l=!0,_.fill=x,_.stroke=b,_.autoStroke=w,_.align=o,_.verticalAlign=a,e.setDefaultTextStyle(_)),e.__dirty|=c.YV,l&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,h.parse)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,h.stringify)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.isObject)(t))for(var n=t,i=(0,l.keys)(n),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(d,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===d;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.indexOf)(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||i);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,p=this._textGuide;return h&&h.useState(t,e,n,u),p&&p.useState(t,e,n,u),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV),s}(0,l.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,f);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,e,d),m&&m.useStates(t,e,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.indexOf)(i,t),o=(0,l.indexOf)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||o.force&&!s.length){var C,A=void 0,I=void 0,D=void 0;if(u){I={},f&&(A={});for(T=0;T{"use strict";n.d(e,{V:()=>v,Z:()=>S});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i;var o=n(3051),a=n(5188);const s=function(){function t(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||o.noop,this.ondestroy=t.ondestroy||o.noop,this.onrestart=t.onrestart||o.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=(0,o.isFunction)(t)?t:r[t]||(0,a.H)(t)},t}();var l=n(1092),u=n(4839),h=Array.prototype.slice;function c(t,e,n){return(e-t)*n+t}function d(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,s=i.length,h=!1,c=6,d=e;if((0,o.isArrayLike)(e)){var p=function(t){return(0,o.isArrayLike)(t&&t[0])?2:1}(e);c=p,(1===p&&!(0,o.isNumber)(e[0])||2===p&&!(0,o.isNumber)(e[0][0]))&&(h=!0)}else if((0,o.isNumber)(e)&&!(0,o.eqNaN)(e))c=0;else if((0,o.isString)(e))if(isNaN(+e)){var f=l.parse(e);f&&(d=f,c=3)}else c=0;else if((0,o.isGradientObject)(e)){var g=(0,o.extend)({},d);g.colorStops=(0,o.map)(e.colorStops,(function(t){return{offset:t.offset,color:l.parse(t.color)}})),(0,u.I1)(e)?c=4:(0,u.gO)(e)&&(c=5),d=g}0===s?this.valType=c:c===this.valType&&6!==c||(h=!0),this.discrete=this.discrete||h;var m={time:t,value:d,rawValue:e,percent:0};return n&&(m.easing=n,m.easingFunc=(0,o.isFunction)(n)?n:r[n]||(0,a.H)(n)),i.push(m),m},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=x(i),l=_(i),u=0;u=0&&!(u[n].percent<=e);n--);n=m(n,h-2)}else{for(n=g;ne);n++);n=m(n-1,h-2)}r=u[n+1],i=u[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var v=r.percent-i.percent,w=0===v?1:m((e-i.percent)/v,1);r.easingFunc&&(w=r.easingFunc(w));var S=a?this._additiveValue:f?b:t[p];if(!x(l)&&!f||S||(S=this._additiveValue=[]),this.discrete)t[p]=w<1?i.rawValue:r.rawValue;else if(x(l))1===l?d(S,i[s],r[s],w):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,v(l),i),this._trackKeys.push(a)}s.addKeyframe(t,v(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var s=a.pop();r.addKeyframe(s.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}()},5188:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var i=n(8554),r=n(3051),o=/cubic-bezier\(([0-9,\.e ]+)\)/;function a(t){var e=t&&o.exec(t);if(e){var n=e[1].split(","),a=+(0,r.trim)(n[0]),s=+(0,r.trim)(n[1]),l=+(0,r.trim)(n[2]),u=+(0,r.trim)(n[3]);if(isNaN(a+s+l+u))return;var h=[];return function(t){return t<=0?0:t>=1?1:(0,i.kD)(0,a,l,1,t,h)&&(0,i.af)(0,s,u,1,h[0])}}}},2795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6387).default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)}},810:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(3051);function r(t){var e,n,r=t.style,o=r.lineDash&&r.lineWidth>0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:(0,i.isNumber)(e)?[e]:(0,i.isArray)(e)?e:null:null),a=r.lineDashOffset;if(o){var s=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(o=(0,i.map)(o,(function(t){return t/s})),a/=s)}return[o,a]}},7772:(t,e,n)=>{"use strict";n.d(e,{Dm:()=>D,RV:()=>I,RZ:()=>x});var i=n(7719),r=n(4014),o=n(8007),a=n(5787),s=n(327),l=n(4535),u=n(1505),h=n(3051),c=n(810),d=n(4414),p=n(3132),f=new r.Z(!0);function g(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function m(t){return"string"==typeof t&&"none"!==t}function v(t){var e=t.fill;return null!=e&&"none"!==e}function y(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function _(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function x(t,e,n){var i=(0,o.Gq)(e.image,e.__image,n);if((0,o.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*h.RADIAN_TO_DEGREE),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}var b=["shadowBlur","shadowOffsetX","shadowOffsetY"],w=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function S(t,e,n,r,o){var a=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){C(t,o),a=!0;var s=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(s)?i.tj.opacity:s}(r||e.blend!==n.blend)&&(a||(C(t,o),a=!0),t.globalCompositeOperation=e.blend||i.tj.blend);for(var l=0;l{"use strict";function i(t){return isFinite(t)}function r(t,e,n){for(var r="radial"===e.type?function(t,e,n){var r=n.width,o=n.height,a=Math.min(r,o),s=null==e.x?.5:e.x,l=null==e.y?.5:e.y,u=null==e.r?.5:e.r;return e.global||(s=s*r+n.x,l=l*o+n.y,u*=a),s=i(s)?s:.5,l=i(l)?l:.5,u=u>=0&&i(u)?u:.5,t.createRadialGradient(s,l,0,s,l,u)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,s=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,s=s*n.height+n.y),r=i(r)?r:0,o=i(o)?o:1,a=i(a)?a:0,s=i(s)?s:0,t.createLinearGradient(r,a,o,s)}(t,e,n),o=e.colorStops,a=0;ar,ap:()=>s,cF:()=>o})},4990:(t,e,n)=>{"use strict";n.d(e,{Ak:()=>o,GD:()=>s,KL:()=>r,iv:()=>l,vU:()=>a});var i=1;n(6387).default.hasGlobalWindow&&(i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},3640:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oi})},765:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var i=n(7637);function r(t,e){return Math.abs(t-e)<1e-8}function o(t,e,n){var o=0,a=t[0];if(!a)return!1;for(var s=1;s{"use strict";n.d(e,{m:()=>r});var i=n(8554);function r(t,e,n,r,o,a,s,l,u){if(0===s)return!1;var h=s;return!(u>e+h&&u>r+h&&u>a+h||ut+h&&l>n+h&&l>o+h||l{"use strict";n.d(e,{Dp:()=>d,GM:()=>p,M3:()=>h,dz:()=>s,lP:()=>u,mU:()=>c,wI:()=>f});var i=n(479),r=n(2528),o=n(3132),a={};function s(t,e){e=e||o.Uo;var n=a[e];n||(n=a[e]=new r.ZP(500));var i=n.get(t);return null==i&&(i=o.qW.measureText(t,e).width,n.put(t,i)),i}function l(t,e,n,r){var o=s(t,e),a=d(e),l=h(0,o,n),u=c(0,a,r);return new i.Z(l,u,o,a)}function u(t,e,n,r){var o=((t||"")+"").split("\n");if(1===o.length)return l(o[0],e,n,r);for(var a=new i.Z(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function f(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=p(i[0],n.width),u+=p(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}},3266:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},7637:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}n.d(e,{Z:()=>i})},479:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(2892),r=n(1610),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,h=new r.Z,c=new r.Z,d=new r.Z;const p=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.create();return i.translate(o,o,[-e.x,-e.y]),i.scale(o,o,[n,r]),i.translate(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,h=e.x+e.width,p=e.y,f=e.y+e.height,g=!(av&&(v=w,y<_?r.Z.set(d,-y,0):r.Z.set(d,_,0)):wv&&(v=S,x=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],c=i[3],d=i[4],p=i[5];return e.x=n.x*r+d,e.y=n.y*c+p,e.width=n.width*r,e.height=n.height*c,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=h.y=n.y,l.x=h.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),h.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,h.x),e.y=o(s.y,l.y,u.y,h.y);var f=a(s.x,l.x,u.x,h.x),g=a(s.y,l.y,u.y,h.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},3510:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},1587:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(1610),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,h=0;h<2;h++){var c=this._axes[h];if(this._getProjMinMaxOnAxis(h,t._corners,r),this._getProjMinMaxOnAxis(h,e._corners,o),r[1]o[1]){if(u=!1,s)return u;var d=Math.abs(o[0]-r[1]),p=Math.abs(r[0]-o[1]);Math.min(d,p)>a.len()&&(d{"use strict";n.d(e,{L:()=>M,Z:()=>C});var i=n(5280),r=n(479),o=n(4990),a=n(3726),s=n(8554),l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],p=[],f=[],g=Math.min,m=Math.max,v=Math.cos,y=Math.sin,_=Math.abs,x=Math.PI,b=2*x,w="undefined"!=typeof Float32Array,S=[];function T(t){return Math.round(t/x*1e8)/1e8%2*x}function M(t,e){var n=T(t[0]);n<0&&(n+=b);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=b?r=n+b:e&&n-r>=b?r=n-b:!e&&n>r?r=n+(b-T(n-r)):e&&n0&&(this._ux=_(n/o.KL/t)||0,this._uy=_(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=_(t-this._xi),i=_(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(l.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(l.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(l.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),S[0]=i,S[1]=r,M(S,o),i=S[0];var a=(r=S[1])-i;return this.addData(l.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=v(r)*n+t,this._yi=y(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(l.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!w||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){c[0]=c[1]=p[0]=p[1]=Number.MAX_VALUE,d[0]=d[1]=f[0]=f[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,s=0,u=0;for(t=0;tn||_(T)>i||p===e-1)&&(w=Math.sqrt(z*z+T*T),r=S,o=A);break;case l.C:var M=t[p++],C=t[p++],A=(S=t[p++],t[p++]),I=t[p++],D=t[p++];w=(0,s.Ci)(r,o,M,C,S,A,I,D,10),r=I,o=D;break;case l.Q:M=t[p++],C=t[p++],S=t[p++],A=t[p++];w=(0,s.wQ)(r,o,M,C,S,A,10),r=S,o=A;break;case l.A:var L=t[p++],P=t[p++],O=t[p++],E=t[p++],N=t[p++],k=t[p++],R=k+N;p+=1;t[p++];x&&(a=v(N)*O+L,u=y(N)*E+P),w=m(O,E)*g(b,Math.abs(k)),r=v(R)*O+L,o=y(R)*E+P;break;case l.R:a=r=t[p++],u=o=t[p++],w=2*t[p++]+2*t[p++];break;case l.Z:var z=a-r;T=u-o;w=Math.sqrt(z*z+T*T),r=a,o=u}w>=0&&(h[d++]=w,c+=w)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,c,d,p,f,x,b=this.data,w=this._ux,S=this._uy,T=this._len,M=e<1,C=0,A=0,I=0;if(!M||(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=e*this._pathLen))t:for(var D=0;D0&&(t.lineTo(f,x),I=0),L){case l.M:n=r=b[D++],i=o=b[D++],t.moveTo(r,o);break;case l.L:a=b[D++],c=b[D++];var O=_(a-r),E=_(c-o);if(O>w||E>S){if(M){if(C+(it=d[A++])>p){var N=(p-C)/it;t.lineTo(r*(1-N)+a*N,o*(1-N)+c*N);break t}C+=it}t.lineTo(a,c),r=a,o=c,I=0}else{var k=O*O+E*E;k>I&&(f=a,x=c,I=k)}break;case l.C:var R=b[D++],z=b[D++],B=b[D++],Z=b[D++],F=b[D++],V=b[D++];if(M){if(C+(it=d[A++])>p){N=(p-C)/it;(0,s.Vz)(r,R,B,F,N,u),(0,s.Vz)(o,z,Z,V,N,h),t.bezierCurveTo(u[1],h[1],u[2],h[2],u[3],h[3]);break t}C+=it}t.bezierCurveTo(R,z,B,Z,F,V),r=F,o=V;break;case l.Q:R=b[D++],z=b[D++],B=b[D++],Z=b[D++];if(M){if(C+(it=d[A++])>p){N=(p-C)/it;(0,s.Lx)(r,R,B,N,u),(0,s.Lx)(o,z,Z,N,h),t.quadraticCurveTo(u[1],h[1],u[2],h[2]);break t}C+=it}t.quadraticCurveTo(R,z,B,Z),r=B,o=Z;break;case l.A:var G=b[D++],H=b[D++],U=b[D++],W=b[D++],j=b[D++],X=b[D++],Y=b[D++],q=!b[D++],K=U>W?U:W,J=_(U-W)>.001,Q=j+X,$=!1;if(M)C+(it=d[A++])>p&&(Q=j+X*(p-C)/it,$=!0),C+=it;if(J&&t.ellipse?t.ellipse(G,H,U,W,Y,j,Q,q):t.arc(G,H,K,j,Q,q),$)break t;P&&(n=v(j)*U+G,i=y(j)*W+H),r=v(Q)*U+G,o=y(Q)*W+H;break;case l.R:n=r=b[D],i=o=b[D+1],a=b[D++],c=b[D++];var tt=b[D++],et=b[D++];if(M){if(C+(it=d[A++])>p){var nt=p-C;t.moveTo(a,c),t.lineTo(a+g(nt,tt),c),(nt-=tt)>0&&t.lineTo(a+tt,c+g(nt,et)),(nt-=et)>0&&t.lineTo(a+m(tt-nt,0),c+et),(nt-=tt)>0&&t.lineTo(a,c+m(et-nt,0));break t}C+=it}t.rect(a,c,tt,et);break;case l.Z:if(M){var it;if(C+(it=d[A++])>p){N=(p-C)/it;t.lineTo(r*(1-N)+n*N,o*(1-N)+i*N);break t}C+=it}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=l,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}()},1610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},7411:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>g,dN:()=>p,kY:()=>f});var i=n(2892),r=n(5280),o=i.identity,a=5e-5;function s(t){return t>a||t<-5e-5}var l=[],u=[],h=i.create(),c=Math.abs,d=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return s(this.rotation)||s(this.x)||s(this.y)||s(this.scaleX-1)||s(this.scaleY-1)||s(this.skewX)||s(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||i.create(),e?this.getLocalTransform(n):o(n),t&&(e?i.mul(n,t,n):i.copy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&o(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(l);var n=l[0]<0?-1:1,r=l[1]<0?-1:1,o=((l[0]-n)*e+n)/l[0]||0,a=((l[1]-r)*e+r)/l[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var n=this.originX,r=this.originY;(n||r)&&(h[4]=n,h[5]=r,i.mul(u,e,h),u[4]-=n,u[5]-=r,e=u),this.setLocalTransform(e)}},t.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)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.applyTransform(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.applyTransform(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){f(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,o=t.scaleX,a=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,d=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||r||s||l){var f=n+s,g=r+l;e[4]=-f*o-d*g*a,e[5]=-g*a-p*f*o}else e[4]=e[5]=0;return e[0]=o,e[3]=a,e[1]=p*o,e[2]=d*a,u&&i.rotate(e,e,u),e[4]+=n+h,e[5]+=r+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),p=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f(t,e){for(var n=0;n{"use strict";n.d(e,{H9:()=>v,mJ:()=>y,qL:()=>_,u4:()=>f,zk:()=>p});var i=n(5280),r=n(8554),o=Math.min,a=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,h=i.create(),c=i.create(),d=i.create();function p(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],s=i[0],l=i[1],u=i[1],h=1;h1e-4)return f[0]=t-n,f[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(h[0]=l(o)*n+t,h[1]=s(o)*r+e,c[0]=l(a)*n+t,c[1]=s(a)*r+e,m(f,h,c),v(g,h,c),(o%=u)<0&&(o+=u),(a%=u)<0&&(a+=u),o>a&&!p?a+=u:oo&&(d[0]=l(x)*n+t,d[1]=s(x)*r+e,m(f,d,f),v(g,d,g))}},8554:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>S,Ci:()=>b,Jz:()=>T,Lx:()=>C,QC:()=>M,Vz:()=>_,Wr:()=>A,X_:()=>m,Zm:()=>w,af:()=>g,kD:()=>v,pP:()=>y,t1:()=>x,wQ:()=>I});var i=n(5280),r=Math.pow,o=Math.sqrt,a=1e-8,s=1e-4,l=o(3),u=1/3,h=(0,i.create)(),c=(0,i.create)(),d=(0,i.create)();function p(t){return t>-1e-8&&ta||t<-1e-8}function g(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function m(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,s){var h=i+3*(e-n)-t,c=3*(n-2*e+t),d=3*(e-t),f=t-a,g=c*c-3*h*d,m=c*d-9*h*f,v=d*d-3*c*f,y=0;if(p(g)&&p(m)){if(p(c))s[0]=0;else(D=-d/c)>=0&&D<=1&&(s[y++]=D)}else{var _=m*m-4*g*v;if(p(_)){var x=m/g,b=-x/2;(D=-c/h+x)>=0&&D<=1&&(s[y++]=D),b>=0&&b<=1&&(s[y++]=b)}else if(_>0){var w=o(_),S=g*c+1.5*h*(-m+w),T=g*c+1.5*h*(-m-w);(D=(-c-((S=S<0?-r(-S,u):r(S,u))+(T=T<0?-r(-T,u):r(T,u))))/(3*h))>=0&&D<=1&&(s[y++]=D)}else{var M=(2*g*c-3*h*m)/(2*o(g*g*g)),C=Math.acos(M)/3,A=o(g),I=Math.cos(C),D=(-c-2*A*I)/(3*h),L=(b=(-c+A*(I+l*Math.sin(C)))/(3*h),(-c+A*(I-l*Math.sin(C)))/(3*h));D>=0&&D<=1&&(s[y++]=D),b>=0&&b<=1&&(s[y++]=b),L>=0&&L<=1&&(s[y++]=L)}}return y}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s)){if(f(a))(c=-l/a)>=0&&c<=1&&(r[u++]=c)}else{var h=a*a-4*s*l;if(p(h))r[0]=-a/(2*s);else if(h>0){var c,d=o(h),g=(-a-d)/(2*s);(c=(-a+d)/(2*s))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function _(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function x(t,e,n,r,a,l,u,p,f,m,v){var y,_,x,b,w,S=.005,T=1/0;h[0]=f,h[1]=m;for(var M=0;M<1;M+=.05)c[0]=g(t,n,a,u,M),c[1]=g(e,r,l,p,M),(b=(0,i.distSquare)(h,c))=0&&b=0&&c<=1&&(r[u++]=c)}else{var h=s*s-4*a*l;if(p(h))(c=-s/(2*a))>=0&&c<=1&&(r[u++]=c);else if(h>0){var c,d=o(h),g=(-s-d)/(2*a);(c=(-s+d)/(2*a))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function M(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function C(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function A(t,e,n,r,a,l,u,p,f){var g,m=.005,v=1/0;h[0]=u,h[1]=p;for(var y=0;y<1;y+=.05){c[0]=w(t,n,a,y),c[1]=w(e,r,l,y),(S=(0,i.distSquare)(h,c))=0&&S{"use strict";n.d(e,{UK:()=>h,A4:()=>u,YB:()=>l});var i=n(6387),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),u=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,p=c.left,f=c.top;s.push(p,f),u=u&&o&&p===o[d]&&f===o[d+1],l.push(t[h].offsetLeft,t[h].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(l,s,o);if(u)return u(t,n,r),!0}return!1}function h(t){return"CANVAS"===t.nodeName.toUpperCase()}},6387:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);const o=r},1158:(t,e,n)=>{"use strict";n.d(e,{OD:()=>c,Oo:()=>d,eV:()=>l,iP:()=>h,sT:()=>f,x1:()=>g,xg:()=>p});var i=n(6387),r=n(4058),o=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,a=[],s=i.default.browser.firefox&&+i.default.browser.version.split(".")[0]<39;function l(t,e,n,i){return n=n||{},i?u(t,e,n):s&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.default.domSupported&&t.getBoundingClientRect){var o=e.clientX,s=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=s-l.top)}if((0,r.A4)(a,t,o,s))return n.zrX=a[0],void(n.zrY=a[1])}n.zrX=n.zrY=0}function h(t){return t||window.event}function c(t,e,n){if(null!=(e=h(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var a=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&o.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function d(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var f=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function g(t){return 2===t.which||3===t.which}},2892:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function h(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function c(t){var e=[1,0,0,1,0,0];return o(e,t),e}n.r(e),n.d(e,{clone:()=>c,copy:()=>o,create:()=>i,identity:()=>r,invert:()=>h,mul:()=>a,rotate:()=>l,scale:()=>u,translate:()=>s})},3132:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>o,g2:()=>h,n5:()=>i,qW:()=>u,rk:()=>r});var i=12,r="sans-serif",o=i+"px "+r;var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)c=h*t.length;else for(var d=0;d{"use strict";n.d(e,{Z:()=>l});function i(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function r(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function o(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function a(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function s(t,e){var n,i,r,s=7,l=0;n=t.length;var u=[];function h(n){var h=i[n],c=r[n],d=i[n+1],p=r[n+1];r[n]=c+p,n===l-3&&(i[n+1]=i[n+2],r[n+1]=r[n+2]),l--;var f=a(t[d],t,h,c,0,e);h+=f,0!==(c-=f)&&0!==(p=o(t[h+c-1],t,d,p,p-1,e))&&(c<=p?function(n,i,r,l){var h=0;for(h=0;h=7||g>=7);if(m)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===i){for(h=0;h=0;h--)t[g+h]=t[f+h];return void(t[p]=u[d])}var m=s;for(;;){var v=0,y=0,_=!1;do{if(e(u[d],t[c])<0){if(t[p--]=t[c--],v++,y=0,0==--i){_=!0;break}}else if(t[p--]=u[d--],y++,v=0,1==--l){_=!0;break}}while((v|y)=0;h--)t[g+h]=t[f+h];if(0===i){_=!0;break}}if(t[p--]=u[d--],1==--l){_=!0;break}if(0!==(y=l-o(t[c],u,0,l,l-1,e))){for(l-=y,g=(p-=y)+1,f=(d-=y)+1,h=0;h=7||y>=7);if(_)break;m<0&&(m=0),m+=2}(s=m)<1&&(s=1);if(1===l){for(g=(p-=i)+1,f=(c-=i)+1,h=i-1;h>=0;h--)t[g+h]=t[f+h];t[p]=u[d]}else{if(0===l)throw new Error;for(f=p-(l-1),h=0;h1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;h(t)}},forceMergeRuns:function(){for(;l>1;){var t=l-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((l=i(t,n,o,e))h&&(c=h),r(t,n,n+c,n+l,e),l=c}u.pushRun(n,l),u.mergeRuns(),a-=l,n+=l}while(0!==a);u.forceMergeRuns()}}}},3051:(t,e,n)=>{"use strict";n.r(e),n.d(e,{HashMap:()=>ot,RADIAN_TO_DEGREE:()=>dt,assert:()=>tt,bind:()=>N,clone:()=>y,concatArray:()=>st,createCanvas:()=>S,createHashMap:()=>at,createObject:()=>lt,curry:()=>k,defaults:()=>w,disableUserSelect:()=>ut,each:()=>I,eqNaN:()=>Y,extend:()=>b,filter:()=>P,find:()=>O,guid:()=>m,hasOwn:()=>ht,indexOf:()=>T,inherits:()=>M,isArray:()=>R,isArrayLike:()=>A,isBuiltInObject:()=>G,isDom:()=>U,isFunction:()=>z,isGradientObject:()=>W,isImagePatternObject:()=>j,isNumber:()=>F,isObject:()=>V,isPrimitive:()=>rt,isRegExp:()=>X,isString:()=>B,isStringSafe:()=>Z,isTypedArray:()=>H,keys:()=>E,logError:()=>v,map:()=>D,merge:()=>_,mergeAll:()=>x,mixin:()=>C,noop:()=>ct,normalizeCssArray:()=>$,reduce:()=>L,retrieve:()=>q,retrieve2:()=>K,retrieve3:()=>J,setAsPrimitive:()=>it,slice:()=>Q,trim:()=>et});var i=n(3132),r=L(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),o=L(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),a=Object.prototype.toString,s=Array.prototype,l=s.forEach,u=s.filter,h=s.slice,c=s.map,d=function(){}.constructor,p=d?d.prototype:null,f="__proto__",g=2311;function m(){return g++}function v(){for(var t=[],e=0;e{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t){return[t[0],t[1]]}function a(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function l(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t){return Math.sqrt(d(t))}n.r(e),n.d(e,{add:()=>s,applyTransform:()=>M,clone:()=>o,copy:()=>r,create:()=>i,dist:()=>x,distSquare:()=>w,distance:()=>_,distanceSquare:()=>b,div:()=>g,dot:()=>m,len:()=>h,lenSquare:()=>d,length:()=>c,lengthSquare:()=>p,lerp:()=>T,max:()=>A,min:()=>C,mul:()=>f,negate:()=>S,normalize:()=>y,scale:()=>v,scaleAndAdd:()=>l,set:()=>a,sub:()=>u});var c=h;function d(t){return t[0]*t[0]+t[1]*t[1]}var p=d;function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function g(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function m(t,e){return t[0]*e[0]+t[1]*e[1]}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function y(t,e){var n=h(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function _(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var x=_;function b(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var w=b;function S(t,e){return t[0]=-e[0],t[1]=-e[1],t}function T(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function M(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function C(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function A(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},2776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(655),r=n(327);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n{"use strict";n.d(e,{ZP:()=>m,ik:()=>h,tj:()=>u});var i=n(655),r=n(5823),o=n(479),a=n(3051),s=n(4414),l="__zr_style_"+Math.round(10*Math.random()),u={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},h={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};u[l]=!0;var c=["z","z2","invisible"],d=["invisible"],p=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.keys)(e),i=0;i{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},8154:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(3051),o=n(5823),a=n(479),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=r.indexOf(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.indexOf(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n{"use strict";n.d(e,{ZP:()=>h});var i=n(655),r=n(7719),o=n(479),a=n(3051),s=(0,a.defaults)({x:0,y:0},r.tj),l={style:(0,a.defaults)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)};var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.createObject)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const h=u},1754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(7719),o=n(479),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(1797).Z)},327:(t,e,n)=>{"use strict";n.d(e,{$t:()=>A,ZP:()=>L});var i=n(655),r=n(7719),o=n(4014),a=n(3640),s=n(8554);function l(t,e,n,i,r,o,a,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>i+d&&c>o+d&&c>l+d||ct+d&&h>n+d&&h>r+d&&h>a+d||hn||d+ur&&(r+=c);var f=Math.atan2(l,s);return f<0&&(f+=c),f>=i&&f<=r||f+c>=i&&f+c<=r}var p=n(7637),f=o.Z.CMD,g=2*Math.PI;var m=[-1,-1,-1],v=[-1,-1];function y(t,e,n,i,r,o,a,l,u,h){if(h>e&&h>i&&h>o&&h>l||h1&&(c=void 0,c=v[0],v[0]=v[1],v[1]=c),g=s.af(e,i,o,l,v[0]),f>1&&(y=s.af(e,i,o,l,v[1]))),2===f?xe&&l>i&&l>o||l=0&&h<=1){for(var c=0,d=s.Zm(e,i,o,h),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);m[0]=-l,m[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=g-1e-4){i=0,r=g;var h=o?1:-1;return a>=m[0]+t&&a<=m[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=g,r+=g);for(var d=0,p=0;p<2;p++){var f=m[p];if(f+t>a){var v=Math.atan2(s,f);h=o?1:-1;v<0&&(v=g+v),(v>=i&&v<=r||v+g>=i&&v+g<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(h=-h),d+=h)}}return d}function b(t,e,n,i,r){for(var o,s,h,c,g=t.data,m=t.len(),v=0,b=0,w=0,S=0,T=0,M=0;M1&&(n||(v+=(0,p.Z)(b,w,S,T,i,r))),A&&(S=b=g[M],T=w=g[M+1]),C){case f.M:b=S=g[M++],w=T=g[M++];break;case f.L:if(n){if(a.m(b,w,g[M],g[M+1],e,i,r))return!0}else v+=(0,p.Z)(b,w,g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.C:if(n){if(l(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=y(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.Q:if(n){if(u.m(b,w,g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=_(b,w,g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.A:var I=g[M++],D=g[M++],L=g[M++],P=g[M++],O=g[M++],E=g[M++];M+=1;var N=!!(1-g[M++]);o=Math.cos(O)*L+I,s=Math.sin(O)*P+D,A?(S=o,T=s):v+=(0,p.Z)(b,w,o,s,i,r);var k=(i-I)*P/L+I;if(n){if(d(I,D,P,O,O+E,N,e,k,r))return!0}else v+=x(I,D,P,O,O+E,N,k,r);b=Math.cos(O+E)*L+I,w=Math.sin(O+E)*P+D;break;case f.R:if(S=b=g[M++],T=w=g[M++],o=S+g[M++],s=T+g[M++],n){if(a.m(S,T,o,T,e,i,r)||a.m(o,T,o,s,e,i,r)||a.m(o,s,S,s,e,i,r)||a.m(S,s,S,T,e,i,r))return!0}else v+=(0,p.Z)(o,T,o,s,i,r),v+=(0,p.Z)(S,s,S,T,i,r);break;case f.Z:if(n){if(a.m(b,w,S,T,e,i,r))return!0}else v+=(0,p.Z)(b,w,S,T,i,r);b=S,w=T}}return n||(h=w,c=T,Math.abs(h-c)<1e-4)||(v+=(0,p.Z)(b,w,S,T,i,r)||0),0!==v}var w=n(3051),S=n(1092),T=n(4990),M=n(4414),C=n(7411),A=(0,w.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),I={style:(0,w.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},D=C.dN.concat(["invisible","culling","z","z2","zlevel","parent"]);const L=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?T.vU:e>.2?T.iv:T.GD}if(t)return T.GD}return T.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,w.isString)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===(0,S.lum)(t,0)0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&M.RH)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return b(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return b(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=M.RH,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,w.extend)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&M.RH)},e.prototype.createStyle=function(t){return(0,w.createObject)(A,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,w.extend)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,w.extend)({},i.shape),(0,w.extend)(s,n.shape)):(s=(0,w.extend)({},r?this.shape:i.shape),(0,w.extend)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,w.extend)({},this.shape);for(var u={},h=(0,w.keys)(s),c=0;c{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(1797).Z)},1505:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(7719),o=n(423),a=n(327),s=n(3051),l=n(3132),u=(0,s.defaults)({strokeFirst:!0,font:l.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.createObject)(u,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);h.prototype.type="tspan";const c=h},6498:(t,e,n)=>{"use strict";n.d(e,{VG:()=>_,Y1:()=>b,ZP:()=>I});var i=n(655),r=n(6918),o=n(1505),a=n(3051),s=n(423),l=n(4535),u=n(5151),h=n(479),c=n(7719),d=n(3132),p={fill:"#000"},f={style:(0,a.defaults)({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},c.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=p,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,z=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),B=a.calculatedLineHeight,Z=0;Z=0&&"right"===(O=w[P]).align;)this._placeToken(O,t,T,v,L,"right",_),M-=O.width,L-=O.width,P--;for(D+=(i-(D-m)-(y-L)-M)/2;I<=P;)O=w[I],this._placeToken(O,t,T,v,D+O.width/2,"center",_),D+=O.width,I++;v+=T}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var c=e.rich[t.styleName]||{};c.text=t.text;var p=t.verticalAlign,f=i+n/2;"top"===p?f=i+t.height/2:"bottom"===p&&(f=i+n-t.height/2),!t.isLineHolder&&A(c)&&this._renderBackground(c,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,f-t.height/2,t.width,t.height);var g=!!c.backgroundColor,m=t.textPadding;m&&(r=M(r,l,m),f-=t.height/2-m[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var _=this._defaultStyle,b=!1,w=0,C=T("fill"in c?c.fill:"fill"in e?e.fill:(b=!0,_.fill)),I=S("stroke"in c?c.stroke:"stroke"in e?e.stroke:g||u||_.autoStroke&&!b?null:(w=2,_.stroke)),D=c.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=f,D&&(y.shadowBlur=c.textShadowBlur||e.textShadowBlur||0,y.shadowColor=c.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=c.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=c.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||d.Uo,y.opacity=(0,a.retrieve3)(c.opacity,e.opacity,1),x(y,c),I&&(y.lineWidth=(0,a.retrieve3)(c.lineWidth,e.lineWidth,w),y.lineDash=(0,a.retrieve2)(c.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=I),C&&(y.fill=C);var L=t.contentWidth,P=t.contentHeight;v.setBoundingRect(new h.Z((0,s.M3)(y.x,L,y.textAlign),(0,s.mU)(y.y,P,y.textBaseline),L,P))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,h,c,d=t.backgroundColor,p=t.borderWidth,f=t.borderColor,g=d&&d.image,m=d&&!g,v=t.borderRadius,y=this;if(m||t.lineHeight||p&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var _=s.shape;_.x=n,_.y=i,_.width=r,_.height=o,_.r=v,s.dirtyShape()}if(m)(c=s.style).fill=d||null,c.fillOpacity=(0,a.retrieve2)(t.fillOpacity,1);else if(g){(h=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var x=h.style;x.image=d.image,x.x=n,x.y=i,x.width=r,x.height=o}p&&f&&((c=s.style).lineWidth=p,c.stroke=f,c.strokeOpacity=(0,a.retrieve2)(t.strokeOpacity,1),c.lineDash=t.borderDash,c.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var b=(s||h).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=(0,a.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return b(t)&&(e=[t.fontStyle,t.fontWeight,_(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&(0,a.trim)(e)||t.textFont||t.font},e}(c.ZP),m={left:!0,right:1,center:1},v={top:1,bottom:1,middle:1},y=["fontStyle","fontWeight","fontSize","fontFamily"];function _(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?d.n5+"px":t+"px":t}function x(t,e){for(var n=0;n{"use strict";n.d(e,{RH:()=>o,SE:()=>r,YV:()=>i});var i=1,r=2,o=4},8007:(t,e,n)=>{"use strict";n.d(e,{Gq:()=>s,ko:()=>a,v5:()=>u});var i=n(2528),r=n(3132),o=new i.ZP(50);function a(t){if("string"==typeof t){var e=o.get(t);return e&&e.image}return t}function s(t,e,n,i,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var s=o.get(t),h={hostEl:n,cb:i,cbPayload:a};return s?!u(e=s.image)&&s.pending.push(h):((e=r.qW.loadImage(t,l,l)).__zrImageSrc=t,o.put(t,e.__cachedImgObj={image:e,pending:[h]})),e}return t}return e}function l(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e{"use strict";n.d(e,{$F:()=>g,NY:()=>c,aF:()=>s});var i=n(8007),r=n(3051),o=n(423),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a=l;h++)u-=l;var c=(0,o.dz)(n,e);return c>u&&(n="",c=0),u=t-c,a.ellipsis=n,a.ellipsisWidth=c,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?h(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function h(t,e,n,i){for(var r=0,o=0,a=t.length;ov&&f){var y=Math.floor(v/d);n=n.slice(0,y)}if(t&&h&&null!=g)for(var x=l(g,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b=0;bp&&m(n,t.substring(p,g),e,d),m(n,l[2],e,d,l[1]),p=a.lastIndex}ph){I>0?(M.tokens=M.tokens.slice(0,I),S(M,A,C),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var N=D.width,k=null==N||"auto"===N;if("string"==typeof N&&"%"===N.charAt(N.length-1))Z.percentWidth=N,v.push(Z),Z.contentWidth=(0,o.dz)(Z.text,O);else{if(k){var R=D.backgroundColor,z=R&&R.image;z&&(z=i.ko(z),i.v5(z)&&(Z.width=Math.max(Z.width,z.width*E/z.height)))}var B=b&&null!=u?u-A:null;null!=B&&B0&&v+i.accumWidth>i.width&&(a=e.split("\n"),f=!0),i.accumWidth=v}else{var y=_(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=y.accumWidth+m,s=y.linesWidths,a=y.lines}}else a=e.split("\n");for(var x=0;x=33&&e<=383}(t)||!!v[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",h=0,c=0,d=0;dn:r+c+f>n)?c?(l||u)&&(g?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=p,l="",c=h+=f):(u&&(l+=u,u="",h=0),a.push(l),s.push(c),l=p,c=f)):g?(a.push(u),s.push(h),u=p,h=f):(a.push(p),s.push(f)):(c+=f,g?(u+=p,h+=f):(u&&(l+=u,u="",h=0),l+=p))}else u&&(l+=u,c+=h),a.push(l),s.push(c),l="",u="",h=0,c=0}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=r),{accumWidth:c,lines:a,linesWidths:s}}},924:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var i=n(5280);function r(t,e,n){var r=e.smooth,o=e.points;if(o&&o.length>=2){if(r){var a=function(t,e,n,r){var o,a,s,l,u=[],h=[],c=[],d=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var p=0,f=t.length;p{"use strict";n.d(e,{Pw:()=>o,_3:()=>r,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},4826:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},4174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(327),o=n(5280),a=n(8554),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var h=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,h=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(n,i),null==h||null==c?(d<1&&((0,a.Lx)(n,l,r,d,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,d,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(d<1&&((0,a.Vz)(n,l,h,r,d,s),l=s[1],h=s[2],r=s[3],(0,a.Vz)(i,u,c,o,d,s),u=s[1],c=s[2],o=s[3]),t.bezierCurveTo(l,u,h,c,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.normalize(e,e)},e}(r.ZP);h.prototype.type="bezier-curve";const c=h},9538:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},2797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},2095:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327),o=n(4111),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},5094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},2514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},5151:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327);var o=n(4111),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},5795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},7214:(t,e,n)=>{"use strict";n.d(e,{C:()=>b});var i=n(655),r=n(327),o=n(3051),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,h=Math.acos,c=Math.atan2,d=Math.abs,p=Math.sqrt,f=Math.max,g=Math.min,m=1e-4;function v(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/p(s*s+l*l),h=u*l,c=-u*s,d=t+h,g=e+c,m=n+h,v=i+c,y=(d+m)/2,_=(g+v)/2,x=m-d,b=v-g,w=x*x+b*b,S=r-o,T=d*v-m*g,M=(b<0?-1:1)*p(f(0,S*S*w-T*T)),C=(T*b-x*M)/w,A=(-T*x-b*M)/w,I=(T*b+x*M)/w,D=(-T*x+b*M)/w,L=C-y,P=A-_,O=I-y,E=D-_;return L*L+P*P>O*O+E*E&&(C=I,A=D),{cx:C,cy:A,x0:-h,y0:-c,x1:C*(r/S-1),y1:A*(r/S-1)}}function y(t,e){var n,i=f(e.r,0),r=f(e.r0||0,0),y=i>0;if(y||r>0){if(y||(i=r,r=0),r>i){var _=i;i=r,r=_}var x=e.startAngle,b=e.endAngle;if(!isNaN(x)&&!isNaN(b)){var w=e.cx,S=e.cy,T=!!e.clockwise,M=d(b-x),C=M>s&&M%s;if(C>m&&(M=C),i>m)if(M>s-m)t.moveTo(w+i*u(x),S+i*l(x)),t.arc(w,S,i,x,b,!T),r>m&&(t.moveTo(w+r*u(b),S+r*l(b)),t.arc(w,S,r,b,x,T));else{var A=void 0,I=void 0,D=void 0,L=void 0,P=void 0,O=void 0,E=void 0,N=void 0,k=void 0,R=void 0,z=void 0,B=void 0,Z=void 0,F=void 0,V=void 0,G=void 0,H=i*u(x),U=i*l(x),W=r*u(b),j=r*l(b),X=M>m;if(X){var Y=e.cornerRadius;Y&&(A=(n=function(t){var e;if((0,o.isArray)(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(Y))[0],I=n[1],D=n[2],L=n[3]);var q=d(i-r)/2;if(P=g(q,D),O=g(q,L),E=g(q,A),N=g(q,I),z=k=f(P,O),B=R=f(E,N),(k>m||R>m)&&(Z=i*u(b),F=i*l(b),V=r*u(x),G=r*l(x),Mm){var it=g(D,z),rt=g(L,z),ot=v(V,G,H,U,i,it,T),at=v(Z,F,W,j,i,rt,T);t.moveTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),z0&&t.arc(w+ot.cx,S+ot.cy,it,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,i,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),!T),rt>0&&t.arc(w+at.cx,S+at.cy,rt,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.moveTo(w+H,S+U),t.arc(w,S,i,x,b,!T);else t.moveTo(w+H,S+U);if(r>m&&X)if(B>m){it=g(A,B),ot=v(W,j,Z,F,r,-(rt=g(I,B)),T),at=v(H,U,V,G,r,-it,T);t.lineTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),B0&&t.arc(w+ot.cx,S+ot.cy,rt,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,r,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),T),it>0&&t.arc(w+at.cx,S+at.cy,it,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.lineTo(w+W,S+j),t.arc(w,S,r,b,x,T);else t.lineTo(w+W,S+j)}else t.moveTo(w,S);t.closePath()}}}var _=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},x=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new _},e.prototype.buildPath=function(t,e){y(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);x.prototype.type="sector";const b=x},6076:(t,e,n)=>{"use strict";n.d(e,{Z:()=>wt});var i=n(4839),r=n(327),o=n(4535),a=n(423),s=n(1505),l=Math.sin,u=Math.cos,h=Math.PI,c=2*Math.PI,d=180/h;const p=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,r,o,a,s,p){var f=s-a,g=!p,m=Math.abs(f),v=(0,i.zT)(m-c)||(g?f>=c:-f>=c),y=f>0?f%c:f%c+c,_=!1;_=!!v||!(0,i.zT)(m)&&y>=h==!!g;var x=t+n*u(a),b=e+r*l(a);this._start&&this._add("M",x,b);var w=Math.round(o*d);if(v){var S=1/this._p,T=(g?1:-1)*(c-S);this._add("A",n,r,w,1,+g,t+n*u(a+T),e+r*l(a+T)),S>.01&&this._add("A",n,r,w,0,+g,x,b)}else{var M=t+n*u(s),C=e+r*l(s);this._add("A",n,r,w,+_,+g,M,C)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+(0,g.map)(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function C(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function A(t,e,n,i){return T("svg","root",{width:t,height:e,xmlns:b,"xmlns:xlink":w,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var I=n(8007),D=n(7411),L=n(4014),P=n(2776),O=n(5188),E={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"},N="transform-origin";function k(t,e,n){var r=(0,g.extend)({},t.shape);(0,g.extend)(r,e),t.buildPath(n,r);var o=new p;return o.reset((0,i.Gk)(t)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function R(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[N]=n+"px "+i+"px")}var z={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function B(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Z(t){return(0,g.isString)(t)?E[t]?"cubic-bezier("+E[t]+")":(0,O.H)(t)?t:"":""}function F(t,e,n,r){var o=t.animators,a=o.length,s=[];if(t instanceof P.Z){var l=function(t,e,n){var i,r,o=t.shape.paths,a={};if((0,g.each)(o,(function(t){var e=C(n.zrId);e.animation=!0,F(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=(0,g.keys)(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var d=h[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=B(a,n);return i.replace(r,s)}}(t,e,n);if(l)s.push(l);else if(!a)return}else if(!a)return;for(var u={},h=0;h0})).length)return B(c,n)+" "+o[0]+" both"}for(var y in u){(l=v(u[y]))&&s.push(l)}if(s.length){var _=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+_]={animation:s.join(",")},e.class=_}}var V=n(6498),G=n(3132),H=Math.round;function U(t){return t&&(0,g.isString)(t.src)}function W(t){return t&&(0,g.isFunction)(t.toDataURL)}function j(t,e,n,r){x((function(o,a){var s="fill"===o||"stroke"===o;s&&(0,i.H3)(a)?function(t,e,n,r){var o,a=t[n],s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if((0,i.I1)(a))o="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else{if(!(0,i.gO)(a))return void 0;o="radialGradient",s.cx=(0,g.retrieve2)(a.x,.5),s.cy=(0,g.retrieve2)(a.y,.5),s.r=(0,g.retrieve2)(a.r,.5)}for(var l=a.colorStops,u=[],h=0,c=l.length;hl?mt(t,null==n[c+1]?null:n[c+1].elm,n,s,c):vt(t,e,a,l))}(n,i,r):dt(r)?(dt(t.text)&&ut(n,""),mt(n,null,r,0,r.length-1)):dt(i)?vt(n,i,0,i.length-1):dt(t.text)&&ut(n,""):t.text!==e.text&&(dt(i)&&vt(n,i,0,i.length-1),ut(n,e.text)))}var xt=n(5787),bt=0;const wt=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=n=(0,g.extend)({},n),this.root=t,this._id="zr"+bt++,this._oldVNode=A(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=S("svg");yt(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(ft(t,e))_t(t,e);else{var n=t.elm,i=st(n);gt(e),null!==i&&(rt(i,e.elm,lt(n)),vt(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return et(t,C(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,r=this._width,o=this._height,a=C(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var s=[];if(n&&"none"!==n){var l=(0,i.ut)(n),u=l.color,h=l.opacity;this._bgVNode=T("rect","bg",{width:r,height:o,x:"0",y:"0",id:"0",fill:u,"fill-opacity":h}),s.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=T("g","main",{},[]);this._paintList(e,a,c?c.children:s),c&&s.push(c);var d=(0,g.map)((0,g.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&s.push(T("defs","defs",{},d)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=(0,g.map)((0,g.keys)(t),(function(e){return e+r+(0,g.map)((0,g.keys)(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=(0,g.map)((0,g.keys)(e),(function(t){return"@keyframes "+t+r+(0,g.map)((0,g.keys)(e[t]),(function(n){return n+r+(0,g.map)((0,g.keys)(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(a.cssNodes,a.cssAnims,{newline:!0});if(p){var f=T("style","stl",{},[],p);s.push(f)}}return A(r,o,s,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},M(this.renderToVNode({animation:(0,g.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:(0,g.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=(0,i.ut)(t),r=n.color,o=n.opacity;e.elm.setAttribute("fill",r),o<1&&e.elm.setAttribute("fill-opacity",o)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m{"use strict";n.d(e,{Cv:()=>v,Gk:()=>S,H3:()=>b,I1:()=>_,Pn:()=>c,R:()=>y,gA:()=>T,gO:()=>x,i2:()=>g,jY:()=>p,m1:()=>w,mU:()=>f,n1:()=>m,oF:()=>M,qV:()=>d,ut:()=>s,zT:()=>u});var i=n(3051),r=n(1092),o=n(6387),a=Math.round;function s(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=(0,r.parse)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var l=1e-4;function u(t){return t-1e-4}function h(t){return a(1e3*t)/1e3}function c(t){return a(1e4*t)/1e4}function d(t){return"matrix("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+c(t[4])+","+c(t[5])+")"}var p={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function g(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function m(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(t){return t&&!!t.image}function y(t){return v(t)||function(t){return t&&!!t.svgElement}(t)}function _(t){return"linear"===t.type}function x(t){return"radial"===t.type}function b(t){return t&&("linear"===t.type||"radial"===t.type)}function w(t){return"url(#"+t+")"}function S(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function T(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*i.RADIAN_TO_DEGREE,o=(0,i.retrieve2)(t.scaleX,1),s=(0,i.retrieve2)(t.scaleY,1),l=t.skewX||0,u=t.skewY||0,h=[];return(e||n)&&h.push("translate("+e+"px,"+n+"px)"),r&&h.push("rotate("+r+")"),1===o&&1===s||h.push("scale("+o+","+s+")"),(l||u)&&h.push("skew("+a(l*i.RADIAN_TO_DEGREE)+"deg, "+a(u*i.RADIAN_TO_DEGREE)+"deg)"),h.join(" ")}var M=o.default.hasGlobalWindow&&(0,i.isFunction)(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}},1092:(t,e,n)=>{"use strict";n.r(e),n.d(e,{fastLerp:()=>x,fastMapToColor:()=>b,lerp:()=>w,lift:()=>y,lum:()=>A,mapToColor:()=>S,modifyAlpha:()=>M,modifyHSL:()=>T,parse:()=>m,random:()=>I,stringify:()=>C,toHex:()=>_});var i=n(2528),r={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function h(t,e,n){return t+(e-t)*n}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),f=null;function g(t,e){f&&d(f,e),f=p.put(t,f||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return d(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return d(e,r[i]),g(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),g(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),g(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),h=i.indexOf(")");if(-1!==u&&h+1===a){var f=i.substr(0,u),m=i.substr(u+1,h-(u+1)).split(","),y=1;switch(f){case"rgba":if(4!==m.length)return 3===m.length?c(e,+m[0],+m[1],+m[2],1):c(e,0,0,0,1);y=l(m.pop());case"rgb":return 3!==m.length?void c(e,0,0,0,1):(c(e,s(m[0]),s(m[1]),s(m[2]),y),g(t,e),e);case"hsla":return 4!==m.length?void c(e,0,0,0,1):(m[3]=l(m[3]),v(m,e),g(t,e),e);case"hsl":return 3!==m.length?void c(e,0,0,0,1):(v(m,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return C(n,4===n.length?"rgba":"rgb")}}function _(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=e[r],u=e[s],c=i-r;return n[0]=o(h(l[0],u[0],c)),n[1]=o(h(l[1],u[1],c)),n[2]=o(h(l[2],u[2],c)),n[3]=a(h(l[3],u[3],c)),n}}var b=x;function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=m(e[r]),u=m(e[s]),c=i-r,d=C([o(h(l[0],u[0],c)),o(h(l[1],u[1],c)),o(h(l[2],u[2],c)),a(h(l[3],u[3],c))],"rgba");return n?{color:d,leftIndex:r,rightIndex:s,value:i}:d}}var S=w;function T(t,e,n,i){var r,o=m(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=l(n)),null!=i&&(o[2]=l(i)),C(v(o),"rgba")}function M(t,e){var n=m(t);if(n&&null!=e)return n[3]=a(e),C(n,"rgba")}function C(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function A(t,e){var n=m(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function I(){return C([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},7494:(t,e,n)=>{"use strict";n.d(e,{U5:()=>D,iR:()=>C,Pc:()=>A,AA:()=>I});var i=n(655),r=n(327),o=n(4014),a=n(5280),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,h=Math.atan2;function c(t,e){if(e){var n,i,r,o,c,d,p=t.data,f=t.len(),g=s.M,m=s.C,v=s.L,y=s.R,_=s.A,x=s.Q;for(r=0,o=0;r1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(v*v)-s*s*(d*d))/(a*a*(v*v)+s*s*(d*d)))||0,w=b*a*v/s,S=b*-s*d/a,T=(t+n)/2+g(c)*w-f(c)*S,M=(e+i)/2+f(c)*w+g(c)*S,C=_([1,0],[(d-w)/a,(v-S)/s]),A=[(d-w)/a,(v-S)/s],I=[(-1*d-w)/a,(-1*v-S)/s],D=_(A,I);if(y(A,I)<=-1&&(D=m),y(A,I)>=1&&(D=0),D<0){var L=Math.round(D/m*1e6)/1e6;D=2*m+L%2*m}h.addData(u,T,M,a,s,C,D,c,o)}var b=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,w=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function T(t){return null!=t.setData}function M(t,e){var n=function(t){var e=new o.Z;if(!t)return e;var n,i=0,r=0,a=i,s=r,l=o.Z.CMD,u=t.match(b);if(!u)return e;for(var h=0;h{"use strict";n.r(e),n.d(e,{dispose:()=>ot,disposeAll:()=>at,getInstance:()=>st,init:()=>rt,registerPainter:()=>lt,version:()=>ut});var i=n(6387),r=n(3051),o=n(655),a=n(5280),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.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 s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(3510),h=n(1158),c=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=d(r)/d(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){h.sT(this.event)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,o.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),v=function(t,e){this.x=t,this.y=e},y=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new v(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new m,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,o.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(r.each(y,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new v(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new v(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new v(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new c);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new v;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(9455),T=n(4414),M=!1;function C(){M||(M=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function A(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const I=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=A}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(C(),u.z=0),isNaN(u.z2)&&(C(),u.z2=0),isNaN(u.zlevel)&&(C(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();var D=n(2795),L=n(5622);function P(){return(new Date).getTime()}const O=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return(0,o.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=P()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,(0,D.Z)((function e(){t._running&&((0,D.Z)(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=P(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=P(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=P()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new L.Z(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var E,N,k=i.default.domSupported,R=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:E=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:r.map(E,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),z=["mousemove","mouseup"],B=["pointermove","pointerup"],Z=!1;function F(t){var e=t.pointerType;return"pen"===e||"touch"===e}function V(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var H=function(t,e){this.stopPropagation=r.noop,this.stopImmediatePropagation=r.noop,this.preventDefault=r.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},U={mousedown:function(t){t=(0,h.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,h.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,h.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){G(this,(t=(0,h.OD)(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Z=!0,t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Z||(t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){V(t=(0,h.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),U.mousemove.call(this,t),U.mousedown.call(this,t)},touchmove:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"change"),U.mousemove.call(this,t)},touchend:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"end"),U.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&U.click.call(this,t)},pointerdown:function(t){U.mousedown.call(this,t)},pointermove:function(t){F(t)||U.mousemove.call(this,t)},pointerup:function(t){U.mouseup.call(this,t)},pointerout:function(t){F(t)||U.mouseout.call(this,t)}};r.each(["click","dblclick","contextmenu"],(function(t){U[t]=function(e){e=(0,h.OD)(this.dom,e),this.trigger(t,e)}}));var W={pointermove:function(t){F(t)||W.mousemove.call(this,t)},pointerup:function(t){W.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function j(t,e){var n=e.domHandlers;i.default.pointerEventsSupported?r.each(R.pointer,(function(i){Y(e,i,(function(e){n[i].call(t,e)}))})):(i.default.touchEventsSupported&&r.each(R.touch,(function(i){Y(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),r.each(R.mouse,(function(i){Y(e,i,(function(r){r=(0,h.iP)(r),e.touching||n[i].call(t,r)}))})))}function X(t,e){function n(n){Y(e,n,(function(i){i=(0,h.iP)(i),G(t,i.target)||(i=function(t,e){return(0,h.OD)(t.dom,new H(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}i.default.pointerEventsSupported?r.each(B,n):i.default.touchEventsSupported||r.each(z,n)}function Y(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,h.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,h.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new K(e,U),k&&(i._globalHandlerScope=new K(document,W)),j(i,i._localHandlerScope),i}return(0,o.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),k&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,k&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?X(this,e):q(e)}},e}(u.Z);var Q=n(1092),$=n(4990),tt=n(8154),et={},nt={};var it=function(){function t(t,e,n){var o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new I,s=n.renderer||"canvas";et[s]||(s=r.keys(et)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var l=new et[s](e,a,n,t),u=n.ssr||l.ssrOnly;this.storage=a,this.painter=l;var h=i.default.node||i.default.worker||u?null:new J(l.getViewportRoot(),l.root);this.handler=new w(a,l,h,l.root),this.animation=new O({stage:{update:u?null:function(){return o._flush(!0)}}}),u||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,Q.lum)(t,1)<$.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{Axis:()=>s.RD,ChartView:()=>s.TA,ComponentModel:()=>s.tF,ComponentView:()=>s.Ir,List:()=>s.aV,Model:()=>s.Hn,PRIORITY:()=>s.Hr,SeriesModel:()=>s.wJ,color:()=>s.$_,connect:()=>s.$j,dataTool:()=>s.Ok,default:()=>p,dependencies:()=>s.HO,disConnect:()=>s.eU,disconnect:()=>s.zP,dispose:()=>s.B9,env:()=>s.OB,extendChartView:()=>s.Zy,extendComponentModel:()=>s.tv,extendComponentView:()=>s.Sp,extendSeriesModel:()=>s.Zr,format:()=>s.WU,getCoordinateSystemDimensions:()=>s.wL,getInstanceByDom:()=>s.JE,getInstanceById:()=>s.rp,getMap:()=>s.FU,graphic:()=>s.Q,helper:()=>s._y,init:()=>s.S1,innerDrawElementOnCanvas:()=>s.z$,matrix:()=>s.pI,number:()=>s.Rx,parseGeoJSON:()=>s.Nu,parseGeoJson:()=>s.pQ,registerAction:()=>s.zl,registerCoordinateSystem:()=>s.RS,registerLayout:()=>s.qR,registerLoading:()=>s.yn,registerLocale:()=>s.I2,registerMap:()=>s.je,registerPostInit:()=>s.sq,registerPostUpdate:()=>s.Br,registerPreprocessor:()=>s.ds,registerProcessor:()=>s.Pu,registerTheme:()=>s.aW,registerTransform:()=>s.rV,registerUpdateLifecycle:()=>s.YK,registerVisual:()=>s.Og,setCanvasCreator:()=>s.jQ,setPlatformAPI:()=>s.g2,throttle:()=>s.P2,time:()=>s.XV,use:()=>s.D$,util:()=>s.D5,vector:()=>s.xr,version:()=>s.i8,zrUtil:()=>s.gf,zrender:()=>s.x_});const e={...{metadata:!0,svgRender:!1,switchMode:!1,echartsOption:{aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,iconStyle:{borderColor:"#fff"},feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}}},graphConfig:{series:{layout:"force",label:{show:!0,color:"#fff",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,legendHoverLink:!0,emphasis:{focus:"none",lineStyle:{color:"#3acc38",opacity:1}},nodeStyle:{color:"#f4d38c"},linkStyle:{width:5,color:"#1ba619"},nodeSize:"17"},baseOptions:{backgroundColor:"#2B2B2B"}},mapOptions:{roam:!0,nodeConfig:{type:"scatter",label:{show:!0,color:"#000000",position:"top",formatter:"{b}"},nodeStyle:{color:"#1566a9"},nodeSize:"17"},linkConfig:{linkStyle:{width:5,color:"#1ba619"},emphasis:{focus:"none",lineStyle:{color:"#3acc38",opacity:1}}},baseOptions:{toolbox:{show:!1}}},mapTileConfig:[{urlTemplate:"https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png",options:{minZoom:3,maxZoom:32,attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'}}],nodeCategories:[],linkCategories:[],prepareData(t){},onClickElement(t,e){}}};const i=class{constructor(t){this.self=t,this.renderModeSelector=null,this.controls=null,this.sideBar=null,this.aboutContainer=null,this.nodeLinkInfoContainer=null}createControls(){const t=document.createElement("div");return t.setAttribute("class","njg-controls"),this.self.el.appendChild(t),t}createRenderModeSelector(){const t=document.createElement("div"),e=document.createElement("span");return e.setAttribute("class","iconfont icon-eye"),t.setAttribute("class","njg-selectIcon"),t.appendChild(e),this.controls.appendChild(t),t}createSideBar(){const t=document.createElement("div");t.setAttribute("class","njg-sideBar");const{body:e}=document,n=document.createElement("button");return t.appendChild(n),n.classList.add("sideBarHandle"),n.onclick=()=>{t.classList.toggle("hidden")},e.appendChild(t),t}createAboutContainer(){const t=document.createElement("div"),e=document.createElement("h2"),n=document.createElement("div");return n.classList.add("njg-metaData"),t.classList.add("njg-aboutContainer"),e.innerHTML="About",t.appendChild(e),t.appendChild(n),this.sideBar.appendChild(t),this.nodeLinkInfoContainer=this.createNodeLinkInfoContainer(),t}createNodeLinkInfoContainer(){const t=document.createElement("div");return t.classList.add("njg-nodeLinkInfoContainer"),t.style.visibility="hidden",this.sideBar.appendChild(t),t}getNodeLinkInfo(t,e){const n=document.querySelectorAll(".njg-infoContainer"),i=document.querySelectorAll(".njg-headerContainer");for(let t=0;t{const n=document.createElement("div");n.classList.add("njg-infoItems");const i=document.createElement("span");i.setAttribute("class","njg-keyLabel");const r=document.createElement("span");r.setAttribute("class","njg-valueLabel"),"location"===t?(i.innerHTML="Location",r.innerHTML=`${Math.round(1e3*e[t].lat)/1e3}, ${Math.round(1e3*e[t].lng)/1e3}`):"localAddresses"===t?(i.innerHTML="Local Addresses",r.innerHTML=e[t].join("
")):(i.innerHTML=t,r.innerHTML=e[t]),n.appendChild(i),n.appendChild(r),o.appendChild(n)})),r.appendChild(a),r.appendChild(s),this.nodeLinkInfoContainer.appendChild(r),this.nodeLinkInfoContainer.appendChild(o),s.onclick=()=>{this.nodeLinkInfoContainer.style.visibility="hidden"}}init(){this.sideBar=this.createSideBar(),this.self.config.switchMode&&(this.controls=this.createControls(),this.renderModeSelector=this.createRenderModeSelector())}};const r=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json?t.json():t)).catch((t=>{console.error(t)})):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:n=(new Date).getTimezoneOffset()/60}){const i=e.exec(t);if(!i||i.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],o={},a=i[1]%4==0&&i[1]%100!=0||i[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,a?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t-=1)o[r[t-1]]=parseInt(i[t],10);let l,u=-n;for(let t=r.length;t>0;t-=1){if("dateYear"===r[t-1]){o[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[o.dateMonth-1]:s.get(r[t-1]);let e=o[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(o[r[t-1]]+10)%11]),e+=l),o[r[t-1]]=e}return`${o.dateYear}.${this.numberMinDigit(o.dateMonth)}.${this.numberMinDigit(o.dateDay)} ${this.numberMinDigit(o.dateHour)}:${this.numberMinDigit(i[5])}:${this.numberMinDigit(i[6])}${i[7]?`.${this.numberMinDigit(i[7],3)}`:""}`}numberMinDigit(t,e=2,n="0"){return(Array(e).join(n)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),n=e.length;for(let t=0;t{i[t]&&this.isObject(i[t])&&this.isObject(n[t])?this.deepMergeObj(i[t],n[t]):i[t]=n[t]})):i||(e[t+1]=n)}return e[n-1]}updateMetadata(){if(this.config.metadata){const t=this.utils.getMetadata(this.data),e=document.querySelector(".njg-metaData"),n=document.querySelectorAll(".njg-metaDataItems");for(let t=0;t{const i=document.createElement("div");i.classList.add("njg-metaDataItems");const r=document.createElement("span");r.setAttribute("class","njg-keyLabel");const o=document.createElement("span");o.setAttribute("class","njg-valueLabel"),r.innerHTML=n,o.innerHTML=t[n],i.appendChild(r),i.appendChild(o),e.appendChild(i)}))}}getMetadata(t){const e=t,n={};return e.label&&(n.label=e.label),["protocol","version","revision","metric","router_id","topology_id"].forEach((t=>{e[t]&&(n[t]=e[t])})),n.nodes=e.nodes.length,n.links=e.links.length,n}nodeInfo(t){const e={};return e.id=t.id,t.label&&"string"==typeof t.label&&(e.label=t.label),t.name&&(e.name=t.name),t.location&&(e.location=t.location),t.properties&&Object.keys(t.properties).forEach((n=>{if("location"===n)e[n]={lat:t.properties.location.lat,lng:t.properties.location.lng};else if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e[n]=i}else e[n.replace(/_/g," ")]=t.properties[n]})),t.linkCount&&(e.links=t.linkCount),t.local_addresses&&(e.localAddresses=t.local_addresses),e}createTooltipItem(t,e){const n=document.createElement("div");n.classList.add("njg-tooltip-item");const i=document.createElement("span");i.setAttribute("class","njg-tooltip-key");const r=document.createElement("span");return r.setAttribute("class","njg-tooltip-value"),i.innerHTML=t,r.innerHTML=e,n.appendChild(i),n.appendChild(r),n}getNodeTooltipInfo(t){const e=document.createElement("div");return e.classList.add("njg-tooltip-inner"),t.id&&e.appendChild(this.createTooltipItem("id",t.id)),t.label&&"string"==typeof t.label&&e.appendChild(this.createTooltipItem("label",t.label)),t.properties&&Object.keys(t.properties).forEach((n=>{if("location"===n)e.appendChild(this.createTooltipItem("location",`${Math.round(1e3*t.properties.location.lat)/1e3}, ${Math.round(1e3*t.properties.location.lng)/1e3}`));else if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e.appendChild(this.createTooltipItem("time",i))}else e.appendChild(this.createTooltipItem(`${n.replace(/_/g," ")}`,t.properties[n]))})),t.linkCount&&e.appendChild(this.createTooltipItem("Links",t.linkCount)),t.local_addresses&&e.appendChild(this.createTooltipItem("Local Addresses",t.local_addresses.join("
"))),e}getLinkTooltipInfo(t){const e=document.createElement("div");return e.classList.add("njg-tooltip-inner"),e.appendChild(this.createTooltipItem("source",t.source)),e.appendChild(this.createTooltipItem("target",t.target)),e.appendChild(this.createTooltipItem("cost",t.cost)),t.properties&&Object.keys(t.properties).forEach((n=>{if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e.appendChild(this.createTooltipItem("time",i))}else e.appendChild(this.createTooltipItem(`${n.replace(/_/g," ")}`,t.properties[n]))})),e}linkInfo(t){const e={};return e.source=t.source,e.target=t.target,e.cost=t.cost,t.properties&&Object.keys(t.properties).forEach((n=>{if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e[n]=i}else e[n.replace(/_/g," ")]=t.properties[n]})),e}generateStyle(t,e){return"function"==typeof t?t(e):t}getNodeStyle(t,e,n){let i,r={},o={};if(t.category&&e.nodeCategories.length){const n=e.nodeCategories.find((e=>e.name===t.category));i=this.generateStyle(n.nodeStyle||{},t),r=this.generateStyle(n.nodeSize||{},t),o={...o,nodeStyle:n.emphasis?this.generateStyle(n.emphasis.nodeStyle||{},t):{}},o={...o,nodeSize:n.empahsis?this.generateStyle(n.emphasis.nodeSize||{},t):{}}}else"map"===n?(i=this.generateStyle(e.mapOptions.nodeConfig.nodeStyle,t),r=this.generateStyle(e.mapOptions.nodeConfig.nodeSize,t)):(i=this.generateStyle(e.graphConfig.series.nodeStyle,t),r=this.generateStyle(e.graphConfig.series.nodeSize,t));return{nodeStyleConfig:i,nodeSizeConfig:r,nodeEmphasisConfig:o}}getLinkStyle(t,e,n){let i,r={};if(t.category&&e.linkCategories.length){const n=e.linkCategories.find((e=>e.name===t.category));i=this.generateStyle(n.linkStyle||{},t),r={...r,linkStyle:n.emphasis?this.generateStyle(n.emphasis.linkStyle||{},t):{}}}else i="map"===n?this.generateStyle(e.mapOptions.linkConfig.linkStyle,t):this.generateStyle(e.graphConfig.series.linkStyle,t);return{linkStyleConfig:i,linkEmphasisConfig:r}}getGUI(t){return new i(t)}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...n){t.set(e,[...t.get(e)||[],...n])},once(t,...n){e.set(t,[...e.get(t)||[],...n])},emit(n){const i=t.get(n)||[],r=e.get(n)||[],o=i.map((t=>t())),a=r.map((t=>t()));return e.delete(n),[...o,...a]},delete(n){t.delete(n),e.delete(n)}}}};const o=class extends r{searchElements(t){const e=this,n={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=i=>{n[i.state.searchValue]?e.utils.JSONDataUpdate.call(e,n[i.state.searchValue].data).then((()=>{e.JSONParam=n[i.state.searchValue].param})):e.utils.JSONDataUpdate.call(e,t+i.state.searchValue)},function(i,r=!0,o=!0){const a=i.trim();if(!window.history.state||window.history.state&&window.history.state.searchValue!==a)return window.history.pushState({searchValue:a},""),e.utils.JSONDataUpdate.call(e,t+a,r,o).then((()=>{n[a]={data:{...e.data},param:[...e.JSONParam]}}))}}JSONDataUpdate(t,e=!0,n=!0){const i=this;return i.config.onUpdate.call(i),i.utils.JSONParamParse(t).then((r=>{function o(){e?(i.JSONParam=[t],i.utils.overrideData(r,i)):(i.JSONParam.push(t),i.config.render===i.utils.mapRender?i.utils.appendData(r,i):i.utils.addData(r,i)),i.utils.updateMetadata.call(i)}return n?(i.config.prepareData.call(i,r),i.config.dealDataByWorker?i.utils.dealDataByWorker.call(i,r,i.config.dealDataByWorker,o):o()):o(),r})).catch((t=>{console.error(t)}))}dealDataByWorker(t,e,n){const i=new Worker(e),r=this;i.postMessage(t),i.addEventListener("error",(t=>{console.error(t),console.error("Error in dealing JSONData!")})),i.addEventListener("message",(t=>{n?n():r.utils.overrideData(t.data,r)}))}overrideData(t,e){e.data=t,e.utils.render(),e.config.afterUpdate.call(e)}};const a=class{constructor(t){this.utils=new o,this.config={...e},this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.body,this.el===document.body&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then((t=>{this.config.prepareData.call(this,t),this.data=t,this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils.render())})).catch((t=>{console.error(t)})),e.length){const n=function(){e.map((t=>this.utils.JSONDataUpdate.call(this,t,!1)))};this.JSONParam=[t],this.event.once("renderArray",n.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}};var s=n(9060),l=n(8023),u=n(1615),h=n(12),c=n(7240),d=n(7164);(0,l.D)([h.N,c.N]);const p={init:function(){return u.S1.apply(null,arguments)}};(0,l.D)(d.T);var f=n(6026);(0,l.D)(f.N);var g=n(9517);(0,l.D)(g.N);var m=n(241);(0,l.D)(m.N);var v=n(7813);(0,l.D)(v.N);var y=n(8690);(0,l.D)(y.N);var _=n(5045);(0,l.D)(_.N);var x=n(3450);(0,l.D)(x.N);var b=n(9448),w=n(6076);(0,b.registerPainter)("svg",w.Z);n(3721);var S=n(531),T=n.n(S);class M{echartsSetOption(t,e){const n=e.config,i=e.echarts,r=e.utils.deepMergeObj({tooltip:{confine:!0,position:(t,e,n,i,r)=>{let o="right";return r.viewSize[0]-t[0]"graph"===t.componentSubType?"edge"===t.dataType?e.utils.getLinkTooltipInfo(t.data):e.utils.getNodeTooltipInfo(t.data):"graphGL"===t.componentSubType?e.utils.getNodeTooltipInfo(t.data):"lines"===t.componentSubType?e.utils.getLinkTooltipInfo(t.data.link):e.utils.getNodeTooltipInfo(t.data.node)}},n.echartsOption);return i.setOption(e.utils.deepMergeObj(r,t)),i.on("click",(t=>{const i=n.onClickElement.bind(e);return"graph"===t.componentSubType?i("edge"===t.dataType?"link":"node",t.data):"graphGL"===t.componentSubType?i("node",t.data):"lines"===t.componentSubType?i("link",t.data.link):i("node",t.data.node)}),{passive:!0}),i}generateGraphOption(t,e){const n=[],i=e.config,r=t.nodes.map((t=>{const n=JSON.parse(JSON.stringify(t)),{nodeStyleConfig:r,nodeSizeConfig:o,nodeEmphasisConfig:a}=e.utils.getNodeStyle(t,i,"graph");return n.itemStyle=r,n.symbolSize=o,n.emphasis={itemStyle:a.nodeStyle,symbolSize:a.nodeSize},n.name="string"==typeof t.label?t.label:t.id,n})),o=t.links.map((t=>{const n=JSON.parse(JSON.stringify(t)),{linkStyleConfig:r,linkEmphasisConfig:o}=e.utils.getLinkStyle(t,i,"graph");return n.lineStyle=r,n.emphasis={lineStyle:o.linkStyle},n})),a=[Object.assign(i.graphConfig.series,{type:"graphGL"===i.graphConfig.series.type?"graphGL":"graph",layout:"graphGL"===i.graphConfig.series.type?"forceAtlas2":i.graphConfig.series.layout,nodes:r,links:o})];return{legend:n.length?{data:n}:void 0,series:a,...i.graphConfig.baseOptions}}generateMapOption(t,e){const n=e.config,{nodes:i,links:r}=t,o=t.flatNodes||{},a=[],s=[];i.forEach((i=>{if(i.properties){const{location:r}=i.properties;if(r&&r.lng&&r.lat){const{nodeStyleConfig:a,nodeSizeConfig:l,nodeEmphasisConfig:u}=e.utils.getNodeStyle(i,n,"map");s.push({name:"string"==typeof i.label?i.label:i.id,value:[r.lng,r.lat],symbolSize:l,itemStyle:a,emphasis:{itemStyle:u.nodeStyle,symbolSize:u.nodeSize},node:i}),t.flatNodes||(o[i.id]=JSON.parse(JSON.stringify(i)))}else console.error(`Node ${i.id} position is undefined!`)}else console.error(`Node ${i.id} position is undefined!`)})),r.forEach((t=>{if(o[t.source])if(o[t.target]){const{linkStyleConfig:i,linkEmphasisConfig:r}=e.utils.getLinkStyle(t,n,"map");a.push({coords:[[o[t.source].properties.location.lng,o[t.source].properties.location.lat],[o[t.target].properties.location.lng,o[t.target].properties.location.lat]],lineStyle:i,emphasis:{lineStyle:r.linkStyle},link:t})}else console.error(`Node ${t.target} is not exist!`);else console.error(`Node ${t.source} is not exist!`)}));const l=[Object.assign(n.mapOptions.nodeConfig,{type:"effectScatter"===n.mapOptions.nodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s,animationDuration:1e3}),Object.assign(n.mapOptions.linkConfig,{type:"lines",coordinateSystem:"leaflet",data:a})];return{leaflet:{tiles:n.mapTileConfig,mapOptions:n.mapOptions},series:l,...n.mapOptions.baseOptions}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.leaflet._zoomAnimated=!1,e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach(((t,n)=>{e.echarts.appendData({seriesIndex:n,data:t.data})})),e.utils.mergeData(t,e),e.config.afterUpdate.call(e)}addData(t,e){e.utils.mergeData(t,e),e.utils.render(),e.config.afterUpdate.call(e)}mergeData(t,e){const n=e.data.nodes.concat(t.nodes),i=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:n,links:i})}}const C=function(t,e){const{util:n,graphic:i,matrix:r}=t,o=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container),t.zoomControl.setPosition("topright")},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function a(t,n){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=n,this._projection=e.Projection.Mercator}function s(t,e,n,i){const{leafletModel:r,seriesModel:o}=n,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}return a.dimensions=["lng","lat"],a.prototype.dimensions=["lng","lat"],a.prototype.setZoom=function(t){this._zoom=t},a.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},a.prototype.setMapOffset=function(t){this._mapOffset=t},a.prototype.getLeaflet=function(){return this._map},a.prototype.getViewRect=function(){const t=this._api;return new i.BoundingRect(0,0,t.getWidth(),t.getHeight())},a.prototype.getRoamTransform=function(){return r.create()},a.prototype.dataToPoint=function(t){const n=new e.LatLng(t[1],t[0]),i=this._map.latLngToLayerPoint(n),r=this._mapOffset;return[i.x-r[0],i.y-r[1]]},a.prototype.pointToData=function(t){const e=this._mapOffset,n=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[n.lng,n.lat]},a.prototype.convertToPixel=n.curry(s,"dataToPoint"),a.prototype.convertFromPixel=n.curry(s,"pointToData"),a.create=function(t,n){let i;const r=[],s=n.getDom();return t.eachComponent("leaflet",(t=>{const l=n.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(i)throw new Error("Only one leaflet component can exist");if(!t.__map){let n=s.querySelector(".ec-extension-leaflet");n&&(l.style.left="0px",l.style.top="0px",s.removeChild(n)),n=document.createElement("div"),n.style.cssText="width:100%;height:100%",n.classList.add("ec-extension-leaflet"),s.appendChild(n),t.__map=e.map(n,t.get("mapOptions"));const i=t.__map,r=t.get("tiles"),a={};let u=!1;if(r.forEach((t=>{const n=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(n.addTo(i),u=!0),a[t.label]=n):n.addTo(i)})),r.length>1){const n=t.get("layerControl");e.control.layers(a,{},n).addTo(i)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new o(h).addTo(i)}const u=t.__map;i=new a(u,n),r.push(i),i.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(i.setZoom(c),i.setCenter(h)),t.coordinateSystem=i})),t.eachSeries((t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=i)})),r},a};function A(t,e){t.extendComponentView({type:"leaflet",render(t,n,i){let r=!0;const o=t.getLeaflet(),a=i.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};function u(t,e){const n=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*n[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*n[1]),t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`}function h(t){[...t.childNodes].forEach((e=>{u(e,t),e.childNodes.length&&h(e)}))}function c(t){const n=e.DomUtil.getPosition(t.getPanes().mapPane);if(n)return n;console.error("Can't get the map offset!")}this._oldMoveStartHandler&&o.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&o.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&o.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&o.off("resize",this._oldResizeHandler);const{roam:d}=t.get("mapOptions");function p(){if(r)return;const t=c(o);t&&Object.assign(l,{x:t.x,y:t.y})}function f(){if(r)return;const n=function(){const n=c(o);if(n){const{x:i,y:r}=n,o=i-l.x,u=r-l.y;return Object.assign(l,{x:i,y:r}),e.DomUtil.setPosition(a,{x:-i,y:-r}),s.setMapOffset([-i,-r]),t.__mapOffset=[-i,-r],{dx:o,dy:u}}}();if(n){const{dx:t,dy:e}=n;i.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function g(){r||i.dispatchAction({type:"leafletZoom"})}function m(){const t=i.getDom();u(a,t),h(a),i.dispatchAction({type:"leafletZoom"})}d&&"scale"!==d?o.dragging.enable():o.dragging.disable(),d&&"move"!==d?(o.scrollWheelZoom.enable(),o.doubleClickZoom.enable(),o.touchZoom.enable()):(o.scrollWheelZoom.disable(),o.doubleClickZoom.disable(),o.touchZoom.disable()),o.on("movestart",p),o.on("move",f),o.on("zoomend",g),o.on("resize",m),this._oldMoveStartHandler=p,this._oldMoveHandler=f,this._oldZoomEndHandler=g,this._oldResizeHandler=m,r=!1}})}function I(t,e,n){const{target:i}=t,r=i.position;r[0]+=e,r[1]+=n,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(i)}function D(t,e){const n=this._model,i=this._api,r=this._zr,o=this._coordSysMgr,a=this._scheduler,{colorTool:s,each:l,env:u}=e;if(!n)return;a.restoreData(n,t),a.performSeriesTasks(n),o.create(n,i),a.performDataProcessorTasks(n,t),function(t,e){const n=t._chartsMap,i=t._scheduler;e.eachSeries((t=>{i.updateStreamModes(t,n[t.__viewId])}))}(this,n),o.update(n,i),function(t){t.clearColorPalette(),t.eachSeries((t=>{t.clearColorPalette()}))}(n),a.performVisualTasks(n,t),function(t,e,n,i){(function(t,e,n,i,r){l(r||t._componentsViews,(t=>{const r=t.__model;t.render(r,e,n,i),c(r,t)}))})(t,e,n,i),l(t._chartsViews,(t=>{t.__alive=!1})),function(t,e,n,i,r){const o=t._scheduler;let a;e.eachSeries((e=>{const n=t._chartsMap[e.__viewId];n.__alive=!0;const s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),c(e,n),function(t,e){const n=t.get("blendMode")||null;e.group.traverse((t=>{t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((t=>{t.setStyle("blend",n)}))}))}(e,n)})),o.unfinished|=a,function(t,e){const n=t.storage;let i=0;n.traverse((t=>{t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!u.node&&n.traverse((t=>{t.isGroup||(t.useHoverLayer=!0)}))}(t._zr,e)}(t,e,0,i),l(t._chartsViews,(t=>{t.__alive||t.remove(e,n)}))}(this,n,i,t),r.refreshImmediately();let h=n.get("backgroundColor")||"transparent";if(u.canvasSupported)r.setBackgroundColor(h);else{const t=s.parse(h);h=s.stringify(t,"rgb"),0===t[3]&&(h="transparent")}function c(t,e){const n=t.get("z"),i=t.get("zlevel");e.group.traverse((t=>{"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}}function L(t,e,n){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:n}=this;return i=t,r=n.center,!(i&&r&&i[0]===r[0]&&i[1]===r[1]&&e===n.zoom);var i,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),A(t,e),t.registerCoordinateSystem("leaflet",C(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},((t,e)=>{e.scheduler.ecInstance._chartsViews.forEach((({group:e})=>{I({target:e},t.dx,t.dy)})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))})),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},((t,e)=>{const i=e.scheduler.ecInstance;D.call(i,t,n),i._chartsViews.forEach((({group:t})=>{I({target:t},-t.position[0],-t.position[1])})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))}))}L.version="1.0.0";const P=L,O=n(1092),{each:E}=n(3051),N=n(6387);class k{constructor(t,e){e&&"map"===e.render?e.render=M.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=M.prototype.graphRender);let n=new a(t);return Object.setPrototypeOf(M.prototype,n.utils),n.utils=new M,n.setUtils(),n.event=n.utils.createEvent(),n.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){const t=this.utils.getGUI(this);return t.init(),this.config.metadata&&(t.createAboutContainer(n),this.utils.updateMetadata.call(this)),this.config.switchMode&&(t.renderModeSelector.onclick=()=>{this.config.render===this.utils.mapRender?(this.config.render=this.utils.graphRender,this.echarts.dispose(),n=new k(this.data,{...this.config}),n.render()):(this.config.render=this.utils.mapRender,this.config.render(this.data,this))}),this.config.onClickElement=(e,n)=>{let i;i="node"===e?this.utils.nodeInfo(n):this.utils.linkInfo(n),t.getNodeLinkInfo(e,i),t.sideBar.classList.remove("hidden")},this.utils.hideLoading.call(this),this.config},...e}),n.echarts=s.S1(n.el,null,{renderer:n.config.svgRender?"svg":"canvas"}),n.config.onInit.call(n),n}}P(t,T(),{colorTool:O,each:E,env:N}),window.NetJSONGraph=k,window.echarts=t,window.L=T()})()})(); //# sourceMappingURL=netjsongraph.min.js.map \ No newline at end of file diff --git a/examples/data/floorplan.png b/examples/data/floorplan.png new file mode 100644 index 00000000..f49a2133 Binary files /dev/null and b/examples/data/floorplan.png differ diff --git a/examples/data/indoormap.jpg b/examples/data/indoormap.jpg deleted file mode 100644 index 3bad0823..00000000 Binary files a/examples/data/indoormap.jpg and /dev/null differ diff --git a/examples/data/netjson-elementsLegend.json b/examples/data/netjson-elementsLegend.json index 0088a1c0..882502b8 100644 --- a/examples/data/netjson-elementsLegend.json +++ b/examples/data/netjson-elementsLegend.json @@ -60,18 +60,6 @@ } ], "links": [ - { - "source": "172.16.146.6", - "target": "172.16.145.2", - "cost": 1.2939453125, - "properties": { - "lq": 0.9, - "nlq": 0.497, - "bitrate": "20 mbit/s", - "type": "fiber", - "time": "2019-04-06T20:06:54.000Z" - } - }, { "source": "172.16.146.6", "target": "172.16.146.4", @@ -92,18 +80,7 @@ "lq": 1.0, "nlq": 1.0, "bitrate": "30 mbit/s", - "type": "vpn" - } - }, - { - "source": "172.16.145.2", - "target": "172.16.146.7", - "cost": 12.739, - "properties": { - "lq": 0.345, - "nlq": 0.227, - "bitrate": "1 mbit/s", - "type": "wireless_weak" + "type": "ethernet" } }, { @@ -114,7 +91,7 @@ "lq": 1.0, "nlq": 1.0, "bitrate": "35 mbit/s", - "type": "wireless" + "type": "ethernet" } }, { @@ -136,7 +113,7 @@ "lq": 1.0, "nlq": 1.0, "bitrate": "32 mbit/s", - "type": "fiber" + "type": "wireless" } }, { @@ -160,17 +137,6 @@ "bitrate": "45 mbit/s", "type": "wireless" } - }, - { - "source": "172.16.146.7", - "target": "172.16.146.4", - "cost": 1.0, - "properties": { - "lq": 1.0, - "nlq": 1.0, - "bitrate": "39 mbit/s", - "type": "fiber" - } } ] } diff --git a/examples/data/netjsonmap-indoormap.json b/examples/data/netjsonmap-indoormap.json index 4e334f65..13ea82df 100644 --- a/examples/data/netjsonmap-indoormap.json +++ b/examples/data/netjsonmap-indoormap.json @@ -6,172 +6,62 @@ "metric": "ETX", "date": "2019-04-03T05:06:54.000Z", "nodes": [ - {"id": "172.16.138.1", "location": {"lng": 12.021, "lat": 46.8245}}, - { - "id": "172.16.181.10", - "location": {"lng": 14.384999999999998, "lat": 47.92375} - }, - { - "id": "172.16.49.3", - "location": {"lng": 28.918999999999997, "lat": 47.50749999999999} - }, - { - "id": "172.16.185.12", - "location": {"lng": 29.366, "lat": 49.70099999999999} - }, - { - "id": "wq35oo", - "location": {"lat": 49.75764874137261, "lng": 5.3064823150634775} - }, { "id": "i3ehd7", - "location": {"lat": 48.69096039092552, "lng": 12.458496093750002} - }, - { - "id": "t39e8p", - "location": {"lat": 50.190967765585604, "lng": 10.261230468750002} - }, - { - "id": "5lu7zw", - "location": {"lat": 46.31658418182218, "lng": 10.085449218750002} - }, - { - "id": "huj13q", - "location": {"lat": 45.78284835197676, "lng": 8.833007812500002} - }, - { - "id": "gjqoc0", - "location": {"lat": 45.85941212790755, "lng": 14.765625000000002} - }, - { - "id": "cl401j", - "location": {"lat": 49.374661232470956, "lng": 22.43107795715332} - }, - { - "id": "b95i1d", - "location": {"lat": 48.275310282737294, "lng": 21.002855300903324} - }, - { - "id": "1n30of", - "location": {"lat": 48.369536273943815, "lng": 32.203760147094734} - }, - { - "id": "6arfsx", - "location": {"lat": 49.87920553932855, "lng": 31.47866249084473} + "location": {"lat": 47.49, "lng": 12.298496093750002}, + "name": "Family room" }, { "id": "i74rhs", - "location": {"lat": 48.5007394591129, "lng": 29.17153358459473} - }, - { - "id": "ur8l3k", - "location": {"lat": 50.85651382037179, "lng": 20.444526672363285} - }, - { - "id": "jlgi7s", - "location": {"lat": 51.4354439242938, "lng": 6.096382141113282} + "location": {"lat": 48.5007394591129, "lng": 28.47153358459473}, + "name": "Lounge" }, { "id": "5vjb7b", - "location": {"lat": 47.363304126849265, "lng": 6.294136047363282} - }, - { - "id": "03z02m", - "location": {"lat": 49.67679293818404, "lng": 26.333198547363285} - }, - { - "id": "rfoycu", - "location": {"lat": 51.3119985247114, "lng": 30.683784484863285} - }, - { - "id": "zi8tv5", - "location": {"lat": 47.0123325207779, "lng": 30.722408294677738} + "location": {"lat": 47.863304126849265, "lng": 6.294136047363282}, + "name": "Bedroom 1" }, { "id": "liwv7p", - "location": {"lat": 46.19718091651456, "lng": 28.744869232177738} - }, - { - "id": "dhpay8", - "location": {"lat": 45.75434934033757, "lng": 32.34838485717774} - }, - { - "id": "xhg8ed", - "location": {"lat": 45.63156563882012, "lng": 30.129146575927738} - }, - { - "id": "3aj0w5", - "location": {"lat": 46.83224759932888, "lng": 26.130123138427738} + "location": {"lat": 44.89718091651456, "lng": 28.944869232177738}, + "name": "Bedroom 4" }, { "id": "m7qhnj", - "location": {"lat": 46.530760483351195, "lng": 22.109127044677738} + "location": {"lat": 47.530760483351195, "lng": 24.609127044677738}, + "name": "Study Area" }, { "id": "a0mg9w", - "location": {"lat": 46.47026114691636, "lng": 18.835201263427738} + "location": {"lat": 44.99, "lng": 18.435201263427738}, + "name": "Dining room" }, { "id": "dsm2x7", - "location": {"lat": 49.549382175122965, "lng": 15.345840454101564} - }, - { - "id": "mhfphx", - "location": {"lat": 49.59213053471149, "lng": 12.950820922851564} - }, - { - "id": "qf3hci", - "location": {"lat": 49.53512440198944, "lng": 20.553359985351566} + "location": {"lat": 50.559382175122965, "lng": 13.955840454101564}, + "name": "Bedroom 2" }, { "id": "nwlpcd", - "location": {"lat": 49.57788524115151, "lng": 18.839492797851566} - }, - { - "id": "lo621p", - "location": {"lat": 47.66087849116105, "lng": 8.973770141601564} - }, - { - "id": "rcaslg", - "location": {"lat": 47.823413360078675, "lng": 7.721328735351563} - }, - { - "id": "3iwfec", - "location": {"lat": 51.64113955167631, "lng": 10.358047485351564} - }, - { - "id": "2iz56s", - "location": {"lat": 51.72288115298209, "lng": 15.433731079101564} + "location": {"lat": 50.57788524115151, "lng": 19.339492797851566}, + "name": "Bedroom 3" }, { "id": "9p0bos", - "location": {"lat": 51.736490408464164, "lng": 25.936660766601562} + "location": {"lat": 51.736490408464164, "lng": 25.936660766601562}, + "name": "Garage" } ], "links": [ - {"source": "172.16.49.3", "target": "zi8tv5", "cost": 0.5}, - {"source": "xhg8ed", "target": "zi8tv5", "cost": 0.5}, - {"source": "dhpay8", "target": "zi8tv5", "cost": 0.5}, - {"source": "liwv7p", "target": "zi8tv5", "cost": 0.5}, - {"source": "rcaslg", "target": "5vjb7b", "cost": 1}, - {"source": "lo621p", "target": "rcaslg", "cost": 0.5}, - {"source": "huj13q", "target": "rcaslg", "cost": 1}, - {"source": "5lu7zw", "target": "lo621p", "cost": 1}, - {"source": "huj13q", "target": "5lu7zw", "cost": 0.5}, - {"source": "172.16.138.1", "target": "lo621p", "cost": 0.8}, - {"source": "nwlpcd", "target": "qf3hci", "cost": 0.5}, - {"source": "ur8l3k", "target": "qf3hci", "cost": 0.5}, - {"source": "cl401j", "target": "qf3hci", "cost": 0.5}, - {"source": "b95i1d", "target": "qf3hci", "cost": 0.5}, - {"source": "mhfphx", "target": "dsm2x7", "cost": 0.5}, - {"source": "172.16.181.10", "target": "dsm2x7", "cost": 0.5}, - {"source": "mhfphx", "target": "i3ehd7", "cost": 0.2}, - {"source": "jlgi7s", "target": "wq35oo", "cost": 0.5}, - {"source": "3iwfec", "target": "t39e8p", "cost": 0.5}, - {"source": "a0mg9w", "target": "m7qhnj", "cost": 1.5}, - {"source": "rfoycu", "target": "6arfsx", "cost": 0.8}, - {"source": "172.16.185.12", "target": "6arfsx", "cost": 0.5}, - {"source": "i74rhs", "target": "6arfsx", "cost": 0.5}, - {"source": "1n30of", "target": "6arfsx", "cost": 0.5} + {"source": "5vjb7b", "target": "i3ehd7", "cost": 1}, + {"source": "5vjb7b", "target": "dsm2x7", "cost": 1}, + {"source": "i3ehd7", "target": "dsm2x7", "cost": 1}, + {"source": "i3ehd7", "target": "a0mg9w", "cost": 1}, + {"source": "dsm2x7", "target": "nwlpcd", "cost": 0.9}, + {"source": "m7qhnj", "target": "9p0bos", "cost": 1}, + {"source": "m7qhnj", "target": "liwv7p", "cost": 1.2}, + {"source": "m7qhnj", "target": "i74rhs", "cost": 1.1}, + {"source": "nwlpcd", "target": "m7qhnj", "cost": 1}, + {"source": "a0mg9w", "target": "m7qhnj", "cost": 0.7} ] } diff --git a/examples/data/netjsonmap.json b/examples/data/netjsonmap.json index 59447159..50bdda86 100644 --- a/examples/data/netjsonmap.json +++ b/examples/data/netjsonmap.json @@ -294,22 +294,42 @@ } ], "links": [ - {"source": "172.16.146.6", "target": "172.16.146.4", "cost": 1}, + { + "source": "172.16.146.6", + "target": "172.16.146.4", + "cost": 1 + }, {"source": "172.16.139.4", "target": "172.16.138.1", "cost": 1.02734375}, {"source": "172.16.135.15", "target": "10.123.10.10", "cost": 1}, {"source": "192.168.145.145", "target": "10.254.254.2", "cost": 1}, {"source": "172.16.186.249", "target": "172.16.159.187", "cost": 1}, {"source": "172.16.186.249", "target": "172.16.159.50", "cost": 1}, {"source": "172.16.12.10", "target": "172.16.12.12", "cost": 1}, - {"source": "172.16.177.31", "target": "172.16.155.4", "cost": 1.1796875}, - {"source": "10.183.1.11", "target": "172.16.145.3", "cost": 1}, + { + "source": "172.16.177.31", + "target": "172.16.155.4", + "cost": 1.1796875 + }, + { + "source": "10.183.1.11", + "target": "172.16.145.3", + "cost": 1, + "properties": { + "status": "down" + } + }, {"source": "172.16.200.67", "target": "172.16.200.2", "cost": 1}, {"source": "172.16.185.11", "target": "192.168.176.10", "cost": 1}, {"source": "172.16.159.187", "target": "172.16.159.50", "cost": 1}, {"source": "172.16.159.187", "target": "172.16.39.31", "cost": 1.36328125}, - {"source": "10.254.254.4", "target": "10.254.254.2", "cost": 1}, - {"source": "10.254.254.2", "target": "10.254.254.4", "cost": 1}, - {"source": "10.254.254.2", "target": "10.254.254.4", "cost": 1.3}, + { + "source": "10.254.254.2", + "target": "10.254.254.4", + "cost": 1.3, + "properties": { + "status": "down" + } + }, {"source": "172.16.171.1", "target": "172.16.169.1", "cost": 1.1181640625}, {"source": "172.16.155.5", "target": "172.16.155.4", "cost": 1}, {"source": "172.16.155.5", "target": "172.16.44.10", "cost": 1.1328125}, @@ -319,7 +339,14 @@ {"source": "10.149.3.3", "target": "172.16.146.4", "cost": 1.26171875}, {"source": "172.16.185.13", "target": "10.185.1.1", "cost": 1}, {"source": "172.16.185.13", "target": "10.185.1.11", "cost": 1}, - {"source": "10.185.1.11", "target": "10.185.1.1", "cost": 1}, + { + "source": "10.185.1.11", + "target": "10.185.1.1", + "cost": 1, + "properties": { + "status": "down" + } + }, { "source": "172.16.133.11", "target": "192.168.176.10", diff --git a/examples/netjson-dateParse.html b/examples/netjson-dateParse.html index 761277f1..51408f5c 100644 --- a/examples/netjson-dateParse.html +++ b/examples/netjson-dateParse.html @@ -1,51 +1,70 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + + - - + - + dateNode.setAttribute("title", dateResult); + dateNode.setAttribute("class", "njg-date"); + dateNode.innerHTML = "Incoming Time: " + dateResult; + _this.el.appendChild(dateNode); + })(graph) + + + + \ No newline at end of file diff --git a/examples/netjson-multipleInterfaces.html b/examples/netjson-multipleInterfaces.html index 704439e6..24ea4a51 100644 --- a/examples/netjson-multipleInterfaces.html +++ b/examples/netjson-multipleInterfaces.html @@ -1,12 +1,15 @@ + netjsongraph.js: basic example + + - + + \ No newline at end of file diff --git a/examples/netjson-searchElements.html b/examples/netjson-searchElements.html index 5a87d045..0e90261d 100644 --- a/examples/netjson-searchElements.html +++ b/examples/netjson-searchElements.html @@ -1,67 +1,140 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + }; + } + this.config.onClickElement = (type, data) => { + let nodeLinkData; + if (type === "node") { + nodeLinkData = this.utils.nodeInfo(data); + } else { + nodeLinkData = this.utils.linkInfo(data); + } + gui.getNodeLinkInfo(type, nodeLinkData); + gui.sideBar.classList.remove("hidden"); + }; + + this.utils.hideLoading(); + }, + }); + + graph.render(); + + + + \ No newline at end of file diff --git a/examples/netjson-switchGraphMode.html b/examples/netjson-switchGraphMode.html index 07a4f224..8fd7bee0 100644 --- a/examples/netjson-switchGraphMode.html +++ b/examples/netjson-switchGraphMode.html @@ -1,102 +1,56 @@ + - netjsongraph.js: basic example - - - - - - - + netjsongraph.js: basic example + + + + + + + + - - - + + - return selectIconContainer; - } - - + \ No newline at end of file diff --git a/examples/netjson-switchRenderMode.html b/examples/netjson-switchRenderMode.html index 21c904dd..1e214626 100644 --- a/examples/netjson-switchRenderMode.html +++ b/examples/netjson-switchRenderMode.html @@ -1,75 +1,147 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + + - - + - + // reDraw + _this.echarts.dispose(); + const graph = new NetJSONGraph(_this.data, { + ..._this.config, + el: _this.el, + }); + graph.render(); + }; + if (_this.config.svgRender) { + checkInput.checked = true; + } else { + checkInput.checked = false; + } + switchWrapper.appendChild(canvasMode); + switchWrapper.appendChild(checkInput); + switchWrapper.appendChild(checkLabel); + switchWrapper.appendChild(svgMode); + _this.el.appendChild(switchWrapper); + + return switchWrapper; + } + + + + \ No newline at end of file diff --git a/examples/netjsongraph-elementsLegend.html b/examples/netjsongraph-elementsLegend.html index 55863609..a432dd45 100644 --- a/examples/netjsongraph-elementsLegend.html +++ b/examples/netjsongraph-elementsLegend.html @@ -1,156 +1,226 @@ - + - netjsongraph.js: basic example - - - - - + netjsongraph.js: basic example + + + + + + + + -
-

  ordinary node

-

  gateway node

-

  wireless link

-

  weak wireless link

-

  ethernet link

-

  fiber link

-

  vpn link

-
-
- - - + }, + }); + + graph.render(); + + + + \ No newline at end of file diff --git a/examples/netjsongraph-graphGL.html b/examples/netjsongraph-graphGL.html index fb5c592a..14fcf02d 100644 --- a/examples/netjsongraph-graphGL.html +++ b/examples/netjsongraph-graphGL.html @@ -1,73 +1,78 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + - - + - + graph.render(); + + + \ No newline at end of file diff --git a/examples/netjsongraph-multipleLinks.html b/examples/netjsongraph-multipleLinks.html index f4d94c29..62ad2466 100644 --- a/examples/netjsongraph-multipleLinks.html +++ b/examples/netjsongraph-multipleLinks.html @@ -1,12 +1,15 @@ + netjsongraph.js: basic example + + - + + \ No newline at end of file diff --git a/examples/netjsongraph-nodeExpand.html b/examples/netjsongraph-nodeExpand.html index 4f32155f..100038a9 100644 --- a/examples/netjsongraph-nodeExpand.html +++ b/examples/netjsongraph-nodeExpand.html @@ -1,114 +1,131 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + - - + + - graph.echarts.setOption(graph.utils.generateGraphOption(JSONData, graph)); - } - } - - + \ No newline at end of file diff --git a/examples/netjsongraph.html b/examples/netjsongraph.html index a72e5e53..c658aa73 100644 --- a/examples/netjsongraph.html +++ b/examples/netjsongraph.html @@ -1,19 +1,151 @@ + - netjsongraph.js: basic example - - - - + netjsongraph.js: basic example + + + + + + + - - - + + + + + \ No newline at end of file diff --git a/examples/netjsonmap-animation.html b/examples/netjsonmap-animation.html index 3f23be67..ab349280 100644 --- a/examples/netjsonmap-animation.html +++ b/examples/netjsonmap-animation.html @@ -1,136 +1,87 @@ - - netjsongraph.js: Dark Colors - - - - - - - - - - + + - graph.render(); - - - + \ No newline at end of file diff --git a/examples/netjsonmap-appendData.html b/examples/netjsonmap-appendData.html index 564bcd96..13e883c3 100644 --- a/examples/netjsonmap-appendData.html +++ b/examples/netjsonmap-appendData.html @@ -1,94 +1,128 @@ + - netjsongraph.js: basic example - - - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + Reflect.deleteProperty(tilesMap, curZoom); + } + }); + + this.utils.hideLoading(); + }, + }); + + map.render(); + + + + \ No newline at end of file diff --git a/examples/netjsonmap-appendData2.html b/examples/netjsonmap-appendData2.html index 46662fe5..6484f595 100644 --- a/examples/netjsonmap-appendData2.html +++ b/examples/netjsonmap-appendData2.html @@ -1,59 +1,63 @@ + - netjsongraph.js: basic example - - - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + }); + }, + }, + ); + + map.render(); + + + + \ No newline at end of file diff --git a/examples/netjsonmap-indoormap.html b/examples/netjsonmap-indoormap.html index 7f2e8236..abd71275 100644 --- a/examples/netjsonmap-indoormap.html +++ b/examples/netjsonmap-indoormap.html @@ -1,97 +1,124 @@ - - netjsongraph.js: Dark Colors - - - - - - - - - - - + + - graph.render(); - - - + \ No newline at end of file diff --git a/examples/netjsonmap-indoormap2.html b/examples/netjsonmap-indoormap2.html deleted file mode 100644 index 882e1b8d..00000000 --- a/examples/netjsonmap-indoormap2.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - netjsongraph.js: Dark Colors - - - - - - - - - - - - - - diff --git a/examples/netjsonmap-multipleTiles.html b/examples/netjsonmap-multipleTiles.html index 5065edb3..d1669407 100644 --- a/examples/netjsonmap-multipleTiles.html +++ b/examples/netjsonmap-multipleTiles.html @@ -1,62 +1,86 @@ + - netjsongraph.js: basic example - - - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + }, + }); + + map.render(); + + + + \ No newline at end of file diff --git a/examples/netjsonmap-nodeTiles.html b/examples/netjsonmap-nodeTiles.html index 7c1fe93c..01624100 100644 --- a/examples/netjsonmap-nodeTiles.html +++ b/examples/netjsonmap-nodeTiles.html @@ -1,113 +1,143 @@ + - netjsongraph.js: basic example - - - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + if (typeof tilesMap[curZoom] === "string") { + // json update function + this.utils + .JSONParamParse(folderName + tilesMap[curZoom]) + .then((JSONData) => { + // store the data. + tilesMap[curZoom] = JSONData; + this.utils.JSONDataUpdate.call(this, tilesMap[curZoom]); + }) + .catch((error) => { + console.error(error); + }); + } else { + this.utils.JSONDataUpdate.call(this, tilesMap[curZoom]); + } + } + }); + + this.utils.hideLoading(); + }, + }); + + map.render(); + + + + \ No newline at end of file diff --git a/examples/netjsonmap-plugins.html b/examples/netjsonmap-plugins.html index 6a94837b..cf5821d6 100644 --- a/examples/netjsonmap-plugins.html +++ b/examples/netjsonmap-plugins.html @@ -1,142 +1,174 @@ - - netjsongraph.js: Dark Colors - - - - - - - - - - - - - - + + + + - graph.render(); - - - + \ No newline at end of file diff --git a/examples/netjsonmap.html b/examples/netjsonmap.html index 2565215c..7b0b8ebb 100644 --- a/examples/netjsonmap.html +++ b/examples/netjsonmap.html @@ -1,59 +1,150 @@ + - netjsongraph.js: basic example - - - - - - + netjsongraph.js: basic example + + + + + + + + - - + - + }, + }); + + const createLegends = (key, name) => { + const legendItem = document.createElement("p"); + const legendIcon = document.createElement("span"); + + legendIcon.setAttribute("class", name); + + legends.appendChild(legendItem); + legendItem.appendChild(legendIcon); + + legendItem.innerHTML += key; + return legendItem; + }; + const legends = document.createElement("div"); + const legendsHeader = document.createElement("h4"); + legends.setAttribute("id", "legend"); + legendsHeader.innerHTML = "Legends"; + legends.appendChild(legendsHeader); + legends.appendChild(createLegends("Up", "link-up")); + legends.appendChild(createLegends("Down", "link-down")); + + document.body.appendChild(legends); + + map.render(); + + + + \ No newline at end of file diff --git a/examples/realtime_update/assets/netjsongraph-theme.css b/examples/realtime_update/assets/netjsongraph-theme.css index 447b1c91..087210a6 100755 --- a/examples/realtime_update/assets/netjsongraph-theme.css +++ b/examples/realtime_update/assets/netjsongraph-theme.css @@ -26,9 +26,10 @@ p { .switch-wrap { position: absolute; - left: 50px; - bottom: 45px; + right: 40px; + bottom: 30px; z-index: 1; + color: #fff; } .switch-wrap input[type="checkbox"] { @@ -78,9 +79,10 @@ p { } .njg-date { position: absolute; - right: 0; + right: 20px; bottom: 20px; z-index: 1; + color: #fff; } @font-face { @@ -104,8 +106,13 @@ p { -moz-osx-font-smoothing: grayscale; } -.icon-eye:hover { - color: red; +.iconfont { + font-family: "iconfont" !important; + font-size: 30px; + font-style: normal; + cursor: pointer; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .icon-eye:before { @@ -115,21 +122,25 @@ p { } .njg-selectIcon { - position: absolute; - right: 20px; - top: 20px; - z-index: 999; width: 35px; height: 35px; line-height: 35px; text-align: center; - background: #fbfbfb; - border-radius: 4px; - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); - border: 1px solid #ccc; - color: #6d6357; + background: rgba(217, 79, 52, 0.85); + border-radius: 5px; + border: 0; + color: #ffffff; +} +.njg-controls { + display: flex; + justify-content: space-between; + align-items: center; + position: absolute; + right: 10px; + top: 20px; + z-index: 999; + background-color: inherit; } - .njg-searchInput { width: 250px; height: 20px; @@ -141,7 +152,138 @@ p { } .njg-searchContainer { position: absolute; - left: 300px; + left: 550px; top: 10px; z-index: 1; } + +.njg-sideBar { + position: absolute; + left: 0; + top: 0; + width: 350px; + height: 100%; + z-index: 1000; + background-color: #fff; + transition: left 0.5s; + display: flex; + flex-direction: column; + user-select: text; +} + +.hidden { + left: -500px; +} + +.sideBarHandle { + background: rgba(217, 79, 52, 0.85); + position: fixed; + top: 15px; + left: 370px; + border: 0; + border-radius: 5px; + outline: none; + font-size: 24px; + width: 45px; + height: 45px; + cursor: pointer; + padding: 0; + transition: all 0.5s; + transform: rotateY(180deg); +} + +.sideBarHandle::before { + content: "\27A4"; + color: #fff; +} + +.hidden .sideBarHandle { + left: 15px; + transform: rotateY(0deg); +} + +.njg-aboutContainer, +.njg-nodeLinkInfoContainer { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 20px 0px; +} + +.njg-metaData, +.njg-infoContainer { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + background-color: inherit; + padding: 0 20px; + margin-top: 20px; +} + +.njg-keyLabel { + font-size: 14px; + font-weight: 600; + flex: 1 1 50%; + word-break: break-word; +} + +.njg-valueLabel { + flex: 1 1 50%; + word-break: break-word; +} + +.njg-metaDataItems, +.njg-infoItems { + display: flex; + align-items: center; + width: 100%; + text-transform: capitalize; + padding: 5px 0; +} + +.njg-tooltip { + background: #fff !important; + border: none !important; +} + +.njg-tooltip-item { + display: flex; + align-items: center; + width: 100%; + padding: 1px 0; + flex-wrap: wrap; +} + +.njg-tooltip-key { + display: inline-flex; + flex-basis: 40%; + flex-wrap: wrap; + text-transform: capitalize; + font-weight: 600; + color: #000; +} +.njg-tooltip-value { + display: inline-flex; + align-items: center; + flex-wrap: wrap; + flex-basis: 60%; + color: #000; +} + +.njg-headerContainer { + display: flex; + align-items: center; + justify-content: center; + text-transform: capitalize; + width: 100%; + padding: 0 15px; + position: relative; +} + +.njg-headerContainer #closeButton { + position: absolute; + right: 20px; + cursor: pointer; +} diff --git a/examples/realtime_update/assets/netjsongraph.css b/examples/realtime_update/assets/netjsongraph.css index 0f24293e..a29c35b2 100755 --- a/examples/realtime_update/assets/netjsongraph.css +++ b/examples/realtime_update/assets/netjsongraph.css @@ -2,6 +2,7 @@ margin: 0; padding: 0; outline: none; + box-sizing: border-box; } html, body { @@ -73,7 +74,6 @@ body { height: 100%; width: 100%; z-index: 100; - /* background-color: red; */ } .loadingElement { @@ -99,7 +99,53 @@ body { text-align: center; } -.njg-tooltip { - background: rgba(251, 251, 251, 0.9) !important; +.leaflet-control-zoom { + top: 5px; + border: 0 !important; +} + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + background: rgba(217, 79, 52, 0.85) !important; + color: #fff !important; +} + +.leaflet-control-zoom-in { + border-top-left-radius: 5px !important; + border-top-right-radius: 5px !important; +} + +.leaflet-control-zoom-out { + border-bottom-left-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +.leaflet-control-layers { + background: rgba(217, 79, 52, 0.85) !important; + color: #fff !important; border: none !important; + right: 3px !important; +} + +.leaflet-control-layers-toggle { + height: 35px !important; + width: 35px !important; + background-size: 20px 20px !important; +} + +.leaflet-zoom-animated { + transform-origin: 0 0 !important; +} + +.leaflet-zoom-anim > .leaflet-zoom-animated { + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) !important; + will-change: transform !important; +} + +.leaflet-zoom-anim > .leaflet-zoom-hide { + visibility: hidden !important; +} + +.leaflet-zoom-anim > .leaflet-tile { + transition: none !important; } diff --git a/examples/realtime_update/assets/netjsongraph.min.js b/examples/realtime_update/assets/netjsongraph.min.js index fd2f51bf..406baac5 100644 --- a/examples/realtime_update/assets/netjsongraph.min.js +++ b/examples/realtime_update/assets/netjsongraph.min.js @@ -1,9 +1,9 @@ -(()=>{var t={3721:(t,e,n)=>{var i;self,t.exports=(i=n(125),(()=>{"use strict";var t={468:(t,e,n)=>{n.r(e);var i=n(83);function r(t,e,n){"object"==typeof e&&(n=e,e=null);var i,r=this;if(!(t instanceof Function))for(var s in i=[],t)t.hasOwnProperty(s)&&i.push(s);var l=function(e){if(r.apply(this,arguments),t instanceof Function?o(this,t.call(this,e)):a(this,t,i),this.constructor===l)for(var n=l.__initializers__,s=0;s=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}};var z,B={supportWebGL:function(){if(null==z)try{var t=document.createElement("canvas");if(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))throw new Error}catch(t){z=!1}return z}};B.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,B.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,B.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,B.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,B.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,B.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,B.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var Z={};"undefined"!=typeof window?Z=window:void 0!==n.g&&(Z=n.g),B.requestAnimationFrame=Z.requestAnimationFrame||Z.msRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},B.createCanvas=function(){return document.createElement("canvas")},B.createImage=function(){return new Z.Image},B.request={get:R.get},B.addEventListener=function(t,e,n,i){t.addEventListener(e,n,i)},B.removeEventListener=function(t,e,n){t.removeEventListener(e,n)};const F=B;var V=function(){this.head=null,this.tail=null,this._length=0};V.prototype.insert=function(t){var e=new V.Entry(t);return this.insertEntry(e),e},V.prototype.insertAt=function(t,e){if(!(t<0)){for(var n=this.head,i=0;n&&i!=t;)n=n.next,i++;if(n){var r=new V.Entry(e),o=n.prev;o?(o.next=r,r.prev=o):this.head=r,r.next=n,n.prev=r}else this.insert(e)}},V.prototype.insertBeforeEntry=function(t,e){var n=new V.Entry(t),i=e.prev;i?(i.next=n,n.prev=i):this.head=n,n.next=e,e.prev=n,this._length++},V.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},V.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._length--},V.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e?(this.remove(e),e.value):void 0}},V.prototype.getHead=function(){if(this.head)return this.head.value},V.prototype.getTail=function(){if(this.tail)return this.tail.value},V.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e.value}},V.prototype.indexOf=function(t){for(var e=this.head,n=0;e;){if(e.value===t)return n;e=e.next,n++}},V.prototype.length=function(){return this._length},V.prototype.isEmpty=function(){return 0===this._length},V.prototype.forEach=function(t,e){for(var n=this.head,i=0,r=void 0!==e;n;)r?t.call(e,n.value,i):t(n.value,i),n=n.next,i++},V.prototype.clear=function(){this.tail=this.head=null,this._length=0},V.Entry=function(t){this.value=t,this.next=null,this.prev=null};const G=V;var H=function(t){this._list=new G,this._map={},this._maxSize=t||10};H.prototype.setMaxSize=function(t){this._maxSize=t},H.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var n=this._list.length();if(n>=this._maxSize&&n>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},H.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},H.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},H.prototype.clear=function(){this._list.clear(),this._map={}};const U=H;var W={},j={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 X(t){return(t=Math.round(t))<0?0:t>255?255:t}function Y(t){return t<0?0:t>1?1:t}function q(t){return t.length&&"%"===t.charAt(t.length-1)?X(parseFloat(t)/100*255):X(parseInt(t,10))}function K(t){return t.length&&"%"===t.charAt(t.length-1)?Y(parseFloat(t)/100):Y(parseFloat(t))}function J(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Q(t,e,n){return t+(e-t)*n}function $(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function tt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var et=new U(20),nt=null;function it(t,e){nt&&tt(nt,e),nt=et.put(t,nt||e.slice())}function rt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=K(t[1]),r=K(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return $(e=e||[],X(255*J(a,o,n+1/3)),X(255*J(a,o,n)),X(255*J(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}W.parse=function(t,e){if(t){e=e||[];var n=et.get(t);if(n)return tt(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in j)return tt(e,j[r]),it(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?($(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),it(t,e),e):void $(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?($(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),it(t,e),e):void $(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void $(e,0,0,0,1);u=K(l.pop());case"rgb":return 3!==l.length?void $(e,0,0,0,1):($(e,q(l[0]),q(l[1]),q(l[2]),u),it(t,e),e);case"hsla":return 4!==l.length?void $(e,0,0,0,1):(l[3]=K(l[3]),rt(l,e),it(t,e),e);case"hsl":return 3!==l.length?void $(e,0,0,0,1):(rt(l,e),it(t,e),e);default:return}}$(e,0,0,0,1)}},W.parseToFloat=function(t,e){if(e=W.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},W.lift=function(t,e){var n=W.parse(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return W.stringify(n,4===n.length?"rgba":"rgb")}},W.toHex=function(t){var e=W.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},W.fastLerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=X(Q(a[0],s[0],l)),n[1]=X(Q(a[1],s[1],l)),n[2]=X(Q(a[2],s[2],l)),n[3]=Y(Q(a[3],s[3],l)),n}},W.fastMapToColor=W.fastLerp,W.lerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=W.parse(e[r]),s=W.parse(e[o]),l=i-r,u=W.stringify([X(Q(a[0],s[0],l)),X(Q(a[1],s[1],l)),X(Q(a[2],s[2],l)),Y(Q(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}},W.mapToColor=W.lerp,W.modifyHSL=function(t,e,n,i){if(t=W.parse(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(t[1]=K(n)),null!=i&&(t[2]=K(i)),W.stringify(rt(t),"rgba");var r},W.modifyAlpha=function(t,e){if((t=W.parse(t))&&null!=e)return t[3]=Y(e),W.stringify(t,"rgba")},W.stringify=function(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}};var ot=W.parseToFloat,at={};function st(t){var e=Object.keys(t);e.sort();for(var n=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var n in t){var i=t[n];this.setUniform(n,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var n=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var r=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=p.clone(t.vertexDefines),this.fragmentDefines=p.clone(t.fragmentDefines),e){for(var a in n)i[a]&&(i[a].value=n[a].value);p.defaults(this.vertexDefines,r),p.defaults(this.fragmentDefines,o)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:!(!e||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=p.clone(this.vertexDefines),t.fragmentDefines=p.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,n){var i=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(n=e,e=t,t="both"),n=null!=n?n:null,"vertex"!==t&&"both"!==t||i[e]!==n&&(i[e]=n,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==n&&(r[e]=n,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},pt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},pt.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},pt.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},pt.random=function(t,e){e=e||1;var n=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},pt.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},pt.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},pt.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},pt.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},pt.forEach=(ut=pt.create(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0&&i.push("#define "+r.toUpperCase()+"_COUNT "+o)}if(n)for(var a=0;al.getMaxJointNumber()&&(d.USE_SKIN_MATRICES_TEXTURE=null),c+="\n"+Mt(d)+"\n"}o&&(c+="\n#define INSTANCING\n");var p=c+Mt(e.vertexDefines,s,h),f=c+Mt(e.fragmentDefines,s,h),g=p+"\n"+e.shader.vertex,m=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=l.getGLExtension(t)}));m.indexOf("EXT_shader_texture_lod")>=0&&(f+="\n#define SUPPORT_TEXTURE_LOD"),m.indexOf("OES_standard_derivatives")>=0&&(f+="\n#define SUPPORT_STANDARD_DERIVATIVES");var v,y,_=function(t){for(var e=[],n=0;n=0){if(1!==s&&4!==s){Vt();break}s=2,u=[]}else if(1!==s)if(4!==s)h(c),s=0;else{var d=c;Nt.indexOf(d)>=0||kt.indexOf(d)>=0||Rt.indexOf(d)>=0?l[a].semantic=d:"ignore"===d||"unconfigurable"===d?l[a].ignore=!0:l[a].value="bool"===t?"true"===d:parseFloat(d)}else l[a].value="bool"===t?"true"===c:parseFloat(c),u=null;else{if(2!==s){Vt();break}if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else l[a].value=new F.Float32Array(u),u=null,s=5;else if(2===s){if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else s=5;else s=4;else{if(0!==s&&3!==s){Vt();break}s=1}}return l}function Ht(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=Ft(t),e=Ft(e),this._shaderID=function(t,e){var n="vertex:"+t+"fragment:"+e;if(Bt[n])return Bt[n];var i=p.genGUID();return Bt[n]=i,Zt[i]={vertex:t,fragment:e},i}(t,e),this._vertexCode=Ht.parseImport(t),this._fragmentCode=Ht.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}Ht.prototype={constructor:Ht,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var n=this.uniformTemplates[e];t[e]={type:n.type,value:n.value()}}return t},_parseImport:function(){this._vertexCode=Ht.parseImport(this.vertex),this._fragmentCode=Ht.parseImport(this.fragment)},_addSemanticUniform:function(t,e,n){if(Nt.indexOf(n)>=0)this.attributeSemantics[n]={symbol:t,type:e};else if(Rt.indexOf(n)>=0){var i=!1,r=n;n.match(/TRANSPOSE$/)&&(i=!0,r=n.slice(0,-9)),this.matrixSemantics[n]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:r}}else kt.indexOf(n)>=0&&(this.uniformSemantics[n]={symbol:t,type:e})},_addMaterialUniform:function(t,e,n,i,r,o){o[t]={type:n,value:r?Et.array:i||Et[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function n(t){return null!=t?function(){return t}:null}function i(i,r,o){var a=Gt(r,o),s=[];for(var l in a){var u=a[l],h=u.semantic,c=l,d=Pt[r],p=n(a[l].value);a[l].isArray&&(c+="["+a[l].arraySize+"]",d+="v"),s.push(c),e._uniformList.push(l),u.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[l]={shaderType:"fragment",type:r}),h?e._addSemanticUniform(l,d,h):e._addMaterialUniform(l,r,d,p,a[l].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(Dt,i),this._fragmentCode=this._fragmentCode.replace(Dt,i),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(It,(function(n,i,r){var o=Gt(i,r),a=zt[i]||1,s=[];for(var l in o){var u=o[l].semantic;if(t[l]={type:"float",size:a,semantic:u||null},u){if(Nt.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:i}}s.push(l)}return"attribute "+i+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,n,i){var r=t.fragmentDefines;return r[n]||(r[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}this._vertexCode=this._vertexCode.replace(Lt,e),this._fragmentCode=this._fragmentCode.replace(Lt,e)},clone:function(){var t=Zt[this._shaderID];return new Ht(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(Ht.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(Ht.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(Ht.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(Ht.prototype,"uniforms",{get:function(){return this._uniformList}}));var Ut=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;Ht.parseImport=function(t){return t.replace(Ut,(function(t,e,n){return(t=Ht.source(n))?Ht.parseImport(t):(console.error('Shader chunk "'+n+'" not existed in library'),"")}))};var Wt=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;Ht.import=function(t){t.replace(Wt,(function(t,e,n,i){if(i=i.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,o=n.split("."),a=Ht.codes,s=0;s 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n}\n@end";var Yt={create:function(){var t=new ct(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},clone:function(t){var e=new ct(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},transpose:function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15],y=n*s-i*a,_=n*l-r*a,x=n*u-o*a,b=i*l-r*s,w=i*u-o*s,S=r*u-o*l,T=h*g-c*f,M=h*m-d*f,A=h*v-p*f,C=c*m-d*g,D=c*v-p*g,I=d*v-p*m,L=y*I-_*D+x*C+b*A-w*M+S*T;return L?(L=1/L,t[0]=(s*I-l*D+u*C)*L,t[1]=(r*D-i*I-o*C)*L,t[2]=(g*S-m*w+v*b)*L,t[3]=(d*w-c*S-p*b)*L,t[4]=(l*A-a*I-u*M)*L,t[5]=(n*I-r*A+o*M)*L,t[6]=(m*x-f*S-v*_)*L,t[7]=(h*S-d*x+p*_)*L,t[8]=(a*D-s*A+u*T)*L,t[9]=(i*A-n*D-o*T)*L,t[10]=(f*w-g*x+v*y)*L,t[11]=(c*x-h*w-p*y)*L,t[12]=(s*M-a*C-l*T)*L,t[13]=(n*C-i*M+r*T)*L,t[14]=(g*_-f*b-m*y)*L,t[15]=(h*b-c*_+d*y)*L,t):null},adjoint:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15];return t[0]=s*(d*v-p*m)-c*(l*v-u*m)+g*(l*p-u*d),t[1]=-(i*(d*v-p*m)-c*(r*v-o*m)+g*(r*p-o*d)),t[2]=i*(l*v-u*m)-s*(r*v-o*m)+g*(r*u-o*l),t[3]=-(i*(l*p-u*d)-s*(r*p-o*d)+c*(r*u-o*l)),t[4]=-(a*(d*v-p*m)-h*(l*v-u*m)+f*(l*p-u*d)),t[5]=n*(d*v-p*m)-h*(r*v-o*m)+f*(r*p-o*d),t[6]=-(n*(l*v-u*m)-a*(r*v-o*m)+f*(r*u-o*l)),t[7]=n*(l*p-u*d)-a*(r*p-o*d)+h*(r*u-o*l),t[8]=a*(c*v-p*g)-h*(s*v-u*g)+f*(s*p-u*c),t[9]=-(n*(c*v-p*g)-h*(i*v-o*g)+f*(i*p-o*c)),t[10]=n*(s*v-u*g)-a*(i*v-o*g)+f*(i*u-o*s),t[11]=-(n*(s*p-u*c)-a*(i*p-o*c)+h*(i*u-o*s)),t[12]=-(a*(c*m-d*g)-h*(s*m-l*g)+f*(s*d-l*c)),t[13]=n*(c*m-d*g)-h*(i*m-r*g)+f*(i*d-r*c),t[14]=-(n*(s*m-l*g)-a*(i*m-r*g)+f*(i*l-r*s)),t[15]=n*(s*d-l*c)-a*(i*d-r*c)+h*(i*l-r*s),t},determinant:function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],m=t[15];return(e*a-n*o)*(c*m-d*g)-(e*s-i*o)*(h*m-d*f)+(e*l-r*o)*(h*g-c*f)+(n*s-i*a)*(u*m-d*p)-(n*l-r*a)*(u*g-c*p)+(i*l-r*s)*(u*f-h*p)},multiply:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],g=e[12],m=e[13],v=e[14],y=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*i+x*s+b*c+w*g,t[1]=_*r+x*l+b*d+w*m,t[2]=_*o+x*u+b*p+w*v,t[3]=_*a+x*h+b*f+w*y,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*i+x*s+b*c+w*g,t[5]=_*r+x*l+b*d+w*m,t[6]=_*o+x*u+b*p+w*v,t[7]=_*a+x*h+b*f+w*y,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*i+x*s+b*c+w*g,t[9]=_*r+x*l+b*d+w*m,t[10]=_*o+x*u+b*p+w*v,t[11]=_*a+x*h+b*f+w*y,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*i+x*s+b*c+w*g,t[13]=_*r+x*l+b*d+w*m,t[14]=_*o+x*u+b*p+w*v,t[15]=_*a+x*h+b*f+w*y,t},multiplyAffine:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],h=e[9],c=e[10],d=e[12],p=e[13],f=e[14],g=n[0],m=n[1],v=n[2];return t[0]=g*i+m*a+v*u,t[1]=g*r+m*s+v*h,t[2]=g*o+m*l+v*c,g=n[4],m=n[5],v=n[6],t[4]=g*i+m*a+v*u,t[5]=g*r+m*s+v*h,t[6]=g*o+m*l+v*c,g=n[8],m=n[9],v=n[10],t[8]=g*i+m*a+v*u,t[9]=g*r+m*s+v*h,t[10]=g*o+m*l+v*c,g=n[12],m=n[13],v=n[14],t[12]=g*i+m*a+v*u+d,t[13]=g*r+m*s+v*h+p,t[14]=g*o+m*l+v*c+f,t}};Yt.mul=Yt.multiply,Yt.mulAffine=Yt.multiplyAffine,Yt.translate=function(t,e,n){var i,r,o,a,s,l,u,h,c,d,p,f,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=h,t[8]=c,t[9]=d,t[10]=p,t[11]=f,t[12]=i*g+s*m+c*v+e[12],t[13]=r*g+l*m+d*v+e[13],t[14]=o*g+u*m+p*v+e[14],t[15]=a*g+h*m+f*v+e[15]),t},Yt.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},Yt.rotate=function(t,e,n,i){var r,o,a,s,l,u,h,c,d,p,f,g,m,v,y,_,x,b,w,S,T,M,A,C,D=i[0],I=i[1],L=i[2],P=Math.sqrt(D*D+I*I+L*L);return Math.abs(P)0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},Kt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},Kt.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},Kt.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},Kt.random=function(t,e){e=e||1;var n=2*dt()*Math.PI,i=2*dt()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t},Kt.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},Kt.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},Kt.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Kt.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.forEach=function(){var t=Kt.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=3),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s1?0:Math.acos(r)};const Jt=Kt;jt.import(Xt);var Qt=qt.create,$t={};function te(t){return t.material}function ee(t,e,n){return e.uniforms[n].value}function ne(t,e,n,i){return n!==i}function ie(t){return!0}function re(){}var oe={float:T,byte:5120,ubyte:S,short:5122,ushort:5123};function ae(t,e,n){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=n,this.vao=null}function se(t){var e,n;this.bind=function(t){e||((e=F.createCanvas()).width=e.height=1,e.getContext("2d"));var i=t.gl,r=!n;r&&(n=i.createTexture()),i.bindTexture(i.TEXTURE_2D,n),r&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var le=g.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=F.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new y(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new Ct(this),this._placeholderTexture=new se(this)}),{resize:function(t,e){var n=this.canvas,i=this.devicePixelRatio;null!=t?(n.style&&(n.style.width=t+"px",n.style.height=e+"px"),n.width=t*i,n.height=e*i,this._width=t,this._height=e):(this._width=n.width/i,this._height=n.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,n,i,r){if("object"==typeof t){var o=t;t=o.x,e=o.y,n=o.width,i=o.height,r=o.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,n*r,i*r),this.viewport={x:t,y:e,width:n,height:i,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,n,i){var r=this.gl,o=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var a=this.viewport,s=!1,l=a.devicePixelRatio;(a.width!==this._width||a.height!==this._height||l&&l!==this.devicePixelRatio||a.x||a.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(a.x*l,a.y*l,a.width*l,a.height*l)),r.clearColor(o[0],o[1],o[2],o[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(n||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,d=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var p=Qt(),f=Jt.create(),g=0;g0){var s=t[r-1],l=s.joints?s.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===s.material&&o.lightGroup===s.lightGroup){o.__program=s.__program;continue}}var u=this._programMgr.getProgram(o,a,e);this.validateProgram(u),o.__program=u}},renderPass:function(t,e,n){this.trigger("beforerenderpass",this,t,e,n),(n=n||{}).getMaterial=n.getMaterial||te,n.getUniform=n.getUniform||ee,n.isMaterialChanged=n.isMaterialChanged||ne,n.beforeRender=n.beforeRender||re,n.afterRender=n.afterRender||re;var i=n.ifRender||ie;this.updatePrograms(t,this._sceneRendering,n),n.sortCompare&&t.sort(n.sortCompare);var r=this.viewport,o=r.devicePixelRatio,a=[r.x*o,r.y*o,r.width*o,r.height*o],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[a[2],a[3]],h=Date.now();e?(qt.copy(ue.VIEW,e.viewMatrix.array),qt.copy(ue.PROJECTION,e.projectionMatrix.array),qt.copy(ue.VIEWINVERSE,e.worldTransform.array)):(qt.identity(ue.VIEW),qt.identity(ue.PROJECTION),qt.identity(ue.VIEWINVERSE)),qt.multiply(ue.VIEWPROJECTION,ue.PROJECTION,ue.VIEW),qt.invert(ue.PROJECTIONINVERSE,ue.PROJECTION),qt.invert(ue.VIEWPROJECTIONINVERSE,ue.VIEWPROJECTION);for(var c,d,p,f,g,m,v,y,_,x,b,w,S=this.gl,T=this._sceneRendering,M=0;Mthis.getMaxJointNumber()){var o=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,o,n),e.setUniform(i,"1i","skinMatricesTexture",n),e.setUniform(i,"1f","skinMatricesTextureSize",o.width)}else{var a=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",a)}},_renderObject:function(t,e,n){var i=this.gl,r=t.geometry,o=t.mode;null==o&&(o=4);var a=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(!s||(a=this.getGLExtension("ANGLE_instanced_arrays"))){var l;if(s&&(l=this._bindInstancedAttributes(t,n,a)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint")&&r.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?a.drawElementsInstancedANGLE(o,e.indicesBuffer.count,u,0,t.getInstanceCount()):i.drawElements(o,e.indicesBuffer.count,u,0)}else s?a.drawArraysInstancedANGLE(o,0,r.vertexCount,t.getInstanceCount()):i.drawArrays(o,0,r.vertexCount);if(s)for(var h=0;hn?n:t}ce.add=function(t,e,n){return Jt.add(t.array,e.array,n.array),t._dirty=!0,t},ce.set=function(t,e,n,i){Jt.set(t.array,e,n,i),t._dirty=!0},ce.copy=function(t,e){return Jt.copy(t.array,e.array),t._dirty=!0,t},ce.cross=function(t,e,n){return Jt.cross(t.array,e.array,n.array),t._dirty=!0,t},ce.distance=ce.dist=function(t,e){return Jt.distance(t.array,e.array)},ce.divide=ce.div=function(t,e,n){return Jt.divide(t.array,e.array,n.array),t._dirty=!0,t},ce.dot=function(t,e){return Jt.dot(t.array,e.array)},ce.len=function(t){return Jt.length(t.array)},ce.lerp=function(t,e,n,i){return Jt.lerp(t.array,e.array,n.array,i),t._dirty=!0,t},ce.min=function(t,e,n){return Jt.min(t.array,e.array,n.array),t._dirty=!0,t},ce.max=function(t,e,n){return Jt.max(t.array,e.array,n.array),t._dirty=!0,t},ce.multiply=ce.mul=function(t,e,n){return Jt.multiply(t.array,e.array,n.array),t._dirty=!0,t},ce.negate=function(t,e){return Jt.negate(t.array,e.array),t._dirty=!0,t},ce.normalize=function(t,e){return Jt.normalize(t.array,e.array),t._dirty=!0,t},ce.random=function(t,e){return Jt.random(t.array,e),t._dirty=!0,t},ce.scale=function(t,e,n){return Jt.scale(t.array,e.array,n),t._dirty=!0,t},ce.scaleAndAdd=function(t,e,n,i){return Jt.scaleAndAdd(t.array,e.array,n.array,i),t._dirty=!0,t},ce.squaredDistance=ce.sqrDist=function(t,e){return Jt.sqrDist(t.array,e.array)},ce.squaredLength=ce.sqrLen=function(t){return Jt.sqrLen(t.array)},ce.subtract=ce.sub=function(t,e,n){return Jt.subtract(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat3=function(t,e,n){return Jt.transformMat3(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat4=function(t,e,n){return Jt.transformMat4(t.array,e.array,n.array),t._dirty=!0,t},ce.transformQuat=function(t,e,n){return Jt.transformQuat(t.array,e.array,n.array),t._dirty=!0,t};var ge=Math.atan2,me=Math.asin,ve=Math.abs;ce.eulerFromQuat=function(t,e,n){t._dirty=!0,e=e.array;var i=t.array,r=e[0],o=e[1],a=e[2],s=e[3],l=r*r,u=o*o,h=a*a,c=s*s;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":i[0]=ge(2*(r*s-o*a),c-l-u+h),i[1]=me(fe(2*(r*a+o*s),-1,1)),i[2]=ge(2*(a*s-r*o),c+l-u-h);break;case"YXZ":i[0]=me(fe(2*(r*s-o*a),-1,1)),i[1]=ge(2*(r*a+o*s),c-l-u+h),i[2]=ge(2*(r*o+a*s),c-l+u-h);break;case"ZXY":i[0]=me(fe(2*(r*s+o*a),-1,1)),i[1]=ge(2*(o*s-a*r),c-l-u+h),i[2]=ge(2*(a*s-r*o),c-l+u-h);break;case"ZYX":i[0]=ge(2*(r*s+a*o),c-l-u+h),i[1]=me(fe(2*(o*s-r*a),-1,1)),i[2]=ge(2*(r*o+a*s),c+l-u-h);break;case"YZX":i[0]=ge(2*(r*s-a*o),c-l+u-h),i[1]=ge(2*(o*s-r*a),c+l-u-h),i[2]=me(fe(2*(r*o+a*s),-1,1));break;case"XZY":i[0]=ge(2*(r*s+o*a),c-l+u-h),i[1]=ge(2*(r*a+o*s),c+l-u-h),i[2]=me(fe(2*(a*s-r*o),-1,1));break;default:console.warn("Unkown order: "+n)}return t},ce.eulerFromMat3=function(t,e,n){var i=e.array,r=i[0],o=i[3],a=i[6],s=i[1],l=i[4],u=i[7],h=i[2],c=i[5],d=i[8],p=t.array;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":p[1]=me(fe(a,-1,1)),ve(a)<.99999?(p[0]=ge(-u,d),p[2]=ge(-o,r)):(p[0]=ge(c,l),p[2]=0);break;case"YXZ":p[0]=me(-fe(u,-1,1)),ve(u)<.99999?(p[1]=ge(a,d),p[2]=ge(s,l)):(p[1]=ge(-h,r),p[2]=0);break;case"ZXY":p[0]=me(fe(c,-1,1)),ve(c)<.99999?(p[1]=ge(-h,d),p[2]=ge(-o,l)):(p[1]=0,p[2]=ge(s,r));break;case"ZYX":p[1]=me(-fe(h,-1,1)),ve(h)<.99999?(p[0]=ge(c,d),p[2]=ge(s,r)):(p[0]=0,p[2]=ge(-o,l));break;case"YZX":p[2]=me(fe(s,-1,1)),ve(s)<.99999?(p[0]=ge(-u,l),p[1]=ge(-h,r)):(p[0]=0,p[1]=ge(a,d));break;case"XZY":p[2]=me(-fe(o,-1,1)),ve(o)<.99999?(p[0]=ge(c,l),p[1]=ge(a,r)):(p[0]=ge(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+n)}return t._dirty=!0,t},Object.defineProperties(ce,{POSITIVE_X:{get:function(){return new ce(1,0,0)}},NEGATIVE_X:{get:function(){return new ce(-1,0,0)}},POSITIVE_Y:{get:function(){return new ce(0,1,0)}},NEGATIVE_Y:{get:function(){return new ce(0,-1,0)}},POSITIVE_Z:{get:function(){return new ce(0,0,1)}},NEGATIVE_Z:{get:function(){return new ce(0,0,-1)}},UP:{get:function(){return new ce(0,1,0)}},ZERO:{get:function(){return new ce}}});const ye=ce;var _e,xe,be,we,Se,Te=function(t,e){this.origin=t||new ye,this.direction=e||new ye};Te.prototype={constructor:Te,intersectPlane:function(t,e){var n=t.normal.array,i=t.distance,r=this.origin.array,o=this.direction.array,a=Jt.dot(n,o);if(0===a)return null;e||(e=new ye);var s=(Jt.dot(n,r)-i)/a;return Jt.scaleAndAdd(e.array,r,o,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=Jt.dot(t.normal.array,this.direction.array);Jt.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,2*-e),this.direction._dirty=!0},distanceToPoint:(Se=Jt.create(),function(t){Jt.sub(Se,t,this.origin.array);var e=Jt.dot(Se,this.direction.array);if(e<0)return Jt.distance(this.origin.array,t);var n=Jt.lenSquared(Se);return Math.sqrt(n-e*e)}),intersectSphere:function(){var t=Jt.create();return function(e,n,i){var r=this.origin.array,o=this.direction.array;e=e.array,Jt.sub(t,e,r);var a=Jt.dot(t,o),s=Jt.squaredLength(t)-a*a,l=n*n;if(!(s>l)){var u=Math.sqrt(l-s),h=a-u,c=a+u;return i||(i=new ye),h<0?c<0?null:(Jt.scaleAndAdd(i.array,r,o,c),i):(Jt.scaleAndAdd(i.array,r,o,h),i)}}}(),intersectBoundingBox:function(t,e){var n,i,r,o,a,s,l=this.direction.array,u=this.origin.array,h=t.min.array,c=t.max.array,d=1/l[0],p=1/l[1],f=1/l[2];if(d>=0?(n=(h[0]-u[0])*d,i=(c[0]-u[0])*d):(i=(h[0]-u[0])*d,n=(c[0]-u[0])*d),p>=0?(r=(h[1]-u[1])*p,o=(c[1]-u[1])*p):(o=(h[1]-u[1])*p,r=(c[1]-u[1])*p),n>o||r>i)return null;if((r>n||n!=n)&&(n=r),(o=0?(a=(h[2]-u[2])*f,s=(c[2]-u[2])*f):(s=(h[2]-u[2])*f,a=(c[2]-u[2])*f),n>s||a>i)return null;if((a>n||n!=n)&&(n=a),(s=0?n:i;return e||(e=new ye),Jt.scaleAndAdd(e.array,u,l,g),e},intersectTriangle:(_e=Jt.create(),xe=Jt.create(),be=Jt.create(),we=Jt.create(),function(t,e,n,i,r,o){var a=this.direction.array,s=this.origin.array;t=t.array,e=e.array,n=n.array,Jt.sub(_e,e,t),Jt.sub(xe,n,t),Jt.cross(we,xe,a);var l=Jt.dot(_e,we);if(i){if(l>-1e-5)return null}else if(l>-1e-5&&l<1e-5)return null;Jt.sub(be,s,t);var u=Jt.dot(we,be)/l;if(u<0||u>1)return null;Jt.cross(we,_e,be);var h=Jt.dot(a,we)/l;if(h<0||h>1||u+h>1)return null;Jt.cross(we,_e,xe);var c=-Jt.dot(be,we)/l;return c<0?null:(r||(r=new ye),o&&ye.set(o,1-u-h,u,h),Jt.scaleAndAdd(r.array,s,a,c),r)}),applyTransform:function(t){ye.add(this.direction,this.direction,this.origin),ye.transformMat4(this.origin,this.origin,t),ye.transformMat4(this.direction,this.direction,t),ye.sub(this.direction,this.direction,this.origin),ye.normalize(this.direction,this.direction)},copy:function(t){ye.copy(this.origin,t.origin),ye.copy(this.direction,t.direction)},clone:function(){var t=new Te;return t.copy(this),t}};const Me=Te;var Ae={create:function(){var t=new ct(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var e=new ct(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},fromValues:function(t,e,n,i){var r=new ct(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},set:function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},subtract:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}};Ae.sub=Ae.subtract,Ae.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},Ae.mul=Ae.multiply,Ae.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},Ae.div=Ae.divide,Ae.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},Ae.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},Ae.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},Ae.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},Ae.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},Ae.dist=Ae.distance,Ae.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},Ae.sqrDist=Ae.squaredDistance,Ae.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},Ae.len=Ae.length,Ae.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},Ae.sqrLen=Ae.squaredLength,Ae.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Ae.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},Ae.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},Ae.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Ae.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},Ae.random=function(t,e){return e=e||1,t[0]=dt(),t[1]=dt(),t[2]=dt(),t[3]=dt(),Ae.normalize(t,t),Ae.scale(t,t,e),t},Ae.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},Ae.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Ae.forEach=function(){var t=Ae.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=4),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Jt.cross(Le,e,n),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=1+i,Ne.normalize(t,t))}),Ne.setAxes=(Ee=Ie.create(),function(t,e,n,i){return Ee[0]=n[0],Ee[3]=n[1],Ee[6]=n[2],Ee[1]=i[0],Ee[4]=i[1],Ee[7]=i[2],Ee[2]=-e[0],Ee[5]=-e[1],Ee[8]=-e[2],Ne.normalize(t,Ne.fromMat3(t,Ee))}),Ne.clone=Ce.clone,Ne.fromValues=Ce.fromValues,Ne.copy=Ce.copy,Ne.set=Ce.set,Ne.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},Ne.setAxisAngle=function(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},Ne.add=Ce.add,Ne.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],h=n[3];return t[0]=i*h+a*s+r*u-o*l,t[1]=r*h+a*l+o*s-i*u,t[2]=o*h+a*u+i*l-r*s,t[3]=a*h-i*s-r*l-o*u,t},Ne.mul=Ne.multiply,Ne.scale=Ce.scale,Ne.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+a*s,t[1]=r*l+o*s,t[2]=o*l-r*s,t[3]=a*l-i*s,t},Ne.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*s,t[1]=r*l+a*s,t[2]=o*l+i*s,t[3]=a*l-r*s,t},Ne.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*s,t[1]=r*l-i*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},Ne.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},Ne.dot=Ce.dot,Ne.lerp=Ce.lerp,Ne.slerp=function(t,e,n,i){var r,o,a,s,l,u=e[0],h=e[1],c=e[2],d=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return(o=u*p+h*f+c*g+d*m)<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,l=Math.sin(i*r)/a):(s=1-i,l=i),t[0]=s*u+l*p,t[1]=s*h+l*f,t[2]=s*c+l*g,t[3]=s*d+l*m,t},Ne.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},Ne.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},Ne.length=Ce.length,Ne.len=Ne.length,Ne.squaredLength=Ce.squaredLength,Ne.sqrLen=Ne.squaredLength,Ne.normalize=Ce.normalize,Ne.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t};const ke=Ne;var Re,ze,Be,Ze,Fe=function(){this._axisX=new ye,this._axisY=new ye,this._axisZ=new ye,this.array=qt.create(),this._dirty=!0};Fe.prototype={constructor:Fe,setArray:function(t){for(var e=0;e0){var e=this.min,n=this.max,i=e.array,r=n.array;en(i,t[0]),en(r,t[0]);for(var o=1;or[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1]),a[2]>r[2]&&(r[2]=a[2])}e._dirty=!0,n._dirty=!0}},union:function(t){var e=this.min,n=this.max;return Jt.min(e.array,e.array,t.min.array),Jt.max(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersection:function(t){var e=this.min,n=this.max;return Jt.max(e.array,e.array,t.min.array),Jt.min(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,n=this.max.array,i=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||n[0]=r[0]&&n[1]>=r[1]&&n[2]>=r[2]},containPoint:function(t){var e=this.min.array,n=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&n[0]>=i[0]&&n[1]>=i[1]&&n[2]>=i[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(Ye=Jt.create(),qe=Jt.create(),Ke=Jt.create(),Je=Jt.create(),Qe=Jt.create(),$e=Jt.create(),function(t,e){var n=t.min.array,i=t.max.array,r=e.array;return Ye[0]=r[0]*n[0],Ye[1]=r[1]*n[0],Ye[2]=r[2]*n[0],qe[0]=r[0]*i[0],qe[1]=r[1]*i[0],qe[2]=r[2]*i[0],Ke[0]=r[4]*n[1],Ke[1]=r[5]*n[1],Ke[2]=r[6]*n[1],Je[0]=r[4]*i[1],Je[1]=r[5]*i[1],Je[2]=r[6]*i[1],Qe[0]=r[8]*n[2],Qe[1]=r[9]*n[2],Qe[2]=r[10]*n[2],$e[0]=r[8]*i[2],$e[1]=r[9]*i[2],$e[2]=r[10]*i[2],n=this.min.array,i=this.max.array,n[0]=Math.min(Ye[0],qe[0])+Math.min(Ke[0],Je[0])+Math.min(Qe[0],$e[0])+r[12],n[1]=Math.min(Ye[1],qe[1])+Math.min(Ke[1],Je[1])+Math.min(Qe[1],$e[1])+r[13],n[2]=Math.min(Ye[2],qe[2])+Math.min(Ke[2],Je[2])+Math.min(Qe[2],$e[2])+r[14],i[0]=Math.max(Ye[0],qe[0])+Math.max(Ke[0],Je[0])+Math.max(Qe[0],$e[0])+r[12],i[1]=Math.max(Ye[1],qe[1])+Math.max(Ke[1],Je[1])+Math.max(Qe[1],$e[1])+r[13],i[2]=Math.max(Ye[2],qe[2])+Math.max(Ke[2],Je[2])+Math.max(Qe[2],$e[2])+r[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,n=this.max.array,i=t.array,r=e[0],o=e[1],a=e[2],s=n[0],l=n[1],u=e[2],h=n[0],c=n[1],d=n[2];if(1===i[15])e[0]=i[0]*r+i[12],e[1]=i[5]*o+i[13],n[2]=i[10]*a+i[14],n[0]=i[0]*h+i[12],n[1]=i[5]*c+i[13],e[2]=i[10]*d+i[14];else{var p=-1/a;e[0]=i[0]*r*p,e[1]=i[5]*o*p,n[2]=(i[10]*a+i[14])*p,p=-1/u,n[0]=i[0]*s*p,n[1]=i[5]*l*p,p=-1/d,e[2]=(i[10]*d+i[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=Jt.fromValues(0,0,0);this.vertices=t}var n=this.min.array,i=this.max.array;return tn(t[0],n[0],n[1],n[2]),tn(t[1],n[0],i[1],n[2]),tn(t[2],i[0],n[1],n[2]),tn(t[3],i[0],i[1],n[2]),tn(t[4],n[0],n[1],i[2]),tn(t[5],n[0],i[1],i[2]),tn(t[6],i[0],n[1],i[2]),tn(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,n=this.max;return en(e.array,t.min.array),en(n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},clone:function(){var t=new nn;return t.copy(this),t}};const rn=nn;var on,an,sn=0;const ln=g.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},(function(){this.name||(this.name=(this.type||"NODE")+"_"+sn++),this.position||(this.position=new ye),this.rotation||(this.rotation=new Xe),this.scale||(this.scale=new ye(1,1,1)),this.worldTransform=new He,this.localTransform=new He,this._children=[]}),{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var n=e._nodeRepository;delete n[this.name],n[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var n=this._scene;n&&n!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,n=e.indexOf(t);n<0||(e.splice(n,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=ln.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(un=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=ln.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e=0&&m[f]>1e-4&&(Jt.transformMat4(S,g,d[v[f]]),Jt.scaleAndAdd(y,y,S,m[f]));T.set(p,y)}}for(p=0;p>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var n=e.get("webgl_texture");n&&t.gl.deleteTexture(n),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(wn.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(wn.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),wn.BYTE=5120,wn.UNSIGNED_BYTE=S,wn.SHORT=5122,wn.UNSIGNED_SHORT=5123,wn.INT=5124,wn.UNSIGNED_INT=5125,wn.FLOAT=T,wn.HALF_FLOAT=36193,wn.UNSIGNED_INT_24_8_WEBGL=34042,wn.DEPTH_COMPONENT=M,wn.DEPTH_STENCIL=34041,wn.ALPHA=6406,wn.RGB=6407,wn.RGBA=A,wn.LUMINANCE=6409,wn.LUMINANCE_ALPHA=6410,wn.SRGB=35904,wn.SRGB_ALPHA=35906,wn.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,wn.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,wn.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,wn.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,wn.NEAREST=C,wn.LINEAR=D,wn.NEAREST_MIPMAP_NEAREST=I,wn.LINEAR_MIPMAP_NEAREST=L,wn.NEAREST_MIPMAP_LINEAR=P,wn.LINEAR_MIPMAP_LINEAR=O,wn.REPEAT=E,wn.CLAMP_TO_EDGE=N,wn.MIRRORED_REPEAT=33648;const Sn=wn;var Tn=cn.extend({skeleton:null,joints:null},(function(){this.joints||(this.joints=[])}),{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=cn.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});Tn.POINTS=0,Tn.LINES=1,Tn.LINE_LOOP=2,Tn.LINE_STRIP=3,Tn.TRIANGLES=4,Tn.TRIANGLE_STRIP=5,Tn.TRIANGLE_FAN=6,Tn.BACK=x,Tn.FRONT=_,Tn.FRONT_AND_BACK=1032,Tn.CW=b,Tn.CCW=w;const Mn=Tn,An={isPowerOfTwo:function(t){return 0==(t&t-1)},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};var Cn=An.isPowerOfTwo;function Dn(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var In=Sn.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type,r=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==Sn.REPEAT&&this.wrapT!==Sn.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r?this.minFilter:this.getAvailableMinFilter());var o=t.getGLExtension("EXT_texture_filter_anisotropic");if(o&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,o.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var a=this.width,s=this.height,l=0;l=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,n,o,i,r,0,e.pixels):t.texImage2D(t.TEXTURE_2D,n,o,i,r,0,o,a,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return Cn(this.width)&&Cn(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var n=F.createImage();e&&(n.crossOrigin=e);var i=this;return n.onload=function(){i.dirty(),i.trigger("success",i)},n.onerror=function(){i.trigger("error",i)},n.src=t,this.image=n,this}});Object.defineProperty(In.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(In.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ln=In;function Pn(t){return{byte:F.Int8Array,ubyte:F.Uint8Array,short:F.Int16Array,ushort:F.Uint16Array}[t]||F.Float32Array}function On(t){return"attr_"+t}function En(t,e,n,i){switch(this.name=t,this.type=e,this.size=n,this.semantic=i||"",this.value=null,n){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var n=this.value;return e[0]=n[2*t],e[1]=n[2*t+1],e},this.set=function(t,e){var n=this.value;n[2*t]=e[0],n[2*t+1]=e[1]},this.copy=function(t,e){var n=this.value;e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]};break;case 3:this.get=function(t,e){var n=3*t,i=this.value;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e},this.set=function(t,e){var n=3*t,i=this.value;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2]},this.copy=function(t,e){var n=this.value;e*=3,n[t*=3]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2]};break;case 4:this.get=function(t,e){var n=this.value,i=4*t;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e[3]=n[i+3],e},this.set=function(t,e){var n=this.value,i=4*t;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3]},this.copy=function(t,e){var n=this.value;e*=4,n[t*=4]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2],n[t+3]=n[e+3]}}}function Nn(t,e,n,i,r){this.name=t,this.type=e,this.buffer=n,this.size=i,this.semantic=r,this.symbol="",this.needsRemove=!1}function kn(t){this.buffer=t,this.count=0}En.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=Pn(this.type);this.value=new e(t*this.size)}},En.prototype.fromArray=function(t){var e,n=Pn(this.type);if(t[0]&&t[0].length){var i=0,r=this.size;e=new n(t.length*r);for(var o=0;o=0){e||(e=[]);var n=this.indices;return e[0]=n[3*t],e[1]=n[3*t+1],e[2]=n[3*t+2],e}},setTriangleIndices:function(t,e){var n=this.indices;n[3*t]=e[0],n[3*t+1]=e[1],n[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,n=this.vertexCount>65535?F.Uint32Array:F.Uint16Array;if(t[0]&&t[0].length){var i=0;e=new n(3*t.length);for(var r=0;r=0&&(e.splice(n,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var n=[],i=this.vertexCount,r=0;ro[0]&&(o[0]=s),l>o[1]&&(o[1]=l),u>o[2]&&(o[2]=u)}n._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,n=e.position.value,i=e.normal.value;if(i&&i.length===n.length)for(var r=0;r65535&&(this.indices=new F.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,n=this.getEnabledAttributes(),i={},r=0;rthis.distance,r=1;r<8;r++)if(Jt.dot(e[r].array,n)>this.distance!=i)return!0},intersectLine:(Qn=Jt.create(),function(t,e,n){var i=this.distanceToPoint(t),r=this.distanceToPoint(e);if(i>0&&r>0||i<0&&r<0)return null;var o=this.normal.array,a=this.distance,s=t.array;Jt.sub(Qn,e.array,t.array),Jt.normalize(Qn,Qn);var l=Jt.dot(o,Qn);if(0===l)return null;n||(n=new ye);var u=(Jt.dot(o,s)-a)/l;return Jt.scaleAndAdd(n.array,s,Qn,-u),n._dirty=!0,n}),applyTransform:(qn=qt.create(),Kn=Ce.create(),Jn=Ce.create(),Jn[3]=1,function(t){t=t.array,Jt.scale(Jn,this.normal.array,this.distance),Ce.transformMat4(Jn,Jn,t),this.distance=Jt.dot(Jn,this.normal.array),qt.invert(qn,t),qt.transpose(qn,qn),Kn[3]=0,Jt.copy(Kn,this.normal.array),Ce.transformMat4(Kn,Kn,qn),Jt.copy(this.normal.array,Kn)}),copy:function(t){Jt.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new $n;return t.copy(this),t}};const ti=$n;var ei,ni=Jt.set,ii=Jt.copy,ri=Jt.transformMat4,oi=Math.min,ai=Math.max,si=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new ti);for(this.boundingBox=new rn,this.vertices=[],t=0;t<8;t++)this.vertices[t]=Jt.fromValues(0,0,0)};si.prototype={setFromProjection:function(t){var e=this.planes,n=t.array,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],p=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];ni(e[0].normal.array,a-i,h-s,f-c),e[0].distance=-(y-g),e[0].normalize(),ni(e[1].normal.array,a+i,h+s,f+c),e[1].distance=-(y+g),e[1].normalize(),ni(e[2].normal.array,a+r,h+l,f+d),e[2].distance=-(y+m),e[2].normalize(),ni(e[3].normal.array,a-r,h-l,f-d),e[3].distance=-(y-m),e[3].normalize(),ni(e[4].normal.array,a-o,h-u,f-p),e[4].distance=-(y-v),e[4].normalize(),ni(e[5].normal.array,a+o,h+u,f+p),e[5].distance=-(y+v),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(0===y){var b=l/i,w=-v/(p-1),S=-v/(p+1),T=-S/l,M=-w/l;_.min.set(-T*b,-T,S),_.max.set(T*b,T,w),ni(x[0],-T*b,-T,S),ni(x[1],-T*b,T,S),ni(x[2],T*b,-T,S),ni(x[3],T*b,T,S),ni(x[4],-M*b,-M,w),ni(x[5],-M*b,M,w),ni(x[6],M*b,-M,w),ni(x[7],M*b,M,w)}else{var A=(-1-g)/i,C=(1-g)/i,D=(1-m)/l,I=(-1-m)/l,L=(-1-v)/p,P=(1-v)/p;_.min.set(Math.min(A,C),Math.min(I,D),Math.min(P,L)),_.max.set(Math.max(C,A),Math.max(D,I),Math.max(L,P));var O=_.min.array,E=_.max.array;ni(x[0],O[0],O[1],O[2]),ni(x[1],O[0],E[1],O[2]),ni(x[2],E[0],O[1],O[2]),ni(x[3],E[0],E[1],O[2]),ni(x[4],O[0],O[1],E[2]),ni(x[5],O[0],E[1],E[2]),ni(x[6],E[0],O[1],E[2]),ni(x[7],E[0],E[1],E[2])}},getTransformedBoundingBox:(ei=Jt.create(),function(t,e){var n=this.vertices,i=e.array,r=t.min,o=t.max,a=r.array,s=o.array,l=n[0];ri(ei,l,i),ii(a,ei),ii(s,ei);for(var u=1;u<8;u++)l=n[u],ri(ei,l,i),a[0]=oi(ei[0],a[0]),a[1]=oi(ei[1],a[1]),a[2]=oi(ei[2],a[2]),s[0]=ai(ei[0],s[0]),s[1]=ai(ei[1],s[1]),s[2]=ai(ei[2],s[2]);return r._dirty=!0,o._dirty=!0,t})};const li=si;var ui;const hi=ln.extend((function(){return{projectionMatrix:new He,invProjectionMatrix:new He,viewMatrix:new He,frustum:new li}}),(function(){this.update(!0)}),{update:function(t){ln.prototype.update.call(this,t),He.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),He.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){He.copy(this.viewMatrix,t),He.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){He.copy(this.projectionMatrix,t),He.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(ui=Ce.create(),function(t,e){var n=void 0!==e?e:new Me,i=t.array[0],r=t.array[1];return Ce.set(ui,i,r,-1,1),Ce.transformMat4(ui,ui,this.invProjectionMatrix.array),Ce.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(n.origin.array,ui,1/ui[3]),Ce.set(ui,i,r,1,1),Ce.transformMat4(ui,ui,this.invProjectionMatrix.array),Ce.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(ui,ui,1/ui[3]),Jt.sub(n.direction.array,ui,n.origin.array),Jt.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n})});var ci,di,pi=qt.create(),fi=qt.create(),gi={};function mi(t){var e=[],n=Object.keys(t);n.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof Yn&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof hi?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof Yn&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},n=0;n0&&this._doUpdateRenderList(a,e,n,i,r)}},isFrustumCulled:(ci=new rn,di=new He,function(t,e,n){var i=t.boundingBox;if(i||(i=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!i)return!1;if(di.array=n,ci.transformFrom(i,di),t.castShadow&&this.viewBoundingBoxLastFrame.union(ci),t.frustumCulling){if(!ci.intersectBoundingBox(e.frustum.boundingBox))return!0;di.array=e.projectionMatrix.array,ci.max.array[2]>0&&ci.min.array[2]<0&&(ci.max.array[2]=-1e-20),ci.applyProjection(di);var r=ci.min.array,o=ci.max.array;if(o[0]<-1||r[0]>1||o[1]<-1||r[1]>1||o[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(yi);var e=this._lightUniforms;for(var n in e)for(var i in e[n])e[n][i].value.length=0;for(var r=0;r=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new xi(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();var Si=An.isPowerOfTwo,Ti=["px","nx","py","ny","pz","nz"],Mi=Sn.extend((function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}}),{textureType:"textureCube",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var r=t.getGLExtension("EXT_texture_filter_anisotropic");if(r&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var o=this.width,a=this.height,s=0;s0&&t.height>0}Object.defineProperty(Mi.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Mi.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ci=Mi,Di=hi.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=hi.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});var Ii="framebuffer",Li="renderbuffer",Pi="renderbuffer_width",Oi="renderbuffer_height",Ei="renderbuffer_attached",Ni="depthtexture_attached",ki=36160,Ri=36161,zi=36096,Bi=g.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},(function(){this._cache=new bn,this._textures={}}),{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(ki,this._getFrameBufferGL(t)),this._boundRenderer=t;var n=this._cache;n.put("viewport",t.viewport);var i,r,o=!1;for(var a in this._textures){o=!0;var s=this._textures[a];s&&(i=s.texture.width,r=s.texture.height,this._doAttach(t,s.texture,a,s.target))}this._width=i,this._height=r,!o&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,i,r,1);var l=n.get("attached_textures");if(l)for(var a in l)if(!this._textures[a]){var u=l[a];this._doDetach(e,a,u)}if(!n.get(Ni)&&this.depthBuffer){n.miss(Li)&&n.put(Li,e.createRenderbuffer());var h=n.get(Li);i===n.get(Pi)&&r===n.get(Oi)||(e.bindRenderbuffer(Ri,h),e.renderbufferStorage(Ri,e.DEPTH_COMPONENT16,i,r),n.put(Pi,i),n.put(Oi,r),e.bindRenderbuffer(Ri,null)),n.get(Ei)||(e.framebufferRenderbuffer(ki,zi,Ri,h),n.put(Ei,!0))}},unbind:function(t){t.__currentFrameBuffer=null,t.gl.bindFramebuffer(ki,null),this._boundRenderer=null,this._cache.use(t.__uid__);var e=this._cache.get("viewport");e&&t.setViewport(e),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var n in this._textures){var i=this._textures[n];if(i){var r=i.texture;if(!r.NPOT&&r.useMipmap&&r.minFilter===Sn.LINEAR_MIPMAP_LINEAR){var o="textureCube"===r.textureType?34067:3553;e.bindTexture(o,r.getWebGLTexture(t)),e.generateMipmap(o),e.bindTexture(o,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(ki)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(Ii)&&e.put(Ii,t.gl.createFramebuffer()),e.get(Ii)},attach:function(t,e,n){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||36064,n=n||3553;var i,r=this._boundRenderer;if(r&&r.gl){var o=this._cache;o.use(r.__uid__),i=o.get("attached_textures")}var a=this._textures[e];if(!a||a.target!==n||a.texture!==t||!i||null==i[e]){var s=!0;r&&(s=this._doAttach(r,t,e,n),this.viewport||r.setViewport(0,0,t.width,t.height,1)),s&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=n)}},_doAttach:function(t,e,n,i){var r=t.gl,o=e.getWebGLTexture(t),a=this._cache.get("attached_textures");if(a&&a[n]){var s=a[n];if(s.texture===e&&s.target===i)return}var l=!0;if(((n=+n)===zi||n===k)&&(t.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==M&&34041!==e.format&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l)){var u=this._cache.get(Li);u&&(r.framebufferRenderbuffer(ki,zi,Ri,null),r.deleteRenderbuffer(u),this._cache.put(Li,!1)),this._cache.put(Ei,!1),this._cache.put(Ni,!0)}return r.framebufferTexture2D(ki,n,i,o,0),a||(a={},this._cache.put("attached_textures",a)),a[n]=a[n]||{},a[n].texture=e,a[n].target=i,l},_doDetach:function(t,e,n){t.framebufferTexture2D(ki,e,n,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),e!==zi&&e!==k||this._cache.put(Ni,!1)},detach:function(t,e){this._textures[t]=null,this._boundRenderer&&(this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e))},dispose:function(t){var e=t.gl,n=this._cache;n.use(t.__uid__);var i=n.get(Li);i&&e.deleteRenderbuffer(i);var r=n.get(Ii);r&&e.deleteFramebuffer(r),n.deleteContext(t.__uid__),this._textures={}}});Bi.DEPTH_ATTACHMENT=zi,Bi.COLOR_ATTACHMENT0=36064,Bi.STENCIL_ATTACHMENT=36128,Bi.DEPTH_STENCIL_ATTACHMENT=k;const Zi=Bi;var Fi=["px","nx","py","ny","pz","nz"];const Vi=g.extend((function(){var t={position:new ye,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new Di({fov:90}),nx:new Di({fov:90}),py:new Di({fov:90}),ny:new Di({fov:90}),pz:new Di({fov:90}),nz:new Di({fov:90})};return e.px.lookAt(ye.POSITIVE_X,ye.NEGATIVE_Y),e.nx.lookAt(ye.NEGATIVE_X,ye.NEGATIVE_Y),e.py.lookAt(ye.POSITIVE_Y,ye.POSITIVE_Z),e.ny.lookAt(ye.NEGATIVE_Y,ye.NEGATIVE_Z),e.pz.lookAt(ye.POSITIVE_Z,ye.NEGATIVE_Y),e.nz.lookAt(ye.NEGATIVE_Z,ye.NEGATIVE_Y),t._frameBuffer=new Zi,t}),{getCamera:function(t){return this._cameras[t]},render:function(t,e,n){var i=t.gl;n||e.update();for(var r=this.texture.width,o=2*Math.atan(r/(r-.5))/Math.PI*180,a=0;a<6;a++){var s=Fi[a],l=this._cameras[s];if(ye.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=o,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),Gi=Hn.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,n=this.attributes,i=[],r=[],o=[],a=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var h=u/e;if(i.push([2*h-1,2*l-1,0]),r&&r.push([h,l]),o&&o.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],n)}}),Xi=ji;function Yi(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var qi=Yi("DXT1"),Ki=Yi("DXT3"),Ji=Yi("DXT5");const Qi=function(t,e){var n=new Int32Array(t,0,31);if(542327876!==n[0])return null;if(4&!n(20))return null;var i,r,o=n(21),a=n[4],s=n[3],l=512&n[28],u=131072&n[2];switch(o){case qi:i=8,r=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ki:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ji:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var h=n[1]+4,c=l?6:1,d=1;u&&(d=Math.max(1,n[7]));for(var p=[],f=0;f0){var r=Math.pow(2,t[3]-128-8+i);e[n+0]=t[0]*r,e[n+1]=t[1]*r,e[n+2]=t[2]*r}else e[n+0]=0,e[n+1]=0,e[n+2]=0;return e[n+3]=1,e}function er(t,e,n,i){for(var r,o,a=0,s=0,l=i;l>0;)if(t[s][0]=e[n++],t[s][1]=e[n++],t[s][2]=e[n++],t[s][3]=e[n++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(o=t[s])[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],s++,l--;a+=8}else s++,l--,a=0;return n}function nr(t,e,n,i){if(i<8|i>32767)return er(t,e,n,i);if(2!=(r=e[n++]))return er(t,e,n-1,i);if(t[0][1]=e[n++],t[0][2]=e[n++],r=e[n++],(t[0][2]<<8>>>0|r)>>>0!==i)return null;for(var r=0;r<4;r++)for(var o=0;o128){a=(127&a)>>>0;for(var s=e[n++];a--;)t[o++][r]=s}else for(;a--;)t[o++][r]=e[n++]}return n}const ir=function(t,e,n){null==n&&(n=0);var i=new Uint8Array(t),r=i.length;if("#?"===function(t,e,n){for(var i="",r=0;r<2;r++)i+=$i(t[r]);return i}(i)){for(var o=2;o=r)){o+=2;for(var a="";o20)return console.warn("Given image is not a height map"),t}var d,p,f,g;l%(4*i)==0?(d=a.data[l],f=a.data[l+4]):l%(4*i)==4*(i-1)?(d=a.data[l-4],f=a.data[l]):(d=a.data[l-4],f=a.data[l+4]),l<4*i?(p=a.data[l],g=a.data[l+4*i]):l>i*(r-1)*4?(p=a.data[l-4*i],g=a.data[l]):(p=a.data[l-4*i],g=a.data[l+4*i]),s.data[l]=d-f+127,s.data[l+1]=p-g+127,s.data[l+2]=255,s.data[l+3]=255}return o.putImageData(s,0,0),n},isHeightImage:function(t,e,n){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),r=i.getContext("2d"),o=e||32;n=n||20,i.width=i.height=o,r.drawImage(t,0,0,o,o);for(var a=r.getImageData(0,0,o,o),s=0;sn)return!1}return!0},_fetchTexture:function(t,e,n){F.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:n})},createChessboard:function(t,e,n,i){t=t||512,e=e||64,n=n||"black",i=i||"white";var r=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var a=o.getContext("2d");a.fillStyle=i,a.fillRect(0,0,t,t),a.fillStyle=n;for(var s=0;s=0||(ar.forEach((function(e){t.on(e,this[sr(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),ar.forEach((function(e){t.off(e,this[sr(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}};const ur=lr,hr=hi.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=hi.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});jt.import("\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end");var cr=new Gi,dr=new Mn({geometry:cr,frustumCulling:!1}),pr=new hr;const fr=g.extend((function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}}),(function(){var t=new jt(jt.source("clay.compositor.vertex"),this.fragment),e=new lt({shader:t});e.enableTexturesAll(),this.material=e}),{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||36064,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var n in this.outputs){var i=this.outputs[n];i&&e.attach(i,n)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var n=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var r=[];for(var o in this.outputs)(o=+o)>=n.COLOR_ATTACHMENT0&&o<=n.COLOR_ATTACHMENT0+8&&r.push(o);i.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var a=this.clearDepth?n.DEPTH_BUFFER_BIT:0;if(n.depthMask(!0),this.clearColor){a|=n.COLOR_BUFFER_BIT,n.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&n.clearColor(s[0],s[1],s[2],s[3])}n.clear(a),this.blendWithPrevious?(n.enable(n.BLEND),this.material.transparent=!0):(n.disable(n.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){dr.material=this.material,t.renderPass([dr],pr)},dispose:function(t){}});var gr={},mr=["px","nx","py","ny","pz","nz"];gr.prefilterEnvironmentMap=function(t,e,n,i,r){r&&i||(i=gr.generateNormalDistribution(),r=gr.integrateBRDF(t,i));var o=(n=n||{}).width||64,a=n.height||64,s=n.type||e.type,l=new Ci({width:o,height:a,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(o,a),h=Math.log(u)/Math.log(2)+1,c=new lt({shader:new jt({vertex:jt.source("clay.skybox.vertex"),fragment:"#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"})});c.set("normalDistribution",i),n.encodeRGBM&&c.define("fragment","RGBM_ENCODE"),n.decodeRGBM&&c.define("fragment","RGBM_DECODE");var d,p=new _i;if("texture2D"===e.textureType){var f=new Ci({width:o,height:a,type:s===Sn.FLOAT?Sn.HALF_FLOAT:s});or.panoramaToCubeMap(t,e,f,{encodeRGBM:n.decodeRGBM}),e=f}(d=new ji({scene:p,material:c})).material.set("environmentMap",e);var g=new Vi({texture:l});n.encodeRGBM&&(s=l.type=Sn.UNSIGNED_BYTE);for(var m=new Ln({width:o,height:a,type:s}),v=new Zi({depthBuffer:!1}),y=F[s===Sn.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_ 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"}),r=new Ln({width:512,height:256,type:Sn.HALF_FLOAT,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",e),i.setUniform("viewportSize",[512,256]),i.attachOutput(r),i.render(t,n),n.dispose(t),r},gr.generateNormalDistribution=function(t,e){for(var n=new Ln({width:t=t||256,height:e=e||1024,type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(e*t*4),r=[],o=0;o>>16)>>>0;u=(((16711935&(u=((252645135&(u=((858993459&(u=((1431655765&u)<<1|(2863311530&u)>>>1)>>>0))<<2|(3435973836&u)>>>2)>>>0))<<4|(4042322160&u)>>>4)>>>0))<<8|(4278255360&u)>>>8)>>>0)/4294967296;var h=Math.sqrt((1-u)/(1+(s*s-1)*u));r[l]=h}for(l=0;l65535?Uint32Array:Uint16Array,y=this.indices=new v(e*t*6),_=this.radius,x=this.phiStart,b=this.phiLength,w=this.thetaStart,S=this.thetaLength,T=[],M=[],A=0,C=1/(_=this.radius);for(d=0;d<=t;d++)for(c=0;c<=e;c++)u=c/e,h=d/t,a=-_*Math.cos(x+u*b)*Math.sin(w+h*S),s=_*Math.cos(w+h*S),l=_*Math.sin(x+u*b)*Math.sin(w+h*S),T[0]=a,T[1]=s,T[2]=l,M[0]=u,M[1]=h,n.set(A,T),i.set(A,M),T[0]*=C,T[1]*=C,T[2]*=C,r.set(A,T),A++;var D=e+1,I=0;for(d=0;d255?255:t}function Jr(t){return t<0?0:t>1?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100*255):Kr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Jr(parseFloat(e)/100):Jr(parseFloat(e))}function to(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function eo(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function no(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var io=new wi(20),ro=null;function oo(t,e){ro&&no(ro,e),ro=io.put(t,ro||e.slice())}function ao(t,e){if(t){e=e||[];var n=io.get(t);if(n)return no(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in qr)return no(e,qr[i]),oo(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(eo(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),oo(t,e),e):void eo(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(eo(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),oo(t,e),e):void eo(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?eo(e,+u[0],+u[1],+u[2],1):eo(e,0,0,0,1);h=$r(u.pop());case"rgb":return 3!==u.length?void eo(e,0,0,0,1):(eo(e,Qr(u[0]),Qr(u[1]),Qr(u[2]),h),oo(t,e),e);case"hsla":return 4!==u.length?void eo(e,0,0,0,1):(u[3]=$r(u[3]),so(u,e),oo(t,e),e);case"hsl":return 3!==u.length?void eo(e,0,0,0,1):(so(u,e),oo(t,e),e);default:return}}eo(e,0,0,0,1)}}function so(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),r=$r(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return eo(e=e||[],Kr(255*to(a,o,n+1/3)),Kr(255*to(a,o,n)),Kr(255*to(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}var lo=Object.prototype.toString,uo=Array.prototype,ho=uo.forEach,co=uo.filter,po=uo.slice,fo=uo.map,go=function(){}.constructor,mo=go?go.prototype:null;function vo(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function yo(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ra)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(_o(e)){var r=function(t){return _o(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&No(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=ao(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!No(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&Eo(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var d=h.percent-c.percent;if(0!==d){var p=(e-c.percent)/d,f=i?this._additiveValue:u?Zo:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Ro(f,m,g,v,y,p,p*p,p*p*p):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0?1===l?Lo(f,c[r],h[r],p):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],p),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(ao(t[n],Zo),Po(Zo,Zo,i,1),t[n]=Bo(Zo)):t[n]=t[n]+i:1===e?Po(t[n],t[n],i,1):2===e&&Oo(t[n],t[n],i,1)},t}();const Vo=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?function(){for(var t=[],e=0;e0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),Go={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(t,e){var n;if(this._animators=this._animators||[],t){for(var i=t.split("."),r=this,o=0,a=i.length;o=0&&s.splice(t,1)})),s.push(l),this.__zr&&this.__zr.animation.addAnimator(l),l},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,n=e.length,i=0;i 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.chunk.instancing_header\n#ifdef INSTANCING\nattribute vec4 instanceMat1;\nattribute vec4 instanceMat2;\nattribute vec4 instanceMat3;\n#endif\n@end\n@export clay.chunk.instancing_matrix\nmat4 instanceMat = mat4(\n vec4(instanceMat1.xyz, 0.0),\n vec4(instanceMat2.xyz, 0.0),\n vec4(instanceMat3.xyz, 0.0),\n vec4(instanceMat1.w, instanceMat2.w, instanceMat3.w, 1.0)\n);\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end";function Uo(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}Object.assign(ln.prototype,Go),jt.import(Ho),jt.import(Xt),jt.import("\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"),jt.import("@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\nattribute vec3 normal: NORMAL;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nvarying vec3 v_Normal;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\nvarying vec3 v_Normal;\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"),jt.import("/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"),jt.import("@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end");var Wo=_i.prototype.addToScene,jo=_i.prototype.removeFromScene;_i.prototype.addToScene=function(t){if(Wo.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},_i.prototype.removeFromScene=function(t){jo.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},lt.prototype.setTextureImage=function(t,e,n,i){if(this.shader){var r,o=n.getZr(),a=this;return a.autoUpdateTextureStatus=!1,a.disableTexture(t),!(s=e)||"none"===s||(r=Xo.loadTexture(e,n,i,(function(e){a.enableTexture(t),o&&o.refresh()})),a.set(t,r)),r}var s};var Xo={};Xo.Renderer=he,Xo.Node=ln,Xo.Mesh=Mn,Xo.Shader=jt,Xo.Material=lt,Xo.Texture=Sn,Xo.Texture2D=Ln,Xo.Geometry=Hn,Xo.SphereGeometry=Cr,Xo.PlaneGeometry=Gi,Xo.CubeGeometry=Wi,Xo.AmbientLight=Dr,Xo.DirectionalLight=Ir,Xo.PointLight=Lr,Xo.SpotLight=Pr,Xo.PerspectiveCamera=Di,Xo.OrthographicCamera=hr,Xo.Vector2=vt,Xo.Vector3=ye,Xo.Vector4=kr,Xo.Quaternion=Xe,Xo.Matrix2=Zr,Xo.Matrix2d=Hr,Xo.Matrix3=Wr,Xo.Matrix4=He,Xo.Plane=ti,Xo.Ray=Me,Xo.BoundingBox=rn,Xo.Frustum=li;var Yo=null;function qo(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function Ko(t){if((t.wrapS===Sn.REPEAT||t.wrapT===Sn.REPEAT)&&t.image){var e=qo(t.width),n=qo(t.height);if(e!==t.width||n!==t.height){var i=document.createElement("canvas");i.width=e,i.height=n,i.getContext("2d").drawImage(t.image,0,0,e,n),t.image=i}}}Xo.loadTexture=function(t,e,n,i){"function"==typeof n&&(i=n,n={}),n=n||{};for(var r=Object.keys(n).sort(),o="",a=0;a3?e[3]=t[3]:e[3]=1,e):((e=i.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},Xo.directionFromAlphaBeta=function(t,e){var n=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,r=[],o=Math.sin(n);return r[0]=o*Math.cos(i),r[1]=-Math.cos(n),r[2]=o*Math.sin(i),r},Xo.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},Xo.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"],Xo.createShader=function(t){"ecgl.shadow"===t&&(t="ecgl.displayShadow");var e=jt.source(t+".vertex"),n=jt.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),n||console.error("Fragment shader of '%s' not exits",t);var i=new jt(e,n);return i.name=t,i},Xo.createMaterial=function(t,e){e instanceof Array||(e=[e]);var n=Xo.createShader(t),i=new lt({shader:n});return e.forEach((function(t){"string"==typeof t&&i.define(t)})),i},Xo.setMaterialFromModel=function(t,e,n,i){e.autoUpdateTextureStatus=!1;var r=n.getModel(t+"Material"),o=r.get("detailTexture"),a=Mr(r.get("textureTiling"),1),s=Mr(r.get("textureOffset"),0);"number"==typeof a&&(a=[a,a]),"number"==typeof s&&(s=[s,s]);var l=a[0]>1||a[1]>1?Xo.Texture.REPEAT:Xo.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,i,u),c=Mr(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,i,u),h=Mr(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",o,i,u),e.setTextureImage("normalMap",d,i,u),e.set({roughness:h,metalness:c,detailUvRepeat:a,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("hatching"===t){var p=r.get("hatchingTextures")||[];p.length;for(var f=0;f<6;f++)e.setTextureImage("hatch"+(f+1),p[f],i,{anisotropic:8,wrapS:Xo.Texture.REPEAT,wrapT:Xo.Texture.REPEAT});e.set({detailUvRepeat:a,detailUvOffset:s})}},Xo.updateVertexAnimation=function(t,e,n,i){var r=i.get("animation"),o=i.get("animationDurationUpdate"),a=i.get("animationEasingUpdate"),s=n.shadowDepthMaterial;if(r&&e&&o>0&&e.geometry.vertexCount===n.geometry.vertexCount){n.material.define("vertex","VERTEX_ANIMATION"),n.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var n=this.zr;t.scene.traverse((function(t){t.__zr=n,t.addAnimatorsToZr&&t.addAnimatorsToZr(n)}))}},$o.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t))}},$o.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},$o.prototype.resize=function(t,e){this.renderer.resize(t,e)},$o.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},$o.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},$o.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},$o.prototype.needsRefresh=function(){this.zr.refresh()},$o.prototype.refresh=function(t){this._backgroundColor=t?Jo.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},$o.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,n=e.viewport,i=this.views.length-1;i>=0;i--){var r=this.views[i];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var o=this._picking.pick(t.offsetX,t.offsetY,!0);if(o)return o.view=r,o}}e.viewport=n},$o.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},$o.prototype.pickObject=function(t,e){for(var n=[],i=this.renderer,r=i.viewport,o=0;o=0&&(c.dataIndex=this._lastDataIndex,c.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0):null!=s&&s!==this._lastEventData&&(null!=this._lastEventData&&(c.eventData=this._lastEventData,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0),this._lastEventData=s,this._lastDataIndex=o,this._lastSeriesIndex=a),c.eventData=s,c.dataIndex=o,c.seriesIndex=a,(null!=s||parseInt(o,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(h,t,e),l&&this.zr.handler.dispatchToElement(h,"mouseover",e))},$o.prototype._dispatchToView=function(t,e){for(var n=0;nt&&a=0&&(function(t){la(t,"itemStyle"),la(t,"lineStyle"),la(t,"areaStyle"),la(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),ua(t.xAxis3D),ua(t.yAxis3D),ua(t.zAxis3D),ua(t.grid3D),la(t.geo3D)}));const ca={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(t){t=t||{},this.option.viewControl=this.option.viewControl||{},null!=t.alpha&&(this.option.viewControl.alpha=t.alpha),null!=t.beta&&(this.option.viewControl.beta=t.beta),null!=t.distance&&(this.option.viewControl.distance=t.distance),null!=t.center&&(this.option.viewControl.center=t.center)}},da={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}},pa={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}};var fa=i.ComponentModel.extend({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.util.merge(fa.prototype,ca),i.util.merge(fa.prototype,da),i.util.merge(fa.prototype,pa);const ga=fa;function ma(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function va(){var t="__ec_inner_"+ya++;return function(e){return e[t]||(e[t]={})}}var ya=Math.round(9*Math.random()),_a={};function xa(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||_a;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||_a).rich;if(n){e=e||{};for(var i=wo(n),r=0;r0&&this._notFirst?this.animateTo({alpha:u,beta:h,center:c,distance:o,orthographicSize:a,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(o),this.setAlpha(u),this.setBeta(h),this.setCenter(c),this.setOrthographicSize(a)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,n=this,i={},r={};return null!=t.distance&&(i.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(i.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(i.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(i.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(i.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,r).during((function(){null!=i.alpha&&n.setAlpha(i.alpha),null!=i.beta&&n.setBeta(i.beta),null!=i.distance&&n.setDistance(i.distance),null!=i.center&&n.setCenter(i.center),null!=i.orthographicSize&&n.setOrthographicSize(i.orthographicSize),n._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),n=this._orthoSize,i=n/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=n/2,e.bottom=-n/2},_updatePan:function(t){var e=this._panVelocity,n=this._distance,i=this.getCamera(),r=i.worldTransform.y,o=i.worldTransform.x;this._center.scaleAndAdd(o,-e.x*n/200).scaleAndAdd(r,-e.y*n/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new ye,n=this._theta+Math.PI/2,i=this._phi+Math.PI/2,r=Math.sin(n);e.x=r*Math.cos(i),e.y=-Math.cos(n),e.z=r*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var n=t.len();(n*=e)<1e-4&&(n=0),t.normalize().scale(n)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),n=Math.atan2(t.x,t.z);this._theta=e,this._phi=-n,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,n=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,n)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===Aa[this.rotateMouseButton]?this._mode="rotate":t.event.button===Aa[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=Ca(this.panSensitivity),n=Ca(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*n[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*n[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var n,i=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(i,r)||(n="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),t}});Object.defineProperty(Da.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});const Ia=Da,La={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var n in e)t||!e[n].value?e[n].value=[]:e[n].value=Array.prototype.slice.call(e[n].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},Pa={vec2:ft,vec3:Jt,vec4:Ce,mat2:zr,mat2d:Vr,mat3:Ie,mat4:qt,quat:ke};var Oa=Pa.vec3,Ea=[[0,0],[1,1]],Na=Hn.extend((function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),positionPrev:new Hn.Attribute("positionPrev","float",3),positionNext:new Hn.Attribute("positionNext","float",3),prevPositionPrev:new Hn.Attribute("prevPositionPrev","float",3),prevPosition:new Hn.Attribute("prevPosition","float",3),prevPositionNext:new Hn.Attribute("prevPositionNext","float",3),offset:new Hn.Attribute("offset","float",1),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Oa.dist(t,e)+Oa.dist(n,e)+Oa.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Ea)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Ea)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=n[0],p=n[1],f=n[2],g=i[0],m=i[1],v=i[2],y=this._getCubicCurveApproxStep(t,e,n,i),_=y*y,x=_*y,b=3*y,w=3*_,S=6*_,T=6*x,M=a-2*u+d,A=s-2*h+p,C=l-2*c+f,D=3*(u-d)-a+g,I=3*(h-p)-s+m,L=3*(c-f)-l+v,P=a,O=s,E=l,N=(u-a)*b+M*w+D*x,k=(h-s)*b+A*w+I*x,R=(c-l)*b+C*w+L*x,z=M*S+D*T,B=A*S+I*T,Z=C*S+L*T,F=D*T,V=I*T,G=L*T,H=0,U=0,W=Math.ceil(1/y),j=new Float32Array(3*(W+1)),X=(j=[],0);for(U=0;U1&&(P=N>0?Math.min(P,g):Math.max(P,g),O=k>0?Math.min(O,m):Math.max(O,m),E=R>0?Math.min(E,v):Math.max(E,v));return this.addPolyline(j,r,o)},addLine:function(t,e,n,i){return this.addPolyline([t,e],n,i)},addPolyline:function(t,e,n,i,r){if(t.length){var o="number"!=typeof t[0];if(null==r&&(r=o?t.length:t.length/3),!(r<2)){null==i&&(i=0),null==n&&(n=1),this._itemVertexOffsets.push(this._vertexOffset);var a,s,l=(o="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,p=this.attributes.offset,f=this.indices,g=this._vertexOffset;n=Math.max(n,.01);for(var m=i;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,a),c.set(g-1,a)),u.set(g,a),u.set(g+1,a),d.set(g,s),d.set(g+1,s),p.set(g,n/2),p.set(g+1,-n/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,a),g++;else if(m>0){var _=3*this._triangleOffset;(f=this.indices)[_]=g-4,f[_+1]=g-3,f[_+2]=g-2,f[_+3]=g-3,f[_+4]=g-1,f[_+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=ta&&(r=this._x=0,o+=this._rowHeight+l,this._y=o,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,n),o+n+l>s)return null;t.x+=this.offsetX*this.dpr+r,t.y+=this.offsetY*this.dpr+o,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/a+u[0],o/s+u[1]],[(r+e)/a+u[0],(o+n)/s+u[1]]]},_fitElement:function(t,e,n){var i=t.getBoundingRect(),r=e/i.width,o=n/i.height;t.x=-i.x*r,t.y=-i.y*o,t.scaleX=r,t.scaleY=o,t.update()}},za.prototype={clear:function(){for(var t=0;t=t)){var r=(n+this._nodeWidth)*this._dpr,o=(i+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:o})}catch(t){this._canvas.width=r,this._canvas.height=o}var a=new Ra(this._zr,n,i,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(a),a}},add:function(t,e,n){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,n);if(!i){var r=this._expand();if(!r)return;i=r.add(t,e,n)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}};const Ba=za;function Za(){}Za.prototype={constructor:Za,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new Jo.DirectionalLight({shadowBias:.005}),this.ambientLight=new Jo.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,n=this.ambientLight,i=t.getModel("light"),r=i.getModel("main"),o=i.getModel("ambient");e.intensity=r.get("intensity"),n.intensity=o.get("intensity"),e.color=Jo.parseColor(r.get("color")).slice(0,3),n.color=Jo.parseColor(o.get("color")).slice(0,3);var a=r.get("alpha")||0,s=r.get("beta")||0;e.position.setArray(Jo.directionFromAlphaBeta(a,s)),e.lookAt(Jo.Vector3.ZERO),e.castShadow=r.get("shadow"),e.shadowResolution=Jo.getShadowResolution(r.get("shadowQuality"))},updateAmbientCubemap:function(t,e,n){var i=e.getModel("light.ambientCubemap"),r=i.get("texture");if(r){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[r];if(!o){var a=this;o=this._cubemapLightsCache[r]=Jo.createAmbientCubemap(i.option,t,n,(function(){a._isSkyboxFromAmbientCubemap&&a._skybox.setEnvironmentMap(o.specular.cubemap),n.getZr().refresh()}))}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,n){var r=e.get("environment"),o=this,a=(o._skybox=o._skybox||new ji,o._skybox);if(r&&"none"!==r)if("auto"===r)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var s=this._currentCubemapLights.specular.cubemap;a.setEnvironmentMap(s),this._scene&&a.attachScene(this._scene),a.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof r&&r.colorStops||"string"==typeof r&&i.color.parse(r)){this._isSkyboxFromAmbientCubemap=!1;var l=new Jo.Texture2D({anisotropic:8,flipY:!1});a.setEnvironmentMap(l);var u=l.image=document.createElement("canvas");u.width=u.height=16;var h=u.getContext("2d"),c=new i.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:r}});i.innerDrawElementOnCanvas(h,c),a.attachScene(this._scene)}else this._isSkyboxFromAmbientCubemap=!1,l=Jo.loadTexture(r,n,{anisotropic:8,flipY:!1}),a.setEnvironmentMap(l),a.attachScene(this._scene);else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var d=e.coordinateSystem;if(this._skybox)if(!d||!d.viewGL||"auto"===r||r.match&&r.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var p=d.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[p]("fragment","SRGB_DECODE")}}};const Fa=Za;var Va=Pa.vec3,Ga=Hn.extend((function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,n=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==n&&(e.position.init(n),e.normal.init(n),e.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=Va.create(),e=Va.create(),n=Va.create(),i=[0,3,1,3,2,1];return function(r,o){var a=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;Va.sub(t,r[1],r[0]),Va.sub(e,r[2],r[1]),Va.cross(n,t,e),Va.normalize(n,n);for(var u=0;u<4;u++)a.set(this._vertexOffset+u,r[u]),l.set(this._vertexOffset+u,o),s.set(this._vertexOffset+u,n);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});i.util.defaults(Ga.prototype,La);const Ha=Ga;var Ua=Mr,Wa={x:0,y:2,z:1};function ja(t,e,n){this.rootNode=new Jo.Node;var i=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),r=new Jo.Mesh({geometry:new Ha,material:n,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(r),this.rootNode.add(i),this.faceInfo=t,this.plane=new Jo.Plane,this.linesMesh=i,this.quadsMesh=r}ja.prototype.update=function(t,e,n){var i=t.coordinateSystem,r=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,a=this.quadsMesh.geometry;o.convertToDynamicArray(!0),a.convertToDynamicArray(!0),this._updateSplitLines(o,r,t,n),this._udpateSplitAreas(a,r,t,n),o.convertToTypedArray(),a.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);!function(t,e,n,i){var r=[0,0,0],o=i<0?n.getExtentMin():n.getExtentMax();r[Wa[n.dim]]=o,t.position.setArray(r),t.rotation.identity(),e.distance=-Math.abs(o),e.normal.set(0,0,0),"x"===n.dim?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):"z"===n.dim?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}(this.rootNode,this.plane,s,this.faceInfo[3])},ja.prototype._updateSplitLines=function(t,e,n,r){var o=r.getDevicePixelRatio();e.forEach((function(r,a){var s=r.model,l=e[1-a].getExtent();if(!r.scale.isBlank()){var u=s.getModel("splitLine",n.getModel("splitLine"));if(u.get("show")){var h=u.getModel("lineStyle"),c=h.get("color"),d=Ua(h.get("opacity"),1),p=Ua(h.get("width"),1);c=i.util.isArray(c)?c:[c];for(var f=r.getTicksCoords({tickModel:u}),g=0,m=0;m65535?new Uint32Array(3*n):new Uint16Array(3*n))},setSpriteAlign:function(t,e,n,i,r){var o,a,s,l;switch(null==n&&(n="left"),null==i&&(i="top"),r=r||0,n){case"left":o=r,s=e[0]+r;break;case"center":case"middle":o=-e[0]/2,s=e[0]/2;break;case"right":o=-e[0]-r,s=-r}switch(i){case"bottom":a=r,l=e[1]+r;break;case"middle":a=-e[1]/2,l=e[1]/2;break;case"top":a=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[o,l]),h.set(u+1,[s,l]),h.set(u+2,[s,a]),h.set(u+3,[o,a])},addSprite:function(t,e,n,i,r,o){var a=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,n,i,r,o);for(var s=0;s 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end";var rs=Mr;Jo.Shader.import(is);var os={x:0,y:2,z:1};const as=i.ComponentView.extend({type:"grid3D",__ecgl__:!0,init:function(t,e){var n=new Jo.Material({shader:Jo.createShader("ecgl.color"),depthMask:!1,transparent:!0}),i=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});n.define("fragment","DOUBLE_SIDED"),n.define("both","VERTEX_COLOR"),this.groupGL=new Jo.Node,this._control=new Ia({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new Xa(t,i,n);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new ns(t,i);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new Ba({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:i,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new Ba({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new Ja({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,n){this._model=t,this._api=n;var i=t.coordinateSystem;i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(i.viewGL);var o=t.getModel("viewControl");r.setFromViewControlModel(o,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(i){i.update(t,e,n)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,n)}),this)),r.on("update",this._onCameraChange.bind(this,t,n),this),this._sceneHelper.setScene(i.viewGL.scene),this._sceneHelper.updateLight(t),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},showAxisPointer:function(t,e,n,i){this._doShowAxisPointer(),this._updateAxisPointer(i.value)},hideAxisPointer:function(t,e,n,i){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,n=this._model.coordinateSystem,i=n.viewGL,r=i.castRay(t.offsetX,t.offsetY,new Jo.Ray),o=0;oi[1]?0:1,a=this._faces[2*n+o],s=this._faces[2*n+1-o];a.rootNode.invisible=!0,s.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),n=t.getAxis("y"),i=t.getAxis("z"),r=i.getExtentMax(),o=i.getExtentMin(),a=e.getExtentMin(),s=e.getExtentMax(),l=n.getExtentMax(),u=n.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,p=this._faces,f=p[4].rootNode.invisible?u:l,g=p[2].rootNode.invisible?r:o,m=p[0].rootNode.invisible?a:s,v=p[2].rootNode.invisible?r:o,y=p[0].rootNode.invisible?s:a,_=p[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),p[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),p[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),p[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,f),c.position.set(m,v,0),d.position.set(y,0,_),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new Jo.Vector4,new Jo.Vector4],n=new Jo.Vector4;this.groupGL.getWorldPosition(n),n.w=1,n.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),n.x/=n.w,n.y/=n.w,this._axes.forEach((function(i){for(var r=i.axisLineCoords,o=(i.labelsMesh.geometry,0);on.y?"bottom":"top"):(s="middle",a=h>n.x?"left":"right"),i.setSpriteAlign(a,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,n=e.dataToPoint(t),i=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function a(t){return Mr(t.model.get("axisPointer.show"),r.get("show"))}function s(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),n=Jo.parseColor(e.get("color")),i=rs(e.get("width"),1),o=rs(e.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}i.convertToDynamicArray(!0);for(var l=0;lf&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}ms.x=ys.x=n.x,ms.y=_s.y=n.y,vs.x=_s.x=n.x+n.width,vs.y=ys.y=n.y+n.height,ms.transform(i),_s.transform(i),vs.transform(i),ys.transform(i),e.x=fs(ms.x,vs.x,ys.x,_s.x),e.y=fs(ms.y,vs.y,ys.y,_s.y);var l=gs(ms.x,vs.x,ys.x,_s.x),u=gs(ms.y,vs.y,ys.y,_s.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}();function Ss(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}function Ts(t,e,n){n=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}(n||0);var i=e.width,r=e.height,o=ma(t.left,i),a=ma(t.top,r),s=ma(t.right,i),l=ma(t.bottom,r),u=ma(t.width,i),h=ma(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(p>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ws(o+n[3],a+n[0],u,h);return f.margin=n,f}So(Ss,"vertical"),So(Ss,"horizontal");var Ms=function(){this._pool={},this._allocatedTextures=[]};Ms.prototype={constructor:Ms,get:function(t){var e=Ds(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var n=this._pool[e];if(!n.length){var i=new Ln(t);return this._allocatedTextures.push(i),i}return n.pop()},put:function(t){var e=Ds(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;e 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n #endif\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n #else\n depth += bias;\n #endif\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec4 P = vec4(position, 1.0);\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = skinMatrixWS * P;\n#endif\n#ifdef INSTANCING\n @import clay.chunk.instancing_matrix\n P = instanceMat * P;\n#endif\n gl_Position = worldViewProjection * P;\n v_WorldPosition = (world * P).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end");var Es,Ns,ks,Rs,zs,Bs,Zs,Fs=g.extend((function(){return{softShadow:Fs.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new Zi,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new Is}}),(function(){this._gaussianPassH=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new fr({fragment:jt.source("clay.sm.debug_depth")})}),{render:function(t,e,n,i){n||(n=e.getMainCamera()),this.trigger("beforerender",this,t,e,n),this._renderShadowPass(t,e,n,i),this.trigger("afterrender",this,t,e,n)},renderDebug:function(t,e){t.saveClear();var n=t.viewport,i=0,r=e||n.width/4,o=r;for(var a in this.softShadow===Fs.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM"),this._textures){var s=this._textures[a];t.setViewport(i,0,r*s.width/s.height,o),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(t),i+=r*s.width/s.height}t.setViewport(n),t.restoreClear()},_updateReceivers:function(t,e){if(e.receiveShadow?(this._receivers.push(e),e.material.set("shadowEnabled",1),e.material.set("pcfKernel",this.kernelPCF)):e.material.set("shadowEnabled",0),this.softShadow===Fs.VSM)e.material.define("fragment","USE_VSM"),e.material.undefine("fragment","PCF_KERNEL_SIZE");else{e.material.undefine("fragment","USE_VSM");var n=this.kernelPCF;n&&n.length?e.material.define("fragment","PCF_KERNEL_SIZE",n.length/2):e.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(t,e){var n=this;e.traverse((function(e){e.isRenderable()&&n._updateReceivers(t,e)}));for(var i=0;i4){console.warn("Support at most 4 cascade");continue}f.shadowCascade>1&&(a=f),this.renderDirectionalLightShadow(t,e,n,f,c,h,u)}else"SPOT_LIGHT"===f.type?this.renderSpotLightShadow(t,e,f,l,s):"POINT_LIGHT"===f.type&&this.renderPointLightShadow(t,e,f,d);this._shadowMapNumber[f.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(p=0;p0?y.define("fragment",v,m):y.isDefined("fragment",v)&&y.undefine("fragment",v))}for(p=0;p0){var x=u.map(T);if(_.directionalLightShadowMaps={value:u,type:"tv"},_.directionalLightMatrices={value:h,type:"m4v"},_.directionalLightShadowMapSizes={value:x,type:"1fv"},a){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),_.shadowCascadeClipsNear={value:b,type:"1fv"},_.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var S=s.map(T);(_=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},_.spotLightMatrices={value:l,type:"m4v"},_.spotLightShadowMapSizes={value:S,type:"1fv"}}d.length>0&&(_.pointLightShadowMaps={value:d,type:"tv"})}function T(t){return t.height}},renderDirectionalLightShadow:(Es=new li,Ns=new He,ks=new rn,Rs=new He,zs=new He,Bs=new He,Zs=new He,function(t,e,n,i,r,o,a){var s=this._getDepthMaterial(i),l={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:Os,getUniform:Ps,ifRender:function(t){return t.castShadow},sortCompare:he.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var u=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(u).applyTransform(n.viewMatrix)}var h=Math.min(-e.viewBoundingBoxLastFrame.min.z,n.far),c=Math.max(-e.viewBoundingBoxLastFrame.max.z,n.near),d=this._getDirectionalLightCamera(i,e,n),p=Bs.array;Zs.copy(d.projectionMatrix),qt.invert(zs.array,d.worldTransform.array),qt.multiply(zs.array,zs.array,n.worldTransform.array),qt.multiply(p,Zs.array,zs.array);for(var f=[],g=n instanceof Di,m=(n.near+n.far)/(n.near-n.far),v=2*n.near*n.far/(n.near-n.far),y=0;y<=i.shadowCascade;y++){var _=c*Math.pow(h/c,y/i.shadowCascade),x=c+(h-c)*y/i.shadowCascade,b=_*i.cascadeSplitLogFactor+x*(1-i.cascadeSplitLogFactor);f.push(b),r.push(-(-b*m+v)/-b)}var w=this._getTexture(i,i.shadowCascade);a.push(w);var S=t.viewport,T=t.gl;for(this._frameBuffer.attach(w),this._frameBuffer.bind(t),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT),y=0;yd?s>p?f[r>0?"px":"nx"]=!0:f[a>0?"pz":"nz"]=!0:d>p?f[o>0?"py":"ny"]=!0:f[a>0?"pz":"nz"]=!0}for(n=0;n0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}}),Hs=g.extend((function(){return{nodes:[]}}),{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=n.COLOR_ATTACHMENT0&&h<=n.COLOR_ATTACHMENT0+8&&u.push(h);l.drawBuffersEXT(u)}t.saveClear(),t.clearBit=16640,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}}),js=Gs.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),Xs=Gs.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new fr({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var n=t.gl;for(var i in this.inputLinks){var r=(c=this.inputLinks[i]).node.getOutput(t,c.pin);this.pass.setUniform(i,r)}if(this.outputs){this.pass.outputs={};var o={};for(var a in this.outputs){var s=this.updateParameter(a,t);isNaN(s.width)&&this.updateParameter(a,t);var l=this.outputs[a],u=this._compositor.allocateTexture(s);this._outputTextures[a]=u,"string"==typeof(h=l.attachment||n.COLOR_ATTACHMENT0)&&(h=n[h]),o[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),o)this._compositor.getFrameBuffer().attach(o[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var i in this.inputLinks){var c;(c=this.inputLinks[i]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var n,i,r=this.outputs[t],o=r.parameters,a=r._parametersCopy;if(a||(a=r._parametersCopy={}),o)for(var s in o)"width"!==s&&"height"!==s&&(a[s]=o[s]);return n="function"==typeof o.width?o.width.call(this,e):o.width,i="function"==typeof o.height?o.height.call(this,e):o.height,n=Math.ceil(n),i=Math.ceil(i),a.width===n&&a.height===i||this._outputTextures[t]&&this._outputTextures[t].dispose(e),a.width=n,a.height=i,a},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){Gs.prototype.clear.call(this),this.pass.material.disableTexturesAll()}}),Ys="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",qs="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",Ks="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",Js="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",Qs="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",$s="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",tl="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",el="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",nl="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";!function(t){t.import("@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"),t.import(Ys),t.import("@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"),t.import(qs),t.import("@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"),t.import(Ks),t.import(Js),t.import(Qs),t.import($s),t.import(tl),t.import("@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"),t.import(el),t.import(nl)}(jt);var il=/^#source\((.*?)\)/;function rl(t,e,n){var i,r,o,a,s=t.type||"filter";if("filter"===s){var l=t.shader.trim(),u=il.exec(l);if(u?i=jt.source(u[1].trim()):"#"===l.charAt(0)&&(i=e.shaders[l.substr(1)]),i||(i=l),!i)return}if(t.inputs)for(var h in r={},t.inputs)"string"==typeof t.inputs[h]?r[h]=t.inputs[h]:r[h]={node:t.inputs[h].node,pin:t.inputs[h].pin};if(t.outputs)for(var h in o={},t.outputs){var c=t.outputs[h];o[h]={},null!=c.attachment&&(o[h].attachment=c.attachment),null!=c.keepLastFrame&&(o[h].keepLastFrame=c.keepLastFrame),null!=c.outputLastFrame&&(o[h].outputLastFrame=c.outputLastFrame),c.parameters&&(o[h].parameters=sl(c.parameters))}if(a="scene"===s?new Ws({name:t.name,scene:n.scene,camera:n.camera,outputs:o}):"texture"===s?new js({name:t.name,outputs:o}):new Xs({name:t.name,shader:i,inputs:r,outputs:o})){if(t.parameters)for(var h in t.parameters)"string"==typeof(d=t.parameters[h])?"#"===(d=d.trim()).charAt(0)?d=e.textures[d.substr(1)]:a.on("beforerender",ll(h,ul(d))):"function"==typeof d&&a.on("beforerender",d),a.setParameter(h,d);if(t.defines&&a.pass)for(var h in t.defines){var d=t.defines[h];a.pass.material.define("fragment",h,d)}}return a}function ol(t,e){return t}function al(t,e){return e}function sl(t){var e={};if(!t)return e;["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach((function(n){var i=t[n];null!=i&&("string"==typeof i&&(i=Sn[i]),e[n]=i)}));var n=t.scale||1;return["width","height"].forEach((function(i){if(null!=t[i]){var r=t[i];"string"==typeof r?(r=r.trim(),e[i]=(o=ul(r),a=(a=n)||1,function(t){var e=t.getDevicePixelRatio(),n=t.getWidth()*a,i=t.getHeight()*a;return o(n,i,e)})):e[i]=r}var o,a})),e.width||(e.width=ol),e.height||(e.height=al),null!=t.useMipmap&&(e.useMipmap=t.useMipmap),e}function ll(t,e){return function(n){var i=n.getDevicePixelRatio(),r=n.getWidth(),o=n.getHeight(),a=e(r,o,i);this.setParameter(t,a)}}function ul(t){var e=/^expr\((.*)\)$/.exec(t);if(e)try{var n=new Function("width","height","dpr","return "+e[1]);return n(1,1),n}catch(t){throw new Error("Invalid expression.")}}const hl=function(t,e){for(var n=0,i=1/e,r=t;r>0;)n+=i*(r%e),r=Math.floor(r/e),i/=e;return n};function cl(t){for(var e=new Uint8Array(t*t*4),n=0,i=new ye,r=0;r 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"),fl.prototype.setDepthTexture=function(t){this._depthTex=t},fl.prototype.setNormalTexture=function(t){this._normalTex=t,this._ssaoPass.material[t?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},fl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._ssaoPass,a=this._blurPass;o.setUniform("kernel",this._kernels[n%this._kernels.length]),o.setUniform("depthTex",this._depthTex),null!=this._normalTex&&o.setUniform("normalTex",this._normalTex),o.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var s=new He;He.transpose(s,e.worldTransform),o.setUniform("projection",e.projectionMatrix.array),o.setUniform("projectionInv",e.invProjectionMatrix.array),o.setUniform("viewInverseTranspose",s.array);var l=this._ssaoTexture,u=this._blurTexture,h=this._blurTexture2;l.width=i/2,l.height=r/2,u.width=i,u.height=r,h.width=i,h.height=r,this._framebuffer.attach(l),this._framebuffer.bind(t),t.gl.clearColor(1,1,1,1),t.gl.clear(t.gl.COLOR_BUFFER_BIT),o.render(t),a.setUniform("textureSize",[i/2,r/2]),a.setUniform("projection",e.projectionMatrix.array),this._framebuffer.attach(u),a.setUniform("direction",0),a.setUniform("ssaoTexture",l),a.render(t),this._framebuffer.attach(h),a.setUniform("textureSize",[i,r]),a.setUniform("direction",1),a.setUniform("ssaoTexture",u),a.render(t),this._framebuffer.unbind(t);var c=t.clearColor;t.gl.clearColor(c[0],c[1],c[2],c[3])},fl.prototype.getTargetTexture=function(){return this._blurTexture2},fl.prototype.setParameter=function(t,e){"noiseTexSize"===t?this.setNoiseSize(e):"kernelSize"===t?this.setKernelSize(e):"intensity"===t?this._ssaoPass.material.set("intensity",e):this._ssaoPass.setUniform(t,e)},fl.prototype.setKernelSize=function(t){this._kernelSize=t,this._ssaoPass.material.define("fragment","KERNEL_SIZE",t),this._kernels=this._kernels||[];for(var e=0;e<30;e++)this._kernels[e]=pl(t,e*t,!!this._normalTex)},fl.prototype.setNoiseSize=function(t){var e=this._ssaoPass.getUniform("noiseTex");e?(e.data=cl(t),e.width=e.height=t,e.dirty()):(e=dl(t),this._ssaoPass.setUniform("noiseTex",dl(t))),this._ssaoPass.setUniform("noiseTexSize",[t,t])},fl.prototype.dispose=function(t){this._blurTexture.dispose(t),this._ssaoTexture.dispose(t),this._blurTexture2.dispose(t)};const gl=fl;function ml(t){t=t||{},this._ssrPass=new fr({fragment:jt.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new fr({fragment:jt.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",t.normalTexture),this._ssrPass.setUniform("gBufferTexture2",t.depthTexture),this._blurPass1.setUniform("gBufferTexture1",t.normalTexture),this._blurPass1.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.setUniform("gBufferTexture1",t.normalTexture),this._blurPass2.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new Ln({type:Sn.HALF_FLOAT}),this._texture2=new Ln({type:Sn.HALF_FLOAT}),this._texture3=new Ln({type:Sn.HALF_FLOAT}),this._prevTexture=new Ln({type:Sn.HALF_FLOAT}),this._currentTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}jt.import("@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"),ml.prototype.setAmbientCubemap=function(t,e){this._ssrPass.material.set("specularCubemap",t),this._ssrPass.material.set("specularIntensity",e);var n=t&&e;this._ssrPass.material[n?"enableTexture":"disableTexture"]("specularCubemap")},ml.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._ssrTexture,s=this._texture2,l=this._texture3;a.width=this._prevTexture.width=this._currentTexture.width=r/this._downScale,a.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,s.width=l.width=r,s.height=l.height=o;var u=this._frameBuffer,h=this._ssrPass,c=this._blurPass1,d=this._blurPass2,p=this._blendPass,f=new He,g=new He;He.transpose(f,e.worldTransform),He.transpose(g,e.viewMatrix),h.setUniform("sourceTexture",n),h.setUniform("projection",e.projectionMatrix.array),h.setUniform("projectionInv",e.invProjectionMatrix.array),h.setUniform("toViewSpace",f.array),h.setUniform("toWorldSpace",g.array),h.setUniform("nearZ",e.near);var m=i/this._totalSamples*this._samplePerFrame;if(h.setUniform("jitterOffset",m),h.setUniform("sampleOffset",i*this._samplePerFrame),c.setUniform("textureSize",[a.width,a.height]),d.setUniform("textureSize",[r,o]),d.setUniform("sourceTexture",n),c.setUniform("projection",e.projectionMatrix.array),d.setUniform("projection",e.projectionMatrix.array),u.attach(a),u.bind(t),h.render(t),this._physicallyCorrect&&(u.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",a),p.material.set({weight1:i>=1?.95:0,weight2:i>=1?.05:1}),p.render(t)),u.attach(s),c.setUniform("texture",this._physicallyCorrect?this._currentTexture:a),c.render(t),u.attach(l),d.setUniform("texture",s),d.render(t),u.unbind(t),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},ml.prototype.getTargetTexture=function(){return this._texture3},ml.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},ml.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=vr.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},ml.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},ml.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},ml.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};const vl=ml,yl=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925];function _l(t,e,n,i,r){var o=t.gl;e.setUniform(o,"1i",n,r),o.activeTexture(o.TEXTURE0+r),i.isRenderable()?i.bind(t):i.unbind(t)}function xl(t,e,n,i,r){var o,a,s,l,u=t.gl;return function(r,h,c){if(!l||l.material!==r.material){var d=r.material,p=r.__program,f=d.get("roughness");null==f&&(f=1);var g=d.get("normalMap")||e,m=d.get("roughnessMap"),v=d.get("bumpMap"),y=d.get("uvRepeat"),_=d.get("uvOffset"),x=d.get("detailUvRepeat"),b=d.get("detailUvOffset"),w=!!v&&d.isTextureEnabled("bumpMap"),S=!!m&&d.isTextureEnabled("roughnessMap"),T=d.isDefined("fragment","DOUBLE_SIDED");v=v||n,m=m||i,c!==h?(h.set("normalMap",g),h.set("bumpMap",v),h.set("roughnessMap",m),h.set("useBumpMap",w),h.set("useRoughnessMap",S),h.set("doubleSide",T),null!=y&&h.set("uvRepeat",y),null!=_&&h.set("uvOffset",_),null!=x&&h.set("detailUvRepeat",x),null!=b&&h.set("detailUvOffset",b),h.set("roughness",f)):(p.setUniform(u,"1f","roughness",f),o!==g&&_l(t,p,"normalMap",g,0),a!==v&&v&&_l(t,p,"bumpMap",v,1),s!==m&&m&&_l(t,p,"roughnessMap",m,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=_&&p.setUniform(u,"2f","uvOffset",_),null!=x&&p.setUniform(u,"2f","detailUvRepeat",x),null!=b&&p.setUniform(u,"2f","detailUvOffset",b),p.setUniform(u,"1i","useBumpMap",+w),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+T)),o=g,a=v,s=m,l=r}}}function bl(t){t=t||{},this._depthTex=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._normalTex=new Ln({type:Sn.HALF_FLOAT}),this._framebuffer=new Zi,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,Zi.DEPTH_ATTACHMENT),this._normalMaterial=new lt({shader:new jt(jt.source("ecgl.normal.vertex"),jt.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=or.createBlank("#000"),this._defaultBumpMap=or.createBlank("#000"),this._defaultRoughessMap=or.createBlank("#000"),this._debugPass=new fr({fragment:jt.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}jt.import("@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"),bl.prototype.getDepthTexture=function(){return this._depthTex},bl.prototype.getNormalTexture=function(){return this._normalTex},bl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._depthTex,a=this._normalTex,s=this._normalMaterial;o.width=i,o.height=r,a.width=i,a.height=r;var l=e.getRenderList(n).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,n,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:xl(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},bl.prototype.renderDebug=function(t){this._debugPass.render(t)},bl.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)};const wl=bl;function Sl(t){t=t||{},this._edgePass=new fr({fragment:jt.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi,this._frameBuffer.attach(this._targetTexture)}Sl.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._targetTexture;a.width=r,a.height=o;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,o]),this._edgePass.setUniform("texture",n),this._edgePass.render(t),s.unbind(t)},Sl.prototype.getTargetTexture=function(){return this._targetTexture},Sl.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},Sl.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};const Tl=Sl,Ml={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]};function Al(t,e){return{color:{parameters:{width:t,height:e}}}}jt.import(Ys),jt.import(qs),jt.import(Ks),jt.import(Js),jt.import(Qs),jt.import($s),jt.import(tl),jt.import(el),jt.import(nl),jt.import("@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"),jt.import("@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end");var Cl=["composite","FXAA"];function Dl(){this._width,this._height,this._dpr,this._sourceTexture=new Ln({type:Sn.HALF_FLOAT}),this._depthTexture=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._framebuffer=new Zi,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,Zi.DEPTH_ATTACHMENT),this._normalPass=new wl,this._compositor=function(t,e){var n=new Us;e=e||{};var i={textures:{},parameters:{}};for(var r in t.parameters){var o=t.parameters[r];i.parameters[r]=sl(o)}return function(t,e,n,i){if(t.textures){var r={},o=0,a=!1,s=n.textureRootPath;p.each(t.textures,(function(t,e){var n,l=t.path,u=sl(t.parameters);if(Array.isArray(l)&&6===l.length)s&&(l=l.map((function(t){return p.relative2absolute(t,s)}))),n=new Ci(u);else{if("string"!=typeof l)return;s&&(l=p.relative2absolute(l,s)),n=new Ln(u)}n.load(l),o++,n.once("success",(function(){r[e]=n,0==--o&&(i(r),a=!0)}))})),0!==o||a||i(r)}else i({})}(t,0,e,(function(r){i.textures=r,function(r,o){for(var a=0;a=this._haltonSequence.length},render:function(t,e,n){var i=this._blendPass;0===this._frame?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),n||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}};const Pl=Ll;function Ol(t){t=t||"perspective",this.layer=null,this.scene=new _i,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new Il,this._temporalSS=new Pl,this._shadowMapPass=new Vs;for(var e=[],n=0,i=0;i<30;i++){for(var r=[],o=0;o<6;o++)r.push(4*hl(n,2)-2),r.push(4*hl(n,3)-2),n++;e.push(r)}this._pcfKernels=e,this.scene.on("beforerender",(function(t,e,n){this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n)}),this)}Ol.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),"perspective"===t?this.camera instanceof Di||(this.camera=new Di,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof hr||(this.camera=new hr,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3},Ol.prototype.setViewport=function(t,e,n,i,r){this.camera instanceof Di&&(this.camera.aspect=n/i),r=r||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=n,this.viewport.height=i,this.viewport.devicePixelRatio=r,this._compositor.resize(n*r,i*r),this._temporalSS.resize(n*r,i*r)},Ol.prototype.containPoint=function(t,e){var n=this.viewport;return e=this.layer.renderer.getHeight()-e,t>=n.x&&e>=n.y&&t<=n.x+n.width&&e<=n.y+n.height};var El=new vt;Ol.prototype.castRay=function(t,e,n){var i=this.layer.renderer,r=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,El),this.camera.castRay(El,n),i.viewport=r,n},Ol.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},Ol.prototype._doRender=function(t,e,n){var i=this.scene,r=this.camera;n=n||0,this._updateTransparent(t,i,r,n),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,r,!0)),this._updateShadowPCFKernel(n);var o,a=t.clearColor;t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,i,r,this._temporalSS.getFrame())),this._updateSSAO(t,i,r,this._temporalSS.getFrame()),this._enablePostEffect?((o=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,r,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,r,null,0))):this.needsTemporalSS()&&e?((o=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,r,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(i,r,!0,!0))},Ol.prototype._updateTransparent=function(t,e,n,i){for(var r=new ye,o=new He,a=n.getWorldPosition(),s=e.getRenderList(n).transparent,l=0;lthis.camera.far||t80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);u=Math.max(o-i,a-r)}return ru(d,p,n,i,r,u),p}function nu(t,e,n,i,r){var o,a;if(r===Su(t,e,n,i)>0)for(o=e;o=e;o-=i)a=xu(o,t[o],t[o+1],a);return a&&mu(a,a.next)&&(bu(a),a=a.next),a}function iu(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!mu(i,i.next)&&0!==gu(i.prev,i,i.next))i=i.next;else{if(bu(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function ru(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=cu(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?au(t,i,r,o):ou(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),bu(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?ru(t=su(t,e,n),e,n,i,r,o,2):2===a&&lu(t,e,n,i,r,o):ru(iu(t),e,n,i,r,o,1);break}}}function ou(t){var e=t.prev,n=t,i=t.next;if(gu(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(pu(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&gu(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function au(t,e,n,i){var r=t.prev,o=t,a=t.next;if(gu(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,h=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=cu(s,l,e,n,i),d=cu(u,h,e,n,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function su(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!mu(r,o)&&vu(r,i,i.next,o)&&yu(r,o)&&yu(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),bu(i),bu(i.next),i=t=o),i=i.next}while(i!==t);return i}function lu(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&fu(a,s)){var l=_u(a,s);return a=iu(a,a.next),l=iu(l,l.next),ru(a,e,n,i,r,o),void ru(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function uu(t,e){return t.x-e.x}function hu(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=h&&r!==i.x&&pu(on.x)&&yu(i,t)&&(n=i,d=l),i=i.next;return n}(t,e)){var n=_u(e,t);iu(n,n.next)}}function cu(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function du(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function fu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&vu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&yu(t,e)&&yu(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function gu(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function mu(t,e){return t.x===e.x&&t.y===e.y}function vu(t,e,n,i){return!!(mu(t,e)&&mu(n,i)||mu(t,i)&&mu(n,e))||gu(t,e,n)>0!=gu(t,e,i)>0&&gu(n,i,t)>0!=gu(n,i,e)>0}function yu(t,e){return gu(t.prev,t,t.next)<0?gu(t,e,t.next)>=0&&gu(t,t.prev,e)>=0:gu(t,e,t.prev)<0||gu(t,t.next,e)<0}function _u(t,e){var n=new wu(t.i,t.x,t.y),i=new wu(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function xu(t,e,n,i){var r=new wu(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function bu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function wu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Su(t,e,n,i){for(var r=0,o=e,a=n-i;ou&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l}),u=o[a].pivot+1,(l=o[a].right)>u&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l})}o=this._parts=s}else for(a=0;a=2e4},doSortTriangles:function(t,e){var n=this.indices;if(0===e){var i=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new n.constructor(n.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var r,o=0,a=0;a0,n={},r=0;r65535?new Uint32Array(3*a):new Uint16Array(3*a),d.material.shader!==e&&d.material.attachShader(e,!0),Jo.setMaterialFromModel(e.__shading,d.material,t,n),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-i))},_updateRegionMesh:function(t,e,n,i){for(var r=t.getData(),o=0,a=0,s=!1,l=this._polygonMesh,u=this._linesMesh,h=n;h0;w&&(b*=e.getDevicePixelRatio(),this._updateLinesGeometry(u.geometry,t,h,y,b,t.coordinateSystem.transform)),u.invisible=!w,u.material.set({color:m})}(l=this._polygonMesh).material.transparent=s,l.material.depthMask=!s,l.geometry.updateBoundingBox(),l.frontFace=this.extrudeY?Jo.Mesh.CCW:Jo.Mesh.CW,l.material.get("normalMap")&&l.geometry.generateTangents(),l.seriesIndex=t.seriesIndex,l.on("mousemove",this._onmousemove,this),l.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var n=Jo.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=Mr(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",n),r.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,n){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(o=this._groundMaterials.lambert),Jo.setMaterialFromModel(r,o,i,n),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",Jo.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,n){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],o=t.coordinateSystem,a=e;a1?i:0,L[F][m]=A.points[G+2],l.set(r+F,L[F]),s?(N[0]=(A.points[G]*v[0]-y[0])/x,N[1]=(A.points[G+2]*v[m]-y[m])/x):(N[0]=(V?k:k+Z)/x,N[1]=(L[F][g]*v[g]-y[g])/x),h.set(r+F,N)}for(Bu.sub(P,L[1],L[0]),Bu.sub(O,L[3],L[0]),Bu.cross(E,P,O),Bu.normalize(E,E),F=0;F<4;F++)u.set(r+F,E),p&&c.set(r+F,a);for(F=0;F<6;F++)f[3*o+F]=I[F]+r;r+=4,o+=2,k+=Z}}return e.dirty(),{vertexOffset:r,triangleOffset:o}},_getRegionLinesInfo:function(t,e,n){var i=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,o=t.interiors;i+=n.getPolylineVertexCount(e),r+=n.getPolylineTriangleCount(e);for(var a=0;athis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[2*e];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});i.util.merge(nh.prototype,ca),i.util.merge(nh.prototype,da),i.util.merge(nh.prototype,pa),i.util.merge(nh.prototype,Kl);const ih=nh;var rh=Math.PI,oh=Math.sin,ah=Math.cos,sh=Math.tan,lh=Math.asin,uh=Math.atan2,hh=rh/180,ch=23.4397*hh;function dh(t,e){return uh(oh(t)*ah(ch)-sh(e)*oh(ch),ah(t))}function ph(t,e,n){return uh(oh(t),ah(t)*oh(e)-sh(n)*ah(e))}function fh(t,e,n){return lh(oh(e)*oh(n)+ah(e)*ah(n)*ah(t))}var gh={getPosition:function(t,e,n){var i=hh*-n,r=hh*e,o=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),a=function(t){var e,n,i=(n=function(t){return hh*(357.5291+.98560028*t)}(t))+hh*(1.9148*oh(n)+.02*oh(2*n)+3e-4*oh(3*n))+102.9372*hh+rh;return{dec:(e=i,lh(oh(0)*ah(ch)+ah(0)*oh(ch)*oh(e))),ra:dh(i,0)}}(o),s=function(t,e){return hh*(280.16+360.9856235*t)-e}(o,i)-a.ra;return{azimuth:ph(s,r,a.dec),altitude:fh(s,r,a.dec)}}};const mh=gh;Jo.Shader.import(Ho),Jo.Shader.import("@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end");const vh=i.ComponentView.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new Jo.Node,this._sphereGeometry=new Jo.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new Jo.PlaneGeometry,this._earthMesh=new Jo.Mesh({renderNormal:!0}),this._atmosphereMesh=new Jo.Mesh,this._atmosphereGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.atmosphere.vertex"),Jo.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=Jo.Mesh.CW,this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new Ia({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,n){var i=t.coordinateSystem,r=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var a="ecgl."+r;o.material&&o.material.shader.name===a||(o.material=Jo.createMaterial(a)),Jo.setMaterialFromModel(r,o.material,t,n),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",Jo.parseColor(t.get("baseColor")));var s=.99*i.radius;if(o.scale.set(s,s,s),t.get("atmosphere.show")){o.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),o.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else o.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),n,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),n,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,n),this._displaceVertices(t,n),this._updateViewControl(t,n),this._updateLayers(t,n)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},_updateLayers:function(t,e){var n=t.coordinateSystem,r=t.get("layers"),o=n.radius,a=[],s=[],l=[],u=[];i.util.each(r,(function(t){var r=new i.Model(t),h=r.get("type"),c=Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8});if(c.surface&&c.surface.attachToMesh(this._earthMesh),"blend"===h){var d=r.get("blendTo"),p=Mr(r.get("intensity"),1);"emission"===d?(l.push(c),u.push(p)):(a.push(c),s.push(p))}else{var f=r.get("id"),g=this._layerMeshes[f];g||(g=this._layerMeshes[f]=new Jo.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===r.get("shading")?(g.material=g.__lambertMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),g.__lambertMaterial=g.material):(g.material=g.__colorMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.color"),transparent:!0,depthMask:!1}),g.__colorMaterial=g.material),g.material.enableTexture("diffuseMap");var m=r.get("distance"),v=o+(null==m?n.radius/100:m);g.scale.set(v,v,v),o=v;var y=this._blankTexture||(this._blankTexture=Jo.createBlankTexture("rgba(255, 255, 255, 0)"));g.material.set("diffuseMap",y),Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(g),g.material.set("diffuseMap",t),e.getZr().refresh()})),r.get("show")?this.groupGL.add(g):this.groupGL.remove(g)}}),this);var h=this._earthMesh.material;h.define("fragment","LAYER_DIFFUSEMAP_COUNT",a.length),h.define("fragment","LAYER_EMISSIVEMAP_COUNT",l.length),h.set("layerDiffuseMap",a),h.set("layerDiffuseIntensity",s),h.set("layerEmissiveMap",l),h.set("layerEmissionIntensity",u);var c=t.getModel("debug.wireframe");if(c.get("show")){h.define("both","WIREFRAME_TRIANGLE");var d=Jo.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)"),p=Mr(c.get("lineStyle.width"),1);h.set("wireframeLineWidth",p),h.set("wireframeLineColor",d)}else h.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var n=t.coordinateSystem,i=t.getModel("viewControl"),r=(n.viewGL.camera,this),o=this._control;o.setViewGL(n.viewGL);var a,s,l=i.get("targetCoord");null!=l&&(s=l[0]+90,a=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:a,beta:s}),o.off("update"),o.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var n=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||n!==this._displacementQuality||i!==this._showDebugWireframe){this._displacementQuality=n,this._showDebugWireframe=i;var o=this._sphereGeometry,a={low:100,medium:200,high:400,ultra:800}[n]||200,s=a/2;(o.widthSegments!==a||i)&&(o.widthSegments=a,o.heightSegments=s,o.build()),this._doDisplaceVertices(o,r),i&&o.generateBarycentric()}},_doDisplaceVertices:function(t,e){var n=t.attributes.position.value,i=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===n.length||((r=new Float32Array(n.length)).set(n),t.__originalPosition=r);for(var o=e.displacementWidth,a=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var a=[];Oh.perspective(a,Nh,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(a),this.viewGL.camera.decomposeProjectionMatrix(),a=Oh.identity([]);var s=this.dataToPoint(this.center);Oh.scale(a,a,[1,-1,1]),Oh.translate(a,a,[0,0,-t]),Oh.rotateX(a,a,e),Oh.rotateZ(a,a,-this.bearing/180*Math.PI),Oh.translate(a,a,[-s[0]*this.getScale()*Rh,-s[1]*this.getScale()*Rh,0]),this.viewGL.camera.viewMatrix.array=a;var l=[];Oh.invert(l,a),this.viewGL.camera.worldTransform.array=l,this.viewGL.camera.decomposeWorldTransform();var u,h=Eh*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var c=this.altitudeExtent[1]-this.altitudeExtent[0];u=this.boxHeight/c*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else u=h/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*Rh;this.viewGL.rootNode.scale.set(this.getScale()*Rh,this.getScale()*Rh,u)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*Eh,e)},projectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1]*kh/180,o=e*(i*kh/180+kh)/(2*kh),a=e*(kh-Math.log(Math.tan(kh/4+.5*r)))/(2*kh);return(n=n||[])[0]=o,n[1]=a,n},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*Eh,e)},unprojectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1],o=i/e*(2*kh)-kh,a=2*(Math.atan(Math.exp(kh-r/e*(2*kh)))-kh/4);return(n=n||[])[0]=180*o/kh,n[1]=180*a/kh,n},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,Eh,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}};const Bh=zh;function Zh(){Bh.apply(this,arguments)}function Fh(t,e,n){function i(t,e){var n=e.getWidth(),i=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,n,i,r),this.width=n,this.height=i,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function r(t,e){if("auto"!==this.model.get("boxHeight")){var n=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=t.coordDimToDataDim("alt")[0];if(i){var r=e.getDataExtent(i,!0);n[0]=Math.min(n[0],r[0]),n[1]=Math.max(n[1],r[1])}}}),this),n&&isFinite(n[1]-n[0])&&(this.altitudeExtent=n)}}return{dimensions:e.prototype.dimensions,create:function(o,a){var s=[];return o.eachComponent(t,(function(t){var n=t.__viewGL;n||(n=t.__viewGL=new Nl).setRootNode(new Jo.Node);var o=new e;o.viewGL=t.__viewGL,o.resize=i,o.resize(t,a),s.push(o),t.coordinateSystem=o,o.model=t,o.update=r})),o.eachSeries((function(e){if(e.get("coordinateSystem")===t){var n=e.getReferringComponents(t).models[0];if(n||(n=o.getComponent(t)),!n)throw new Error(t+' "'+Mr(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=n.coordinateSystem}})),n&&n(s,o,a),s}}}Zh.prototype=new Bh,Zh.prototype.constructor=Zh,Zh.prototype.type="mapbox3D";const Vh=Fh("mapbox3D",Zh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMapboxCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Ah),t.registerComponentView(Ph),t.registerCoordinateSystem("mapbox3D",Vh),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"mapbox3D",query:t},(function(e){e.setMapboxCameraOption(t)}))}))}));var Gh=["zoom","center","pitch","bearing"],Hh=i.ComponentModel.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return Gh.reduce((function(e,n){return e[n]=t.get(n),e}),{})},setMaptalksCameraOption:function(t){null!=t&&Gh.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});i.util.merge(Hh.prototype,da),i.util.merge(Hh.prototype,pa);const Uh=Hh;function Wh(t,e,n,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:n,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}Wh.prototype.setUnpainted=function(){},Wh.prototype.resize=function(){this._maptalks.checkSize()},Wh.prototype.getMaptalks=function(){return this._maptalks},Wh.prototype.clear=function(){},Wh.prototype.refresh=function(){this._maptalks.checkSize()};var jh=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];Wh.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},jh.forEach((function(e){this._handlers[e]=function(n){var i={};for(var r in n)i[r]=n[r];i.bubbles=!1;var o=new n.constructor(n.type,i);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(o):t.firstElementChild.dispatchEvent(o)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},Wh.prototype.dispose=function(){jh.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()};const Xh=Wh;Jo.Shader.import(Lh);const Yh=i.ComponentView.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new Jo.Mesh({geometry:new Jo.PlaneGeometry,material:new Jo.Material({shader:new Jo.Shader({vertex:Jo.Shader.source("ecgl.displayShadow.vertex"),fragment:Jo.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var n=e.getZr();this._zrLayer=new Xh("maptalks3D",n,t.get("center"),t.get("zoom")),n.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach((function(t){i.on(t,r)}))},render:function(t,e,n){this._zrLayer||this._initMaptalksLayer(t,n);var i=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),o=i.getBaseLayer();r!==this._oldUrlTemplate&&(o?o.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(o=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(o))),this._oldUrlTemplate=r,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var a=t.coordinateSystem;a.viewGL.scene.add(this._lightRoot),a.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(a.viewGL.scene),this._sceneHelper.updateLight(t),a.viewGL.setPostEffect(t.getModel("postEffect"),n),a.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,n,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),n.getZr().refresh()},_dispatchInteractAction:function(t,e,n){var i;t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:(i=e.getResolution(),19-Math.log(i/qh)/Math.LN2+1),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var n=new Jo.Plane(new Jo.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new Jo.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new Jo.Vector2(1,1)),o=i.intersectPlane(n),a=r.intersectPlane(n),s=o.dist(a)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),qh=12756274*Math.PI/(256*Math.pow(2,20));function Kh(){Bh.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}Kh.prototype=new Bh,Kh.prototype.constructor=Kh,Kh.prototype.type="maptalks3D";const Jh=Fh("maptalks3D",Kh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMaptalksCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Uh),t.registerComponentView(Yh),t.registerCoordinateSystem("maptalks3D",Jh),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"maptalks3D",query:t},(function(e){e.setMaptalksCameraOption(t)}))}))}));var Qh=Pa.vec3,$h=i.helper.dataStack.isDimensionStacked;function tc(t,e,n){for(var i=t.getDataExtent(e),r=t.getDataExtent(n),o=i[1]-i[0]||i[0],a=r[1]-r[0]||r[0],s=new Uint8Array(2500),l=0;l0&&d>0||c<0&&d<0)),g=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),m=$h(n,g[2]),v=m?n.getCalculationInfo("stackResultDimension"):g[2];n.each(g,(function(t,i,o,a){var s=n.get(v,a),l=m?s-o:f?0:p[0],u=e.dataToPoint([t,i,l]),h=e.dataToPoint([t,i,s]),c=Qh.dist(u,h),d=[0,h[1]"+o.join("
")}(o):i.format.encodeHTML(i.format.addCommas(o)),s=r.getName(e),l=Nu(r,e);i.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=i.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?i.format.encodeHTML(h)+(n?": ":"
"):"",n?u+h+a:h+u+(s?i.format.encodeHTML(s)+": "+a:a)}function sc(t,e,n){n=n||t.getSource();var r=e||i.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],o=i.helper.createDimensions(n,{dimensionsDefine:n.dimensionsDefine||t.get("dimensions"),encodeDefine:n.encodeDefine||t.get("encode"),coordDimensions:r.map((function(e){var n=t.getReferringComponents(e+"Axis3D").models[0];return{type:n&&"category"===n.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&o.forEach((function(e){if(r.indexOf(e.coordDim)>=0){var n=t.getReferringComponents(e.coordDim+"Axis3D").models[0];n&&"category"===n.get("type")&&(e.ordinalMeta=n.getOrdinalMeta())}}));var a=i.helper.dataStack.enableDataStack(t,o,{byIndex:!0,stackedCoordDimension:"z"}),s=new i.List(o,t);return s.setCalculationInfo(a),s.initData(n),s}var lc=i.SeriesModel.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);return null==r&&(r=this.getData().get("z",t)),r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});i.util.merge(lc.prototype,Kl);const uc=lc;var hc,cc,dc,pc,fc,gc,mc,vc,yc=Pa.vec3,_c=Pa.mat3,xc=Hn.extend((function(){return{attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR"),prevPosition:new Hn.Attribute("prevPosition","float",3),prevNormal:new Hn.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,n=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==n&&(this.attributes.position.init(n),e?this.attributes.normal.init(n):this.attributes.normal.value=null,this.attributes.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i),this._dataIndices=new Uint32Array(n))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var n=this.getBarVertexCount(),i=n*(t+1),r=n*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,v);else{yc.copy(r,c),yc.normalize(r,r),yc.cross(o,g,r),yc.normalize(o,o),yc.cross(i,r,o),yc.normalize(o,o),yc.negate(a,i),yc.negate(s,r),yc.negate(l,o),e(u[0],t,i,m[0]/2),e(u[0],u[0],o,m[2]/2),e(u[1],t,i,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,a,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,a,m[0]/2),e(u[3],u[3],o,m[2]/2),e(n,t,r,m[1]),e(u[4],n,i,m[0]/2),e(u[4],u[4],o,m[2]/2),e(u[5],n,i,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],n,a,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],n,a,m[0]/2),e(u[7],u[7],o,m[2]/2);var x=this.attributes;if(this.enableNormal){h[0]=i,h[1]=a,h[2]=r,h[3]=s,h[4]=o,h[5]=l;for(var b=this._vertexOffset,w=0;w0&&(p++,h[3]<.99&&(f=!0))}})),a.geometry.setBarCount(p);var g=n.getLayout("orient"),m=this._barIndexOfData=new Int32Array(n.count());p=0,n.each((function(t){if(n.hasValue(t)){var e=n.getItemLayout(t),i=e[0],r=e[1],a=e[2],s=4*t;h[0]=c[s++],h[1]=c[s++],h[2]=c[s++],h[3]=c[s++],h[3]>0&&(o._barMesh.geometry.addBar(i,r,g,a,h,t),m[t]=p++)}else m[t]=-1})),a.geometry.dirty(),a.geometry.updateBoundingBox();var v=a.material;v.transparent=f,v.depthMask=!f,a.geometry.sortTriangles=f,this._initHandler(t,e)},_initHandler:function(t,e){var n=t.getData(),i=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=i.geometry.getDataIndexOfVertex(t.triangle[0]);a!==o&&(this._downplay(o),this._highlight(a),this._labelsBuilder.updateLabels([a]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",a),n.get("y",a),n.get("z",a,!0)]})),o=a,i.dataIndex=a}),this),i.on("mouseout",(function(t){this._downplay(o),this._labelsBuilder.updateLabels(),o=-1,i.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var r=e.getItemModel(t).getModel("emphasis.itemStyle"),o=r.get("color"),a=r.get("opacity");if(null==o){var s=Nu(e,t);o=i.color.lift(s,-.4)}null==a&&(a=ku(e,t));var l=Jo.parseColor(o);l[3]*=a,this._barMesh.geometry.setColor(n,l),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=Nu(e,t),r=ku(e,t),o=Jo.parseColor(i);o[3]*=r,this._barMesh.geometry.setColor(n,o),this._api.getZr().refresh()}}},highlight:function(t,e,n,i){this._toggleStatus("highlight",t,e,n,i)},downplay:function(t,e,n,i){this._toggleStatus("downplay",t,e,n,i)},_toggleStatus:function(t,e,n,r,o){var a=e.getData(),s=Ar(a,o),l=this;null!=s?i.util.each(oc.normalizeToArray(s),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):a.each((function(e){"highlight"===t?l._highlight(e):l._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Sc),t.registerSeriesModel(uc),rc(t),t.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))}));const Tc=i.SeriesModel.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return sc(this)},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}});function Mc(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||o=0){var m=3*l,v=new ye(this._points[m],this._points[m+1],this._points[m+2]);o.push({dataIndex:l,point:v,pointWorld:v.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(v)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Cc),t.registerSeriesModel(Tc),t.registerLayout((function(t,e){t.eachSeriesByType("line3D",(function(t){var e=t.getData(),n=t.coordinateSystem;if(n){if("cartesian3D"!==n.type)return;var i=new Float32Array(3*e.count()),r=[],o=[],a=n.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]}));n&&e.each(a,(function(t,e,a,s){r[0]=t,r[1]=e,r[2]=a,n.dataToPoint(r,o),i[3*s]=o[0],i[3*s+1]=o[1],i[3*s+2]=o[2]})),e.setLayout("points",i)}}))}))}));const Dc=i.SeriesModel.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function Ic(t,e,n){(e=e||document.createElement("canvas")).width=t,e.height=t;var i=e.getContext("2d");return n&&n(i),e}var Lc={getMarginByStyle:function(t){var e=t.minMargin||0,n=0;t.stroke&&"none"!==t.stroke&&(n=null==t.lineWidth?1:t.lineWidth);var i=t.shadowBlur||0,r=t.shadowOffsetX||0,o=t.shadowOffsetY||0,a={};return a.left=Math.max(n/2,-r+i,e),a.right=Math.max(n/2,r+i,e),a.top=Math.max(n/2,-o+i,e),a.bottom=Math.max(n/2,o+i,e),a},createSymbolSprite:function(t,e,n,r){var o=function(t,e,n,r){i.util.isArray(e)||(e=[e,e]);var o=Lc.getMarginByStyle(n,void 0),a=e[0]+o.left+o.right,s=e[1]+o.top+o.bottom,l=i.helper.createSymbol(t,0,0,e[0],e[1]),u=Math.max(a,s);l.x=o.left,l.y=o.top,a>s?l.y+=(u-s)/2:l.x+=(u-a)/2;var h=l.getBoundingRect();return l.x-=h.x,l.y-=h.y,l.setStyle(n),l.update(),l.__size=u,l}(t,e,n),a=Lc.getMarginByStyle(n);return{image:Ic(o.__size,r,(function(t){i.innerDrawElementOnCanvas(t,o)})),margin:a}},createSDFFromCanvas:function(t,e,n,i){return Ic(e,i,(function(e){var i=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,n){var i=e.width,r=e.height,o=t.canvas.width,a=t.canvas.height,s=i/o,l=r/a;function u(t){return t<128?1:-1}function h(t,o){var a=1/0;t=Math.floor(t*s);for(var h=(o=Math.floor(o*l))*i+t,c=u(e.data[4*h]),d=Math.max(o-n,0);d=2e4},doSortVertices:function(t,e){var n=this.indices,i=Oc.create();if(!n){n=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var r=0;r.05);else for(r=0;r<3;r++)this._progressiveQuickSort(3*e+r);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,n=this.indices;function i(t,n){return e[n]-e[t]}t?Array.prototype.sort.call(n,i):Du.sort(n,i,0,n.length-1)},_progressiveQuickSort:function(t){var e=this._zList,n=this.indices;this._quickSort=this._quickSort||new Du,this._quickSort.step(n,(function(t,n){return e[n]-e[t]}),t)}};var Nc=Pa.vec4;Jo.Shader.import("@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end");const kc=Jo.Mesh.extend((function(){var t=new Jo.Geometry({dynamic:!0,attributes:{color:new Jo.Geometry.Attribute("color","float",4,"COLOR"),position:new Jo.Geometry.Attribute("position","float",3,"POSITION"),size:new Jo.Geometry.Attribute("size","float",1),prevPosition:new Jo.Geometry.Attribute("prevPosition","float",3),prevSize:new Jo.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,Ec);var e=new Jo.Material({shader:Jo.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var n=new Jo.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",n),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:Jo.Mesh.POINTS,sizeScale:1}}),{_pick:function(t,e,n,i,r,o){var a=this._positionNDC;if(a)for(var s=n.viewport,l=2/s.width,u=2/s.height,h=this.geometry.vertexCount-1;h>=0;h--){var c,d=a[2*(c=this.geometry.indices?this.geometry.indices[h]:h)],p=a[2*c+1],f=this.geometry.attributes.size.get(c)/this.sizeScale/2;if(t>d-f*l&&tp-f*u&&e2?(f=this._updateSymbolSprite(t,d,h,c),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(r-i);var g=[];if(p){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var m=function(t){const e=t.getVisual("style");if(e)return e[t.getVisual("drawType")]}(a),v=function(t){return t.getVisual("style").opacity}(a);Jo.parseColor(m,g),g[3]*=v,s.set({color:g,u_Size:h.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(r-i),u.color.init(r-i),this._originalOpacity=new Float32Array(r-i);for(var y=a.getLayout("points"),_=u.position.value,x=0;x1?(a[0]=n.maxSize,a[1]=n.maxSize/n.aspect):(a[1]=n.maxSize,a[0]=n.maxSize*n.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===n.type&&(o=a,(r=this._symbolSize)&&o&&r[0]===o[0]&&r[1]===o[1])&&this._lineWidth===e.lineWidth||(Pc.createSymbolSprite(n.type,a,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),Pc.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=n.type,this._symbolSize=a,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/n.maxSize*i},_updateMaterial:function(t,e){var n="lighter"===t.get("blendMode")?Jo.additiveBlend:null,i=this._mesh.material;i.blend=n,i.set("lineWidth",e.lineWidth/20);var r=Jo.parseColor(e.stroke);i.set("strokeColor",r),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,n){var i=t.getData(),r=this._mesh.geometry,o=r.attributes.position.value,a=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(i,e,n),this._labelsBuilder.getLabelPosition=function(t,n,i){var r=3*(t-e);return[o[r],o[r+1],o[r+2]]},this._labelsBuilder.getLabelDistance=function(t,n,i){return r.attributes.size.get(t-e)/a/2+i},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,n){var i,r=t.getData(),o=this._mesh,a=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(i=t.coordinateSystem.model),o.seriesIndex=t.seriesIndex,o.off("mousemove"),o.off("mouseout"),o.on("mousemove",(function(e){var u=e.vertexIndex+a._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&n.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:i.componentIndex})),o.dataIndex=u,s=u}),this),o.on("mouseout",(function(t){var e=t.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,o.dataIndex=-1,l&&n.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:i.componentIndex})}),this)},updateLayout:function(t,e,n){var i=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,o=i.getLayout("points");if(this.is2D)for(var a=0;athis._endDataIndex||ethis._endDataIndex||e 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end");const od=Jo.Mesh.extend((function(){var t=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.trail2.vertex"),Jo.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new ka({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,n){var i=t.hostModel,r=this.geometry,o=i.getModel("effect"),a=o.get("trailWidth")*e.getDevicePixelRatio(),s=o.get("trailLength"),l=i.get("effect.constantSpeed"),u=1e3*i.get("effect.period"),h=null!=l;h?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[h?"define":"undefine"]("vertex","CONSTANT_SPEED");var c=i.get("polyline");r.trailLength=s,this.material.set("trailLength",s),r.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){r.attributes[t].value=n.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){r.attributes[t].init(r.vertexCount)})),r.indices=n.indices;var d=[],p=o.get("trailColor"),f=o.get("trailOpacity"),g=null!=p,m=null!=f;this.updateWorldTransform();var v=this.worldTransform.x.len(),y=this.worldTransform.y.len(),_=this.worldTransform.z.len(),x=0,b=0;t.each((function(e){var i=t.getItemLayout(e),o=m?f:ku(t,e),s=Nu(t,e);null==o&&(o=1),(d=Jo.parseColor(g?p:s,d))[3]*=o;for(var l=c?n.getPolylineVertexCount(i):n.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),w=0,S=[],T=[],M=x;Mx&&(w+=rd.dist(S,T)),r.attributes.dist.set(M,w),rd.copy(T,S);b=Math.max(b,w);var A=Math.random()*(h?w:u);for(M=x;M0?1:-1)*a/2),r.attributes.color.set(M,d);x+=l})),this.material.set("spotSize",.1*b*s),this.material.set("spotIntensity",o.get("spotIntensity")),r.dirty()},setAnimationTime:function(t){this.material.set("time",t)}});Jo.Shader.import(is);const ad=i.ChartView.extend({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this._meshLinesMaterial=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new Jo.Mesh({geometry:new ka,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new od},render:function(t,e,n){this.groupGL.add(this._linesMesh);var i=t.coordinateSystem,r=t.getData();if(i&&i.viewGL){i.viewGL.add(this.groupGL),this._updateLines(t,e,n);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var a=this._trailMesh;if(a.stopAnimation(),t.get("effect.show")){this.groupGL.add(a),a.updateData(r,n,this._linesMesh.geometry),a.__time=a.__time||0;var s=36e5;this._curveEffectsAnimator=a.animate("",{loop:!0}).when(s,{__time:s}).during((function(){a.setAnimationTime(a.__time)})).start()}else this.groupGL.remove(a),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?Jo.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,n){var i=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,a=t.get("polyline");o.expandLine=!0;var s=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=s/20;var l="lineStyle.width".split("."),u=n.getDevicePixelRatio(),h=0;i.each((function(t){var e=i.getItemModel(t).get(l);null==e&&(e=1),i.setItemVisual(t,"lineWidth",e),h=Math.max(e,h)})),o.useNativeLine=!1;var c=0,d=0;i.each((function(t){var e=i.getItemLayout(t);a?(c+=o.getPolylineVertexCount(e),d+=o.getPolylineTriangleCount(e)):(c+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),d+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(c),o.setTriangleCount(d),o.resetOffset();var p=[];i.each((function(t){var e=i.getItemLayout(t),n=Nu(i,t),r=ku(i,t),s=i.getItemVisual(t,"lineWidth")*u;null==r&&(r=1),(p=Jo.parseColor(n,p))[3]*=r,a?o.addPolyline(e,p,s):o.addCubicCurve(e[0],e[1],e[2],e[3],p,s)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function sd(t,e){for(var n=[],i=0;i0;this._updateSurfaceMesh(this._surfaceMesh,t,h,p);var f=this._surfaceMesh.material;p?(f.define("WIREFRAME_QUAD"),f.set("wireframeLineWidth",d),f.set("wireframeLineColor",Jo.parseColor(c.get("lineStyle.color")))):f.undefine("WIREFRAME_QUAD"),this._initHandler(t,n),this._updateAnimation(t)},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new Jo.Mesh({geometry:new Jo.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.sm.depth.vertex"),Jo.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,Eu),t},_initHandler:function(t,e){var n=t.getData(),i=this._surfaceMesh,r=t.coordinateSystem;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=function(t,e){for(var n=1/0,r=-1,o=[],a=0;a=0){var s=[];i.geometry.attributes.position.get(a,s);for(var l=r.pointToData(s),u=1/0,h=-1,c=[],d=0;d65535?Uint32Array:Uint16Array)((f-1)*(g-1)*6),w=function(t,e,n){n[1]=t*g+e,n[0]=t*g+e+1,n[3]=(t+1)*g+e+1,n[2]=(t+1)*g+e},S=!1;if(l){var T=[],M=[],A=0;m?h.init(r.vertexCount):h.value=null;for(var C=[[],[],[]],D=[],I=[],L=pd.create(),P=function(t,e,n){var i=3*e;return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n},O=new Float32Array(a.length),E=new Float32Array(a.length/3*4),N=0;N0;){if(Math.floor(s/h)===s/h)return[h,s/h];h--}return[h=Math.floor(Math.sqrt(s)),h]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function gd(t,e){for(var n=[],i=0;i=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof Ad||(e=this._nodesMap[Td(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}yo(Ad,Dd("hostGraph","data")),yo(Cd,Dd("hostGraph","edgeData"));const Id=Md;var Ld=va();function Pd(t,e){if(Ld(this).mainData===this){var n=vo({},Ld(this).datas);n[this.dataType]=e,Rd(e,n,t)}else zd(e,this.dataType,Ld(this).mainData,t);return e}function Od(t,e){return t.struct&&t.struct.update(),e}function Ed(t,e){return xo(Ld(e).datas,(function(n,i){n!==e&&zd(n.cloneShallow(),i,e,t)})),e}function Nd(t){var e=Ld(this).mainData;return null==t||null==e?e:Ld(e).datas[t]}function kd(){var t=Ld(this).mainData;return null==t?[{data:t}]:bo(wo(Ld(t).datas),(function(e){return{type:e,data:Ld(t).datas[e]}}))}function Rd(t,e,n){Ld(t).datas={},xo(e,(function(e,i){zd(e,i,t,n)}))}function zd(t,e,n,i){Ld(n).datas[e]=t,Ld(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Nd,t.getLinkedDataAll=kd}var Bd=i.SeriesModel.extend({type:"series.graphGL",visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,init:function(t){Bd.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){Bd.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},getInitialData:function(t,e){var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&n)return function(t,e,n,r,o){for(var a=new Id(!0),s=0;s "+f)),c++)}var g=i.helper.createDimensions(t,{coordDimensions:["value"]});(l=new i.List(g,n)).initData(t);var m,v,y,_=new i.List(["value"],n);return _.initData(h,u),o&&o(l,_),v=(m={mainData:l,struct:a,structAttr:"graph",datas:{node:l,edge:_},datasAttr:{node:"data",edge:"edgeData"}}).mainData,(y=m.datas)||(y={main:v},m.datasAttr={main:"data"}),m.datas=m.mainData=null,Rd(v,y,m),xo(y,(function(t){xo(v.TRANSFERABLE_METHODS,(function(e){t.wrapMethod(e,So(Pd,m))}))})),v.wrapMethod("cloneShallow",So(Ed,m)),xo(v.CHANGABLE_METHODS,(function(t){v.wrapMethod(t,So(Od,m))})),function(t,e){if(!t)throw new Error(void 0)}(y[v.dataType]===v),a.update(),a}(r,n,this,0,(function(t,n){t.wrapMethod("getItemModel",(function(t){const e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));const i=e.getModel([]).getModel;function r(t,e){const n=i.call(this,t,e);return n.resolveParentPath=a,n}function a(t){if(t&&("label"===t[0]||"label"===t[1])){const e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=a,t.getModel=r,t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(t,n),a=r.graph.getEdgeByIndex(t),s=r.getName(a.node1.dataIndex),l=r.getName(a.node2.dataIndex),u=[];return null!=s&&u.push(s),null!=l&&u.push(l),u=i.format.encodeHTML(u.join(" > ")),o.value&&(u+=" : "+i.format.encodeHTML(o.value)),u}return Bd.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:Object.assign({value:0},t)})),e=new i.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Fd.dist(t,e)+Fd.dist(n,e)+Fd.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Vd)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Vd)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=e[0],u=e[1],h=n[0],c=n[1],d=i[0],p=i[1],f=this._getCubicCurveApproxStep(t,e,n,i),g=f*f,m=g*f,v=3*f,y=3*g,_=6*g,x=6*m,b=a-2*l+h,w=s-2*u+c,S=3*(l-h)-a+d,T=3*(u-c)-s+p,M=a,A=s,C=(l-a)*v+b*y+S*m,D=(u-s)*v+w*y+T*m,I=b*_+S*x,L=w*_+T*x,P=S*x,O=T*x,E=0,N=0,k=Math.ceil(1/f),R=new Float32Array(3*(k+1)),z=(R=[],0);for(N=0;N1&&(M=C>0?Math.min(M,d):Math.max(M,d),A=D>0?Math.min(A,p):Math.max(A,p));this.addPolyline(R,r,o)},addLine:function(t,e,n,i){this.addPolyline([t,e],n,i)},addPolyline:function(){var t=Fd.create(),e=Fd.create(),n=Fd.create(),i=Fd.create(),r=[],o=[],a=[];return function(s,l,u,h,c){if(s.length){var d="number"!=typeof s[0];if(null==c&&(c=d?s.length:s.length/2),!(c<2)){null==h&&(h=0),null==u&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,f=d?"number"!=typeof l[0]:l.length/4===c,g=this.attributes.position,m=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,_=this.indices,x=this._vertexOffset,b=0;b1&&(g.copy(x,x-1),m.copy(x,x-1),x++);else{var T;if(b0){Fd.sub(t,r,a),Fd.sub(e,o,r),Fd.normalize(t,t),Fd.normalize(e,e),Fd.add(i,t,e),Fd.normalize(i,i);var M=u/2*Math.min(1/Fd.dot(t,i),2);n[0]=-i[1],n[1]=i[0],T=M}else Fd.sub(t,o,r),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;else Fd.sub(t,r,a),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;y.set(x,n),y.set(x+1,n),v.set(x,T),v.set(x+1,-T),Fd.copy(a,r),g.set(x,r),g.set(x+1,r),m.set(x,p),m.set(x+1,p),x+=2}if(this.useNativeLine)m.set(x,p),g.set(x,r),x++;else if(b>0){var A=3*this._faceOffset;(_=this.indices)[A]=x-4,_[A+1]=x-3,_[A+2]=x-2,_[A+3]=x-3,_[A+4]=x-1,_[A+5]=x-2,this._faceOffset+=2}}this._vertexOffset=x}}}}(),setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=t 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end");var Ud={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function Wd(t){var e={type:Jo.Texture.FLOAT,minFilter:Jo.Texture.NEAREST,magFilter:Jo.Texture.NEAREST};this._positionSourceTex=new Jo.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new Jo.Texture2D(e),this._positionPrevTex=new Jo.Texture2D(e),this._forceTex=new Jo.Texture2D(e),this._forcePrevTex=new Jo.Texture2D(e),this._weightedSumTex=new Jo.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new Jo.Texture2D(e),this._globalSpeedPrevTex=new Jo.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new fr({fragment:Jo.Shader.source("clay.compositor.output")});var n=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node1:new Jo.Geometry.Attribute("node1","float",2),node2:new Jo.Geometry.Attribute("node2","float",2),weight:new Jo.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._weightedSumMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._framebuffer=new Zi({depthBuffer:!1}),this._dummyCamera=new Jo.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}Wd.prototype.updateOption=function(t){for(var e in Ud)this[e]=Ud[e];var n=this._nodes.length;if(this.jitterTolerence=n>5e4?10:n>5e3?1:.1,this.scaling=n>100?2:10,t)for(var e in Ud)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,r=0;rt},Wd.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},Wd.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},Wd.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(n){this[n].width=t,this[n].height=e,this[n].dirty()}),this)},Wd.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};const jd=Wd;var Xd=function(){var t=function(){return new Float32Array(2)},e=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},n=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},r=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a=function(t,e,n){return t[0]=e,t[1]=n,t};function s(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var l=s.prototype;function u(){this.position=new Float32Array(2),this.force=t(),this.forcePrev=t(),this.mass=1,this.inDegree=0,this.outDegree=0}function h(t,e){this.source=t,this.target=e,this.weight=1}function c(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new s,this.rootRegion.centerOfMass=t(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}l.beforeUpdate=function(){for(var t=0;t=t&&this.bbox[1]<=e&&this.bbox[3]>=e},l.setBBox=function(t,e,n,i){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=n,this.bbox[3]=i,this.size=(n-t+i-e)/2},l._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new s,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},l._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),n=this.bbox;if(!e){var i=(n[0]+n[2])/2,r=(n[1]+n[3])/2,o=(n[2]-n[0])/2,a=(n[3]-n[1])/2,s=t.position[0]>=i?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*o+n[0],l*a+n[1],(s+1)*o+n[0],(l+1)*a+n[1])}e.addNode(t)},l._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,n=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,n+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=n/this.mass};var d=c.prototype;d.initNodes=function(t,e,n){var i=e.length;this.nodes.length=0;for(var r=void 0!==n,o=0;o0&&(this.strongGravityMode?this.applyNodeStrongGravity(c):this.applyNodeGravity(c))}for(u=0;u0&&(v=Math.min(v/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=v,u=0;u0&&(_=Math.min(x*_,10)/x,i(h.position,h.position,h.force,_))}},d.applyRegionToNodeRepulsion=function(){var e=t();return function(t,n){if(t.node)this.applyNodeToNodeRepulsion(t.node,n,!0);else{o(e,n.position,t.centerOfMass);var r=e[0]*e[0]+e[1]*e[1];if(r>this.barnesHutTheta*t.size*t.size){var a=this.scaling*n.mass*t.mass/r;i(n.force,n.force,e,a)}else for(var s=0;s0)s=this.scaling*t.mass*n.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*n.mass}}else s=this.scaling*t.mass*n.mass/a;i(t.force,t.force,e,s),i(n.force,n.force,e,-s)}}}}(),d.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,a=t.target;o(e,r.position,a.position);var s,l,u=n(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-a.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,i(r.force,r.force,e,l),i(a.force,a.force,e,-l))}}(),d.applyNodeGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position);var r=n(e);i(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),d.applyNodeStrongGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position),i(t.force,t.force,e,this.gravity*t.mass)}}(),d.updateBBox=function(){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,r=0;r5e4?10:o>5e3?1:.1,e.scaling=o>100?2:10,e.barnesHutOptimize=o>1e3,t)for(var n in Yd)null!=t[n]&&(e[n]=t[n]);if(!e.gravityCenter){for(var a=[1/0,1/0],s=[-1/0,-1/0],l=0;lt},qd.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var n=0;n0?1.1:.9,o=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=o/this._zoom;var a=this._convertPos(n,i),s=(a.x-this._dx)*(r-1),l=(a.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=o,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}});var Qd=Pa.vec2;Jo.Shader.import("@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end");var $d=1;const tp=i.ChartView.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this.viewGL=new Nl("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new zc(!0,e),this._forceEdgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2),color:new Jo.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:Jo.Mesh.LINES}),this._edgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Hd({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new Jd({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,n){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=n,this._initLayout(t,e,n),this._pointsBuilder.update(t,e,n),this._forceLayoutInstance instanceof jd||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,n),this._control.off("update"),this._control.on("update",(function(){n.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(Mr(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),n.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?n.getZr().on("click",this._clickHandler):"mouseover"===r&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var n=this._forceEdgesMesh.geometry,i=e.getEdgeData(),r=0,o=this._forceLayoutInstance,a=2*i.count();n.attributes.node.init(a),n.attributes.color.init(a),i.each((function(e){var a=t[e];n.attributes.node.set(r,o.getNodeUV(a.node1)),n.attributes.node.set(r+1,o.getNodeUV(a.node2));var s=Nu(i,a.dataIndex),l=Jo.parseColor(s);l[3]*=Mr(ku(i,a.dataIndex),1),n.attributes.color.set(r,l),n.attributes.color.set(r+1,l),r+=2})),n.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,n=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var i=[],r=[],o=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(a){var s=t.graph.getEdgeByIndex(a),l=2*s.node1.dataIndex,u=2*s.node2.dataIndex;i[0]=n[l],i[1]=n[l+1],r[0]=n[u],r[1]=n[u+1];var h=Nu(t,s.dataIndex),c=Jo.parseColor(h);c[3]*=Mr(ku(t,s.dataIndex),1);var d=t.getItemModel(s.dataIndex),p=Mr(d.get(o),1)*this._api.getDevicePixelRatio();e.addLine(i,r,c,p);for(var f=0;f<4;f++)this._originalEdgeColors[4*s.dataIndex+f]=c[f];this._edgeIndicesMap[s.dataIndex]=a}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),n=[],i=0;i=p&&(l._syncNodePosition(t),d=0),n.getZr().refresh(),Qo((function(){f(e)}))}))};Qo((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),f(u)})),this._layouting=!0}}},stopLayout:function(t,e,n,i){i&&null!=i.from&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,n)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,n){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,n),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData();this._downplayAll();var o=i.dataIndex,a=r.graph,s=[],l=a.getNodeByIndex(o);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,n,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),n=Jo.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=Mr(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);n[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],n)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(ep=[],function(t,e){this._getColor(t,ep),ep[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],ep)}),_getColor:function(t,e){for(var n=0;n<4;n++)e[n]=this._originalEdgeColors[4*t+n];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var n=this.viewGL.camera,i=t.getData().getLayout("points"),r=Qd.create(1/0,1/0),o=Qd.create(-1/0,-1/0),a=[],s=0;sn.left&&un.top)){var h=Math.max(o[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,n.left=r[0],n.top=l-c/2,n.bottom=l+c/2,n.right=h+r[0],n.near=0,n.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});var ep;function np(t){return t instanceof Array||(t=[t,t]),t}(0,i.use)((function(t){function e(){}t.registerChartView(tp),t.registerSeriesModel(Zd),t.registerVisual((function(t){const e={};t.eachSeriesByType("graphGL",(function(t){var n=t.getCategoriesData(),r=t.getData(),o={};n.each((function(i){var r=n.getName(i);o["ec-"+r]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),n.setItemVisual(i,"style",s);var l=["symbol","symbolSize","symbolKeepAspect"];for(let t=0;t65535?new Uint32Array(3*i):new Uint16Array(3*i))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});jt.import("@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n");var op=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Ln({type:Sn.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};op.prototype={constructor:op,init:function(){var t={type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1};this._spawnTexture=new Ln(t),this._particleTexture0=new Ln(t),this._particleTexture1=new Ln(t),this._frameBuffer=new Zi({depthBuffer:!1}),this._particlePass=new fr({fragment:jt.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new fr({fragment:jt.source("clay.compositor.downsample")});var e=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderPoints.vertex"),jt.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:Mn.POINTS,geometry:new Hn({dynamic:!0,mainAttribute:"texcoord0"})}),n=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderLines.vertex"),jt.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new rp,culling:!1}),i=new Mn({material:new lt({shader:new jt(jt.source("ecgl.color.vertex"),jt.source("ecgl.color.fragment"))}),geometry:new Gi});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=n,this._lastFrameFullQuadMesh=i,this._camera=new hr,this._thisFrameTexture=new Ln,this._lastFrameTexture=new Ln},setParticleDensity:function(t,e){for(var n=new Float32Array(t*e*4),i=0,r=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new Ln),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");return n.fillStyle="#fff",n.arc(t/2,t/2,t/2,0,2*Math.PI),n.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var n=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,o=this._width*this._supersampling,a=this._height*this._supersampling,s=0;s=359&&(r[0]>0&&(r[0]=0),o[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=Jo.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=Jo.Mesh.LINES),n=n||0,i=i||r.count(),s.resetOffset();var h=0,c=0,d=[],p=[],f=[],g=[],m=[],v=.3,y=.7;function _(){p[0]=d[0]*y+g[0]*v-(d[1]-g[1])*o,p[1]=d[1]*y+g[1]*v-(g[0]-d[0])*o,f[0]=d[0]*v+g[0]*y-(d[1]-g[1])*o,f[1]=d[1]*v+g[1]*y-(g[0]-d[0])*o}if(a||0!==o)for(var x=n;x{t.exports=i}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(468)})())},125:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Axis:()=>r.RD,ChartView:()=>r.TA,ComponentModel:()=>r.tF,ComponentView:()=>r.Ir,List:()=>r.aV,Model:()=>r.Hn,PRIORITY:()=>r.Hr,SeriesModel:()=>r.wJ,color:()=>r.$_,connect:()=>r.$j,dataTool:()=>r.Ok,dependencies:()=>r.HO,disConnect:()=>r.eU,disconnect:()=>r.zP,dispose:()=>r.B9,env:()=>r.OB,extendChartView:()=>r.Zy,extendComponentModel:()=>r.tv,extendComponentView:()=>r.Sp,extendSeriesModel:()=>r.Zr,format:()=>r.WU,getCoordinateSystemDimensions:()=>r.wL,getInstanceByDom:()=>r.JE,getInstanceById:()=>r.rp,getMap:()=>r.FU,graphic:()=>r.Q,helper:()=>r._y,init:()=>r.S1,innerDrawElementOnCanvas:()=>r.z$,matrix:()=>r.pI,number:()=>r.Rx,parseGeoJSON:()=>r.Nu,parseGeoJson:()=>r.pQ,registerAction:()=>r.zl,registerCoordinateSystem:()=>r.RS,registerLayout:()=>r.qR,registerLoading:()=>r.yn,registerLocale:()=>r.I2,registerMap:()=>r.je,registerPostInit:()=>r.sq,registerPostUpdate:()=>r.Br,registerPreprocessor:()=>r.ds,registerProcessor:()=>r.Pu,registerTheme:()=>r.aW,registerTransform:()=>r.rV,registerUpdateLifecycle:()=>r.YK,registerVisual:()=>r.Og,setCanvasCreator:()=>r.jQ,setPlatformAPI:()=>r.g2,throttle:()=>r.P2,time:()=>r.XV,use:()=>r.D$,util:()=>r.D5,vector:()=>r.xr,version:()=>r.i8,zrUtil:()=>r.gf,zrender:()=>r.x_});var i=n(8023),r=n(9060),o=n(6076);var a=n(12),s=n(655),l=n(8455),u=n(3321),h=n(1525),c=n(8154);const d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new c.Z,n=(0,h.th)("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=(0,h.th)(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(u.Z);var p=n(3051),f=n(8162),g=n(6351),m=n(9936);function v(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:(0,p.isNumber)(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=(0,p.map)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,m.M)(e,c[0])&&(d=!0,c[0]=f),(0,m.M)(e,c[1])&&(d=!0,c[1]=f),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function y(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var _=n(887);var x=n(4438),b=n(9266),w=n(6498),S=n(2234),T=n(327),M=n(4014),A=n(8554),C=Math.min,D=Math.max;function I(t,e){return isNaN(t)||isNaN(e)}function L(t,e,n,i,r,o,a,s,l){for(var u,h,c,d,p,f,g=n,m=0;m=r||g<0)break;if(I(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),c=v,d=y;else{var _=v-u,x=y-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===y&&m=i||I(w,S))p=v,f=y;else{A=w-u,L=S-h;var E=v-u,N=w-v,k=y-h,R=S-y,z=void 0,B=void 0;if("x"===s){var Z=A>0?1:-1;p=v-Z*(z=Math.abs(E))*a,f=y,P=v+Z*(B=Math.abs(N))*a,O=y}else if("y"===s){var F=L>0?1:-1;p=v,f=y-F*(z=Math.abs(k))*a,P=v,O=y+F*(B=Math.abs(R))*a}else z=Math.sqrt(E*E+k*k),p=v-A*a*(1-(M=(B=Math.sqrt(N*N+R*R))/(B+z))),f=y-L*a*(1-M),O=y+L*a*M,P=C(P=v+A*a*M,D(w,v)),O=C(O,D(S,y)),P=D(P,C(w,v)),f=y-(L=(O=D(O,C(S,y)))-y)*z/B,p=C(p=v-(A=P-v)*z/B,D(u,v)),f=C(f,D(h,y)),P=v+(A=v-(p=D(p,C(u,v))))*B/z,O=y+(L=y-(f=D(f,C(h,y))))*B/z}t.bezierCurveTo(c,d,p,f,v,y),c=P,d=O}else t.lineTo(v,y)}u=v,h=y,g+=o}return m}var P=function(){this.smooth=0,this.smoothConstraint=!0},O=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new P},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&I(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(h-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++];var v=a?(0,A.kD)(n,u,c,p,t,s):(0,A.kD)(i,h,d,f,t,s);if(v>0)for(var y=0;y=0){m=a?(0,A.af)(i,h,d,f,_):(0,A.af)(n,u,c,p,_);return a?[t,m]:[m,t]}}n=p,i=f}}},e}(T.ZP),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e}(P),N=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new E},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&I(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=p.map(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord,r=(n-i)/(e.coord-i);return{coord:n,color:(0,H.lerp)(r,[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),f=d.length;if(!f&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";p.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:c[0]||"transparent"});var y=new x.Z(0,0,0,0,d,!0);return y[r]=g,y[r+"2"]=m,y}}}function K(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return p.each(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function J(t,e){return[t[2*e],t[2*e+1]]}function Q(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1);(0,V.A)(f).seriesIndex=t.seriesIndex,(0,B.k5)(f,R,z,Z);var F=X(t.get("smooth")),H=t.get("smoothMonotone");if(f.setShape({smooth:F,smoothMonotone:H,connectNulls:C}),g){var W=a.getCalculationInfo("stackedOnSeries"),j=0;g.useStyle(p.defaults(l.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),W&&(j=X(W.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:H,connectNulls:C}),(0,B.WO)(g,t,"areaStyle"),(0,V.A)(g).seriesIndex=t.seriesIndex,(0,B.k5)(g,R,z,Z)}var J=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=J)})),this._polyline.onHoverStateChange=J,this._data=a,this._coordSys=r,this._stackedOnPoints=M,this._points=u,this._step=P,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,f),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,e){(0,V.A)(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new g.Z(r,o)).x=l,s.y=u,s.setZ(h,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else k.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else k.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,B.Gl)(this._polyline,t),e&&(0,B.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new O({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new N({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");p.isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=p.isFunction(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],d=void 0,f=void 0,g=void 0;if(n)if(r){var m=n,v=e.pointToCoord(c);i?(d=m.startAngle,f=m.endAngle,g=-v[1]/180*Math.PI):(d=m.r0,f=m.r,g=v[0])}else{var y=n;i?(d=y.x,f=y.x+y.width,g=t.x):(d=y.y+y.height,f=y.y,g=t.y)}var _=f===d?0:(g-d)/(f-d);a&&(_=1-_);var x=p.isFunction(u)?u(o):l*_+h,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Q(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new w.ZP({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&((0,Z.ni)(o,(0,Z.k3)(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?(0,F.O)(r,n):(0,F.H)(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),T=w.range,M=T[1]-T[0],A=void 0;if(M>=1){if(M>1&&!c){var C=J(u,T[0]);s.attr({x:C[0]+_,y:C[1]+x}),r&&(A=h.getRawValue(T[0]))}else{(C=l.getPointOn(y,b))&&s.attr({x:C[0]+_,y:C[1]+x});var D=h.getRawValue(T[0]),I=h.getRawValue(T[1]);r&&(A=S.pk(n,d,D,I,w.t))}i.lastFrameIndex=T[0]}else{var L=1===t||i.lastFrameIndex>0?T[0]:0;C=J(u,L);r&&(A=h.getRawValue(L)),s.attr({x:C[0]+_,y:C[1]+x})}r&&(0,Z.qA)(s).setLabelText(A)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],d=[],p=[],f=[],g=[],m=v(r,e,a),x=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w3e3||l&&j(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:p}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),b.D(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),b.D(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],x=h.status,w=0;we&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;(0,p.isString)(r)?f=it[r]:(0,p.isFunction)(r)&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,rt))}}}}}var at=n(9093),st=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(u.Z);u.Z.registerClass(st);const lt=st;var ut=n(2151);const ht=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(){return(0,l.Z)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(lt);var ct=n(1177),dt=n(5151),pt=n(7214),ft=n(270),gt=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},mt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new gt},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,d=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,b.XD)(e,t,(0,V.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(k.Z),Tt={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=bt(e.x,t.x),s=wt(e.x+e.width,r),l=bt(e.y,t.y),u=wt(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=wt(e.r,t.r),o=bt(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Mt={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new dt.Z({shape:(0,p.extend)({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?vt:pt.C,h=new u({shape:i,z2:1});h.name="item";var c,d,p=Ot(r);if(h.calculateTextPosition=(c=p,d=({isRoundCap:u===vt}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return(0,yt.wI)(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,p=(u+h)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(u-h)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(r){case"startArc":x=s+(h-o)*y(m),b=l+(h-o)*_(m),w="center",S="top";break;case"insideStartArc":x=s+(h+o)*y(m),b=l+(h+o)*_(m),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+_t(f,o+v,!1),b=l+p*_(f)+xt(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+_t(f,-o+v,!1),b=l+p*_(f)+xt(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*y(m),b=l+p*_(m),w="center",S="middle";break;case"endArc":x=s+(u+o)*y(m),b=l+(u+o)*_(m),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*y(m),b=l+(u-o)*_(m),w="center",S="top";break;case"endAngle":x=s+p*y(g)+_t(g,o+v,!0),b=l+p*_(g)+xt(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(g)+_t(g,-o+v,!0),b=l+p*_(g)+xt(g,-o+v,!0),w="right",S="middle";break;default:return(0,yt.wI)(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?0:i.startAngle,g[f]=i[f],(s?b.D:b.KZ)(h,{shape:g},o)}return h}};function At(t,e,n,i,r,o,a,s){var l,u;o?(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||(a?b.D:b.KZ)(n,{shape:l},e,r,null);var h=e?t.baseAxis.model:null;(a?b.D:b.KZ)(n,{shape:u},h,r)}function Ct(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Ot(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Et(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=(0,Z.k3)(i);(0,Z.ni)(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:(0,F.H)(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=t.getTextContent();if(s&&d){var f=i.get(["label","position"]);t.textConfig.inside="middle"===f||null,function(t,e,n,i){if((0,p.isNumber)(i))t.setTextConfig({rotation:i});else if((0,p.isArray)(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===f?h:f,Ot(a),i.get(["label","rotate"]))}(0,Z.pe)(d,c,o.getRawValue(n),(function(t){return(0,F.O)(e,t)}));var g=i.getModel(["emphasis"]);(0,B.k5)(t,g.get("focus"),g.get("blurScope"),g.get("disabled")),(0,B.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",(0,p.each)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Nt=function(){},kt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);(0,V.A)(this).dataIndex=e>=0?e:null}),30,!1);function Bt(t,e,n){if(z(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}const Zt=St;var Ft=n(1891),Vt=n(5669),Gt=n(6172),Ht=2*Math.PI,Ut=Math.PI/180;function Wt(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jt(t,e){var n=Wt(t,e),i=t.get("center"),r=t.get("radius");p.isArray(r)||(r=[0,r]),p.isArray(i)||(i=[i,i]);var o=(0,Vt.GM)(n.width,e.getWidth()),a=(0,Vt.GM)(n.height,e.getHeight()),s=Math.min(o,a);return{cx:(0,Vt.GM)(i[0],o)+n.x,cy:(0,Vt.GM)(i[1],a)+n.y,r0:(0,Vt.GM)(r[0],s/2),r:(0,Vt.GM)(r[1],s/2)}}function Xt(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=Wt(t,n),o=jt(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*Ut,c=t.get("minAngle")*Ut,d=0;e.each(i,(function(t){!isNaN(t)&&d++}));var p=e.getSum(i),f=Math.PI/(p||d)*2,g=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),y=e.getDataExtent(i);y[0]=0;var _=Ht,x=0,b=h,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===p&&v?f:t*f:Ht/d)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-c)/2}}}function ne(t){return"center"===t.position}function ie(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*$t,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,d=s.height;function f(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),y=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),x=v.get("alignTo"),b=(0,Vt.GM)(v.get("edgeDistance"),u),w=v.get("bleedMargin"),S=m.getModel("labelLine"),T=S.get("length");T=(0,Vt.GM)(T,u);var M=S.get("length2");if(M=(0,Vt.GM)(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":P>0?"left":"right"}var Z=Math.PI,F=0,V=v.get("rotate");if((0,p.isNumber)(V))F=V*(Z/180);else if("center"===y)F=0;else if("radial"===V||!0===V){F=P<0?-L+Z:-L}else if("tangential"===V&&"outside"!==y&&"outer"!==y){var G=Math.atan2(P,O);G<0&&(G=2*Z+G),O>0&&(G=Z+G),F=G-Z}if(o=!!F,d.x=A,d.y=C,d.rotation=F,d.setStyle({verticalAlign:"middle"}),E){d.setStyle({align:I});var H=d.states.select;H&&(H.x+=d.x,H.y+=d.y)}else{var U=d.getBoundingRect().clone();U.applyTransform(d.getComputedTransform());var W=(d.style.margin||0)+2.1;U.y-=W/2,U.height+=W,r.push({label:d,labelLine:g,position:y,len:T,len2:M,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Kt.Z(P,O),linePoints:D,textAlign:I,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:E})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(k.Z);var se=n(5623),le=n(5101);function ue(t,e,n){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=(0,se.Z)(i,e).dimensions,o=new le.Z(r,t);return o.initData(i,n),o}var he=n(1772),ce=n(2019);const de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=(0,Vt.eJ)(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){S.Cc(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(u.Z);const pe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(u.Z);var fe=n(479),ge=function(){},me=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ge},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const ye=ve;const _e=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=(0,nt.Z)("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ye:new f.Z,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(k.Z);var xe=n(3166),be=n(8071);const we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(be.Z);var Se=n(6650),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",S.C6).models[0]},e.type="cartesian2dAxis",e}(be.Z);p.mixin(Te,Se.W);var Me={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Ae=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Me),Ce=p.merge({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}}},Me);const De={category:Ae,value:Ce,time:p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ce),log:p.defaults({logBase:10},Ce)};var Ie=n(1401),Le={value:1,category:1,time:1,log:1};function Pe(t,e,n,i){(0,p.each)(Le,(function(r,o){var a=(0,p.merge)((0,p.merge)({},De[o],!0),i,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return(0,s.ZT)(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,Gt.YD)(this),i=n?(0,Gt.tE)(t):{},r=e.getTheme();(0,p.merge)(t,r.get(o+"Axis")),(0,p.merge)(t,this.getDefaultOption()),t.type=Oe(t),n&&(0,Gt.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Ie.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",Oe)}function Oe(t){return t.type||(t.data?"category":"value")}var Ee=n(7947);const Ne=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return p.map(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),p.filter(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var ke=n(2892),Re=n(5280),ze=["x","y"];function Be(t){return"interval"===t.type||"time"===t.type}const Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ze,e}return(0,s.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(Be(t)&&Be(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,d=this._transform=[l,0,0,u,h,c];this._invTransform=(0,ke.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,Re.applyTransform)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return(0,Re.applyTransform)(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new fe.Z(n,i,r,o)},e}(Ne);var Fe=n(2950),Ve=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Fe.Z);const Ge=Ve;var He=n(9069),Ue=n(5021),We=n(103),je=Math.log;function Xe(t,e,n){var i=We.Z.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=(0,Ee.Xv)(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var d=je(t.base);u=[je(u[0])/d,je(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],m=u[1];if(h&&c)f=(m-g)/a;else if(h)for(m=u[0]+f*a;mu[0]&&isFinite(g)&&isFinite(u[0]);)f=(0,Ue.r1)(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=(0,Ue.r1)(f));var v=f*a;m=Math.ceil(u[1]/f)*f,(g=(0,Vt.NM)(m-v))<0&&u[0]>=0?(g=0,m=(0,Vt.NM)(v)):m>0&&u[1]<=0&&(m=0,g=-(0,Vt.NM)(v))}var y=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,m+f*_),i.setInterval.call(t,f),(y||_)&&i.setNiceExtent.call(t,g+f,m-f)}var Ye=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ze,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=(0,p.keys)(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;(0,Ue.lM)(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):((0,Ee.Jk)(l,s),(0,Ue.lM)(l)&&(e=a))}r.length&&(e||(e=r.pop(),(0,Ee.Jk)(e.scale,e.model)),(0,p.each)(r,(function(t){Xe(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};(0,p.each)(n.x,(function(t){Ke(n,"y",t,r)})),(0,p.each)(n.y,(function(t){Ke(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=(0,Gt.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){(0,p.each)(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&((0,p.each)(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,Ee.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);o[n]-=e[n]+i,"top"===t.position?o.y+=e.height+i:"left"===t.position&&(o.x+=e.width+i)}}})),s()),(0,p.each)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,p.isObject)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=p.defaults({color:c.color},a));var f=p.merge(p.clone(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:h},!1);if(p.isString(l)){var g=f.name;f.name=l.replace("{value}",null!=g?g:"")}else p.isFunction(l)&&(f.name=l(f.name,f));var m=new An.Z(f,null,this.ecModel);return p.mixin(m,Se.W.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},Cn.axisLine),axisLabel:Dn(Cn.axisLabel,!1),axisTick:Dn(Cn.axisTick,!1),splitLine:Dn(Cn.splitLine,!0),splitArea:Dn(Cn.splitArea,!0),indicator:[]},e}(be.Z);const Ln=In;var Pn=n(9538),On=n(5795),En=["axisLine","axisTickLabel","axisName"],Nn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=p.map(n,(function(t){var n=t.model.get("showName")?t.name:"";return new tn.Z(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));p.each(i,(function(t){p.each(En,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),d=p.isArray(h)?h:[h],f=p.isArray(c)?c:[c],g=[],m=[];if("circle"===i)for(var v=n[0].getTicksCoords(),y=e.cx,_=e.cy,x=0;x=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=gi(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new c.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new dt.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=Fn[s];if(u&&(0,p.hasOwn)(Fn,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=ei[s];if(d&&(0,p.hasOwn)(ei,s)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(a&&a.isGroup)for(var m=t.firstChild;m;)1===m.nodeType?this._parseNode(m,a,n,l,r,o):3===m.nodeType&&o&&this._parseText(m,a),m=m.nextSibling},t.prototype._parseText=function(t,e){var n=new Yn.Z({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ri(e,n),ai(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Fn={g:function(t,e){var n=new c.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new dt.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},circle:function(t,e){var n=new Pn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new $e.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},ellipse:function(t,e){var n=new Wn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new _n.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new qt.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new xn.ZP;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,jn.iR)(n);return ri(e,i),ai(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),ei={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new x.Z(e,n,i,r);return ni(t,o),ii(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new Xn.Z(e,n,i);return ni(t,r),ii(t,r),r}};function ni(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function ii(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};fi(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function ri(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,t.__inheritedStyle))}function oi(t){for(var e=hi(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=hi(a);switch(r=r||ke.create(),s){case"translate":ke.translate(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ke.scale(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ke.rotate(r,r,-parseFloat(l[0])*di);break;case"skewX":var u=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,0,u,1,0,0],r);break;case"skewY":var h=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,h,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),fi(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=p.createHashMap(),n=p.createHashMap(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,Z.ni)(e,(0,Z.k3)(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(Fi(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ji(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):(0,V.A)(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function Xi(t,e,n,i,r){t.data||ct.setTooltipConfig({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function Yi(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return(0,B.k5)(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&(0,B.th)(e,r,n),a}function qi(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),p.each(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(u.Z);const tr=$i;function er(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),p.each(e,(function(t,e){for(var n,i,r,o=(n=p.map(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},p.each(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Gt.ME(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var hr=function(){function t(){this.dimensions=or}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new lr(o+r,o,p.extend({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=ur,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),p.each(r,(function(t,r){var o=p.map(t,(function(t){return t.get("nameMap")})),a=new lr(r,r,p.extend({nameMap:p.mergeAll(o)},i(t[0])));a.zoomLimit=p.retrieve.apply(null,p.map(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=ur,a.resize(t[0],e),p.each(t,(function(t){t.coordinateSystem=a,function(t,e){p.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=p.createHashMap(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=Mr(s),o=Ar(o),s&&o;){r=Mr(r),a=Ar(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);d>0&&(Dr(Cr(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!Mr(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!Ar(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function br(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function wr(t){return arguments.length?t:Ir}function Sr(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Tr(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Mr(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Ar(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Cr(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Dr(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Ir(t,e){return t.parentNode===e.parentNode?1:2}var Lr=n(3726),Pr=function(){this.parentPoint=[],this.childPoints=[]},Or=function(t){function e(e){return t.call(this,e)||this}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Pr},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=(0,Vt.GM)(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;dx.x)||(S-=Math.PI);var A=T?"left":"right",C=s.getModel("label"),D=C.get("rotate"),I=D*(Math.PI/180),L=y.getTextContent();L&&(y.setTextConfig({position:C.get("position")||A,rotation:null==D?-S:I,origin:"center"}),L.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),O="relative"===P?p.concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():null;O&&((0,V.A)(n).focus=O),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(m||(m=i.__edge=new _r.Z({shape:Zr(h,c,d,r,r)})),b.D(m,{shape:Zr(h,c,d,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,y=[],_=0;_e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(p.isString(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function jr(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xr(t,e){var n=jr(t);return p.indexOf(n,e)>=0}function Yr(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new An.Z(n,this,this.ecModel),r=Ur.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(u.Z);const Kr=qr;function Jr(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function Qr(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=Tr(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=wr((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=wr());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:a(u,h)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=Sr(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+p),f=r/(c.depth-1||1),Jr(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function $r(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");(0,p.extend)(i,n)}))}))}var to=["treemapZoomToNode","treemapRender","treemapMove"];var eo=n(5494);function no(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=(0,eo.i)(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var io=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ro(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new An.Z({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=(0,S.kF)(e.get("color")),o=(0,S.kF)(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],p.each(t,(function(t){var e=new An.Z(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=p.map(i||[],(function(t){return new An.Z(t,o,e)}),this),s=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return(0,Sn.TX)("nameValue",{name:o,value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(u.Z);function ro(t){var e=0;p.each(t.children,(function(t){ro(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const oo=io;var ao=n(4130),so=function(){function t(t){this.group=new c.Z,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Gt.p$(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=(0,S.U5)(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o=0,a=e.emptyItemWidth,s=t.get(["breadcrumb","height"]),l=Gt.lq(e.pos,e.box),u=e.totalWidth,h=e.renderList,c=h.length-1;c>=0;c--){var d=h[c],f=d.node,g=d.width,m=d.text;u>l.width&&(u-=g-a,g=a,m=null);var v=new _n.Z({shape:{points:lo(o,0,g,s,c===h.length-1,0===c)},style:(0,p.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new w.ZP({style:{text:m,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e4*B.zr,onclick:(0,p.curry)(r,f)});v.disableLabelAnimation=!0,this.group.add(v),uo(v,t,f),o+=g+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function lo(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function uo(t,e,n){(0,V.A)(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Yr(n,e)}}const ho=so;var co=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new fe.Z(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=ke.create();ke.translate(s,s,[-e,-n]),ke.scale(s,s,[t.scale,t.scale]),ke.translate(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&(0,G.MI)(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ho(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Xr(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(k.Z);const Mo=To;var Ao=p.each,Co=p.isObject,Do=-1,Io=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=p.clone(e);this.type=i,this.mappingMethod=n,this._normalizeData=Zo[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Lo(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,p.each(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Ao(e,(function(t,e){n[t]=e})),!p.isArray(i)){var r=[];p.isObject(i)?Ao(i,(function(t,e){var i=n[e];r[null!=i?i:Do]=t})):r[-1]=i,i=Bo(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):Lo(r,!0):(p.assert("linear"!==n||r.dataExtent),Lo(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},t.listVisualTypes=function(){return p.keys(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){p.isObject(t)?p.each(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=p.isArray(e)?[]:p.isObject(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&Ao(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(p.isArray(t))t=t.slice();else{if(!Co(t))return[];var e=[];Ao(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new Vo(c);return Go(d).drColorMappingBy=h,d}(0,r,o,0,u,f);(0,p.each)(f,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=(0,p.extend)({},e);if(r){var s=r.type,l="color"===s&&Go(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,g,i);Uo(t,o,n,i)}}))}else s=Wo(u),h.fill=s}}function Wo(t){var e=jo(t,"color");if(e){var n=jo(t,"colorAlpha"),i=jo(t,"colorSaturation");return i&&(e=(0,H.modifyHSL)(e,null,null,i)),n&&(e=(0,H.modifyAlpha)(e,n)),e}}function jo(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Xo(t,e){var n=t.get(e);return(0,p.isArray)(n)&&n.length?{name:e,range:n}:null}var Yo=Math.max,qo=Math.min,Ko=p.retrieve,Jo=p.each,Qo=["itemStyle","borderWidth"],$o=["itemStyle","gapWidth"],ta=["upperLabel","show"],ea=["upperLabel","height"];const na={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Gt.ME(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=(0,Vt.GM)(Ko(s.width,l[0]),r),h=(0,Vt.GM)(Ko(s.height,l[1]),o),c=i&&i.type,d=Wr(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?i.rootRect:null,g=t.getViewRoot(),m=jr(g);if("treemapMove"!==c){var v="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,d=0,p=c.length;dVt.YM&&(u=Vt.YM),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?Yo(u*i/l,l/(u*r)):1/0}function oa(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,d=t.length;c=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(T.ZP);function ha(t,e){var n=null==t?"":t+"";return e&&((0,p.isString)(e)?n=e.replace("{value}",n):(0,p.isFunction)(e)&&(n=e(t))),n}var ca=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:(0,Vt.GM)(n[0],e.getWidth()),cy:(0,Vt.GM)(n[1],e.getHeight()),r:(0,Vt.GM)(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?vt:pt.C,c=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];(0,M.L)(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:k}),silent:!0}))}if(y.get("show")&&P!==x){O=(O=y.get("distance"))?O+l:l;for(var R=0;R<=b;R++){u=Math.cos(M),h=Math.sin(M);var z=new $e.Z({shape:{x1:u*(f-O)+d,y1:h*(f-O)+p,x2:u*(f-T-O)+d,y2:h*(f-T-O)+p},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:i((P+R/b)/x)}),c.add(z),M+=C}M-=C}else M+=A}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,f=[],g=t.get(["pointer","show"]),m=t.getModel("progress"),v=m.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),S=[x,w],T=[o,a];function M(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=(0,Vt.GM)(o.get("width"),r.r),s=(0,Vt.GM)(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=(0,Vt.GM)(u[0],r.r),d=(0,Vt.GM)(u[1],r.r),p=o.get("keepAspect");return(i=l?(0,h.th)(l,c-a/2,d-s,a,s,null,p):new ua({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function A(t,e){var n=m.get("roundCap")?vt:pt.C,i=m.get("overlap"),a=i?m.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=w-y.get(_,t)%w),c}(v||g)&&(y.diff(c).add((function(e){var n=y.get(_,e);if(g){var i=M(e,o);b.KZ(i,{rotation:-((isNaN(+n)?T[0]:(0,Vt.NU)(n,S,T,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(v){var r=A(e,o),a=m.get("clip");b.KZ(r,{shape:{endAngle:(0,Vt.NU)(n,S,T,a)}},t),u.add(r),(0,V.Q)(t.seriesIndex,y.dataType,e,r),f[e]=r}})).update((function(e,n){var i=y.get(_,e);if(g){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=M(e,a);s.rotation=a,b.D(s,{rotation:-((isNaN(+i)?T[0]:(0,Vt.NU)(i,S,T,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(v){var l=d[n],h=A(e,l?l.shape.endAngle:o),p=m.get("clip");b.D(h,{shape:{endAngle:(0,Vt.NU)(i,S,T,p)}},t),u.add(h),(0,V.Q)(t.seriesIndex,y.dataType,e,h),f[e]=h}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(g){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof xn.ZP){var h=s.style;s.useStyle((0,p.extend)({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i((0,Vt.NU)(y.get(_,t),S,[0,1],!0))),s.z2EmphasisLift=0,(0,B.WO)(s,e),(0,B.k5)(s,r,o,a)}if(v){var c=f[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,(0,B.WO)(c,e),(0,B.k5)(c,r,o,a)}})),this._progressEls=f)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=(0,h.th)(r,e.cx-i/2+(0,Vt.GM)(o[0],e.r),e.cy-i/2+(0,Vt.GM)(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new c.Z,d=[],p=[],f=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new w.ZP({silent:!0}),p[t]=new w.ZP({silent:!0})})).update((function(t,e){d[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),m=new c.Z,v=i((0,Vt.NU)(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var _=y.get("offsetCenter"),x=r.cx+(0,Vt.GM)(_[0],r.r),b=r.cy+(0,Vt.GM)(_[1],r.r);(I=d[e]).attr({z2:g?0:2,style:(0,Z.Lr)(y,{x,y:b,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),m.add(I)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),T=r.cx+(0,Vt.GM)(S[0],r.r),M=r.cy+(0,Vt.GM)(S[1],r.r),A=(0,Vt.GM)(w.get("width"),r.r),C=(0,Vt.GM)(w.get("height"),r.r),D=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:v,I=p[e],L=w.get("formatter");I.attr({z2:g?0:2,style:(0,Z.Lr)(w,{x:T,y:M,text:ha(o,L),width:isNaN(A)?null:A,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:D})}),(0,Z.pe)(I,{normal:w},o,(function(t){return ha(t,L)})),f&&(0,Z.tD)(I,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return ha(a?a.interpolatedValue:o,L)}}),m.add(I)}h.add(m)})),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(k.Z);const da=ca;const pa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return ue(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(u.Z);var fa=["itemStyle","opacity"],ga=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new qt.Z,a=new w.ZP;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return(0,s.ZT)(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(fa);l=null==l?1:l,n||(0,b.Zi)(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,b.KZ(i,{style:{opacity:l}},r,e)):b.D(i,{style:{opacity:l},shape:{points:a.points}},r,e),(0,B.WO)(i,o),this._updateLabel(t,e),(0,B.k5)(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;(0,Z.ni)(r,(0,Z.k3)(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Kt.Z(h[0][0],h[0][1]):null},b.D(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),(0,Jt.Iu)(n,(0,Jt.$x)(a),{stroke:u})},e}(_n.Z);const ma=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new ga(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){var n=r.getItemGraphicEl(e);b.XD(n,t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(k.Z);var va=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype._defaultLabelLine=function(t){(0,S.Cc)(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(u.Z);const ya=va;function _a(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ea(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Ea(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const Na=Pa;var ka=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&p.merge(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);p.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(be.Z);const Ra=ka;const za=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(Fe.Z);var Ba=n(9233),Za=p.each,Fa=Math.min,Va=Math.max,Ga=Math.floor,Ha=Math.ceil,Ua=Vt.NM,Wa=Math.PI,ja=function(){function t(t,e,n){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Za(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new za(t,Ee.aG(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Za(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Ee.Jk(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=Xa(e.get("axisExpandWidth"),l),c=Xa(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=e.get("axisExpandWindow");p?(t=Xa(p[1]-p[0],l),p[1]=p[0]+t):(t=Xa(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||Ga(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Ga(Ua(p[0]/h,1))+1,Ha(Ua(p[1]/h,1))-1],m=f/h*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Za(n,(function(e,n){var o=(i.axisExpandable?qa:Ya)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Wa/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=ke.create();ke.rotate(h,h,u),ke.translate(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];p.each(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?(0,Ba.Z)(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[Va(0,o[1]*s/d-d/2)])[1]=Fa(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function Xa(t,e){return Fa(Va(t,e[0]),e[1])}function Ya(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function qa(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Vt.dt(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i=0&&(o[r[a].depth]=new An.Z(r[a],this,e));if(i&&n){var s=(0,cs.Z)(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value,s=o.source+" -- "+o.target;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return(0,Sn.TX)("nameValue",{name:null!=u?u+"":null,value:l,noValue:i(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(u.Z);const ps=ds;function fs(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){p.each(t,(function(t){var e=Ts(t.outEdges,Ss),n=Ts(t.inEdges,Ss),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,d=0;d=0;y&&v.depth>f&&(f=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_c-1?f:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)vs(s,l*=.99,a),ms(s,r,n,i,a),Ms(s,l,a),ms(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";p.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),p.each(t,(function(t){var e=0,n=0;p.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),p.each(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==p.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function gs(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ms(t,e,n,i,r){var o="vertical"===r?"x":"y";p.each(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function vs(t,e,n){p.each(t.slice().reverse(),(function(t){p.each(t,(function(t){if(t.outEdges.length){var i=Ts(t.outEdges,ys,n)/Ts(t.outEdges,Ss);if(isNaN(i)){var r=t.outEdges.length;i=r?Ts(t.outEdges,_s,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-ws(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-ws(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function ys(t,e){return ws(t.node2,e)*t.getValue()}function _s(t,e){return ws(t.node2,e)}function xs(t,e){return ws(t.node1,e)*t.getValue()}function bs(t,e){return ws(t.node1,e)}function ws(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Ss(t){return t.getValue()}function Ts(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),p.each(e,(function(e){var r=new Vo({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var Cs=n(381),Ds=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[r,o],f=d[u].get("type"),g=d[1-u].get("type"),m=t.data;if(m&&i){var v=[];p.each(m,(function(t,e){var n;p.isArray(t)?(n=t.slice(),t.unshift(e)):p.isArray(t.value)?((n=p.extend({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,v.push(n)})),t.data=v}var y=this.defaultValueDimensions,_=[{name:h,type:(0,Cs.T)(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,Cs.T)(g),dimsDef:y.slice()}];return ue(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:p.curry(he.pY,_,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Is=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return(0,s.ZT)(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(u.Z);(0,p.mixin)(Is,Ds,!0);const Ls=Is;var Ps=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=Ns(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?((0,b.Zi)(n),ks(s,n,i,t)):n=Ns(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(k.Z),Os=function(){},Es=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Os},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();im){var b=[y,x];i.push(b)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var Us=["color","borderColor"],Ws=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&qs(s,a))return;var l=Ys(a,n,!0);b.KZ(l,{shape:{points:a.ends}},t,n),Ks(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&qs(s,h)?i.remove(u):(u?(b.D(u,{shape:{points:h.ends}},t,a),(0,b.Zi)(u)):u=Ys(h,a),Ks(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),tl(t,this.group);var e=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=Ys(i.getItemLayout(n),n);Ks(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){tl(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(k.Z),js=function(){},Xs=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new js},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(T.ZP);function Ys(t,e,n){var i=t.ends;return new Xs({shape:{points:n?Js(i,t):i},z2:100})}function qs(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(Us);e.useStyle(o),e.style.fill=null,e.style.stroke=r}const nl=Ws;var il=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return(0,s.ZT)(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(u.Z);(0,p.mixin)(il,Ds,!0);const rl=il;function ol(t){t&&p.isArray(t.series)&&p.each(t.series,(function(t){p.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}var al=n(5682),sl=["itemStyle","borderColor"],ll=["itemStyle","borderColor0"],ul=["itemStyle","color"],hl=["itemStyle","color0"],cl={seriesType:"candlestick",plan:(0,al.Z)(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?ul:hl)}function i(t,e){return e.get(t>0?sl:ll)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill;var l=e.ensureUniqueItemVisual(r,"style");(0,p.extend)(l,s)}}}}};const dl=cl;var pl={seriesType:"candlestick",plan:(0,al.Z)(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=(0,Vt.GM)((0,p.retrieve2)(t.get("barMaxWidth"),r),r),a=(0,Vt.GM)((0,p.retrieve2)(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?(0,Vt.GM)(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=(0,p.map)(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=(0,_.o)(4*t.count),c=0,d=[],p=[],f=n.getStore();for(;null!=(r=t.next());){var g=f.get(o,r),m=f.get(s,r),v=f.get(l,r),y=f.get(u,r),x=f.get(h,r);isNaN(g)||isNaN(y)||isNaN(x)?(a[c++]=NaN,c+=3):(a[c++]=fl(f,r,m,v,l),d[0]=g,d[1]=y,i=e.dataToPoint(d,null,p),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,d[1]=x,i=e.dataToPoint(d,null,p),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),d=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(h,r),m=Math.min(d,p),v=Math.max(d,p),y=S(m,c),_=S(v,c),x=S(f,c),b=S(g,c),w=[];T(w,_,0),T(w,y,1),w.push(A(b),A(_),A(x),A(y)),n.setItemLayout(r,{sign:fl(a,r,d,p,l),initBaseline:d>p?_[1]:y[1],ends:w,brushRect:M(f,g,c)})}function S(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var r=e.slice(),o=e.slice();r[0]=(0,ct.subPixelOptimize)(r[0]+i/2,1,!1),o[0]=(0,ct.subPixelOptimize)(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=S(t,n),o=S(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function A(t){return t[0]=(0,ct.subPixelOptimize)(t[0],1),t}}}}};function fl(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}const gl=pl;var ml=n(3132),vl=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=ml.qW.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p0){var M=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=M[T],_[x++]=M[T+1],_[x++]=M[T+2],_[x++]=M[T+3]*v*256}else x+=4}return c.putImageData(y,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=ml.qW.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();const yl=vl;function _l(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var xl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):_l(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(_l(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=z(u,"cartesian2d");if(h){var c=u.getAxis("x"),d=u.getAxis("y");0,o=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),_=(0,Z.k3)(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),T=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;Ms[1]||Il[1])continue;var L=u.dataToPoint([D,I]);A=new dt.Z({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(T[1],M)))continue;A=new dt.Z({z2:1,shape:u.dataToRect([f.get(T[0],M)]).contentShape,style:C})}if(f.hasItemOption){var P=f.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),m=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),y=P.get(["itemStyle","borderRadius"]),b=O.get("focus"),w=O.get("blurScope"),S=O.get("disabled"),_=(0,Z.k3)(P)}A.shape.r=y;var E=t.getRawValue(M),N="-";E&&null!=E[2]&&(N=E[2]+""),(0,Z.ni)(A,_,{labelFetcher:t,labelDataIndex:M,defaultOpacity:C.opacity,defaultText:N}),A.ensureState("emphasis").style=g,A.ensureState("blur").style=m,A.ensureState("select").style=v,(0,B.k5)(A,b,w,S),A.incremental=r,r&&(A.states.emphasis.hoverLayer=!0),p.add(A),f.setItemGraphicEl(M,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new yl;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),g=d-h,m=f-c,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(v,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),_=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(_,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=p.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,d),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),g=t.getItemVisual(e,"symbolSize");h=p.isArray(g)?g.slice():null==g?["100%","100%"]:[g,g];h[d.index]=(0,Vt.GM)(h[d.index],f),h[c.index]=(0,Vt.GM)(h[c.index],i?f:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,d.boundingLength,d.pxSign,u,i,d),function(t,e,n,i,r){var o=t.get(Tl)||0;o&&(Al.attr({scaleX:e[0],scaleY:e[1],rotation:n}),Al.updateTransform(),o/=Al.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var f=d.symbolSize,g=(0,h.Cq)(n.get("symbolOffset"),f);return function(t,e,n,i,r,o,a,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,g=c.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var y=Math.abs(l),_=p.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;_.lastIndexOf("!")===_.length-1&&(x=!0,_=_.slice(0,_.length-1));var b=(0,Vt.GM)(_,e[f.index]),w=Math.max(m+2*b,0),S=x?0:2*b,T=(0,Vt.kE)(i),M=T?i:Hl((y+S)/w);w=m+2*(b=(y-M*m)/2/(x?M:Math.max(M-1,1))),S=x?0:2*b,T||"fixed"===i||(M=u?Hl((Math.abs(u)+S)/w):0),v=M*w-S,c.repeatTimes=M,c.symbolMargin=b}var A=g*(v/2),C=c.pathPosition=[];C[d.index]=n[d.wh]/2,C[f.index]="start"===a?A:"end"===a?l-A:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var D=c.bundlePosition=[];D[d.index]=n[d.xy],D[f.index]=n[f.xy];var I=c.barRectShape=p.extend({},n);I[f.wh]=g*Math.max(Math.abs(n[f.wh]),Math.abs(C[f.index]+A)),I[d.wh]=n[d.wh];var L=c.clipShape={};L[d.xy]=-n[d.xy],L[d.wh]=h.ecSize[d.wh],L[f.xy]=0,L[f.wh]=n[f.wh]}(n,f,r,o,0,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function Dl(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Il(t){var e=t.symbolPatternSize,n=(0,h.th)(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Ll(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(Fl(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Pl(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?Vl(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=Il(n),r.add(o),Vl(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function Ol(t,e,n){var i=p.extend({},e.barRectShape),r=t.__pictorialBarRect;r?Vl(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new dt.Z({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function El(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=p.extend({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)b.D(r,{shape:o},s,l);else{o[a.wh]=0,r=new dt.Z({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ct[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Nl(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=kl,n.isAnimationEnabled=Rl,n}function kl(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Rl(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zl(t,e,n,i){var r=new c.Z,o=new c.Z;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?Ll(r,e,n):Pl(r,0,n),Ol(r,n,i),El(r,e,n,i),r.__pictorialShapeStr=Zl(t,n),r.__pictorialSymbolMeta=n,r}function Bl(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Fl(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),p.each(o,(function(t){b.bX(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function Zl(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fl(t,e,n){p.each(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function Vl(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ct[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function Gl(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");Fl(t,(function(t){if(t instanceof xn.ZP){var e=t.style;t.useStyle(p.extend({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var f=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;(0,Z.ni)(g,(0,Z.k3)(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:(0,F.H)(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),(0,B.k5)(t,h,c,o.get("disabled"))}function Hl(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Ul=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Ml[+s],categoryDim:Ml[1-+s]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=Nl(r,t),n=Cl(r,t,e,u),o=zl(r,u,n);r.setItemGraphicEl(t,o),i.add(o),Gl(o,u,n)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=Nl(r,t),s=Cl(r,t,a,u),l=Zl(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,r=n.dataIndex,o=t.__pictorialBundle;b.D(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?Ll(t,e,n,!0):Pl(t,e,n,!0);Ol(t,n,!0),El(t,e,n,!0)}(n,u,s):n=zl(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),Gl(n,u,s)}else i.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&Bl(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){Bl(i,(0,V.A)(e).dataIndex,t,e)})):n.removeAll()},e.type="pictorialBar",e}(k.Z);const Wl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(lt);var jl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var d=new ao.Z(this._layersSeries||[],a,h,h),f=[];function g(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,d=[],p=[],g=a[n].indices,m=0;mo&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,d=o.length,f=o[0].indices.length,g=0;gMath.PI/2?"right":"left"):T&&"center"!==T?"left"===T?(_=r.r0+S,a>Math.PI/2&&(T="right")):"right"===T&&(_=r.r-S,a>Math.PI/2&&(T="left")):(_=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,T="center"),m.style.align=T,m.style.verticalAlign=g(d,"verticalAlign")||"middle",m.x=_*s+r.cx,m.y=_*l+r.cy;var M=g(d,"rotate"),A=0;"radial"===M?(A=-a)<-Math.PI/2&&(A+=Math.PI):"tangential"===M?(A=Math.PI/2-a)>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI):p.isNumber(M)&&(A=M*Math.PI/180),m.rotation=A})),h.dirtyStyle()},e}(pt.C);const $l=Ql;var tu="sunburstRootToNode",eu="sunburstHighlight";var nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new $l(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new ao.Z(r,i,s,s).add(h).update(h).remove(p.curry(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new $l(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";(0,G.MI)(a,s)}}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tu,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(k.Z);const iu=nu;var ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ou(n);var i=this._levelModels=p.map(t.levels||[],(function(t){return new An.Z(t,this,e)}),this),r=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Yr(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(u.Z);function ou(t){var e=0;p.each(t.children,(function(t){ou(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const au=ru;var su=Math.PI/180;function lu(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");p.isArray(i)||(i=[0,i]),p.isArray(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=(0,Vt.GM)(e[0],r),l=(0,Vt.GM)(e[1],o),u=(0,Vt.GM)(i[0],a/2),h=(0,Vt.GM)(i[1],a/2),c=-t.get("startAngle")*su,d=t.get("minAngle")*su,f=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&uu(g,v);var y=0;p.each(g.children,(function(t){!isNaN(t.getValue())&&y++}));var _=g.getValue(),x=Math.PI/(_||y)*2,b=g.depth>0,w=g.height-(b?-1:1),S=(h-u)/(w||1),T=t.get("clockwise"),M=t.get("stillShowZeroSum"),A=T?1:-1,C=function(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===_&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&(0,p.isString)(o)&&(o=(0,H.lift)(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height));var a=n.ensureUniqueItemVisual(r.dataIndex,"style");(0,p.extend)(a,o)}))}))}var cu={color:"fill",borderColor:"stroke"},du={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},pu=(0,S.Yf)();const fu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=pu(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(u.Z);function gu(t,e){return e=e||[0,0],p.map(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function mu(t,e){return e=e||[0,0],p.map([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function vu(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function yu(t,e){return e=e||[0,0],p.map(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function _u(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||(0,p.hasOwn)(t,"text")))}function xu(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},(0,p.hasOwn)(a,"text")&&(o.text=a.text),(0,p.hasOwn)(a,"rich")&&(o.rich=a.rich),(0,p.hasOwn)(a,"textFill")&&(o.fill=a.textFill),(0,p.hasOwn)(a,"textStroke")&&(o.stroke=a.textStroke),(0,p.hasOwn)(a,"fontFamily")&&(o.fontFamily=a.fontFamily),(0,p.hasOwn)(a,"fontSize")&&(o.fontSize=a.fontSize),(0,p.hasOwn)(a,"fontStyle")&&(o.fontStyle=a.fontStyle),(0,p.hasOwn)(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textPosition")&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textOffset")&&(i.offset=a.textOffset),(0,p.hasOwn)(a,"textRotation")&&(i.rotation=a.textRotation),(0,p.hasOwn)(a,"textDistance")&&(i.distance=a.textDistance)}return bu(o,t),(0,p.each)(o.rich,(function(t){bu(t,t)})),{textConfig:i,textContent:r}}function bu(t,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(t.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(t.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(t.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(t.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function wu(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Su(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,(0,p.each)(e.rich,(function(t){Su(t,t)})),i}function Su(t,e){e&&((0,p.hasOwn)(e,"fill")&&(t.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(t.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(t.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(t.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(t.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(t.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(t.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(t.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(t.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(t.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(t.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(t.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Tu=n(5622),Mu=n(7411),Au={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Cu=(0,p.keys)(Au),Du=((0,p.reduce)(Mu.dN,(function(t,e){return t[e]=1,t}),{}),Mu.dN.join(", "),["","style","shape","extra"]),Iu=(0,S.Yf)();function Lu(t,e,n,i,r){var o=t+"Animation",a=(0,b.ke)(t,i,r)||{},s=Iu(e).userDuring;return a.duration>0&&(a.during=s?(0,p.bind)(zu,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),(0,p.extend)(a,n[o]),a}function Pu(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Iu(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!r&&(r=i.style={});var f=(0,p.keys)(n);for(u=0;u0&&t.animateFrom(d,f)}else!function(t,e,n,i,r){if(r){var o=Lu("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);Ou(t,e),u?t.dirty():t.markRedraw()}function Ou(t,e){for(var n=Iu(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=(0,p.keys)(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:p.bind(yu,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function eh(t){return t instanceof T.ZP}function nh(t){return t instanceof ki.ZP}const ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=lh(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){hh(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);Eu(n,pu(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);hh(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=lh(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=_(i,Wu).getItemStyle(),o=x(i,Wu),a=Z.Lr(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,p.retrieve3)(t.getFormattedLabel(i,Wu),t.getFormattedLabel(i,ju),(0,F.H)(e,i)):null;var l=Z.nC(o,null,!0);return w(n,r),r=wu(r,a,l),n&&b(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),(0,p.hasOwn)(cu,t)){var i=e.getItemVisual(n,"style");return i?i[cu[t]]:null}if((0,p.hasOwn)(du,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){var e=o.getBaseAxis();return(0,at.Gk)((0,p.defaults)({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return Z.qT(t,n)}},a.api||{}),h={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:uh(t.getData())},c={},d={},f={},g={},m=0;m=c;d--){Eu(e.childAt(d),pu(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function dh(t,e,n){var i,r=pu(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&((0,p.hasOwn)(i,"pathData")||(0,p.hasOwn)(i,"d")))&&_h(a)!==r.customPathData||"image"===o&&(0,p.hasOwn)(s,"image")&&s.image!==r.customImagePath}function ph(t,e,n){var i=e?fh(t,e):t,r=e?gh(t,i,Wu):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?fh(s,e):s:null;if(r&&(n.isLegacy||_u(r,o,!!a,!!l))){n.isLegacy=!0;var u=xu(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function fh(t,e){return e?t?t[e]:null:t}function gh(t,e,n){var i=e&&e.style;return null==i&&n===Wu&&t&&(i=t.styleEmphasis),i}function mh(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function vh(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ch(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function yh(t){var e=this.context,n=e.oldChildren[t];Eu(n,pu(n).option,e.seriesModel)}function _h(t){return t&&(t.pathData||t.d)}var xh=n(6026),bh=n(9517),wh=n(241),Sh=n(7037);var Th=n(7329),Mh=n(5539),Ah=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ch[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=ke.create();ke.rotate(d,d,s),ke.translate(d,d,[i.cx,i.cy]),l=ct.applyTransform([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=tn.Z.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));Mh.$_(t,n,i,r,d)},e}(Th.Z);var Ch={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:Mh.BL(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Mh.Rj(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:Mh.Rj(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}};const Dh=Ah;const Ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(be.Z);var Lh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",S.C6).models[0]},e.type="polarAxis",e}(be.Z);p.mixin(Lh,Se.W);var Ph=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="angleAxis",e}(Lh),Oh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="radiusAxis",e}(Lh),Eh=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(Fe.Z);Eh.prototype.dataToRadius=Fe.Z.prototype.dataToCoord,Eh.prototype.radiusToData=Fe.Z.prototype.coordToData;const Nh=Eh;var kh=(0,S.Yf)(),Rh=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=yt.lP(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=kh(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-h)<=1&&Math.abs(p-r)<=1&&d>h?h=d:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(Fe.Z);Rh.prototype.dataToAngle=Fe.Z.prototype.dataToCoord,Rh.prototype.angleToData=Fe.Z.prototype.coordToData;const zh=Rh;var Bh=["radius","angle"],Zh=function(){function t(t){this.dimensions=Bh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Nh,this._angleAxis=new zh,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return Fh(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Fh(e)===this?this.pointToData(n):null},t}();function Fh(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const Vh=Zh;function Gh(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();p.each((0,Ee.PY)(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),p.each((0,Ee.PY)(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),(0,Ee.Jk)(i.scale,i.model),(0,Ee.Jk)(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function Hh(t,e){if(t.type=e.get("type"),t.scale=(0,Ee.aG)(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var Uh={dimensions:Bh,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new Vh(i+"");r.update=Gh;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Hh(o,s),Hh(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=(0,Vt.GM)(i[0],r),t.cy=(0,Vt.GM)(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,Vt.GM)(l[0],s),(0,Vt.GM)(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",S.C6).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}};const Wh=Uh;var jh=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xh(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function Yh(t){return t.getRadiusAxis().inverse?0:1}function qh(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var Kh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=p.map(n.getViewLabels(),(function(t){t=p.clone(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));qh(s),qh(o),p.each(jh,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||Jh[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(en.Z),Jh={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=Yh(n),u=l?0:1;(a=0===o[u]?new Pn.Z({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new On.Z({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[Yh(n)],u=p.map(i,(function(t){return new $e.Z({shape:Xh(n,[l,l+s],t.coord)})}));t.add(ct.mergePath(u,{style:p.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[Yh(n)],h=[],c=0;cg?"left":"right",y=Math.abs(f[1]-m)/d<.3?"middle":f[1]>m?"top":"bottom";if(s&&s[c]){var _=s[c];p.isObject(_)&&_.textStyle&&(a=new An.Z(_.textStyle,l,l.ecModel))}var x=new w.ZP({silent:tn.Z.isLabelSilent(e),style:(0,Z.Lr)(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:v,verticalAlign:y})});if(t.add(x),h){var b=tn.Z.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,(0,V.A)(x).eventData=b}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",C=b;_&&(i[s][M]||(i[s][M]={p:b,n:b}),C=i[s][M][A]);var D=void 0,I=void 0,L=void 0,P=void 0;if("radius"===c.dim){var O=c.dataToCoord(T)-b,E=o.dataToCoord(M);Math.abs(O)=P})}}}))};var sc={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},lc={splitNumber:5},uc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="polar",e}(xe.Z);function hc(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.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]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),p.retrieve(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var cc=["axisLine","axisTickLabel","axisName"],dc=["splitArea","splitLine"],pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new c.Z;var s=hc(e),l=new tn.Z(e,s);p.each(cc,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),p.each(dc,(function(t){e.get([t,"show"])&&fc[t](this,this.group,this._axisGroup,e)}),this),ct.groupTransition(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){on(this)},e.type="singleAxis",e}(en.Z),fc={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),h=[],c=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return bc(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return bc(e)===this?this.pointToData(n):null},t}();const Sc={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new wc(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",S.C6).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:xc};var Tc=["x","y"],Mc=["width","height"],Ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=Ic(a,1-Dc(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Cc[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=hc(n);Mh.gf(e,t,d,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=hc(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=Mh.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=Dc(r),s=Ic(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Ic(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Th.Z),Cc={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:Mh.BL([e,n[0]],[e,n[1]],Dc(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Mh.uE([e-i/2,n[0]],[i,r],Dc(t))}}};function Dc(t){return t.isHorizontal()?0:1}function Ic(t,e){var n=t.getRect();return[n[Tc[e]],n[Tc[e]]+n[Mc[e]]]}const Lc=Ac;var Pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="single",e}(xe.Z);function Oc(t,e){var n,i=t.cellSize;1===(n=p.isArray(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=p.map([0,1],(function(t){return(0,Gt.QM)(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));(0,Gt.dt)(t,e,{type:"box",ignoreSize:r})}const Ec=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e,n,i){var r=(0,Gt.tE)(e);t.prototype.init.apply(this,arguments),Oc(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Oc(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(be.Z);var Nc=n(3917),kc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new dt.Z({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new qt.Z({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return(0,p.isString)(t)&&t?(0,G.wx)(t,e):(0,p.isFunction)(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new w.ZP({z2:30,style:(0,Z.Lr)(r,{text:g})});m.attr(this._yearTextPositionControl(m,c[a],n,a,o)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!(0,p.isString)(o)||(o&&(e=(0,Nc.G8)(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,f=0;f=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/zc)-Math.floor(n[0].time/zc)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function Fc(t,e){var n;return p.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var Vc=["transition","enterFrom","leaveTo"],Gc=Vc.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Hc(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?Vc:Gc,r=0;r=0;l--){var f,g;u=n[l];if(g=null!=(f=S.U5(u.id,null))?r.get(f):null){var m=g.parent,v=(d=jc(m),m===i?{width:o,height:a}:{width:d.width,height:d.height}),y={},_=Gt.p$(g,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!jc(g).isNew&&_){for(var x=u.transition,w={},T=0;T=0)?w[M]=A:g[M]=A}(0,b.D)(g,w,t,0)}else g.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Kc(n,jc(n).option,e,t._lastGraphicModel)})),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xe.Z);function Yc(t){var e=new(p.hasOwn(Wc,t)?Wc[t]:ct.getShapeClass(t))({});return jc(e).type=t,e}function qc(t,e,n,i){var r=Yc(n);return e.add(r),i.set(t,r),jc(r).id=t,jc(r).isNew=!0,r}function Kc(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Kc(t,e,n,i)})),Eu(t,e,i),n.removeKey(jc(t).id))}function Jc(t,e,n,i){t.isGroup||p.each([["cursor",ki.ZP.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];p.hasOwn(e,i)?t[i]=p.retrieve2(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),p.each(p.keys(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=p.isFunction(i)?i:null}})),p.hasOwn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Qc=["rect","polygon","keep","clear"];function $c(t,e){var n=(0,S.kF)(t?t.brush:[]);if(n.length){var i=[];p.each(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;p.isArray(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),o=u,a={},p.each(o,(function(t){a[t]=1})),o.length=0,p.each(a,(function(t,e){o.push(e)})),e&&!u.length&&u.push.apply(u,Qc)}}var td=n(6211),ed=p.each;function nd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function id(t,e,n){var i={};return ed(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);ed(t[e],(function(t,i){if(Vo.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new Vo(r),"opacity"===i&&((r=p.clone(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Vo(r))}}))})),i}function rd(t,e,n){var i;p.each(n,(function(t){e.hasOwnProperty(t)&&nd(e[t])&&(i=!0)})),i&&p.each(n,(function(n){e.hasOwnProperty(n)&&nd(e[n])?t[n]=p.clone(e[n]):delete t[n]}))}var od=n(765);var ad={lineX:sd(0),lineY:sd(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&od.X(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(od.X(i,r,o)||od.X(i,r+a,o)||od.X(i,r,o+s)||od.X(i,r+a,o+s)||fe.Z.create(t).contain(l[0],l[1])||(0,ct.linePolygonIntersect)(r,o,r+a,o,i)||(0,ct.linePolygonIntersect)(r,o,r,o+s,i)||(0,ct.linePolygonIntersect)(r+a,o,r+a,o+s,i)||(0,ct.linePolygonIntersect)(r,o+s,r+a,o+s,i))||void 0}}};function sd(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ld(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&yd(e)}};function yd(t){return new fe.Z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const _d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ts.Z(e.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){pd(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:p.clone(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:p.clone(n),$from:e})},e.type="brush",e}(xe.Z);function xd(t,e){return p.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new An.Z(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const bd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,(function(t){return xd(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=xd(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(be.Z);var wd=n(1806),Sd=["rect","polygon","lineX","lineY","keep","clear"],Td=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,p.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return p.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:Sd.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wd.f1);const Md=Td;const Ad=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],(0,p.each)(n,(function(e,n){var i,o=(0,S.U5)((0,S.C4)(e),"");(0,p.isObject)(e)?(i=(0,p.clone)(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new le.Z([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(be.Z);var Cd=n(1219),Dd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline.slider",e.defaultOption=(0,ut.ZL)(Ad.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Ad);(0,p.mixin)(Dd,Cd.X.prototype);const Id=Dd;const Ld=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline",e}(xe.Z);const Pd=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return(0,s.ZT)(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(Fe.Z);var Od=n(5043),Ed=n(1618),Nd=Math.PI,kd=(0,S.Yf)(),Rd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return(0,Sn.TX)("nameValue",{noName:!0,value:e})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Nd/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),g=f.get("show",!0),m=g?f.get("itemSize"):0,v=g?f.get("itemGap"):0,y=m+v,_=t.get(["label","rotate"])||0;_=_*Nd/180;var x=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),w=g&&f.get("showPrevBtn",!0),S=g&&f.get("showNextBtn",!0),T=0,M=d;"left"===x||"bottom"===x?(b&&(i=[0,0],T+=y),w&&(r=[T,0],T+=y),S&&(o=[M-m,0],M-=y)):(b&&(i=[M-m,0],M-=y),w&&(r=[0,0],T+=y),S&&(o=[M-m,0],M-=y));var A=[T,M];return t.get("inverse")&&A.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:_,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:A,controlSize:m,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=ke.create(),a=r.x,s=r.y+r.height;ke.translate(o,o,[-a,-s]),ke.rotate(o,o,-Nd/2),ke.translate(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=v(r),u=v(n.getBoundingRect()),h=v(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var f,g=t.labelPosOpt;null==g||(0,p.isString)(g)?(y(c,u,l,1,f="+"===g?0:1),y(d,h,l,1,1-f)):(y(c,u,l,1,f=g>=0?0:1),d[1]=c[1]+g);function m(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,m(n),m(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Od.Z({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Ed.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new We.Z}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new Pd("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new c.Z;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new $e.Z({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:(0,p.extend)({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new $e.Z({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],(0,p.each)(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:(0,p.bind)(r._changeTimeline,r,t.value)},d=zd(s,l,e,c);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=h.getItemStyle(),(0,B.vF)(d);var f=(0,V.A)(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],(0,p.each)(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),d=new w.ZP({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(r._changeTimeline,r,a),silent:!1,style:(0,Z.Lr)(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=(0,Z.Lr)(u),d.ensureState("progress").style=(0,Z.Lr)(h),e.add(d),(0,B.vF)(d),kd(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=(0,yt.GM)((0,p.retrieve2)(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=ct.createIcon(t.get(["controlStyle",e]),i||{},new fe.Z(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),(0,B.vF)(c)}}h(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=(0,p.bind)(s._handlePointerDrag,s),t.ondragend=(0,p.bind)(s._handlePointerDragend,s),Bd(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){Bd(t,s._progressLine,o,n,i)}};this._currentPointer=zd(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=Vt.dt(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var $d={min:(0,p.curry)(Qd,"min"),max:(0,p.curry)(Qd,"max"),average:(0,p.curry)(Qd,"average"),median:(0,p.curry)(Qd,"median")};function tp(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!(0,p.isArray)(e.coord)&&i){var r=i.dimensions,o=ep(e,n,i,t);if((e=(0,p.clone)(e)).type&&$d[e.type]&&o.baseAxis&&o.valueAxis){var a=(0,p.indexOf)(r,o.baseAxis.dim),s=(0,p.indexOf)(r,o.valueAxis.dim),l=$d[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$d[u[h]]&&(u[h]=rp(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function ep(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function np(t,e){return!(t&&t.containData&&e.coord&&!Jd(e))||t.containData(e.coord)}function ip(t,e){return t?function(t,n,i,r){var o=r<2?t.coord&&t.coord[r]:t.value;return(0,Kd.yQ)(o,e[r])}:function(t,n,i,r){return(0,Kd.yQ)(t.value,e[r])}}function rp(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var op=(0,S.Yf)();const ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){op(t).keep=!1})),e.eachSeries((function(t){var r=Yd.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!op(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){op(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;(0,p.each)(t,(function(t){var i=Yd.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?(0,B.SX)(t):(0,B.VP)(t))}))}))},e.type="marker",e}(xe.Z);function sp(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Vt.GM(a.get("x"),n.getWidth()),l=Vt.GM(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}const lp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markPoint");e&&(sp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new f.Z),u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=(0,p.map)(n.get("data"),(0,p.curry)(tp,e));t&&(o=(0,p.filter)(o,(0,p.curry)(np,t)));var a=ip(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),sp(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if((0,p.isFunction)(i)||(0,p.isFunction)(r)||(0,p.isFunction)(o)||(0,p.isFunction)(s)){var h=e.getRawValue(t),c=e.getDataParams(t);(0,p.isFunction)(i)&&(i=i(h,c)),(0,p.isFunction)(r)&&(r=r(h,c)),(0,p.isFunction)(o)&&(o=o(h,c)),(0,p.isFunction)(s)&&(s=s(h,c))}var d=n.getModel("itemStyle").getItemStyle(),f=(0,td.UL)(a,"color");d.fill||(d.fill=f),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ap);const up=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Yd);var hp=n(7145),cp=(0,S.Yf)(),dp=function(t,e,n,i){var r,o=t.getData();if((0,p.isArray)(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=(0,p.retrieve)(i.yAxis,i.xAxis);else{var u=ep(i,o,e,t);s=u.valueAxis,l=rp(o,(0,m.IR)(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,d=(0,p.clone)(i),f={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,f.coord[c]=1/0;var g=n.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=f.coord[h]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var v=[tp(t,r[0]),tp(t,r[1]),(0,p.extend)({},r[2])];return v[2].type=v[2].type||null,(0,p.merge)(v[2],v[0]),(0,p.merge)(v[2],v[1]),v};function pp(t){return!isNaN(t)&&!isFinite(t)}function fp(t,e,n,i){var r=1-t,o=i.dimensions[t];return pp(e[r])&&pp(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function gp(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(fp(1,n,i,t)||fp(0,n,i,t)))return!0}return np(t,e[0])&&np(t,e[1])}function mp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get("x"),r.getWidth()),u=Vt.GM(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if(z(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;pp(t.get(h[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):pp(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}const vp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=cp(e).from,o=cp(e).to;r.each((function(e){mp(r,e,!0,t,n),mp(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new hp.Z);this.group.add(l.group);var u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=new le.Z(i,n),a=new le.Z([],n),s=(0,p.map)(n.get("data"),(0,p.curry)(dp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(gp,t)));var l=ip(!!t,i);return r.initData((0,p.map)(s,(function(t){return t[0]})),null,l),o.initData((0,p.map)(s,(function(t){return t[1]})),null,l),a.initData((0,p.map)(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,d=u.line;cp(e).from=h,cp(e).to=c,e.setData(d);var f=e.get("symbol"),g=e.get("symbolSize"),m=e.get("symbolRotate"),v=e.get("symbolOffset");function y(e,n,r){var o=e.getItemModel(n);mp(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=(0,td.UL)(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:(0,p.retrieve2)(o.get("symbolRotate",!0),m[r?0:1]),symbolSize:(0,p.retrieve2)(o.get("symbolSize"),g[r?0:1]),symbol:(0,p.retrieve2)(o.get("symbol",!0),f[r?0:1]),style:s})}(0,p.isArray)(f)||(f=[f,f]),(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(v)||(v=[v,v]),u.from.each((function(t){y(h,t,!0),y(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){(0,V.A)(t).dataModel=e,t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ap);const yp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Yd);var _p=(0,S.Yf)(),xp=function(t,e,n,i){var r=tp(t,i[0]),o=tp(t,i[1]),a=r.coord,s=o.coord;a[0]=(0,p.retrieve)(a[0],-1/0),a[1]=(0,p.retrieve)(a[1],-1/0),s[0]=(0,p.retrieve)(s[0],1/0),s[1]=(0,p.retrieve)(s[1],1/0);var l=(0,p.mergeAll)([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function bp(t){return!isNaN(t)&&!isFinite(t)}function wp(t,e,n,i){var r=1-t;return bp(e[r])&&bp(n[r])}function Sp(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return z(t,"cartesian2d")?!(!n||!i||!wp(1,n,i)&&!wp(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!Jd(e)&&!Jd(n))||t.containZone(e.coord,n.coord)}(t,r,o):np(t,r)||np(t,o)}function Tp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get(n[0]),r.getWidth()),u=Vt.GM(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[p=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(z(a,"cartesian2d")){var c=a.getAxis("x"),d=a.getAxis("y"),p=t.get(n[0],e),f=t.get(n[1],e);bp(p)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):bp(f)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Mp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=(0,p.map)(Mp,(function(r){return Tp(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new c.Z});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},i),{name:t,ordinalMeta:null})}));r=(0,p.map)(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new le.Z(r,n)}else r=[{name:"value",type:"float"}],i=new le.Z(r,n);var s=(0,p.map)(n.get("data"),(0,p.curry)(xp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(Sp,t)));var l=t?function(t,e,n,i){var o=t.coord[Math.floor(i/2)][i%2];return(0,Kd.yQ)(o,r[i])}:function(t,e,n,i){return(0,Kd.yQ)(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=(0,p.map)(Mp,(function(n){return Tp(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Vt.dt(c),Vt.dt(d);var f=!!(l[0]>c[1]||l[1]d[1]||h[1]i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),ft.T9(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Np(i,t)}))}))}var Bp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Ep(i,e,{pan:(0,p.bind)(Zp.pan,this),zoom:(0,p.bind)(Zp.zoom,this),scrollMove:(0,p.bind)(Zp.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Op(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return(0,Ba.Z)(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Fp((function(t,e,n,i,r,o){var a=Vp[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:Fp((function(t,e,n,i,r,o){return Vp[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function Fp(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return(0,Ba.Z)(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var Vp={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};const Gp=Bp;var Hp=n(7543);function Up(t){(0,Hp.Z)(t),t.registerComponentModel(Ip),t.registerComponentView(Gp),zp(t)}const Wp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,ut.ZL)(Dp.Z.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Dp.Z);var jp=n(1158),Xp=dt.Z,Yp="horizontal",qp="vertical",Kp=["line","bar","candlestick","scatter"],Jp={easing:"cubicOut",duration:100,delay:0},Qp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),ft.T9(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ft.ZH(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new c.Z;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===Yp?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Gt.tE(t.option);(0,p.each)(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Gt.ME(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===qp&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==Yp||r?n===Yp&&r?{scaleY:a?1:-1,scaleX:-1}:n!==qp||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Xp({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Xp({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(r!==this._shadowData||o!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(y>0&&e%y)v+=m;else{var n=null==t||isNaN(t)||""===t,i=n?0:(0,Vt.NU)(t,l,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,h=n}})),a=this._shadowPolygonPts=f,s=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=o,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var b=w(1===x);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new c.Z,i=new _n.Z({shape:{points:a},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new qt.Z({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){var a=t.getAxisProxy(r,o).getTargetSeriesModels();(0,p.each)(a,(function(t){if(!(n||!0!==e&&(0,p.indexOf)(Kp,t.get("type"))<0)){var a,s=i.getComponent((0,Pp.jQ)(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Xp({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Xp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],(function(e){var o=a.get("handleIcon");!h.Pw[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=(0,h.th)(o,-1,0,2,2,null,!0);s.attr({cursor:$p(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,e),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=(0,Vt.GM)(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,B.vF)(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var d=a.getModel("textStyle");t.add(i[e]=new w.ZP({silent:!0,invisible:!0,style:(0,Z.Lr)(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var f=(0,Vt.GM)(a.get("moveHandleSize"),o[1]),g=e.moveHandle=new dt.Z({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:f}}),m=.8*f,v=e.moveHandleIcon=(0,h.th)(a.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);v.silent=!0,v.y=o[1]+f/2-.5,g.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(f,10));(d=e.moveZone=new dt.Z({invisible:!0,shape:{y:o[1]-y,height:f+y}})).on("mouseover",(function(){s.enterEmphasis(g)})).on("mouseout",(function(){s.leaveEmphasis(g)})),r.add(g),r.add(v),r.add(d)}d.attr({draggable:!0,cursor:$p(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[(0,Vt.NU)(t[0],[0,100],e,!0),(0,Vt.NU)(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];(0,Ba.Z)(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?(0,Vt.NU)(o.minSpan,a,r,!0):null,null!=o.maxSpan?(0,Vt.NU)(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=(0,Vt.dt)([(0,Vt.NU)(i[0],r,a,!0),(0,Vt.NU)(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=(0,Vt.dt)(n.slice()),r=this._size;(0,p.each)([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Kt.Z(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=(0,Vt.dt)([(0,Vt.NU)(n.x,i,r,!0),(0,Vt.NU)(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(jp.sT(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new Xp({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Jp:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=(0,Pp.rg)(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lp.Z);function $p(t){return"vertical"===t?"ns-resize":"ew-resize"}const tf=Qp;function ef(t){t.registerComponentModel(Wp),t.registerComponentView(tf),(0,Hp.Z)(t)}var nf={get:function(t,e,n){var i=p.clone((rf[t]||{})[e]);return n&&p.isArray(i)?i[i.length-1]:i}},rf={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const of=nf;var af=Vo.mapVisual,sf=Vo.eachVisual,lf=p.isArray,uf=p.each,hf=Vt.dt,cf=Vt.NU,df=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=p.bind(t,this),this.controllerVisuals=id(this.option.controller,e,t),this.targetVisuals=id(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=S.kF(t),e},e.prototype.eachTargetSeries=function(t,e){p.each(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],p.isArray(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return p.isString(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):p.isFunction(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=hf([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});p.merge(i,n),p.merge(r,n);var o=this.isCategory();function a(n){lf(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},uf(i,(function(t,e){if(Vo.isValidType(e)){var n=of.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";uf(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&p.clone(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&p.clone(n)||(o?s[0]:[s[0],s[0]])),l.symbol=af(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;sf(u,(function(t){t>h&&(h=t)})),l.symbolSize=af(u,(function(t){return cf(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(be.Z);const pf=df;var ff=[20,140],gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=ff[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=ff[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):p.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Vt.dt((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=mf(this,"outOfRange",this.getExtent()),n=mf(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new c.Z("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();Tf([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=Sf(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var d=ct.applyTransform(n.handleLabelPoints[l],ct.getTransform(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=Sf(t,o,s,!0),p=a[0]-c/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=ct.applyTransform(l.indicatorLabelPoint,ct.getTransform(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:p,y:d,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),m.animateTo(x,b)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||If(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=S.XI(h,c);this._dispatchHighDown("downplay",wf(d[0],n)),this._dispatchHighDown("highlight",wf(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=(0,V.A)(e).dataIndex){var i=(0,V.A)(e),r=this.ecModel.getSeriesByIndex(i.seriesIndex);if(n.isTargetSeries(r)){var o=r.getData(i.dataType),a=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function kf(t,e,n,i){for(var r=e.targetVisuals[i],o=Vo.prepareVisualTypes(r),a={color:(0,td.UL)(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(Of,Ef),(0,p.each)(Nf,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(zf))}function Vf(t){t.registerComponentModel(vf),t.registerComponentView(Pf),Ff(t)}var Gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Hf[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=p.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p.map(this._pieceList,(function(t){return t=p.clone(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=Vo.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}p.each(e.pieces,(function(t){p.each(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),p.each(n,(function(t,n){var i=!1;p.each(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&p.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=of.get(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var e=Vo.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){Vo.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return p.each(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=(0,ut.ZL)(pf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(pf),Hf={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function Uf(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const Wf=Gf;const jf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=p.retrieve(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),p.each(l.viewPieceList,(function(i){var l=i.piece,u=new c.Z;u.onclick=p.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),h){var f=this.visualMapModel.getValueState(d);u.add(new w.ZP({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===f?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Gt.BZ(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:wf(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return bf(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new c.Z,a=this.visualMapModel.textStyleModel;o.add(new w.ZP({style:(0,Z.Lr)(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=p.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add((0,h.th)(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=p.clone(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,p.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(_f);function Xf(t){t.registerComponentModel(Wf),t.registerComponentView(jf),Ff(t)}var Yf={label:{enabled:!0},decal:{show:!1}},qf=(0,S.Yf)(),Kf={};function Jf(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=p.clone(Yf);p.merge(i.label,t.getLocaleModel().get("aria"),!1),p.merge(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=p.createHashMap();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),qf(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(p.isFunction(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=(0,eo.i)(e.ecModel,e.name,Kf,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=qf(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=(0,eo.i)(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?p.extend(p.extend({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=p.defaults(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(d){var f=o.get(["general","withTitle"]);s=r(f,{title:d})}else s=o.get(["general","withoutTitle"]);var g=[],m=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(m,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),d=o.get(["data","separator","end"]),p=[],f=0;f":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tg=function(){function t(t){if(null==(this._condVal=(0,p.isString)(t)?new RegExp(t):(0,p.isRegExp)(t)?t:null)){0,(0,Vs._y)("")}}return t.prototype.evaluate=function(t){var e=typeof t;return(0,p.isString)(e)?this._condVal.test(t):!!(0,p.isNumber)(e)&&this._condVal.test(t+"")},t}(),eg=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),ng=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){yg(t,i)&&yg(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nT:C2&&l.push(e),l}function xg(t,e,n,i,r,o,a,s,l,u){if(yg(t,n)&&yg(e,i)&&yg(r,a)&&yg(o,s))l.push(a,s);else{var h=2/u,c=h*h,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,m=i-e,v=r-a,y=o-s,_=g*g+m*m,x=v*v+y*y;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],T=[];(0,A.Vz)(t,n,r,a,.5,S),(0,A.Vz)(e,i,o,s,.5,T),xg(S[0],T[0],S[1],T[1],S[2],T[2],S[3],T[3],l,u),xg(S[4],T[4],S[5],T[5],S[6],T[6],S[7],T[7],l,u)}}}}function bg(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=bg([l,u],h?0:1,e),d=(h?s:u)/c.length,p=0;p1?null:new Kt.Z(p*l+t,p*u+e)}function Mg(t,e,n){var i=new Kt.Z;Kt.Z.sub(i,n,e),i.normalize();var r=new Kt.Z;return Kt.Z.sub(r,t,e),r.dot(i)}function Ag(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function Cg(t){var e=t.points,n=[],i=[];(0,Lr.zk)(e,n,i);var r=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Kt.Z,h=new Kt.Z;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=bg([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,d=0;d0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),T=Math.cos(w),M=0;for(_=0;_0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function Hg(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=(0,p.map)(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return(0,p.map)(o,(function(o,a){return{cp:o,z:Gg(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function Ug(t){return Ig(t.path,t.count)}function Wg(t){return(0,p.isArray)(t[0])}function jg(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var Xg={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);Wg(t)&&(s=t,l=e),Wg(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?jg(l,s):jg(c?e:t,[c?t:e]),f=0,g=0;g1e4))for(var i=n.getIndices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof T.ZP&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function nm(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function im(t){return(0,p.isArray)(t)?t.sort().join(","):t}function rm(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function om(t,e){for(var n=0;n=0&&r.push({data:e.oldData[n],divide:rm(e.oldData[n]),dim:t.dimension})})),(0,p.each)((0,S.kF)(t.to),(function(t){var e=om(n.updatedSeries,t);if(e>=0){var i=n.updatedSeries[e].getData();o.push({data:i,divide:rm(i),dim:t.dimension})}})),r.length>0&&o.length>0&&em(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=(0,p.createHashMap)(),i=(0,p.createHashMap)(),r=(0,p.createHashMap)();return(0,p.each)(t.oldSeries,(function(e,n){var o=t.oldData[n],a=nm(e),s=im(a);i.set(s,o),(0,p.isArray)(a)&&(0,p.each)(a,(function(t){r.set(t,{data:o,key:s})}))})),(0,p.each)(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.getData(),o=nm(t),a=im(o),s=i.get(a);if(s)n.set(a,{oldSeries:[{divide:rm(s),data:s}],newSeries:[{divide:rm(e),data:e}]});else if((0,p.isArray)(o)){var l=[];(0,p.each)(o,(function(t){var e=i.get(t);e&&l.push({divide:rm(e),data:e})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:e,divide:rm(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldSeries:[{data:u.data,divide:rm(u.data)}],newSeries:[]},n.set(u.key,h)),h.newSeries.push({data:e,divide:rm(e)})}}}})),n}(i,n);(0,p.each)(o.keys(),(function(t){var n=o.get(t);em(n.oldSeries,n.newSeries,e)}))}(0,p.each)(n.updatedSeries,(function(t){t[u.V]&&(t[u.V]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldData=[],h=0;h{"use strict";function i(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function r(t,e,n,r){var o=t.getZoom(),a=t.getCenter(),s=e.zoom,l=t.projectedToPoint?t.projectedToPoint(a):t.dataToPoint(a);if(null!=e.dx&&null!=e.dy&&(l[0]-=e.dx,l[1]-=e.dy,t.setCenter(i(t,l),r)),null!=s){if(n){var u=n.min||0,h=n.max||1/0;s=Math.max(Math.min(o*s,h),u)/o}t.scaleX*=s,t.scaleY*=s;var c=(e.originX-t.x)*(s-1),d=(e.originY-t.y)*(s-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(i(t,l),r),t.setZoom(s*o)}return{center:t.getCenter(),zoom:t.getZoom()}}n.d(e,{A:()=>r})},9266:(t,e,n)=>{"use strict";n.d(e,{D:()=>s,KZ:()=>l,XD:()=>d,Zi:()=>p,_W:()=>f,bX:()=>h,eq:()=>u,ke:()=>o});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e,n,r,o){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var l="update"===t;if(e&&e.isAnimationEnabled()){var u=void 0,h=void 0,c=void 0;return r?(u=(0,i.retrieve2)(r.duration,200),h=(0,i.retrieve2)(r.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(u=a.duration),null!=a.easing&&(h=a.easing),null!=a.delay&&(c=a.delay)),(0,i.isFunction)(c)&&(c=c(n,o)),(0,i.isFunction)(u)&&(u=u(n)),{duration:u||0,delay:c,easing:h}}return null}function a(t,e,n,r,a,s,l){var u,h=!1;(0,i.isFunction)(a)?(l=s,s=a,a=null):(0,i.isObject)(a)&&(s=a.cb,l=a.during,h=a.isFrom,u=a.removeOpt,a=a.dataIndex);var c="leave"===t;c||e.stopAnimation("leave");var d=o(t,r,a,c?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(e,a):null);if(d&&d.duration>0){var p={duration:d.duration,delay:d.delay||0,easing:d.easing,done:s,force:!!s||!!l,setToFinal:!c,scope:t,during:l};h?e.animateFrom(n,p):e.animateTo(n,p)}else e.stopAnimation(),!h&&e.attr(n),l&&l(1),s&&s()}function s(t,e,n,i,r,o){a("update",t,e,n,i,r,o)}function l(t,e,n,i,r,o){a("enter",t,e,n,i,r,o)}function u(t){if(!t.__zr)return!0;for(var e=0;e{"use strict";n.d(e,{N:()=>v});var i=n(655),r=n(8162),o=n(1525),a=n(8154),s=n(6357),l=n(6351);function u(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var h=function(t){function e(e,n){var i=t.call(this)||this,r=new l.Z(e,n),o=new a.Z;return i.add(r),i.add(o),i.updateData(e,n),i}return(0,i.ZT)(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),a=0;a{"use strict";n.d(e,{N:()=>dt});var i=n(3051);function r(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),r=t.getGraph().data,o=n.mapArray(n.getName);r.filterSelf((function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){(0,i.isNumber)(n)&&(n=o[n]);for(var a=0;ar&&(r=e);var a=r%2?r+2:r+3;o=[];for(var s=0;s=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Y(t,e){var n=[],i=F.Lx,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[l.clone(u[0]),l.clone(u[1])],u[2]&&u.__original.push(l.clone(u[2])));var d=u.__original;if(null!=u[2]){if(l.copy(r[0],d[0]),l.copy(r[1],d[2]),l.copy(r[2],d[1]),h&&"none"!==h){var p=x(t.node1),f=X(r,d[0],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){p=x(t.node2),f=X(r,d[1],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]}l.copy(u[0],r[0]),l.copy(u[1],r[2]),l.copy(u[2],r[1])}else{if(l.copy(o[0],d[0]),l.copy(o[1],d[1]),l.sub(a,o[1],o[0]),l.normalize(a,a),h&&"none"!==h){p=x(t.node1);l.scaleAndAdd(o[0],o[0],a,p*e)}if(c&&"none"!==c){p=x(t.node2);l.scaleAndAdd(o[1],o[1],a,-p*e)}l.copy(u[0],o[0]),l.copy(u[1],o[1])}}))}var q=n(5797),K=n(106);function J(t){return"view"===t.type}var Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,E.ZT)(e,t),e.prototype.init=function(t,e){var n=new N.Z,i=new k.Z,r=this.group;this._controller=new R.Z(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,s=this._lineDraw,l=this.group;if(J(o)){var u={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?l.attr(u):Z.D(l,u,t)}Y(t.getGraph(),_(t));var h=t.getData();a.updateData(h);var c=t.getEdgeData();s.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p),h.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){d&&(d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,p),d.setFixed(e),h.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(e)})),n.setDraggable(o&&!!d,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&((0,K.A)(n).focus=t.getAdjacentDataIndices())}})),h.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&((0,K.A)(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),m=h.getLayout("cy");h.eachItemGraphicEl((function(t,e){var n=h.getItemModel(e).get(["label","rotate"])||0,r=t.getSymbolPath();if(f){var o=h.getItemLayout(e),a=Math.atan2(o[1]-m,o[0]-g);a<0&&(a=2*Math.PI+a);var s=o[0] "),value:r.value,noValue:null==r.value})}return(0,st.w)({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=i.map(this.option.categories||[],(function(t){return null!=t.value?t:i.extend({value:0},t)})),e=new tt.Z(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ot.Z);const ut=lt;var ht=n(553),ct={type:"graphRoam",event:"graphRoam",update:"none"};function dt(t){t.registerChartView($),t.registerSeriesModel(ut),t.registerProcessor(r),t.registerVisual(o),t.registerVisual(s),t.registerLayout(y),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,M),t.registerLayout(D),t.registerCoordinateSystem("graphView",{dimensions:I.Z.dimensions,create:O}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},i.noop),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},i.noop),t.registerAction(ct,(function(t,e,n){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,r=(0,ht.A)(i,t,void 0,n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom)}))}))}},9971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>M});var i=n(655),r=n(3051),o=n(5280),a=n(1525),s=n(2095),l=n(4174),u=n(327),h=s.Z.prototype,c=l.Z.prototype,d=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}(0,i.ZT)(e,t)}(d);function p(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}const f=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new d},e.prototype.buildPath=function(t,e){p(e)?h.buildPath.call(this,t,e):c.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return p(this.shape)?h.pointAt.call(this,t):c.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=p(e)?[e.x2-e.x1,e.y2-e.y1]:c.tangentAt.call(this,t);return o.normalize(n,n)},e}(u.ZP);var g=n(9266),m=n(8154),v=n(6357),y=n(6006),_=n(5669),x=["fromSymbol","toSymbol"];function b(t){return"_"+t+"Type"}function w(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),s=e.getItemVisual(n,t+"Offset"),l=e.getItemVisual(n,t+"KeepAspect"),u=a.zp(r),h=a.Cq(s||0,u),c=a.th(i,-u[0]/2+h[0],-u[1]/2+h[1],u[0],u[1],null,l);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=t,c}}function S(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var T=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return(0,i.ZT)(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new f({name:"line",subPixelOptimize:!0});return S(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,g.KZ(o,{shape:{percent:1}},i,e),this.add(o),(0,r.each)(x,(function(n){var i=w(n,t,e);this.add(i),this[b(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),s={shape:{}};S(s.shape,a),g.D(o,s,i,e),(0,r.each)(x,(function(n){var i=t.getItemVisual(e,n),r=b(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=w(n,t,e);this.add(o)}this[r]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,l=n&&n.selectLineStyle,u=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),f=p.getModel("emphasis");a=f.getModel("lineStyle").getLineStyle(),s=p.getModel(["blur","lineStyle"]).getLineStyle(),l=p.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),d=f.get("blurScope"),u=(0,y.k3)(p)}var g=t.getItemVisual(e,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=a,o.ensureState("blur").style=s,o.ensureState("select").style=l,(0,r.each)(x,(function(t){var e=this.childOfName(t);if(e){e.setColor(m),e.style.opacity=g.opacity;for(var n=0;n0&&(_[0]=-_[0],_[1]=-_[1]);var b=y[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(y[1],y[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*g+u[0],i.y=-c[1]*m+u[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=g*b+u[0],i.y=u[1]+S,d=y[0]<0?"right":"left",i.originX=-g*b,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-g*b+h[0],i.y=h[1]+S,d=y[0]>=0?"right":"left",i.originX=g*b,i.originY=-S}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}}}function T(t,e){var n=t.__specifiedRotation;if(null==n){var i=s.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(m.Z);const M=T},7145:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(8154),r=n(1177),o=n(9971),a=n(6006);function s(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:(0,a.k3)(e)}}function l(t){return isNaN(t[0])||isNaN(t[1])}function u(t){return t&&!l(t[0])&&!l(t[1])}const h=function(){function t(t){this.group=new i.Z,this._LineCtor=t||o.Z}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=s(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=s(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i{"use strict";n.d(e,{Z:()=>f});var i=n(655),r=n(1525),o=n(9266),a=n(8154),s=n(106),l=n(6357),u=n(3140),h=n(3051),c=n(6006),d=n(4535);function p(t,e){this.parent.drift(t,e)}const f=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,i.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var a=(0,r.th)(t,-1,-1,2,2,null,o);a.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=p,this._symbolType=t,this.add(a)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,l.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,l.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var a=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=a!==this._symbolType,h=r&&r.disableAnimation;if(u){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,t,n,l,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?p.attr(d):o.D(p,d,s,n),(0,o.Zi)(p)}if(this._updateCommon(t,n,l,i,r),u){var p=this.childAt(0);if(!h){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,o.KZ(p,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,o){var a,s,p,f,g,m,v,y,_,x=this.childAt(0),b=t.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,p=i.selectItemStyle,f=i.focus,g=i.blurScope,v=i.labelStatesModels,y=i.hoverScale,_=i.cursorStyle,m=i.emphasisDisabled),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");a=S.getModel("itemStyle").getItemStyle(),p=w.getModel(["select","itemStyle"]).getItemStyle(),s=w.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),g=S.get("blurScope"),m=S.get("disabled"),v=(0,c.k3)(w),y=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0);var M=(0,r.Cq)(t.getItemVisual(e,"symbolOffset"),n);M&&(x.x=M[0],x.y=M[1]),_&&x.attr("cursor",_);var A=t.getItemVisual(e,"style"),C=A.fill;if(x instanceof d.ZP){var D=x.style;x.useStyle((0,h.extend)({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},A))}else x.__isEmptyBrush?x.useStyle((0,h.extend)({},A)):x.useStyle(A),x.style.decal=null,x.setColor(C,o&&o.symbolInnerColor),x.style.strokeNoScale=!0;var I=t.getItemVisual(e,"liftZ"),L=this._z2;null!=I?null==L&&(this._z2=x.z2,x.z2+=I):null!=L&&(x.z2=L,this._z2=null);var P=o&&o.useNameLabel;(0,c.ni)(x,v,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return P?t.getName(e):(0,u.H)(t,e)},inheritColor:C,defaultOpacity:A.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=x.ensureState("emphasis");if(O.style=a,x.ensureState("select").style=p,x.ensureState("blur").style=s,y){var E=Math.max((0,h.isNumber)(y)?y:1.1,3/this._sizeY);O.scaleX=this._sizeX*E,O.scaleY=this._sizeY*E}this.setSymbolScale(1),(0,l.k5)(this,f,g,m)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=(0,s.A)(this).dataIndex,a=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&o.bX(l,{style:{opacity:0}},e,{dataIndex:r,removeOpt:a,cb:function(){i.removeTextContent()}})}else i.removeTextContent();o.bX(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:a})},e.getSymbolSize=function(t,e){return(0,r.zp)(t.getItemVisual(e,"symbolSize"))},e}(a.Z)},8162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(8154),r=n(9266),o=n(1177),a=n(6351),s=n(3051),l=n(6006);function u(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function h(t){return null==t||(0,s.isObject)(t)||(t={isIgnore:t}),t||{}}function c(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:(0,l.k3)(e),cursorStyle:e.get("cursor")}}const d=function(){function t(t){this.group=new i.Z,this._SymbolCtor=t||a.Z}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=h(e);var n=this.group,i=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=c(t),d={disableAnimation:s},p=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var r=p(i);if(u(t,r,i,e)){var o=new a(t,i,l,d);o.setPosition(r),t.setItemGraphicEl(i,o),n.add(o)}})).update((function(h,c){var f=o.getItemGraphicEl(c),g=p(h);if(u(t,g,h,e)){var m=t.getItemVisual(h,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)n.remove(f),(f=new a(t,h,l,d)).setPosition(g);else{f.updateData(t,h,l,d);var y={x:g[0],y:g[1]};s?f.attr(y):r.D(f,y,i)}n.add(f),t.setItemGraphicEl(h,f)}else n.remove(f)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=p,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=c(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=h(n);for(var r=t.start;r{"use strict";n.d(e,{ID:()=>l,X0:()=>u,lQ:()=>h});var i=n(5151),r=n(9266),o=n(7214),a=n(5669),s=n(3051);function l(t,e,n,o,a){var l=t.getArea(),u=l.x,h=l.y,c=l.width,d=l.height,p=n.get(["lineStyle","width"])||2;u-=p/2,h-=p/2,c+=p,d+=p,u=Math.floor(u),c=Math.round(c);var f=new i.Z({shape:{x:u,y:h,width:c,height:d}});if(e){var g=t.getBaseAxis(),m=g.isHorizontal(),v=g.inverse;m?(v&&(f.shape.x+=c),f.shape.width=0):(v||(f.shape.y+=d),f.shape.height=0);var y=(0,s.isFunction)(a)?function(t){a(t,f)}:null;r.KZ(f,{shape:{width:c,height:d,x:u,y:h}},n,null,o,y)}return f}function u(t,e,n){var i=t.getArea(),s=(0,a.NM)(i.r0,1),l=(0,a.NM)(i.r,1),u=new o.C({shape:{cx:(0,a.NM)(t.cx,1),cy:(0,a.NM)(t.cy,1),r0:s,r:l,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?u.shape.endAngle=i.startAngle:u.shape.r=s,r.KZ(u,{shape:{endAngle:i.endAngle,r:l}},n));return u}function h(t,e,n,i,r){return t?"polar"===t.type?u(t,e,n):"cartesian2d"===t.type?l(t,e,n,i,r):null:null}},1764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101);function o(t){return"_EC_"+t}var a=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[o(t)]){var i=new s(t,e);return i.hostGraph=this,this.nodes.push(i),n[o(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[o(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,a=this._edgesMap;if(i.isNumber(t)&&(t=this.nodes[t]),i.isNumber(e)&&(e=this.nodes[e]),t instanceof s||(t=r[o(t)]),e instanceof s||(e=r[o(e)]),t&&e){var u=t.id+"-"+e.id,h=new l(t,e,n);return h.hostGraph=this,this._directed&&(t.outEdges.push(h),e.inEdges.push(h)),t.edges.push(h),t!==e&&e.edges.push(h),this.edges.push(h),a[u]=h,h}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof s&&(t=t.id),e instanceof s&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof s||(e=this._nodesMap[o(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}i.mixin(s,u("hostGraph","data")),i.mixin(l,u("hostGraph","edgeData"));const h=a;var c=n(9344),d=n(5623),p=n(4267),f=n(8455),g=n(2234);function m(t,e,n,o,a){for(var s=new h(o),l=0;l "+x)),v++)}var b,w=n.get("coordinateSystem");if("cartesian2d"===w||"polar"===w)b=(0,f.Z)(t,n);else{var S=p.Z.get(w),T=S&&S.dimensions||[];i.indexOf(T,"value")<0&&T.concat(["value"]);var M=(0,d.Z)(t,{coordDimensions:T,encodeDefine:n.getEncode()}).dimensions;(b=new r.Z(M,n)).initData(t)}var A=new r.Z(["value"],n);return A.initData(m,u),a&&a(b,A),(0,c.Z)({mainData:b,struct:s,structAttr:"graph",datas:{node:b,edge:A},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},5682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2234);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},8455:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101),o=n(5623),a=n(381),s=n(2234),l=n(4267),u=function(t){this.coordSysDims=[],this.axisMap=(0,i.createHashMap)(),this.categoryAxisMap=(0,i.createHashMap)(),this.coordSysName=t};var h={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",s.C6).models[0],o=t.getReferringComponents("yAxis",s.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),c(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),c(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",s.C6).models[0];e.coordSysDims=["single"],n.set("single",r),c(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",s.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),c(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),c(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.each)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),c(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function c(t){return"category"===t.get("type")}var d=n(9574),p=n(9936),f=n(1772),g=n(4279);const m=function(t,e,n){n=n||{};var c,m=e.getSourceManager(),v=!1;t?(v=!0,c=(0,d.nx)(t)):v=(c=m.getSource()).sourceFormat===g.cy;var y=function(t){var e=t.get("coordinateSystem"),n=new u(e),i=h[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),_=function(t,e){var n,r=t.get("coordinateSystem"),o=l.Z.get(r);return e&&e.coordSysDims&&(n=i.map(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=(0,a.T)(r)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(e,y),x=n.useEncodeDefaulter,b=i.isFunction(x)?x:x?i.curry(f.pY,_,e):null,w={coordDimensions:_,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!v},S=(0,o.Z)(c,w),T=function(t,e,n){var r,o;return n&&i.each(t,(function(t,i){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==r||(t[r].otherDims.itemName=0),r}(S.dimensions,n.createInvertedIndices,y),M=v?null:m.getSharedDataStore(S),A=(0,p.BM)(e,{schema:S,store:M}),C=new r.Z(S,e);C.setCalculationInfo(A);var D=null!=T&&function(t){if(t.sourceFormat===g.cy){var e=function(t){var e=0;for(;e{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(8540),r=n(3051);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=(0,i.hk)(t,e,n[0]);return null!=o?o+"":null}if(r){for(var a=[],s=0;s=0&&i.push(e[a])}return i.join(" ")}},241:(t,e,n)=>{"use strict";n.d(e,{N:()=>B});var i=n(655),r=n(7145),o=n(8154),a=n(9971),s=n(3051),l=n(1525),u=n(5280),h=n(8554);const c=function(t){function e(e,n,i){var r=t.call(this)||this;return r.add(r.createLine(e,n,i)),r._updateEffectSymbol(e,n),r}return(0,i.ZT)(e,t),e.prototype.createLine=function(t,e,n){return new a.Z(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");s.isArray(i)||(i=[i,i]);var o=t.getItemVisual(e,"style"),a=n.get("color")||o&&o.stroke,u=this.childAt(1);this._symbolType!==r&&(this.remove(u),(u=(0,l.th)(r,-.5,-.5,1,1,a)).z2=100,u.culling=!0,this.add(u)),u&&(u.setStyle("shadowColor",a),u.setStyle(n.getItemStyle(["color"])),u.scaleX=i[0],u.scaleY=i[1],u.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=t.getItemLayout(n),o=1e3*e.get("period"),a=e.get("loop"),l=e.get("constantSpeed"),u=s.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3}));if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop){i.stopAnimation();var h=void 0;h=s.isFunction(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a)}this._period=o,this._loop=a}},e.prototype._animateSymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getLineLength=function(t){return u.dist(t.__p1,t.__cp1)+u.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=h.Zm,l=h.AZ;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var c=l(e[0],i[0],n[0],r),d=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(c);var y=n(479),_=n(327),x=n(3640),b=n(5674),w=n(106),S=function(){this.polyline=!1,this.curveness=0,this.segs=[]},T=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,i.ZT)(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new S},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,d=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){var f=(u+d)/2-(h-p)*r,g=(h+p)/2-(d-u)*r;if(b.m(u,h,f,g,d,p,o,t,e))return a}else if(x.m(u,h,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const A={seriesType:"lines",plan:(0,n(5682).Z)(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&(0,C.lQ)(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=A.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),s=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&s===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=s?new M:new r.Z(o?i?v:m:i?c:a.Z),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(n(5797).Z);var I=n(3321),L=n(5101),P=n(5685),O="undefined"==typeof Uint32Array?Array:Uint32Array,E="undefined"==typeof Float64Array?Array:Float64Array;function N(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=(0,s.map)(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),(0,s.mergeAll)([e,t[0],t[1]])})))}const k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return(0,i.ZT)(e,t),e.prototype.init=function(e){e.data=e.data||[],N(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(N(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=(0,s.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=(0,s.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(I.Z);function R(t){return t instanceof Array||(t=[t,t]),t}const z={seriesType:"lines",reset:function(t){var e=R(t.get("symbol")),n=R(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=R(n.getShallow("symbol",!0)),r=R(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};function B(t){t.registerChartView(D),t.registerSeriesModel(k),t.registerLayout(A),t.registerVisual(z)}},8608:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var i=n(3051),r=n(8154),o=n(2095),a=n(6498),s=n(1177),l=n(106),u=n(6006),h=n(1497),c=n(5669),d=n(1525),p=n(2892),f=n(5280),g=n(7947),m=n(4162),v=Math.PI,y=function(){function t(t,e){this.group=new r.Z,this.opt=e,this.axisModel=t,(0,i.defaults)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Z({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!_[t]},t.prototype.add=function(t){_[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,c.wW)(e-t);return(0,c.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,c.mW)(o-v)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),_={axisLine:function(t,e,n,r){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=r.transform,u=[s[0],0],h=[s[1],0];l&&((0,f.applyTransform)(u,u,l),(0,f.applyTransform)(h,h,l));var c=(0,i.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new o.Z({subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});p.anid="line",n.add(p);var g=e.get(["axisLine","symbol"]);if(null!=g){var m=e.get(["axisLine","symbolSize"]);(0,i.isString)(g)&&(g=[g,g]),((0,i.isString)(m)||(0,i.isNumber)(m))&&(m=[m,m]);var v=(0,d.Cq)(e.get(["axisLine","symbolOffset"])||0,m),y=m[0],_=m[1];(0,i.each)([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-h[0])*(u[0]-h[0])+(u[1]-h[1])*(u[1]-h[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,d.th)(g[i],-y/2,-_/2,y,_,c.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:u[0]+o*Math.cos(t.rotation),y:u[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,r){var o=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");"auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick"));if(!s||o.scale.isBlank())return;for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),h=S(o.getTicksCoords(),e.transform,u,(0,i.defaults)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c_[1]?-1:1,b=["start"===p?_[0]-x*m:"end"===p?_[1]+x*m:(_[0]+_[1])/2,w(p)?t.labelOffset+f*m:0],S=e.get("nameRotate");null!=S&&(S=S*v/180),w(p)?h=y.innerTextLayout(t.rotation,null!=S?S:t.rotation,f):(h=function(t,e,n,i){var r,o,a=(0,c.wW)(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;(0,c.mW)(a-v/2)?(o=l?"bottom":"top",r="center"):(0,c.mW)(a-1.5*v)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*v&&a>v/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,S||0,_),null!=(d=t.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var T=g.getFont(),M=e.get("nameTruncate",!0)||{},A=M.ellipsis,C=(0,i.retrieve)(t.nameTruncateMaxWidth,M.maxWidth,d),D=new a.ZP({x:b[0],y:b[1],rotation:h.rotation,silent:y.isLabelSilent(e),style:(0,u.Lr)(g,{text:o,font:T,overflow:"truncate",width:C,ellipsis:A,fill:g.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:g.get("align")||h.textAlign,verticalAlign:g.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(s.setTooltipConfig({el:D,componentModel:e,itemName:o}),D.__fullText=o,D.anid="name",e.get("triggerEvent")){var I=y.makeAxisEventDataBase(e);I.targetType="axisName",I.name=o,(0,l.A)(D).eventData=I}r.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function x(t){t&&(t.ignore=!0)}function b(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=p.identity([]);return p.rotate(r,r,-t.rotation),n.applyTransform(p.mul([],r,t.getLocalTransform())),i.applyTransform(p.mul([],r,e.getLocalTransform())),n.intersect(i)}}function w(t){return"middle"===t||"center"===t}function S(t,e,n,i,r){for(var a=[],s=[],l=[],u=0;u{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(8490),o=n(3166),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(1177),a=n(6498),s=n(9266),l=n(8490),u=n(1158),h=n(270),c=(0,n(2234).Yf)(),d=i.clone,p=i.bind,f=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,o){var a=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,o||this._lastValue!==a||this._lastStatus!==s){this._lastValue=a,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var h={};this.makeElOption(h,a,t,e,n);var c=h.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var p=i.curry(g,e,d);this.updatePointerEl(l,h,p),this.updateLabelEl(l,h,p,e)}else l=this._group=new r.Z,this.createPointerEl(l,h,t,e),this.createLabelEl(l,h,t,e),n.getZr().add(l);_(l,e,!0),this._renderHandle(a)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=l.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var a=c(t).pointerEl=new o[r.type](d(e.pointer));t.add(a)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=c(t).labelEl=new a.ZP(d(e.label));t.add(r),v(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=c(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=c(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),v(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),a=this._handle,s=n.getModel("handle"),l=n.get("status");if(!s.get("show")||!l||"hide"===l)return a&&r.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=o.createIcon(s.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){u.sT(t.event)},onmousedown:p(this._onHandleDragMove,this,0,0),drift:p(this._onHandleDragMove,this),ondragend:p(this._onHandleDragEnd,this)}),r.add(a)),_(a,n,!1),a.setStyle(s.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var c=s.get("size");i.isArray(c)||(c=[c,c]),a.scaleX=c[0]/2,a.scaleY=c[1]/2,h.T9(this,"_doDispatchAxisPointer",s.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){g(this._axisPointerModel,!e&&this._moveAnimation,this._handle,y(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(y(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(y(i)),c(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),h.ZH(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function g(t,e,n,i){m(c(n).lastProp,i)||(c(n).lastProp=i,e?s.D(n,i,t):(n.stopAnimation(),n.attr(i)))}function m(t,e){if(i.isObject(t)&&i.isObject(e)){var n=!0;return i.each(e,(function(e,i){n=n&&m(t[i],e)})),!!n}return t===e}function v(t,e){t[e.get(["label","show"])?"show":"hide"]()}function y(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const x=f},2448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r=n(2234);function o(t,e){var n,o=[],a=t.seriesIndex;if(null==a||!(n=e.getSeriesByIndex(a)))return{point:[]};var s=n.getData(),l=r.gO(s,t);if(null==l||l<0||i.isArray(l))return{point:[]};var u=s.getItemGraphicEl(l),h=n.coordinateSystem;if(n.getTooltipPosition)o=n.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)if(t.isStacked){var c=h.getBaseAxis(),d=h.getOtherAxis(c).dim,p=c.dim,f="x"===d||"radius"===d?1:0,g=s.mapDimension(p),m=[];m[f]=s.get(g,l),m[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),o=h.dataToPoint(m)||[]}else o=h.dataToPoint(s.getValues(i.map(h.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var v=u.getBoundingRect().clone();v.applyTransform(u.transform),o=[v.x+v.width/2,v.y+v.height/2]}return{point:o,el:u}}},6996:(t,e,n)=>{"use strict";n.d(e,{E:()=>h,z:()=>s});var i=n(3051),r=n(6387),o=(0,n(2234).Yf)(),a=i.each;function s(t,e,n){if(!r.default.node){var s=e.getZr();o(s).records||(o(s).records={}),function(t,e){if(o(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);a(o(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}o(t).initialized=!0,n("click",i.curry(u,"click")),n("mousemove",i.curry(u,"mousemove")),n("globalout",l)}(s,e),(o(s).records[t]||(o(s).records[t]={})).handler=n}}function l(t,e,n){t.handler("leave",null,n)}function u(t,e,n,i){e.handler(t,n,i)}function h(t,e){if(!r.default.node){var n=e.getZr();(o(n).records||{})[t]&&(o(n).records[t]=null)}}},7037:(t,e,n)=>{"use strict";n.d(e,{N:()=>C});var i=n(1726),r=n(655),o=n(7329),a=n(5539),s=n(9069),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,l=o.grid,c=i.get("type"),d=u(l,o).getOtherAxis(o).getGlobalExtent(),p=o.toGlobalCoord(o.dataToCoord(e,!0));if(c&&"none"!==c){var f=a.fk(i),g=h[c](o,p,d);g.style=f,t.graphicKey=g.type,t.pointer=g}var m=s.bK(l.model,n);a.gf(e,t,m,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=s.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=a.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=u(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=h[l];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(o.Z);function u(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var h={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:a.BL([e,n[0]],[e,n[1]],c(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:a.uE([e-i/2,n[0]],[i,r],c(t))}}};function c(t){return"x"===t.dim?0:1}const d=l;const p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(n(8071).Z);var f=n(6996);const g=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";f.z("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){f.E("axisPointer",e)},e.prototype.dispose=function(t,e){f.E("axisPointer",e)},e.type="axisPointer",e}(n(3166).Z);var m=n(3051),v=n(8490),y=n(2234),_=n(2448),x=(0,y.Yf)();function b(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||(0,m.bind)(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){A(r)&&(r=(0,_.Z)({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=A(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||A(r),d={},p={},f={list:[],map:{}},g={showPointer:(0,m.curry)(S,p),showTooltip:(0,m.curry)(T,f)};(0,m.each)(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);(0,m.each)(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&w(t,a,g,!1,d)}}))}));var v={};return(0,m.each)(h,(function(t,e){var n=t.linkGroup;n&&!p[e]&&(0,m.each)(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,M(e),M(t)))),v[t.key]=o}}))})),(0,m.each)(v,(function(t,e){w(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];(0,m.each)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,h,d),function(t,e,n,i){if(A(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=x(i)[r]||{},a=x(i)[r]={};(0,m.each)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,m.each)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];(0,m.each)(o,(function(t,e){!a[e]&&l.push(t)})),(0,m.each)(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),d}}function w(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return(0,m.each)(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),(0,m.each)(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&(0,m.extend)(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function S(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function T(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=v.zm(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function M(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function A(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function C(t){i.Z.registerAxisPointerClass("CartesianAxisPointer",d),t.registerComponentModel(p),t.registerComponentView(g),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!(0,m.isArray)(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=(0,v.KM)(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},b)}},8490:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,np:()=>u,r:()=>l,zm:()=>c});var i=n(1497),r=n(3051);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.each)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var d=c(n.model),p=t.coordSysAxesInfo[d]={};t.coordSysMap[d]=n;var f=n.model.getModel("tooltip",o);if((0,r.each)(n.getAxes(),(0,r.curry)(y,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),m="cross"===f.get(["axisPointer","type"]),v=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||m)&&(0,r.each)(v.baseAxes,(0,r.curry)(y,!m||"cross",g)),m&&(0,r.each)(v.otherAxes,(0,r.curry)(y,"cross",!1))}}function y(o,d,g){var m=g.model.getModel("axisPointer",s),v=m.get("show");if(v&&("auto"!==v||o||h(m))){null==d&&(d=m.get("triggerTooltip")),m=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],h={};(0,r.each)(u,(function(t){h[t]=(0,r.clone)(l.get(t))})),h.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===a){var d=l.get(["label","show"]);if(c.show=null==d||d,!s){var p=h.lineStyle=l.get("crossStyle");p&&(0,r.defaults)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(h,n,o))}(g,f,s,e,o,d):m;var y=m.get("snap"),_=c(g.model),x=d||y||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:m,triggerTooltip:d,involveSeries:x,snap:y,useHandle:h(m),seriesModels:[],linkGroup:null};p[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=h(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a{"use strict";n.d(e,{$_:()=>d,BL:()=>m,Rj:()=>y,Zh:()=>f,fk:()=>c,gf:()=>g,gk:()=>p,uE:()=>v});var i=n(3051),r=n(1177),o=n(423),a=n(8988),s=n(2892),l=n(7947),u=n(8608),h=n(6006);function c(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function d(t,e,n,i,r){var s=p(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),u=a.MY(l.get("padding")||0),c=l.getFont(),d=o.lP(s,c),f=r.position,g=d.width+u[1]+u[3],m=d.height+u[0]+u[2],v=r.align;"right"===v&&(f[0]-=g),"center"===v&&(f[0]-=g/2);var y=r.verticalAlign;"bottom"===y&&(f[1]-=m),"middle"===y&&(f[1]-=m/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,g,m,i);var _=l.get("backgroundColor");_&&"auto"!==_||(_=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:(0,h.Lr)(l,{text:s,font:c,fill:l.getTextColor(),padding:u,backgroundColor:_}),z2:10}}function p(t,e,n,r,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var u={value:l.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};i.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&u.seriesData.push(r)})),i.isString(s)?a=s.replace("{value}",a):i.isFunction(s)&&(a=s(u))}return a}function f(t,e,n){var i=s.create();return s.rotate(i,i,n.rotation),s.translate(i,i,n.position),r.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function g(t,e,n,i,r,o){var a=u.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),d(e,i,r,o,{position:f(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function m(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function v(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function y(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}},2719:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(3051),o=n(8071),a=n(6398),s=n(2234),l=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function u(t){var e={};return(0,r.each)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const h=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=u(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=u(t);(0,r.merge)(this.option,t,!0),(0,r.merge)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.createHashMap)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.each)(a.I,(function(n){var i=this.getReferringComponents((0,a.jQ)(n),s.iP);if(i.specified){e=!0;var o=new l;(0,r.each)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";u(n.findComponents({mainType:o+"Axis"}),o)}i&&u(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function u(e,n){var o=e[0];if(o){var a=new l;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var u=o.getReferringComponents("grid",s.C6).models[0];u&&(0,r.each)(e,(function(t){o.componentIndex!==t.componentIndex&&u===t.getReferringComponents("grid",s.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&(0,r.each)(a.I,(function(e){if(i){var r=n.findComponents({mainType:(0,a.jQ)(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new l;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.each)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent((0,a.jQ)(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.each)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent((0,a.jQ)(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.each)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(n(3166).Z)},6398:(t,e,n)=>{"use strict";n.d(e,{BL:()=>l,I:()=>r,jQ:()=>s,kc:()=>a,rg:()=>u});var i=n(3051),r=["x","y","radius","angle","single"],o=["cartesian2d","polar","singleAxis"];function a(t){var e=t.get("coordinateSystem");return(0,i.indexOf)(o,e)>=0}function s(t){return t+"Axis"}function l(t,e){var n,r=(0,i.createHashMap)(),o=[],a=(0,i.createHashMap)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var i=r.get(t);i&&i[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return o}function u(t){var e=t.ecModel,n={infoList:[],infoMap:(0,i.createHashMap)()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(s(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,l=n.infoMap.get(a);l||(l={model:o,axisModels:[]},n.infoList.push(l),n.infoMap.set(a,l)),l.axisModels.push(r)}}})),n}},7543:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(3051),r=n(6398),o=n(5669),a=n(9233),s=n(7947),l=n(8986),u=n(2234),h=i.each,c=o.dt;const d=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if((0,r.kc)(e)){var n=(0,r.jQ)(this._dimName),i=e.getReferringComponents(n,u.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return i.clone(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];h(["start","end"],(function(a,h){var c=t[a],d=t[a+"Value"];"percent"===r[h]?(null==c&&(c=s[h]),d=i.parse(o.NU(c,s,n))):(e=!0,d=null==d?n[h]:i.parse(d),c=o.NU(d,n,s)),u[h]=d,l[h]=c})),c(u),c(l);var d=this._minMaxSpan;function p(t,e,n,r,s){var l=s?"Span":"ValueSpan";(0,a.Z)(0,t,n,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=o.NU(t[u],n,r,!0),s&&(e[u]=i.parse(e[u]))}return e?p(u,l,n,s,!1):p(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];h(n,(function(t){(0,s.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,l.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&h(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var s=e.getStore(),l=i.map(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,o=0;oa[1];if(h&&!c&&!d)return!0;h&&(i=!0),c&&(e=!0),d&&(n=!0)}return i&&e&&n}))}else h(r,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));h(r,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;h(["min","max"],(function(i){var r=e.get(i+"Span"),a=e.get(i+"ValueSpan");null!=a&&(a=this.getAxisModel().axis.scale.parse(a)),null!=a?r=o.NU(n[0]+a,n,[0,100],!0):null!=r&&(a=o.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=a}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=o.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();const p={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var a=t.getComponent((0,r.jQ)(i),o);e(i,o,a,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new d(e,i,o,t),n.push(r.__dzAxisProxy))}));var o=(0,i.createHashMap)();return(0,i.each)(n,(function(t){(0,i.each)(t.getTargetSeriesModels(),(function(t){o.set(t.uid,t)}))})),o},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var f=!1;function g(t){f||(f=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,p),function(t){t.registerAction("dataZoom",(function(t,e){var n=(0,r.BL)(e,t);(0,i.each)(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}},7240:(t,e,n)=>{"use strict";n.d(e,{N:()=>h});var i=n(655),r=n(8071),o=n(3166),a=n(4279),s=n(6437),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new s.U(this),(0,s.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,s.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:a.fY},e}(r.Z),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(o.Z);function h(t){t.registerComponentModel(l),t.registerComponentView(u)}},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>$});var i=n(655),r=n(3051),o=n(3510),a=n(8154),s=n(5151),l=n(1177),u=n(2514),h=n(5094),c=n(582),d=n(4130),p=!0,f=Math.min,g=Math.max,m=Math.pow,v="globalPan",y={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},x={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},b=0,w=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new a.Z,n._uid="brushController_"+b++,(0,r.each)(q,(function(t,e){this._handlers[e]=(0,r.bind)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||c.qn(e,v,this._uid),(0,r.each)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.merge)((0,r.clone)(x),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;c.Ar(t,v,this._uid),(0,r.each)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.each)(t,(function(t){e[t.panelId]=(0,r.clone)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.map)(t,(function(t){return(0,r.merge)((0,r.clone)(x),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new d.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):T(i,S(i,s));C(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(o.Z);function S(t,e){var n=J[e.brushType].createCover(t,e);return n.__brushOption=e,A(n,e),t.group.add(n),n}function T(t,e){var n=D(e);return n.endCreating&&(n.endCreating(t,e),A(e,e.__brushOption)),e}function M(t,e){var n=e.__brushOption;D(e).updateCoverShape(t,e,n.range,n)}function A(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function C(t,e){D(e).updateCommon(t,e),M(t,e)}function D(t){return J[t.__brushOption.brushType]}function I(t,e,n){var i,o=t._panels;if(!o)return p;var a=t._transform;return(0,r.each)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function L(t,e){var n=t._panels;if(!n)return p;var i=e.__brushOption.panelId;return null!=i?n[i]:p}function P(t){var e=t._covers,n=e.length;return(0,r.each)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function O(t,e){var n=(0,r.map)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.clone)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function E(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function N(t,e,n,i){var o=new a.Z;return o.add(new s.Z({name:"main",style:B(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.curry)(V,t,e,o,["n","s","w","e"]),ondragend:(0,r.curry)(O,e,{isEnd:!0})})),(0,r.each)(i,(function(n){o.add(new s.Z({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.curry)(V,t,e,o,n),ondragend:(0,r.curry)(O,e,{isEnd:!0})}))})),o}function k(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=g(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,p=c-o+r/2,f=h-a,m=c-s,v=f+r,y=m+r;z(t,e,"main",a,s,f,m),i.transformable&&(z(t,e,"w",l,u,o,y),z(t,e,"e",d,u,o,y),z(t,e,"n",l,u,v,o),z(t,e,"s",l,p,v,o),z(t,e,"nw",l,u,o,o),z(t,e,"ne",d,u,o,o),z(t,e,"sw",l,p,o,o),z(t,e,"se",d,p,o,o))}function R(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(B(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?F(t,n[0]):function(t,e){var n=[F(t,e[0]),F(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?_[o]+"-resize":null})}))}function z(t,e,n,i,r,o,a){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=U(t,e,[[i,r],[i+o,r+a]]),l=f(s[0][0],s[1][0]),u=f(s[0][1],s[1][1]),h=g(s[0][0],s[1][0]),c=g(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function B(t){return(0,r.defaults)({strokeNoScale:!0},t.brushStyle)}function Z(t,e,n,i){var r=[f(t,n),f(e,i)],o=[g(t,n),g(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function F(t,e){var n=l.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return l.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function V(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=H(e,o,a);(0,r.each)(i,(function(t){var e=y[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(Z(l[0][0],l[1][0],l[0][1],l[1][1])),C(e,n),O(e,{isEnd:!1})}function G(t,e,n,i){var o=e.__brushOption.range,a=H(t,n,i);(0,r.each)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),C(t,e),O(t,{isEnd:!1})}function H(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function U(t,e,n){var i=L(t,e);return i&&i!==p?i.clipPath(n,t._transform):(0,r.clone)(n)}function W(t){var e=t.event;e.preventDefault&&e.preventDefault()}function j(t,e,n){return t.childOfName("main").contain(e,n)}function X(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return m(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&P(t);var u=(0,r.clone)(l);u.brushType=Y(u.brushType,s),u.panelId=s===p?null:s.panelId,a=t._creatingCover=S(t,u),t._covers.push(a)}if(a){var h=J[Y(t._brushType,s)];a.__brushOption.range=h.getCreatingRange(U(t,a,t._track)),i&&(T(t,a),h.updateCommon(t,a)),M(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&I(t,e,n)&&P(t)&&(o={isEnd:i,removeOnClick:!0});return o}function Y(t,e){return"auto"===t?e.defaultBrushType:t}var q={mousedown:function(t){if(this._dragging)K(this,t);else if(!t.target||!t.target.draggable){W(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=I(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=I(t,e,n);if(!t._dragging)for(var a=0;a{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(1177),o=n(1463),a=n(2234),s=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],l=function(){function t(t,e,n){var r=this;this._targetInfoList=[];var o=h(e,t);(0,i.each)(c,(function(t,e){(!n||!n.include||(0,i.indexOf)(n.include,e)>=0)&&t(o,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=f[t.brushType](0,n,e);t.__rangeOffset={offset:m[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,i.each)(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&(0,i.each)(r.coordSyses,(function(i){var r=f[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,i.each)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=f[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?m[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=y(n),o=y(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,i.map)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:o.x0(i),isTargetByCursor:o.G(i,t,n.coordSysModel),getLinearBrushOtherExtent:o.VM(i)}}))},t.prototype.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&(0,i.indexOf)(r.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=h(e,t),r=0;rt[1]&&t.reverse(),t}function h(t,e){return(0,a.pm)(t,e,{includeMainTypes:s})}var c={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,o=t.gridModels,a=(0,i.createHashMap)(),s={},l={};(n||r||o)&&((0,i.each)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,i.each)(r,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,i.each)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,i.each)(o.getCartesians(),(function(t,e){((0,i.indexOf)(n,t.getAxis("x").model)>=0||(0,i.indexOf)(r,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:p.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,i.each)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:p.geo})}))}},d=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],p={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(r.getTransform(t)),e}},f={lineX:(0,i.curry)(g,0),lineY:(0,i.curry)(g,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[u([r[0],o[0]]),u([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,i.map)(n,(function(n){var i=t?e.pointToData(n,r):e.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function g(t,e,n,r){var o=n.getAxis(["x","y"][t]),a=u((0,i.map)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(r[t]),!0):o.toGlobalCoord(o.dataToCoord(r[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var m={lineX:(0,i.curry)(v,0),lineY:(0,i.curry)(v,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,i.map)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function v(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function y(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const _=l},9176:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(3510),o=n(1158),a=n(582),s=n(3051);function l(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(o.sT(i.event),u(t,e,n,i,r))}function u(t,e,n,i,r){r.isAvailableBehavior=(0,s.bind)(h,null,n,i),t.trigger(e,r)}function h(t,e,n){var i=n[t];return!t||i&&(!(0,s.isString)(i)||e.event[i+"Key"])}const c=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=(0,s.bind)(n._mousedownHandler,n),r=(0,s.bind)(n._mousemoveHandler,n),o=(0,s.bind)(n._mouseupHandler,n),a=(0,s.bind)(n._mousewheelHandler,n),l=(0,s.bind)(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=(0,s.defaults)((0,s.clone)(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",l)},n}return(0,i.ZT)(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(o.x1(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&h("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!a.Tf(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,s=e-i,l=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&o.sT(t.event),u(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){o.x1(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=h("zoomOnMouseWheel",t,this._opt),n=h("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;l(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i);l(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){a.Tf(this._zr,"globalPan")||l(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(r.Z)},1463:(t,e,n)=>{"use strict";n.d(e,{G:()=>l,VM:()=>s,x0:()=>a});var i=n(479),r=n(1485),o=n(1177);function a(t){return t=u(t),function(e){return o.clipPointsByRect(e,t)}}function s(t,e){return t=u(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function l(t,e,n){var i=u(t);return function(t,o){return i.contain(o[0],o[1])&&!(0,r.l)(t,e,n)}}function u(t){return i.Z.create(t)}},1485:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});var i={axisPointer:1,tooltip:1,brush:1};function r(t,e,n){var r=e.getComponentByElement(t.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!i.hasOwnProperty(r.mainType)&&o&&o.model!==n}},582:(t,e,n)=>{"use strict";n.d(e,{Ar:()=>s,Tf:()=>l,qn:()=>a});var i=n(1615),r=n(3051),o="\0_ec_interaction_mutex";function a(t,e,n){u(t)[e]=n}function s(t,e,n){var i=u(t);i[e]===n&&(i[e]=null)}function l(t,e){return!!u(t)[e]}function u(t){return t[o]||(t[o]={})}i.zl({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r.noop)},9337:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(6172),r=n(8988),o=n(5151);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new o.Z({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},1194:(t,e,n)=>{"use strict";function i(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function r(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}n.d(e,{H:()=>r,e:()=>i})},9233:(t,e,n)=>{"use strict";function i(t,e,n,i,a,s){t=t||0;var l=n[1]-n[0];if(null!=a&&(a=o(a,[0,l])),null!=s&&(s=Math.max(s,null!=a?a:0)),"all"===i){var u=Math.abs(e[1]-e[0]);u=o(u,[0,l]),a=s=o(u,[a,s]),i=0}e[0]=o(e[0],n),e[1]=o(e[1],n);var h=r(e,i);e[i]+=t;var c,d=a||0,p=n.slice();return h.sign<0?p[0]+=d:p[1]-=d,e[i]=o(e[i],p),c=r(e,i),null!=a&&(c.sign!==h.sign||c.spans&&(e[1-i]=e[i]+c.sign*s),e}function r(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function o(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}n.d(e,{Z:()=>i})},3450:(t,e,n)=>{"use strict";n.d(e,{N:()=>G});var i=n(8023),r=n(655),o=n(3051),a=n(1497),s=n(2234),l=n(8071);const u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.isArray(e)&&o.each(e,(function(t,i){o.isString(t)&&(t={type:t}),e[i]=o.merge(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);var h=n(1092),c=n(1177),d=n(8154),p=n(6498),f=n(5151),g=n(6357),m=n(6006),v=n(9337),y=n(6172),_=n(3166),x=n(1525),b=n(8625),w=o.curry,S=o.each,T=d.Z;function M(t,e,n,i){D(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),C(t,e,n,i)}function A(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0),S(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?(0,b.I)(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=C||u||"roundRect",i,s,l,v,w,d),I=new T,L=i.getModel("textStyle");if(!o.isFunction(t.getLegendIcon)||C&&"inherit"!==C){var P="inherit"===C&&t.getData().getVisual("symbol")?"inherit"===M?t.getData().getVisual("symbolRotate"):M:0;I.add(function(t){var e=t.icon||"roundRect",n=(0,x.th)(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:y,itemHeight:_,icon:u,iconRotate:P,itemStyle:D.itemStyle,lineStyle:D.lineStyle,symbolKeepAspect:A}))}else I.add(t.getLegendIcon({itemWidth:y,itemHeight:_,icon:u,iconRotate:M,itemStyle:D.itemStyle,lineStyle:D.lineStyle,symbolKeepAspect:A}));var O="left"===a?y+5:-5,E=a,N=r.get("formatter"),k=e;o.isString(N)&&N?k=N.replace("{name}",null!=e?e:""):o.isFunction(N)&&(k=N(e));var R=i.get("inactiveColor");I.add(new p.ZP({style:(0,m.Lr)(L,{text:k,x:O,y:_/2,fill:w?L.getTextColor():R,align:E,verticalAlign:"middle"})}));var z=new f.Z({shape:I.getBoundingRect(),invisible:!0}),B=i.getModel("tooltip");return B.get("show")&&c.setTooltipConfig({el:z,componentModel:r,itemName:e,itemTooltipOption:B.option}),I.add(z),I.eachChild((function(t){t.silent=!0})),z.silent=!h,this.getContentGroup().add(I),(0,g.vF)(I),I.__legendDataIndex=n,I},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();y.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){y.BZ("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+h[f],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(_.Z);function L(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;nn[r],m=[-d.x,-d.y];e||(m[i]=u[l]);var v=[0,0],_=[-p.x,-p.y],x=o.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[i]+=n[r]-p[r]:v[i]+=p[r]+x);_[1-i]+=d[a]/2-p[a]/2,u.setPosition(m),h.setPosition(v),c.setPosition(_);var b={x:0,y:0};if(b[r]=g?n[r]:d[r],b[a]=Math.max(d[a],p[a]),b[s]=Math.min(0,p[s]+_[1-i]),h.__rectSize=n[r],g){var w={x:0,y:0};w[r]=Math.max(n[r]-p[r]-x,0),w[a]=b[a],h.setClipPath(new f.Z({shape:w})),h.__rectSize=w[r]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&R.D(u,{x:S.contentPosition[0],y:S.contentPosition[1]},g?t:null),this._updatePageInfoView(t,S),b},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;o.each(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,s=null!=a?a+1:0,l=e.pageCount;i&&r&&i.setStyle("text",o.isString(r)?r.replace("{current}",null==s?"":s+"").replace("{total}",null==l?"":l+""):r({current:s,total:l}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=B[r],a=Z[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=h;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(I);function V(t){(0,i.D)(O),t.registerComponentModel(k),t.registerComponentView(F),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}function G(t){(0,i.D)(O),(0,i.D)(V)}},8690:(t,e,n)=>{"use strict";n.d(e,{N:()=>g});var i=n(655),r=n(3051),o=n(6498),a=n(5151),s=n(106),l=n(6006),u=n(6172),h=n(8071),c=n(3166),d=n(8988),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(h.Z),f=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,h=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),f=r.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),g=new o.ZP({style:(0,l.Lr)(h,{text:t.get("text"),fill:h.getTextColor()},{disableBox:!0}),z2:10}),m=g.getBoundingRect(),v=t.get("subtext"),y=new o.ZP({style:(0,l.Lr)(c,{text:v,fill:c.getTextColor(),y:m.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),_=t.get("link"),x=t.get("sublink"),b=t.get("triggerEvent",!0);g.silent=!_&&!b,y.silent=!x&&!b,_&&g.on("click",(function(){(0,d.MI)(_,"_"+t.get("target"))})),x&&y.on("click",(function(){(0,d.MI)(x,"_"+t.get("subtarget"))})),(0,s.A)(g).eventData=(0,s.A)(y).eventData=b?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(g),v&&i.add(y);var w=i.getBoundingRect(),S=t.getBoxLayoutParams();S.width=w.width,S.height=w.height;var T=(0,u.ME)(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?T.x+=T.width:"center"===p&&(T.x+=T.width/2)),f||("center"===(f=t.get("top")||t.get("bottom"))&&(f="middle"),"bottom"===f?T.y+=T.height:"middle"===f&&(T.y+=T.height/2),f=f||"top"),i.x=T.x,i.y=T.y,i.markRedraw();var M={align:p,verticalAlign:f};g.setStyle(M),y.setStyle(M),w=i.getBoundingRect();var A=T.margin,C=t.getItemStyle(["color","opacity"]);C.fill=t.get("backgroundColor");var D=new a.Z({shape:{x:w.x-A[3],y:w.y-A[0],width:w.width+A[1]+A[3],height:w.height+A[0]+A[2],r:t.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});i.add(D)}},e.type="title",e}(c.Z);function g(t){t.registerComponentModel(p),t.registerComponentView(f)}},1806:(t,e,n)=>{"use strict";n.d(e,{Bm:()=>a,f1:()=>i,ls:()=>o});var i=function(){},r={};function o(t,e){r[t]=e}function a(t){return r[t]}},5045:(t,e,n)=>{"use strict";n.d(e,{N:()=>et});var i=n(8023),r=n(655);const o=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2719).Z);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2159).Z);var s=n(7543);function l(t){t.registerComponentModel(o),t.registerComponentView(a),(0,s.Z)(t)}var u=n(3051),h=n(1806);const c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u.each(this.option.feature,(function(t,n){var i=h.Bm(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),u.merge(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(n(8071).Z);var d=n(423),p=n(1177),f=n(6357),g=n(1497),m=n(4130),v=n(9337),y=n(3166),_=n(2151),x=n(6498);const b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),c=[];u.each(s,(function(t,e){c.push(e)})),new m.Z(this._featureNames||[],c).add(y).update(y).remove(u.curry(y,null)).execute(),this._featureNames=c,v.b(r,t,n),r.add(v.l(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!u.isFunction(l)&&e){var h=l.style||(l.style={}),c=d.lP(e,x.ZP.makeFont(h)),p=t.x+r.x,f=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",f=!0);var g=f?-5-c.height:o+10;p+c.width/2>n.getWidth()?(a.position=["100%",g],h.align="right"):p-c.width/2<0&&(a.position=[0,g],h.align="left")}}))}function y(d,m){var v,y=c[d],b=c[m],w=s[y],S=new g.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===y&&(w.title=i.newTitle),y&&!b){if(function(t){return 0===t.indexOf("my")}(y))v={onclick:S.option.onclick,featureName:y};else{var T=(0,h.Bm)(y);if(!T)return;v=new T}l[y]=v}else if(!(v=l[b]))return;v.uid=(0,_.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n;var M=v instanceof h.f1;y||!b?!S.get("show")||M&&v.unusable?M&&v.remove&&v.remove(e,n):(!function(i,s,l){var c,d,g=i.getModel("iconStyle"),m=i.getModel(["emphasis","iconStyle"]),v=s instanceof h.f1&&s.getIcons?s.getIcons():i.get("icon"),y=i.get("title")||{};u.isString(v)?(c={})[l]=v:c=v;u.isString(y)?(d={})[l]=y:d=y;var _=i.iconPaths={};u.each(c,(function(l,h){var c=p.createIcon(l,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(g.getItemStyle()),c.ensureState("emphasis").style=m.getItemStyle();var v=new x.ZP({style:{text:d[h],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v),p.setTooltipConfig({el:c,componentModel:t,itemName:h,formatterParamsExtra:{title:d[h]}}),c.__title=d[h],c.on("mouseover",(function(){var e=m.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";v.setStyle({fill:m.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),c.setTextConfig({position:m.get("textPosition")||i}),v.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",h])&&n.leaveEmphasis(this),v.hide()})),("emphasis"===i.get(["iconStatus",h])?f.fD:f.Mh)(c),r.add(c),c.on("click",u.bind(s.onclick,s,e,n,h)),_[h]=c}))}(S,v,y),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?f.fD:f.Mh)(i[t])},v instanceof h.f1&&v.render&&v.render(S,e,n,i)):M&&v.dispose&&v.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){u.each(this._features,(function(t){t instanceof h.f1&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);var w=n(6387);const S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=w.default.browser;if((0,u.isFunction)(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),d=c[0].indexOf("base64")>-1,p=r?decodeURIComponent(c[1]):c[1];d&&(p=window.atob(p));var f=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,f)}else{var y=document.createElement("iframe");document.body.appendChild(y);var _=y.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,f),document.body.removeChild(y)}}else{var b=n.get("lang"),S='',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(h.f1);var T=n(1615),M=n(2234),A="__ec_magicType_stack__",C=[["line","bar"],["stack"]],D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return u.each(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(I[n]){var o,a={series:[]};u.each(C,(function(t){u.indexOf(t,n)>=0&&u.each(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=I[n](e,r,t,i);o&&(u.defaults(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",c=t.getReferringComponents(h,M.C6).models[0].componentIndex;a[h]=a[h]||[];for(var d=0;d<=c;d++)a[h][c]=a[h][c]||{};a[h][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=u.merge({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(h.f1),I={line:function(t,e,n,i){if("bar"===t)return u.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return u.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===A;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),u.merge({id:e,stack:r?"":A},i.get(["option","stack"])||{},!0)}};T.zl({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const L=D;var P=n(1158),O=new Array(60).join("-"),E="\t";function N(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var k=new RegExp("[\t]+","g");function R(t,e){var n=t.split(new RegExp("\n*"+O+"\n*","g")),i={series:[]};return u.each(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(E)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=N(e.shift()).split(k),i=[],r=u.map(n,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){Q[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new j.Z($(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=G(t);F(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=(0,X.Z)(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];q(t,(function(t,n){e.push(u.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(h.f1),Q={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=G(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return F(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function $(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}(0,Y.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=$(i),a=(0,M.pm)(t,o);return q(a.xAxisModels,(function(t){return s(t,"xAxis","xAxisIndex")})),q(a.yAxisModels,(function(t){return s(t,"yAxis","yAxisIndex")})),r}function s(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:K+e+o};a[n]=o,r.push(a)}}));const tt=J;function et(t){t.registerComponentModel(c),t.registerComponentView(b),(0,h.ls)("saveAsImage",S),(0,h.ls)("magicType",L),(0,h.ls)("dataView",Z),(0,h.ls)("dataZoom",tt),(0,h.ls)("restore",U),(0,i.D)(l)}},7813:(t,e,n)=>{"use strict";n.d(e,{N:()=>$});var i=n(7037),r=n(8023),o=n(655);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(n(8071).Z);var s=n(3051),l=n(6387),u=n(1158),h=n(4058),c=n(8988);function d(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function p(t){if(l.default.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(h+="top:50%",d+="translateY(-50%) rotate("+(a="left"===l?-225:-45)+"deg)"):(h+="left:50%",d+="translateX(-50%) rotate("+(a="top"===l?225:45)+"deg)");var p=a*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),m=e+" solid "+r+"px;";return'
'}(n,i,r)),(0,s.isString)(t))o.innerHTML=t+a;else if(t){o.innerHTML="",(0,s.isArray)(t)||(t=[t]);for(var l=0;l=0;o--){var a=t[o];a&&(a instanceof z.Z&&(a=a.get("tooltip",!0)),(0,s.isString)(a)&&(a={formatter:a}),a&&(i=new z.Z(a,i,r)))}return i}function K(t,e){return t.dispatchAction||(0,s.bind)(e.dispatchAction,e)}function J(t){return"center"===t||"middle"===t}const Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.prototype.init=function(t,e){if(!l.default.node&&e.getDom()){var n=t.getComponent("tooltip"),i=this._renderMode=(0,V.U9)(n.get("renderMode"));this._tooltipContent="richText"===i?new O(e):new M(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!l.default.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?(0,X.T9)(this,"_updatePosition",50,"fixRate"):(0,X.ZH)(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");B.z("itemTooltip",this._api,(0,s.bind)((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!l.default.node&&n.getDom()){var r=K(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=(0,V.zH)(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=(0,V.HZ)(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=(0,U.A)(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Y;u.x=i.x,u.y=i.y,u.update(),(0,U.A)(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=(0,k.Z)(i,e),c=h.point[0],d=h.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:h.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(K(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===q([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,(0,j.o)(n,(function(t){return null!=(0,U.A)(t).dataIndex?(r=t,!0):null!=(0,U.A)(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=(0,s.bind)(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=q([e.tooltipOption],i),a=this._renderMode,l=[],u=(0,v.TX)("section",{blocks:[],noHeader:!0}),h=[],d=new v.iv;(0,s.each)(t,(function(t){(0,s.each)(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=F.gk(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),p=(0,v.TX)("section",{header:o,noHeader:!(0,s.trim)(o),sortBlocks:!0,blocks:[]});u.blocks.push(p),(0,s.each)(t.seriesDataIndices,(function(u){var f=n.getSeriesByIndex(u.seriesIndex),g=u.dataIndexInside,m=f.getDataParams(g);if(!(m.dataIndex<0)){m.axisDim=t.axisDim,m.axisIndex=t.axisIndex,m.axisType=t.axisType,m.axisId=t.axisId,m.axisValue=Z.DX(e.axis,{value:r}),m.axisValueLabel=o,m.marker=d.makeTooltipMarker("item",(0,c.Lz)(m.color),a);var v=(0,W.f)(f.formatTooltip(g,!0,null)),y=v.frag;if(y){var _=q([f],i).get("valueFormatter");p.blocks.push(_?(0,s.extend)({valueFormatter:_},y):y)}v.text&&h.push(v.text),l.push(m)}}))}}))})),u.blocks.reverse(),h.reverse();var p=e.position,f=o.get("order"),g=(0,v.BY)(u,d,a,f,n.get("useUTC"),o.get("textStyle"));g&&h.unshift(g);var m="richText"===a?"\n\n":"
",y=h.join(m);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(o,p,r[0],r[1],this._tooltipContent,l):this._showTooltipContent(o,y,l,Math.random()+"",r[0],r[1],p,null,d)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=(0,U.A)(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),l=r.dataModel||a,u=r.dataIndex,h=r.dataType,d=l.getData(h),p=this._renderMode,f=t.positionDefault,g=q([d.getItemModel(u),l,a&&(a.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=g.get("trigger");if(null==m||"item"===m){var y=l.getDataParams(u,h),_=new v.iv;y.marker=_.makeTooltipMarker("item",(0,c.Lz)(y.color),p);var x=(0,W.f)(l.formatTooltip(u,!1,h)),b=g.get("order"),w=g.get("valueFormatter"),S=x.frag,T=S?(0,v.BY)(w?(0,s.extend)({valueFormatter:w},S):S,_,p,b,i.get("useUTC"),g.get("textStyle")):x.text,M="item_"+l.name+"_"+u;this._showOrMove(g,(function(){this._showTooltipContent(g,T,y,M,t.offsetX,t.offsetY,t.position,t.target,_)})),n({type:"showTip",dataIndexInside:u,dataIndex:d.getRawIndex(u),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=(0,U.A)(e),r=i.tooltipConfig.option||{};if((0,s.isString)(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var l=t.positionDefault,u=q(o,this._tooltipModel,l?{position:l}:null),h=u.get("content"),c=Math.random()+"",d=new v.iv;this._showOrMove(u,(function(){var n=(0,s.clone)(u.get("formatterParams")||{});this._showTooltipContent(u,h,n,c,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");a=a||t.get("position");var p=e,f=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(d)if((0,s.isString)(d)){var g=t.ecModel.get("useUTC"),m=(0,s.isArray)(n)?n[0]:n;p=d,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=(0,H.WU)(m.axisValue,p,g)),p=(0,c.kF)(p,n,!0)}else if((0,s.isFunction)(d)){var v=(0,s.bind)((function(e,i){e===this._ticket&&(h.setContent(i,u,t,f,a),this._updatePosition(t,a,r,o,h,n,l))}),this);this._ticket=i,p=d(n,i,v)}else p=d;h.setContent(p,u,t,f,a),h.show(t,f),this._updatePosition(t,a,r,o,h,n,l)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||(0,s.isArray)(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:(0,s.isArray)(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),c=t.get("align"),p=t.get("verticalAlign"),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),(0,s.isFunction)(e)&&(e=e([n,i],o,r.el,f,{viewSize:[l,u],contentSize:h.slice()})),(0,s.isArray)(e))n=(0,E.GM)(e[0],l),i=(0,E.GM)(e[1],u);else if((0,s.isObject)(e)){var g=e;g.width=h[0],g.height=h[1];var m=(0,R.ME)(g,{width:l,height:u});n=m.x,i=m.y,c=null,p=null}else if((0,s.isString)(e)&&a){var v=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,f,h,t.get("borderWidth"));n=v[0],i=v[1]}else{v=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,l,u,c?null:20,p?null:20);n=v[0],i=v[1]}if(c&&(n-=J(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=J(p)?h[1]/2:"bottom"===p?h[1]:0),d(t)){v=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,l,u);n=v[0],i=v[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&(0,s.each)(n,(function(n,o){var a=n.dataByAxis||[],l=(t[o]||{}).dataByAxis||[];(r=r&&a.length===l.length)&&(0,s.each)(a,(function(t,n){var o=l[n]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&(0,s.each)(a,(function(t,e){var n=u[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&(0,s.each)(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!l.default.node&&e.getDom()&&((0,X.ZH)(this,"_updatePosition"),this._tooltipContent.dispose(),B.E("itemTooltip",e))},e.type="tooltip",e}(G.Z);function $(t){(0,r.D)(i.N),t.registerComponentModel(a),t.registerComponentView(Q),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},s.noop),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},s.noop)}},3993:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var i=n(3051),r=n(5685),o=n(8540),a=n(2234);function s(t){var e,n,s,l,u=t.series,h=t.dataIndex,c=t.multipleSeries,d=u.getData(),p=d.mapDimensionsAll("defaultedTooltip"),f=p.length,g=u.getRawValue(h),m=(0,i.isArray)(g),v=(0,r.jT)(u,h);if(f>1||m&&!f){var y=function(t,e,n,a,s){var l=e.getData(),u=(0,i.reduce)(t,(function(t,e,n){var i=l.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),h=[],c=[],d=[];function p(t,e){var n=l.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(u?d.push((0,r.TX)("nameValue",{markerType:"subItem",markerColor:s,name:n.displayName,value:t,valueType:n.type})):(h.push(t),c.push(n.type)))}return a.length?(0,i.each)(a,(function(t){p((0,o.hk)(l,n,t),t)})):(0,i.each)(t,p),{inlineValues:h,inlineValueTypes:c,blocks:d}}(g,u,h,p,v);e=y.inlineValues,n=y.inlineValueTypes,s=y.blocks,l=y.inlineValues[0]}else if(f){var _=d.getDimensionInfo(p[0]);l=e=(0,o.hk)(d,h,p[0]),n=_.type}else l=e=m?g[0]:g;var x=(0,a.yu)(u),b=x&&u.name||"",w=d.getName(h),S=c?b:w;return(0,r.TX)("section",{header:b,noHeader:c||!x,sortParam:l,blocks:[(0,r.TX)("nameValue",{markerType:"item",markerColor:v,name:S,noName:!(0,i.trim)(S),value:e,valueType:n})].concat(s||[])})}},5685:(t,e,n)=>{"use strict";n.d(e,{BY:()=>m,TX:()=>h,d_:()=>x,iv:()=>b,jT:()=>_});var i=n(8988),r=n(3051),o=n(8407),a=n(5669);function s(t,e){var n=t.color||"#6e7079",r=t.fontSize||12,o=t.fontWeight||"400",a=t.color||"#464646",s=t.fontSize||14,l=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+(0,i.F1)(r+"")+"px;color:"+(0,i.F1)(n)+";font-weight:"+(0,i.F1)(o+""),valueStyle:"font-size:"+(0,i.F1)(s+"")+"px;color:"+(0,i.F1)(a)+";font-weight:"+(0,i.F1)(l+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:s,fill:a,fontWeight:l}}}var l=[0,10,20,30],u=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function c(t){return"section"===t.type}function d(t){return c(t)?f:g}function p(t){if(c(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return(0,r.each)(t.blocks,(function(t){var n=p(t);n>=e&&(e=n+ +(i&&(!n||c(t)&&!t.noHeader)))})),e}return 0}function f(t,e,n,a){var h,c=e.noHeader,f=(h=p(e),{html:l[h],richText:u[h]}),g=[],m=e.blocks||[];(0,r.assert)(!m||(0,r.isArray)(m)),m=m||[];var _=t.orderMode;if(e.sortBlocks&&_){m=m.slice();var x={valueAsc:"asc",valueDesc:"desc"};if((0,r.hasOwn)(x,_)){var b=new o.ID(x[_],null);m.sort((function(t,e){return b.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===_&&m.reverse()}(0,r.each)(m,(function(n,i){var o=e.valueFormatter,s=d(n)(o?(0,r.extend)((0,r.extend)({},t),{valueFormatter:o}):t,n,i>0?f.html:0,a);null!=s&&g.push(s)}));var w="richText"===t.renderMode?g.join(f.richText):v(g.join(""),c?n:f.html);if(c)return w;var S=(0,i.uX)(e.header,"ordinal",t.useUTC),T=s(a,t.renderMode).nameStyle;return"richText"===t.renderMode?y(t,S,T)+f.richText+w:v('
'+(0,i.F1)(S)+"
"+w,n)}function g(t,e,n,o){var a=t.renderMode,l=e.noName,u=e.noValue,h=!e.markerType,c=e.name,d=t.useUTC,p=e.valueFormatter||t.valueFormatter||function(t){return t=(0,r.isArray)(t)?t:[t],(0,r.map)(t,(function(t,e){return(0,i.uX)(t,(0,r.isArray)(m)?m[e]:m,d)}))};if(!l||!u){var f=h?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),g=l?"":(0,i.uX)(c,"ordinal",d),m=e.valueType,_=u?[]:p(e.value),x=!h||!l,b=!h&&l,w=s(o,a),S=w.nameStyle,T=w.valueStyle;return"richText"===a?(h?"":f)+(l?"":y(t,g,S))+(u?"":function(t,e,n,i,o){var a=[o],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle((0,r.isArray)(e)?e.join(" "):e,a)}(t,_,x,b,T)):v((h?"":f)+(l?"":function(t,e,n){return''+(0,i.F1)(t)+""}(g,!h,S))+(u?"":function(t,e,n,o){var a=n?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=(0,r.isArray)(t)?t:[t],''+(0,r.map)(t,(function(t){return(0,i.F1)(t)})).join("  ")+""}(_,x,b,T)),n)}}function m(t,e,n,i,r,o){if(t)return d(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function v(t,e){return'
'+t+'
'}function y(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function _(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function x(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var b=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.isString)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.isArray)(e)?(0,r.each)(e,(function(t){return(0,r.extend)(n,t)})):(0,r.extend)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},2950:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(5669),o=n(423),a=n(2234),s=n(7947),l=(0,a.Yf)();function u(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:i.map(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function h(t,e){return"category"===t.type?function(t,e){var n,r,o=d(t,"ticks"),a=(0,s.rk)(e),l=p(o,a);if(l)return l;e.get("show")&&!t.scale.isBlank()||(n=[]);if(i.isFunction(a))n=m(t,a,!0);else if("auto"===a){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,n=i.map(u.labels,(function(t){return t.tickValue}))}else n=g(t,r=a,!0);return f(o,a,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:i.map(t.scale.getTicks(),(function(t){return t.value}))}}function c(t,e){var n,r,o=d(t,"labels"),a=(0,s.rk)(e),u=p(o,a);return u||(i.isFunction(a)?n=m(t,a):(r="auto"===a?function(t){var e=l(t).autoInterval;return null!=e?e:l(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=g(t,r)),f(o,a,{labels:n,labelCategoryInterval:r}))}function d(t,e){return l(t)[e]||(l(t)[e]=[])}function p(t,e){for(var n=0;n1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=(0,s.WY)(t),p=a.get("showMinLabel")||d,f=a.get("showMaxLabel")||d;p&&h!==o[0]&&m(o[0]);for(var g=h;g<=o[1];g+=u)m(g);function m(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&m(o[1]),l}function m(t,e,n){var r=t.scale,o=(0,s.J9)(t),a=[];return i.each(r.getTicks(),(function(t){var i=r.getLabel(t),s=t.value;e(t.value,i)&&a.push(n?s:{formattedLabel:o(t),rawLabel:i,tickValue:s})})),a}var v=[0,1];function y(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const _=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,r.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count()),(0,r.NU)(t,v,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count());var o=(0,r.NU)(t,n,v,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=h(this,e).ticks,o=(0,i.map)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,o){var a=e.length;if(!t.onBand||n||!a)return;var s,l,u=t.getExtent();if(1===a)e[0].coord=u[0],s=e[1]={coord:u[0]};else{var h=e[a-1].tickValue-e[0].tickValue,c=(e[a-1].coord-e[0].coord)/h;(0,i.each)(e,(function(t){t.coord-=c/2})),l=1+t.scale.getExtent()[1]-e[a-1].tickValue,s={coord:e[a-1].coord+c*l},e.push(s)}var d=u[0]>u[1];p(e[0].coord,u[0])&&(o?e[0].coord=u[0]:e.shift());o&&p(u[0],e[0].coord)&&e.unshift({coord:u[0]});p(u[1],s.coord)&&(o?s.coord=u[1]:e.pop());o&&p(s.coord,u[1])&&e.push({coord:u[1]});function p(t,e){return t=(0,r.NM)(t),e=(0,r.NM)(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,i.map)(e,(function(t){return(0,i.map)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return u(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),u=r.count();if(a[1]-a[0]<1)return 0;var h=1;u>40&&(h=Math.max(1,Math.floor(u/40)));for(var c=a[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),p=Math.abs(d*Math.cos(i)),f=Math.abs(d*Math.sin(i)),g=0,m=0;c<=a[1];c+=h){var v,y,_=o.lP(n({value:c}),e.font,"center","top");v=1.3*_.width,y=1.3*_.height,g=Math.max(g,v,7),m=Math.max(m,y,7)}var x=g/p,b=m/f;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=l(t.model),T=t.getExtent(),M=S.lastAutoInterval,A=S.lastTickCount;return null!=M&&null!=A&&Math.abs(M-w)<=1&&Math.abs(A-u)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=u,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}()},3845:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(5280),o=n(2892),a=n(479),s=n(7411),l=n(5669),u=r.applyTransform;function h(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const c=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new s.ZP,n._rawTransformable=new s.ZP,n.name=e,n}return(0,i.ZT)(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new a.Z(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new a.Z(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new a.Z(t,e,n,i));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[(0,l.GM)(t[0],e.getWidth()),(0,l.GM)(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=r.applyTransform([],i,t),n=r.applyTransform([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),o.copy(this.transform||(this.transform=[]),e.transform||o.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],o.invert(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new s.ZP;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?u(n,t,i):r.copy(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?u([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=h(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=h(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(s.ZP)},7947:(t,e,n)=>{"use strict";n.d(e,{aG:()=>D,Do:()=>O,DX:()=>P,PY:()=>k,rk:()=>E,Xv:()=>A,Yb:()=>I,J9:()=>L,Jk:()=>C,WY:()=>N,AH:()=>R});var i=n(3051),r=n(5043),o=n(103),a=n(379),s=n(9093),l=n(479),u=n(1618),h=n(655),c=n(5669),d=n(5021),p=a.Z.prototype,f=o.Z.prototype,g=c.NM,m=Math.floor,v=Math.ceil,y=Math.pow,_=Math.log,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new o.Z,e._interval=0,e}return(0,h.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=f.getTicks.call(this,t);return i.map(o,(function(t){var e=t.value,i=c.NM(y(this.base,e));return i=e===n[0]&&this._fixMin?w(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?w(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=_(t)/_(n),e=_(e)/_(n),f.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=p.getExtent.call(this);e[0]=y(t,e[0]),e[1]=y(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=w(e[0],n[0])),this._fixMax&&(e[1]=w(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=_(t[0])/_(e),t[1]=_(t[1])/_(e),p.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=c.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[c.NM(v(e[0]/i)*i),c.NM(m(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){f.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_(t)/_(this.base),d.XS(t,this._extent)},e.prototype.normalize=function(t){return t=_(t)/_(this.base),d.Fv(t,this._extent)},e.prototype.scale=function(t){return t=d.bA(t,this._extent),y(this.base,t)},e.type="log",e}(a.Z),b=x.prototype;function w(t,e){return g(t,c.p8(e))}b.getMinorTicks=f.getMinorTicks,b.getLabel=f.getLabel,a.Z.registerClass(x);const S=x;var T=n(9936),M=n(8986);function A(t,e){var n=t.type,r=(0,M.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,l=e.ecModel;if(l&&"time"===n){var u=(0,s.Ge)("bar",l),h=!1;if(i.each(u,(function(t){h=h||t.getBaseAxis()===e.axis})),h){var c=(0,s.My)(u),d=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],l=(0,s.G_)(r,n.axis);if(void 0===l)return{min:t,max:e};var u=1/0;i.each(l,(function(t){u=Math.min(t.offset,u)}));var h=-1/0;i.each(l,(function(t){h=Math.max(t.offset+t.width,h)})),u=Math.abs(u),h=Math.abs(h);var c=u+h,d=e-t,p=d/(1-(u+h)/a)-d;return{min:t-=p*(u/c),max:e+=p*(h/c)}}(o,a,e,c);o=d.min,a=d.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function C(t,e){var n=e,i=A(t,n),r=i.extent,o=n.get("splitNumber");t instanceof S&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function D(t,e){if(e=e||t.get("type"))switch(e){case"category":return new r.Z({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new u.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(a.Z.getClass(e)||o.Z)}}function I(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function L(t){var e,n,r=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):i.isString(r)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(r):i.isFunction(r)?(e=r,function(n,i){return null!=o&&(i=n.value-o),e(P(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function P(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function O(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,a=n.getExtent();o=n instanceof r.Z?n.count():(i=n.getTicks()).length;var s,u,h,c,d,p,f,g,m=t.getLabelModel(),v=L(t),y=1;o>40&&(y=Math.ceil(o/40));for(var _=0;_t[1]&&(t[1]=i[1])}))}},6650:(t,e,n)=>{"use strict";n.d(e,{W:()=>i});var i=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}()},9069:(t,e,n)=>{"use strict";n.d(e,{Mk:()=>s,Yh:()=>a,bK:()=>o});var i=n(3051),r=n(2234);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,h=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===h?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(s){var m=s.toGlobalCoord(s.dataToCoord(0));g[p.onZero]=Math.max(Math.min(m,g[1]),g[0])}a.position=["y"===h?g[p[u]]:d[0],"x"===h?g[p[u]]:d[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[p[l]]-g[p.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.retrieve(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-v:v,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.each(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},4215:(t,e,n)=>{"use strict";n.d(e,{Im:()=>m,Ni:()=>g,Qh:()=>p,jM:()=>f});var i=n(655),r=n(479),o=n(5280),a=n(765),s=n(2892),l=n(3051),u=[];function h(t,e){for(var n=0;nn&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s{"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(4215);function o(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function s(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var r=e.features;return i.each(r,(function(t){var e=t.geometry,r=e.encodeOffsets,s=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=a(s,r,n);break;case"Polygon":case"MultiLineString":o(s,r,n);break;case"MultiPolygon":i.each(s,(function(t,e){return o(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t),i.map(i.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,o=t.geometry,a=[];switch(o.type){case"Polygon":var s=o.coordinates;a.push(new r.Qh(s[0],s.slice(1)));break;case"MultiPolygon":i.each(o.coordinates,(function(t){t[0]&&a.push(new r.Qh(t[0],t.slice(1)))}));break;case"LineString":a.push(new r.jM([o.coordinates]));break;case"MultiLineString":a.push(new r.jM(o.coordinates))}var l=new r.Ni(n[e||"name"],a,n.cp);return l.properties=n,l}))}},8986:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(3051),r=n(423),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(s=d,u=!0),null!=p&&(l=p,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.eqNaN)(e)?NaN:t.parse(e)}},4267:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.each(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},1615:(t,e,n)=>{"use strict";n.d(e,{Hr:()=>xe,$j:()=>hn,Ok:()=>Nn,HO:()=>ve,eU:()=>cn,zP:()=>dn,B9:()=>pn,wL:()=>Tn,JE:()=>fn,rp:()=>gn,FU:()=>On,S1:()=>un,zl:()=>wn,RS:()=>Sn,qR:()=>Mn,yn:()=>In,I2:()=>ue.I2,je:()=>Pn,sq:()=>_n,Br:()=>xn,ds:()=>vn,Pu:()=>yn,aW:()=>mn,OB:()=>En,YK:()=>bn,Og:()=>An,jQ:()=>Ln,i8:()=>me});var i=n(655),r=n(9448),o=n(3051),a=n(6387),s=n(9455),l=n(3510),u=n(2234),h=n(1497),c=n(8071),d="";"undefined"!=typeof navigator&&(d=navigator.platform||"");var p="rgba(0, 0, 0, 0.2)";const f={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:p,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:p,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:p,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:p,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:p,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:p,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:d.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 g,m,v,y=n(1772),_=n(2468),x=n(5494);var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new h.Z(i),this._locale=new h.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=T(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,T(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):v(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.each)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.createHashMap)(),l=e&&e.replaceMergeMainTypeMap;(0,y.md)(this),(0,o.each)(t,(function(t,e){null!=t&&(c.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.clone)(t):(0,o.merge)(n[e],t,!0))})),l&&l.each((function(t,e){c.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),c.Z.topologicalTravel(a,c.Z.getAllClassMainTypes(),(function(e){var a=(0,_.R)(this,e,u.kF(t[e])),s=i.get(e),h=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=u.ab(s,a,h);u.O0(d,e,c.Z),n[e]=null,i.set(e,null),r.set(e,0);var p,f=[],m=[],v=0;(0,o.each)(d,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a="series"===e,s=c.Z.getClass(e,t.keyInfo.subType,!a);if(!s)return;if("tooltip"===e){if(p)return void 0;p=!0}if(i&&i.constructor===s)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var l=(0,o.extend)({componentIndex:n},t.keyInfo);i=new s(r,this,this,l),(0,o.extend)(i,l),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(f.push(i.option),m.push(i),v++):(f.push(void 0),m.push(void 0))}),this),n[e]=f,i.set(e,m),r.set(e,v),"series"===e&&g(this)}),this),this._seriesIndices||g(this)},e.prototype.getOption=function(){var t=(0,o.clone)(this.option);return(0,o.each)(t,(function(e,n){if(c.Z.hasClass(n)){for(var i=u.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!u.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const O=L;var E=o.each,N=o.isObject,k=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function R(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=k.length;n=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=(0,$.S$)(p,v),f=v;break}}}return i[0]=p,i[1]=f,i}))}))}var et=n(3321),nt=n(3166),it=n(5797),rt=n(5151),ot=n(4535),at=n(9266),st=n(327),lt=n(106),ut=n(6357),ht=n(270),ct=n(9066),dt=n(9887),pt=n(7515),ft=(0,u.Yf)(),gt={itemStyle:(0,ct.Z)(dt.t,!0),lineStyle:(0,ct.Z)(pt.v,!0)},mt={lineStyle:"stroke",itemStyle:"fill"};function vt(t,e){var n=t.visualStyleMapper||gt[e];return n||(console.warn("Unkown style type '"+e+"'."),gt.itemStyle)}function yt(t,e){var n=t.visualDrawType||mt[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var _t={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=vt(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=yt(t,i),u=a[l],h=(0,o.isFunction)(u)?u:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[l]||h||c){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||(0,o.isFunction)(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||(0,o.isFunction)(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.extend)({},a);r[l]=h(i),e.setItemVisual(n,"style",r)}}}},xt=new h.Z,bt={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=vt(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){xt.option=n[i];var s=r(xt),l=t.ensureUniqueItemVisual(e,"style");(0,o.extend)(l,s),xt.option.decal&&(t.setItemVisual(e,"decal",xt.option.decal),xt.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},wt={performRawSeries:!0,overallReset:function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),ft(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ft(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=yt(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},St=n(8154),Tt=n(6498),Mt=n(4826),At=Math.PI;var Ct=n(8674),Dt=n(2151),It=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.createHashMap)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.createHashMap)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.each)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.assert)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.each)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),a.updatePayload(h,n);var p=a.getPerformArgs(h,i.block);d.each((function(t){t.perform(p)})),h.perform(p)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.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)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.createHashMap)(),l=t.seriesType,u=t.getTargetSeries;function h(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,Ct.v)({plan:Nt,reset:kt,count:Bt}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,Ct.v)({reset:Lt});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.createHashMap)(),u=t.seriesType,h=t.getTargetSeries,c=!0,d=!1;function p(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(d=!0,(0,Ct.v)({reset:Pt,onDirty:Et})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,r._pipe(t,n)}(0,o.assert)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,p):h?h(n,i).each(p):(c=!1,(0,o.each)(n.getSeries(),p)),d&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.isFunction)(t)&&(t={overallReset:t,seriesType:Zt(t)}),t.uid=(0,Dt.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function Lt(t){t.overallReset(t.ecModel,t.api,t.payload)}function Pt(t){return t.overallProgress&&Ot}function Ot(){this.agent.dirty(),this.getDownstream().dirty()}function Et(){this.agent&&this.agent.dirty()}function Nt(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function kt(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,u.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.map)(e,(function(t,e){return zt(e)})):Rt}var Rt=zt(0);function zt(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),ee=["symbol","symbolSize","symbolRotate","symbolOffset"],ne=ee.concat(["symbolKeepAspect"]),ie={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},a=!1,s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{var i,r,a;if((0,o.isObject)(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,a=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var s=new O(this._api),l=this._theme,u=this._model=new M;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:r},$e);var h={seriesTransition:a,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:h},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{Ae(this),Ie.update.call(this,null,h)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.setTheme=function(){(0,ae.Sh)("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ge&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(a.default.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return(0,o.each)(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;(0,o.each)(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return(0,o.each)(i,(function(t){t.group.ignore=!1})),a}qe(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(on[n]){var l=s,u=s,h=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();(0,o.each)(rn,(function(r,s){if(r.group===n){var p=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas((0,o.clone)(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),h=a(f.right,h),c=a(f.bottom,c),d.push({dom:p,left:f.left,top:f.top})}}));var f=(h*=p)-(l*=p),g=(c*=p)-(u*=p),m=pe.qW.createCanvas(),v=r.init(m,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:g}),e){var y="";return(0,o.each)(d,(function(t){var e=t.left-l,n=t.top-u;y+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new rt.Z({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),(0,o.each)(d,(function(t){var e=new ot.ZP({style:{x:t.left*p-l,y:t.top*p-u,image:t.dom}});v.add(e)})),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}qe(this.id)},e.prototype.convertToPixel=function(t,e){return Le(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Le(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=u.pm(i,t);return(0,o.each)(r,(function(t,i){i.indexOf("Models")>=0&&(0,o.each)(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}qe(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=u.pm(n,t,{defaultMainType:"series"});var r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?(0,oe.Or)(r,o,e):(0,oe.UL)(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;(0,o.each)(Ye,(function(e){var n=function(n){var i,r=t.getModel(),a=n.target;if("globalout"===e?i={}:a&&(0,he.o)(a,(function(t){var e=(0,lt.A)(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=(0,o.extend)({},e.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:a,packedEvent:i,model:u,view:h},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),(0,o.each)(Je,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),(0,o.each)(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),(0,se.s)(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?qe(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)qe(this.id);else{this._disposed=!0,this.getDom()&&u.P$(this.getDom(),ln,"");var t=this,e=t._api,n=t._model;(0,o.each)(t._componentsViews,(function(t){t.dispose(n,e)})),(0,o.each)(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete rn[t.id]}},e.prototype.resize=function(t){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&Ae(this),Ie.update.call(this,{type:"resize",animation:(0,o.extend)({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nn[t]){var n=nn[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?qe(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=(0,o.extend)({},t);return e.type=Je[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(e)||(e={silent:!!e}),Ke[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Oe.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.default.browser.weChat&&this._throttledZrFlush(),Ee.call(this,n),Ne.call(this,n)}},e.prototype.updateLabelLayout=function(){de.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)qe(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(at.eq(t))return;if(t instanceof st.ZP&&(0,ut.e9)(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ae=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ce(t,!0),Ce(t,!1),e.plan()},Ce=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.default.node&&!a.default.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),de.trigger("series:afterupdate",e,i,s)},Ge=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},He=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){at.eq(t)||e(t)})),t.__needsUpdateStatus=!1)},Fe=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,ut.fD)(e,n),Ge(t)},n.prototype.leaveEmphasis=function(e,n){(0,ut.Mh)(e,n),Ge(t)},n.prototype.enterBlur=function(e){(0,ut.SX)(e),Ge(t)},n.prototype.leaveBlur=function(e){(0,ut.VP)(e),Ge(t)},n.prototype.enterSelect=function(e){(0,ut.XX)(e),Ge(t)},n.prototype.leaveSelect=function(e){(0,ut.SJ)(e),Ge(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(C))(t)},Ve=function(t){function e(t,e){for(var n=0;n=0)){Cn.push(n);var a=Ut.wrapStageHandler(n,r);a.__prio=e,a.__raw=n,t.push(a)}}function In(t,e){nn[t]=e}function Ln(t){(0,pe.g2)({createCanvas:t})}function Pn(t,e,n){var i=(0,fe.C)("registerMap");i&&i(t,e,n)}function On(t){var e=(0,fe.C)("getMap");return e&&e(t)}var En=le.DA;An(ye,_t),An(_e,bt),An(_e,wt),An(ye,ie),An(_e,re),An(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=(0,ce.I)(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=(0,ce.I)(r,e)}}))})),vn(Q),yn(900,(function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(tt)})),In("default",(function(t,e){e=e||{},o.defaults(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new St.Z,i=new rt.Z({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=new Tt.ZP({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),s=new rt.Z({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Mt.Z({shape:{startAngle:-At/2,endAngle:-At/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*At/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*At/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=a.getBoundingRect().width,o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:o),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),wn({type:ut.Ki,event:ut.Ki,update:ut.Ki},o.noop),wn({type:ut.yx,event:ut.yx,update:ut.yx},o.noop),wn({type:ut.Hg,event:ut.Hg,update:ut.Hg},o.noop),wn({type:ut.JQ,event:ut.JQ,update:ut.JQ},o.noop),wn({type:ut.iK,event:ut.iK,update:ut.iK},o.noop),mn("light",jt),mn("dark",Qt);var Nn={}},9428:(t,e,n)=>{"use strict";n.d(e,{C:()=>o,M:()=>r});var i={};function r(t,e){i[t]=e}function o(t){return i[t]}},3917:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>g,G8:()=>f,I2:()=>d});var i=n(1497),r=n(6387);var o=n(3051),a="ZH",s="EN",l=s,u={},h={},c=r.default.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:l;function d(t,e){t=t.toUpperCase(),h[t]=new i.Z(e),u[t]=e}function p(t){if((0,o.isString)(t)){var e=u[t.toUpperCase()]||{};return t===a||t===s?(0,o.clone)(e):(0,o.merge)((0,o.clone)(e),(0,o.clone)(u.EN),!1)}return(0,o.merge)((0,o.clone)(t),(0,o.clone)(u.EN),!1)}function f(t){return h[t]}function g(){return h.EN}d(s,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),d(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},8674:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(3051);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=c(this._modBy),l=this._modDataCount||0,u=c(t&&t.modBy),h=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}s===u&&l===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=h;var d=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(a||p1&&i>0?s:a}};return o;function a(){return e=t?null:o{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a1){var h=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(h,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s1&&1===d)this._updateManyToOne&&this._updateManyToOne(h,u),r[l]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(h,u),r[l]=null;else if(1===c&&1===d)this._update&&this._update(h,u),r[l]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(h,u),r[l]=null;else if(c>1)for(var p=0;p1)for(var s=0;s{"use strict";n.d(e,{ZP:()=>g,hG:()=>h});var i,r=n(3051),o=n(8407),a=n(9574),s="undefined",l=typeof Uint32Array===s?Array:Uint32Array,u=typeof Uint16Array===s?Array:Uint16Array,h=typeof Int32Array===s?Array:Int32Array,c=typeof Float64Array===s?Array:Float64Array,d={float:c,int:h,ordinal:Array,number:Array,time:c};function p(t){return t>65535?l:u}function f(t,e,n,i,r){var o=d[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=(0,r.map)(a,(function(t){return t.property})),h=0;hy[1]&&(y[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=h&&b<=c||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){m=d[i[0]];var y=d[i[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=h&&b<=c||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=h&&b<=c||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[A][1])&&(T=!1)}T&&(s[l++]=e.getRawIndex(v))}return lm[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(p(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var d=1;dn&&(n=i,r=A)}M>0&&Mu-f&&(s=u-f,a.length=s);for(var g=0;gh[1]&&(h[1]=v),c[d++]=y}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return(0,o.yQ)(t[i],this._dimensions[i])}i={arrayRows:t,objectRows:function(t,e,n,i){return(0,o.yQ)(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return(0,o.yQ)(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}()},1401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3051),r=0;function o(t){return(0,i.isObject)(t)&&null!=t.value?t.value:t+""}const a=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++r}return t.createByAxisModel=function(e){var n=e.option,r=n.data,a=r&&(0,i.map)(r,o);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!(0,i.isString)(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.createHashMap)(this.categories))},t}()},5101:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var i,r,o,a,s,l,u,h=n(3051),c=n(1497),d=n(4130),p=n(8540),f=n(381),g=n(5440),m=n(4279),v=n(2234),y=n(106),_=n(9574),x=n(3834),b=n(1029),w=h.isObject,S=h.map,T="undefined"==typeof Int32Array?Array:Int32Array,M=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],A=["_approximateExtent"];const C=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;(0,b.bB)(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===m.cy&&!n.pure)for(var a=[],s=t;s0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),h.isArray(r)?r=r.slice():w(r)&&(r=h.extend({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,w(e)?h.extend(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){w(t)?h.extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?h.extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;(0,y.Q)(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){h.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:S(this.dimensions,this._getDimInfo,this),this.hostModel)),s(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];h.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(h.slice(arguments)))})},t.internalField=(i=function(t){var e=t._invertedIndicesMap;h.each(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new T(o.categories.length);for(var s=0;s1&&(l+="__ec__"+h),i[e]=l}})),t}()},5440:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);const r=function(t){this.otherDims={},null!=t&&i.extend(this,t)}},9574:(t,e,n)=>{"use strict";n.d(e,{Kp:()=>d,Ld:()=>l,ML:()=>c,QY:()=>g,_P:()=>u,nx:()=>h});var i=n(3051),r=n(4279),o=n(2234),a=n(1772),s=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n{"use strict";n.d(e,{Eo:()=>l,Jj:()=>c,Jl:()=>d,bB:()=>u,v5:()=>h});var i=n(3051),r=n(2234),o=n(9574),a=(0,r.Yf)(),s={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},l=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=c(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return(0,i.retrieve2)(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=(0,o.QY)(this.source),n=!d(t),i="",r=[],a=0,l=0;a30}},5623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d,q:()=>c});var i=n(4279),r=n(5440),o=n(3051),a=n(9574),s=n(3834),l=n(2234),u=n(1772),h=n(1029);function c(t,e){return d(t,e).dimensions}function d(t,e){(0,a.Ld)(t)||(t=(0,a.nx)(t));var n=(e=e||{}).coordDimensions||[],c=e.dimensionsDefine||t.dimensionsDefine||[],d=(0,o.createHashMap)(),f=[],g=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return(0,o.each)(e,(function(t){var e;(0,o.isObject)(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,c,e.dimensionsCount),m=e.canOmitUnusedDimensions&&(0,h.Jl)(g),v=c===t.dimensionsDefine,y=v?(0,h.Jj)(t):(0,h.v5)(c),_=e.encodeDefine;!_&&e.encodeDefaulter&&(_=e.encodeDefaulter(t,g));for(var x=(0,o.createHashMap)(_),b=new s.hG(g),w=0;w0&&(i.name=r+(a-1)),a++,e.set(r,a)}}(f),new h.Eo({source:t,dimensions:f,fullDimensionCount:g,dimensionOmitted:m})}function p(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}},8540:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>d,_j:()=>g,a:()=>y,hk:()=>S,tB:()=>b});var i,r,o,a,s,l=n(3051),u=n(2234),h=n(9574),c=n(4279),d=function(){function t(t,e){var n=(0,h.Ld)(t)?t:(0,h.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===c.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,h=o.startIndex,d=o.dimensionsDefine,p=a[w(s,u)];if((0,l.extend)(t,p),s===c.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.bind)(f,null,r,h,d);var m=y(s,u);t.count=(0,l.bind)(m,null,r,h,d)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;ou&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e{"use strict";n.d(e,{BM:()=>o,IR:()=>s,M:()=>a});var i=n(3051),r=n(1029);function o(t,e,n){var o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension;!function(t){return!(0,r.bB)(t.schema)}(e)?(a=e.schema,o=a.dimensions,s=e.store):o=e;var h,c,d,p,f=!(!t||!t.get("stack"));if((0,i.each)(o,(function(t,e){(0,i.isString)(t)&&(o[e]=t={name:t}),f&&!t.isExtraCoord&&(l||h||!t.ordinalMeta||(h=t),c||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(c=t))})),!c||l||h||(l=!0),c){d="__\0ecstackresult_"+t.id,p="__\0ecstackedover_"+t.id,h&&(h.createInvertedIndices=!0);var g=c.coordDim,m=c.type,v=0;(0,i.each)(o,(function(t){t.coordDim===g&&v++}));var y={name:d,coordDim:g,coordDimIndex:v,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},_={name:p,coordDim:p,coordDimIndex:v+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(y.storeDimIndex=s.ensureCalculationDimension(p,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),a.appendCalculationDimension(y),a.appendCalculationDimension(_)):(o.push(y),o.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:h&&h.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:d}}function a(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function s(t,e){return a(t,e)?t.getCalculationInfo("stackResultDimension"):e}},8407:(t,e,n)=>{"use strict";n.d(e,{ID:()=>c,o2:()=>l,tR:()=>p,yQ:()=>a});var i=n(5669),r=n(3051),o=n(175);function a(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||(0,r.isNumber)(t)||null==t||"-"===t||(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t)}var s=(0,r.createHashMap)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return(0,r.isString)(t)?(0,r.trim)(t):t}});function l(t){return s.get(t)}var u={lt:function(t,e){return te},gte:function(t,e){return t>=e}},h=function(){function t(t,e){if(!(0,r.isNumber)(e)){0,(0,o._y)("")}this._opFn=u[t],this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){return(0,r.isNumber)(t)?this._opFn(t,this._rvalFloat):this._opFn((0,i.FK)(t),this._rvalFloat)},t}(),c=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=(0,r.isNumber)(t)?t:(0,i.FK)(t),o=(0,r.isNumber)(e)?e:(0,i.FK)(e),a=isNaN(n),s=isNaN(o);if(a&&(n=this._incomparable),s&&(o=this._incomparable),a&&s){var l=(0,r.isString)(t),u=(0,r.isString)(e);l&&(n=u?t:0),u&&(o=l?e:0)}return no?-this._resultLT:0},t}(),d=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=(0,i.FK)(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function p(t,e){return"eq"===t||"ne"===t?new d("eq"===t,e):(0,r.hasOwn)(u,t)?new h(t,e):null}},381:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,y:()=>a});var i=n(3051),r=n(4279),o=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function a(t,e){var n={},a=n.encode={},l=(0,i.createHashMap)(),u=[],h=[],c={};(0,i.each)(t.dimensions,(function(e){var n,i=t.getDimensionInfo(e),o=i.coordDim;if(o){0;var d=i.coordDimIndex;s(a,o)[d]=e,i.isExtraCoord||(l.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(u[0]=e),s(c,o)[d]=t.getDimensionIndex(i.name)),i.defaultTooltip&&h.push(e)}r.f7.each((function(t,e){var n=s(a,e),r=i.otherDims[e];null!=r&&!1!==r&&(n[r]=i.name)}))}));var d=[],p={};l.each((function(t,e){var n=a[e];p[e]=n[0],d=d.concat(n)})),n.dataDimsOnCoord=d,n.dataDimIndicesOnCoord=(0,i.map)(d,(function(e){return t.getDimensionInfo(e).storeDimIndex})),n.encodeFirstDimNotExtra=p;var f=a.label;f&&f.length&&(u=f.slice());var g=a.tooltip;return g&&g.length?h=g.slice():h.length||(h=u.slice()),a.defaultedLabel=u,a.defaultedTooltip=h,n.userOutput=new o(c,e),n}function s(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function l(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},9344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e){if(r(o=this).mainData===o){var n=(0,i.extend)({},r(this).datas);n[this.dataType]=e,h(e,n,t)}else c(e,this.dataType,r(this).mainData,t);var o;return e}function a(t,e){return t.struct&&t.struct.update(),e}function s(t,e){return(0,i.each)(r(e).datas,(function(n,i){n!==e&&c(n.cloneShallow(),i,e,t)})),e}function l(t){var e=r(this).mainData;return null==t||null==e?e:r(e).datas[t]}function u(){var t=r(this).mainData;return null==t?[{data:t}]:(0,i.map)((0,i.keys)(r(t).datas),(function(e){return{type:e,data:r(t).datas[e]}}))}function h(t,e,n){r(t).datas={},(0,i.each)(e,(function(e,i){c(e,i,t,n)}))}function c(t,e,n,i){r(n).datas[e]=t,r(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=l,t.getLinkedDataAll=u}const d=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,h(e,n,t),(0,i.each)(n,(function(n){(0,i.each)(e.TRANSFERABLE_METHODS,(function(e){n.wrapMethod(e,(0,i.curry)(o,t))}))})),e.wrapMethod("cloneShallow",(0,i.curry)(s,t)),(0,i.each)(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,(0,i.curry)(a,t))})),(0,i.assert)(n[e.dataType]===e)}},1772:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,JT:()=>d,Ss:()=>h,Wd:()=>c,md:()=>l,pY:()=>u,u7:()=>p});var i=n(2234),r=n(3051),o=n(4279),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.createHashMap)()}function u(t,e,n){var i={},o=c(e);if(!o||!t)return i;var a,l,u=[],h=[],d=e.ecModel,p=s(d).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.each)(t,(function(e,n){var o=(0,r.isObject)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=v(o)),i[o.name]=[]}));var g=p.get(f)||p.set(f,{categoryWayDim:l,valueWayDim:0});function m(t,e,n){for(var i=0;i{"use strict";n.d(e,{U:()=>h,t:()=>c});var i=n(3051),r=n(9574),o=n(4279),a=n(1772),s=n(437),l=n(3834),u=n(8540),h=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;if(d(n)){var l=n,u=void 0,h=void 0,c=void 0;if(s){var p=a[0];p.prepareSource(),u=(c=p.getSource()).data,h=c.sourceFormat,e=[p._getVersionSign()]}else u=l.get("data",!0),h=(0,i.isTypedArray)(u)?o.J5:o.cy,e=[];var f=this._getSourceMetaRawOption()||{},g=c&&c.metaRawOption||{},m=(0,i.retrieve2)(f.seriesLayoutBy,g.seriesLayoutBy)||null,v=(0,i.retrieve2)(f.sourceHeader,g.sourceHeader),y=(0,i.retrieve2)(f.dimensions,g.dimensions);t=m!==g.seriesLayoutBy||!!v!=!!g.sourceHeader||y?[(0,r._P)(u,{seriesLayoutBy:m,sourceHeader:v,dimensions:y},h)]:[]}else{var _=n;if(s){var x=this._applyTransform(a);t=x.sourceList,e=x.upstreamSignList}else{var b=_.get("source",!0);t=[(0,r._P)(b,this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(null!=a){1!==t.length&&p("")}var l=[],u=[];return(0,i.each)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||p(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e{"use strict";n.d(e,{DA:()=>m,vK:()=>v});var i=n(4279),r=n(2234),o=n(3051),a=n(8540),s=n(8407),l=n(175),u=n(9574),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function c(t){if(!_(t.sourceFormat)){0,(0,l._y)("")}return t.data}function d(t){var e=t.sourceFormat,n=t.data;if(!_(e)){0,(0,l._y)("")}if(e===i.XD){for(var r=[],a=0,s=n.length;a{"use strict";n.d(e,{RD:()=>dt.Z,TA:()=>p.Z,tF:()=>h.Z,Ir:()=>c.Z,aV:()=>f.Z,Hn:()=>T.Z,Hr:()=>u.Hr,wJ:()=>d.Z,$_:()=>_,$j:()=>u.$j,Ok:()=>u.Ok,HO:()=>u.HO,eU:()=>u.eU,zP:()=>u.zP,B9:()=>u.B9,OB:()=>ct.default,Zy:()=>vt,tv:()=>ft,Sp:()=>gt,Zr:()=>mt,WU:()=>s,wL:()=>u.wL,JE:()=>u.JE,rp:()=>u.rp,FU:()=>u.FU,Q:()=>a,_y:()=>i,S1:()=>u.S1,z$:()=>pt.RV,pI:()=>m,Rx:()=>r,Nu:()=>Z.Z,pQ:()=>Z.Z,zl:()=>u.zl,RS:()=>u.RS,qR:()=>u.qR,yn:()=>u.yn,I2:()=>u.I2,je:()=>u.je,sq:()=>u.sq,Br:()=>u.Br,ds:()=>u.ds,Pu:()=>u.Pu,aW:()=>u.aW,rV:()=>u.OB,YK:()=>u.YK,Og:()=>u.Og,jQ:()=>u.jQ,g2:()=>B.g2,P2:()=>x.P2,XV:()=>o,D$:()=>z.D,D5:()=>l,xr:()=>v,i8:()=>u.i8,gf:()=>y,x_:()=>g});var i={};n.r(i),n.d(i,{createDimensions:()=>I.q,createList:()=>O,createScale:()=>N,createSymbol:()=>L.th,createTextStyle:()=>R,dataStack:()=>E,enableHoverEmphasis:()=>P.vF,getECData:()=>C.A,getLayoutRect:()=>M.ME,mixinAxisModelCommonMethods:()=>k});var r={};n.r(r),n.d(r,{MAX_SAFE_INTEGER:()=>F.YM,asc:()=>F.dt,getPercentWithPrecision:()=>F.eJ,getPixelPrecision:()=>F.M9,getPrecision:()=>F.p8,getPrecisionSafe:()=>F.ZB,isNumeric:()=>F.kE,isRadianAroundZero:()=>F.mW,linearMap:()=>F.NU,nice:()=>F.kx,numericToNumber:()=>F.FK,parseDate:()=>F.sG,quantile:()=>F.VR,quantity:()=>F.Xd,quantityExponent:()=>F.xW,reformIntervals:()=>F.nR,remRadian:()=>F.wW,round:()=>F.NM});var o={};n.r(o),n.d(o,{format:()=>V.WU,parse:()=>F.sG});var a={};n.r(a),n.d(a,{Arc:()=>nt.Z,BezierCurve:()=>et.Z,BoundingRect:()=>st.Z,Circle:()=>X.Z,CompoundPath:()=>rt.Z,Ellipse:()=>Y.Z,Group:()=>U.Z,Image:()=>W.ZP,IncrementalDisplayable:()=>it.Z,Line:()=>tt.Z,LinearGradient:()=>ot.Z,Polygon:()=>J.Z,Polyline:()=>Q.Z,RadialGradient:()=>at.Z,Rect:()=>$.Z,Ring:()=>K.Z,Sector:()=>q.C,Text:()=>j.ZP,clipPointsByRect:()=>G.clipPointsByRect,clipRectByRect:()=>G.clipRectByRect,createIcon:()=>G.createIcon,extendPath:()=>G.extendPath,extendShape:()=>G.extendShape,getShapeClass:()=>G.getShapeClass,getTransform:()=>G.getTransform,initProps:()=>H.KZ,makeImage:()=>G.makeImage,makePath:()=>G.makePath,mergePath:()=>G.mergePath,registerShape:()=>G.registerShape,resizePath:()=>G.resizePath,updateProps:()=>H.D});var s={};n.r(s),n.d(s,{addCommas:()=>lt.OD,capitalFirst:()=>lt.ew,encodeHTML:()=>lt.F1,formatTime:()=>lt.mr,formatTpl:()=>lt.kF,getTextRect:()=>ht,getTooltipMarker:()=>lt.A0,normalizeCssArray:()=>lt.MY,toCamelCase:()=>lt.zW,truncateText:()=>ut.aF});var l={};n.r(l),n.d(l,{bind:()=>y.bind,clone:()=>y.clone,curry:()=>y.curry,defaults:()=>y.defaults,each:()=>y.each,extend:()=>y.extend,filter:()=>y.filter,indexOf:()=>y.indexOf,inherits:()=>y.inherits,isArray:()=>y.isArray,isFunction:()=>y.isFunction,isObject:()=>y.isObject,isString:()=>y.isString,map:()=>y.map,merge:()=>y.merge,reduce:()=>y.reduce});var u=n(1615),h=n(8071),c=n(3166),d=n(3321),p=n(5797),f=n(5101),g=n(9448),m=n(2892),v=n(5280),y=n(3051),_=n(1092),x=n(270),b=n(8455),w=n(7947),S=n(6650),T=n(1497),M=n(6172),A=n(9936),C=n(106),D=n(6006),I=n(5623),L=n(1525),P=n(6357);function O(t){return(0,b.Z)(null,t)}var E={isDimensionStacked:A.M,enableDataStack:A.BM,getStackedDimension:A.IR};function N(t,e){var n=e;e instanceof T.Z||(n=new T.Z(e));var i=w.aG(n);return i.setExtent(t[0],t[1]),w.Jk(i,n),i}function k(t){y.mixin(t,S.W)}function R(t,e){return e=e||{},(0,D.Lr)(t,null,null,"normal"!==e.state)}var z=n(8023),B=n(3132),Z=n(6672),F=n(5669),V=n(5015),G=n(1177),H=n(9266),U=n(8154),W=n(4535),j=n(6498),X=n(9538),Y=n(2797),q=n(7214),K=n(5795),J=n(5094),Q=n(2514),$=n(5151),tt=n(2095),et=n(4174),nt=n(4826),it=n(1754),rt=n(2776),ot=n(4438),at=n(6369),st=n(479),lt=n(8988),ut=n(6918);function ht(t,e,n,i,r,o,a,s){return new j.ZP({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var ct=n(6387),dt=n(2950),pt=n(7772);function ft(t){var e=h.Z.extend(t);return h.Z.registerClass(e),e}function gt(t){var e=c.Z.extend(t);return c.Z.registerClass(e),e}function mt(t){var e=d.Z.extend(t);return d.Z.registerClass(e),e}function vt(t){var e=p.Z.extend(t);return p.Z.registerClass(e),e}var yt=n(7164);(0,z.D)(yt.T)},8023:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var i=n(1615),r=n(3166),o=n(5797),a=n(8071),s=n(3321),l=n(3051),u=n(9428),h=n(9448),c=[],d={registerPreprocessor:i.ds,registerProcessor:i.Pu,registerPostInit:i.sq,registerPostUpdate:i.Br,registerUpdateLifecycle:i.YK,registerAction:i.zl,registerCoordinateSystem:i.RS,registerLayout:i.qR,registerVisual:i.Og,registerTransform:i.OB,registerLoading:i.yn,registerMap:i.je,registerImpl:u.M,PRIORITY:i.Hr,ComponentModel:a.Z,ComponentView:r.Z,SeriesModel:s.Z,ChartView:o.Z,registerComponentModel:function(t){a.Z.registerClass(t)},registerComponentView:function(t){r.Z.registerClass(t)},registerSeriesModel:function(t){s.Z.registerClass(t)},registerChartView:function(t){o.Z.registerClass(t)},registerSubTypeDefaulter:function(t,e){a.Z.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){(0,h.registerPainter)(t,e)}};function p(t){(0,l.isArray)(t)?(0,l.each)(t,(function(t){p(t)})):(0,l.indexOf)(c,t)>=0||(c.push(t),(0,l.isFunction)(t)&&(t={install:t}),t.install(d))}},7164:(t,e,n)=>{"use strict";n.d(e,{T:()=>S});var i=n(2234),r=n(479),o=n(9266),a=n(106),s=n(5669),l=n(7411),u=n(7377),h=n(3051),c=n(4162),d=n(6006);function p(t){if(t){for(var e=[],n=0;n=0&&n.attr(b.oldLayoutSelect),(0,h.indexOf)(p,"emphasis")>=0&&n.attr(b.oldLayoutEmphasis)),(0,o.D)(n,u,e,l)}else if(n.attr(u),!(0,d.qA)(n).valueAnimation){var f=(0,h.retrieve2)(n.style.opacity,1);n.style.opacity=0,(0,o.KZ)(n,{style:{opacity:f}},e,l)}if(b.oldLayout=u,n.states.select){var g=b.oldLayoutSelect={};_(g,u,x),_(g,n.states.select,x)}if(n.states.emphasis){var m=b.oldLayoutEmphasis={};_(m,u,x),_(m,n.states.emphasis,x)}(0,d.tD)(n,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){r=(b=y(i)).oldLayout;var b,w={points:i.shape.points};r?(i.attr({shape:r}),(0,o.D)(i,{shape:w},e)):(i.setShape(w),i.style.strokePercent=0,(0,o.KZ)(i,{style:{strokePercent:1}},e)),b.oldLayout=w}},t}();var w=(0,i.Yf)();function S(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=w(e).labelManager;i||(i=w(e).labelManager=new b),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=w(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}},7377:(t,e,n)=>{"use strict";n.d(e,{$x:()=>R,Iu:()=>k,_A:()=>O,d:()=>D,qK:()=>P});var i=n(1610),r=n(327),o=n(2514),a=n(4014),s=n(3266),l=n(8554),u=n(3051),h=n(2892),c=n(5280),d=n(6357),p=2*Math.PI,f=a.Z.CMD,g=["top","right","bottom","left"];function m(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function v(t,e,n,i,r,o,a,l,u){a-=t,l-=e;var h=Math.sqrt(a*a+l*l),c=(a/=h)*n+t,d=(l/=h)*n+e;if(Math.abs(i-r)%p<1e-4)return u[0]=c,u[1]=d,h-n;if(o){var f=i;i=(0,s.m)(r),r=(0,s.m)(f)}else i=(0,s.m)(i),r=(0,s.m)(r);i>r&&(r+=p);var g=Math.atan2(l,a);if(g<0&&(g+=p),g>=i&&g<=r||g+p>=i&&g+p<=r)return u[0]=c,u[1]=d,h-n;var m=n*Math.cos(i)+t,v=n*Math.sin(i)+e,y=n*Math.cos(r)+t,_=n*Math.sin(r)+e,x=(m-a)*(m-a)+(v-l)*(v-l),b=(y-a)*(y-a)+(_-l)*(_-l);return x0){e=e/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(A,S,T),i.Z.sub(C,M,T);var n=A.len(),r=C.len();if(!(n<.001||r<.001)){A.scale(1/n),C.scale(1/r);var o=A.dot(C);if(Math.cos(e)1&&i.Z.copy(L,M),L.toArray(t[1])}}}}function O(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(A,T,S),i.Z.sub(C,M,T);var r=A.len(),o=C.len();if(!(r<.001||o<.001))if(A.scale(1/r),C.scale(1/o),A.dot(e)=s)i.Z.copy(L,M);else{L.scaleAndAdd(C,a/Math.tan(Math.PI/2-l));var u=M.x!==T.x?(L.x-T.x)/(M.x-T.x):(L.y-T.y)/(M.y-T.y);if(isNaN(u))return;u<0?i.Z.copy(L,T):u>1&&i.Z.copy(L,M)}L.toArray(t[1])}}}function E(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function N(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=c.dist(i[0],i[1]),o=c.dist(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=c.lerp([],i[1],i[0],a/r),l=c.lerp([],i[1],i[2],a/o),u=c.lerp([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h{"use strict";n.d(e,{GI:()=>l,VT:()=>o,WE:()=>s,yl:()=>u});var i=n(1587),r=n(479);function o(t){for(var e=[],n=0;n0&&o&&w(-c/a,0,a);var m,v,y=t[0],_=t[a-1];return x(),m<0&&S(-m,.8),v<0&&S(v,.8),x(),b(m,v,1),b(v,m,-1),x(),m<0&&T(-m),v<0&&T(v),u}function x(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){w(-(o[l-1]*c),l,a)}}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}function s(t,e,n,i){return a(t,"x","width",e,n,i)}function l(t,e,n,i){return a(t,"y","height",e,n,i)}function u(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new r.Z(0,0,0,0);function o(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var a=0;a{"use strict";n.d(e,{Lr:()=>p,k3:()=>d,nC:()=>f,ni:()=>c,pe:()=>b,qA:()=>x,qT:()=>_,tD:()=>w});var i=n(6498),r=n(3051),o=n(6357),a=n(2234),s=n(9266),l={};function u(t,e){for(var n=0;n{"use strict";n.d(e,{Bk:()=>v,G_:()=>g,Ge:()=>d,Gk:()=>c,My:()=>p,bK:()=>m});var i=n(3051),r=n(5669),o=n(9936),a=n(5682),s=n(887),l="__ec_stack_";function u(t){return t.get("stack")||l+t.seriesIndex}function h(t){return t.dim+t.index}function c(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),a=0;a0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return(0,i.each)(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],c=Math.abs(a[1]-a[0]),d=o.scale.getExtent(),p=Math.abs(d[1]-d[0]);i=l?c/p*l:c}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),m=(0,r.GM)(t.get("barMaxWidth"),i),v=(0,r.GM)(t.get("barMinWidth")||(_(t)?.5:1),i),y=t.get("barGap"),x=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:m,barMinWidth:v,barGap:y,barCategoryGap:x,axisKey:h(o),stackId:u(t)})})),f(n)}function f(t){var e={};(0,i.each)(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return(0,i.each)(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=(0,i.keys)(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),h=(0,r.GM)(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,p=(c-u)/(d+(d-1)*h);p=Math.max(p,0),(0,i.each)(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+h*i,d--}else{var i=p;e&&ei&&(i=n),i!==p&&(t.width=i,c-=i+h*i,d--)}})),p=(c-u)/(d+(d-1)*h),p=Math.max(p,0);var f,g=0;(0,i.each)(o,(function(t,e){t.width||(t.width=p),f=t,g+=t.width*(1+h)})),f&&(g-=f.width*h);var m=-g/2;(0,i.each)(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:m,width:t.width},m+=t.width*(1+h)}))})),n}function g(t,e,n){if(t&&e){var i=t[h(e)];return null!=i&&null!=n?i[u(n)]:i}}function m(t,e){var n=d(t,e),r=p(n);(0,i.each)(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=u(t),o=r[h(n)][i],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function v(t){return{seriesType:t,plan:(0,a.Z)(),reset:function(t){if(y(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.getDimensionIndex(e.mapDimension(r.dim)),l=e.getDimensionIndex(e.mapDimension(i.dim)),u=t.get("showBackground",!0),h=e.mapDimension(r.dim),c=e.getCalculationInfo("stackResultDimension"),d=(0,o.M)(e,h)&&!!e.getCalculationInfo("stackedOnSeries"),p=r.isHorizontal(),f=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),g=_(t),m=t.get("barMinHeight")||0,v=c&&e.getDimensionIndex(c),x=e.getLayout("size"),b=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,o=g&&(0,s.o)(3*r),h=g&&u&&(0,s.o)(3*r),c=g&&(0,s.o)(r),y=n.master.getRect(),_=p?y.width:y.height,w=e.getStore(),S=0;null!=(i=t.next());){var T=w.get(d?v:a,i),M=w.get(l,i),A=f,C=void 0;d&&(C=+T-w.get(a,i));var D=void 0,I=void 0,L=void 0,P=void 0;if(p){var O=n.dataToPoint([T,M]);if(d)A=n.dataToPoint([C,M])[0];D=A,I=O[1]+b,L=O[0]-A,P=x,Math.abs(L){"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(5682),o=n(9936),a=n(887);function s(t,e){return{seriesType:t,plan:(0,r.Z)(),reset:function(t){var n=t.getData(),r=t.coordinateSystem,s=t.pipelineContext,l=e||s.large;if(r){var u=(0,i.map)(r.dimensions,(function(t){return n.mapDimension(t)})).slice(0,2),h=u.length,c=n.getCalculationInfo("stackResultDimension");(0,o.M)(n,u[0])&&(u[0]=c),(0,o.M)(n,u[1])&&(u[1]=c);var d=n.getStore(),p=n.getDimensionIndex(u[0]),f=n.getDimensionIndex(u[1]);return h&&{progress:function(t,e){for(var n=t.end-t.start,i=l&&(0,a.o)(n*h),o=[],s=[],u=t.start,c=0;u{"use strict";n.d(e,{s:()=>s,y:()=>o});var i=n(3051),r=n(2234);function o(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}(0,i.each)([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,r,o){e=(0,i.extend)({},e),o.dispatchAction((0,i.extend)(e,{type:t[1],seriesIndex:n(r,e)}))}))}))}function a(t,e,n,o,a){var s=t+e;n.isSilent(s)||o.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,o=t.option.selectedMap,l=a.selected,u=0;u{"use strict";n.d(e,{Z:()=>d});var i=n(655),r=n(3051),o=n(1497),a=n(2151),s=n(4251),l=n(2234),u=n(6172),h=(0,l.Yf)(),c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.merge(t,o.get(this.mainType)),r.merge(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.merge(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=h(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.merge(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(c,o.Z),(0,s.au)(c),a.cj(c),a.jS(c,(function(t){var e=[];r.each(c.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.map(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e}));const d=c},1497:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(6387),r=n(4251),o=(0,n(9066).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(6006),l=n(6498),u=["textStyle","color"],h=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],c=new l.ZP;const d=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n{"use strict";n.d(e,{V:()=>v,Z:()=>A});var i=n(655),r=n(3051),o=n(6387),a=n(2234),s=n(8071),l=n(5494),u=n(1219),h=n(6172),c=n(8674),d=n(4251),p=n(6437),f=n(3993),g=a.Yf();function m(t,e){return t.getName(e)||t.getId(e)}var v="__universalTransitionEnabled",y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,c.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(g(this).sourceManager=new p.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,g(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,h.YD)(this),i=n?(0,h.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,h.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,h.YD)(this);n&&(0,h.dt)(this.option,t,n);var i=g(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,g(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[m(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[v])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r.isObject(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.each(r.concatArray(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.curry(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.mixin(y,u.X),r.mixin(y,l._),(0,d.pw)(y,s.Z);const A=y},2468:(t,e,n)=>{"use strict";n.d(e,{R:()=>a,f:()=>o});var i=n(3051),r=(0,i.createHashMap)();function o(t,e){(0,i.assert)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},1219:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(3051),r=n(8540),o=n(8988),a=/\{@(.+?)\}/g,s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,h=this.mainType,c="series"===h,d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var h=this.getData(n),c=this.getDataParams(t,n);(u&&(c.value=u.interpolatedValue),null!=s&&i.isArray(c.value)&&(c.value=c.value[s]),l)||(l=h.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return i.isFunction(l)?(c.status=e,c.dimensionIndex=s,l(c)):i.isString(l)?(0,o.kF)(l,c).replace(a,(function(e,n){var o=n.length,a=n;"["===a.charAt(0)&&"]"===a.charAt(o-1)&&(a=+a.slice(1,o-1));var s=(0,r.hk)(h,t,a);if(u&&i.isArray(u.interpolatedValue)){var l=h.getDimensionIndex(a);l>=0&&(s=u.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.isObject(t)?t.type&&(n=t):e=t,{text:e,frag:n}}},9887:(t,e,n)=>{"use strict";n.d(e,{D:()=>a,t:()=>r});var i=n(9066),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},7515:(t,e,n)=>{"use strict";n.d(e,{K:()=>a,v:()=>r});var i=n(9066),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},9066:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);function r(t,e){for(var n=0;n=0||o&&i.indexOf(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},5494:(t,e,n)=>{"use strict";n.d(e,{_:()=>a,i:()=>s});var i=n(2234),r=(0,i.Yf)(),o=(0,i.Yf)(),a=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return l(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t,e;(e=r)(t=this).paletteIdx=0,e(t).paletteNameMap={}},t}();function s(t,e,n,r){var a=(0,i.kF)(t.get(["aria","decal","decals"]));return l(t,o,a,null,e,n,r)}function l(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var h=null!=a&&i?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}},12:(t,e,n)=>{"use strict";n.d(e,{N:()=>b});var i=n(4990),r=n(3051),o=n(655),a=n(3510),s=n(5787),l=n(7772),u=n(479),h=n(4414),c=n(3132);function d(t,e,n){var i=c.qW.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}const p=function(t){function e(e,n,o){var a,s=t.call(this)||this;s.motionBlur=!1,s.lastFrameAlpha=.7,s.dpr=1,s.virtual=!1,s.config={},s.incremental=!1,s.zlevel=0,s.maxRepaintRectCount=5,s.__dirty=!0,s.__firstTimePaint=!0,s.__used=!1,s.__drawIndex=0,s.__startIndex=0,s.__endIndex=0,s.__prevStartIndex=null,s.__prevEndIndex=null,o=o||i.KL,"string"==typeof e?a=d(e,n,o):r.isObject(e)&&(e=(a=e).id),s.id=e,s.dom=a;var l=a.style;return l&&(r.disableUserSelect(a),a.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),s.painter=n,s.dpr=o,s}return(0,o.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=d("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new u.Z(0,0,0,0);function c(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new u.Z(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,h=0;h=a)}}for(var d=this.__startIndex;d15)break}n.prevElClipPaths&&u.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var x=p.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?y:0),this._needsManuallyCompositing),c.__builtin__||r.logError("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),l.__dirty&h.YV&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,r.each(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?r.merge(n[t],e,!0):n[t]=e;for(var i=0;i{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(5669),o=n(8988),a=n(379),s=n(5021),l=r.NM,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return s.XS(t,this._extent)},e.prototype.normalize=function(t){return s.Fv(t,this._extent)},e.prototype.scale=function(t){return s.bA(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=s.lb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:l(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&c{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(379),o=n(1401),a=n(5021),s=n(3051),l=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new o.Z({})),(0,s.isArray)(i)&&(i=new o.Z({categories:(0,s.map)(i,(function(t){return(0,s.isObject)(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return null==t?NaN:(0,s.isString)(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),a.XS(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),a.Fv(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(a.bA(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(r.Z);r.Z.registerClass(l);const u=l},379:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4251),r=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();i.au(r);const o=r},1618:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(655),r=n(5669),o=n(5015),a=n(5021),s=n(103),l=n(379),u=n(3051),h=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,i.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,o.WU)(t.value,o.V8[(0,o.xC)((0,o.Tj)(this._minLevelUnit))]||o.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,o.k7)(t,e,n,r,i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),a=function(t,e,n,i){var a=1e4,s=o.FW,l=0;function h(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===c&&s.unshift({value:s[0].value-x})}}for(c=0;c=i[0]&&A<=i[1]&&x++)}var C=(i[1]-i[0])/e;if(x>1.5*C&&b>C/1.5)break;if(y.push(T),x>C||t===s[w])break}_=[]}}0;var D=(0,u.filter)((0,u.map)(y,(function(t){return(0,u.filter)(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),I=[],L=D.length-1;for(w=0;wn&&(this._approxInterval=n);var o=c.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function p(t){return(t/=30*o.s2)>6?6:t>3?3:t>2?2:1}function f(t){return(t/=o.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function g(t,e){return(t/=e?o.yR:o.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function m(t){return r.kx(t,!0)}function v(t,e,n){var i=new Date(t);switch((0,o.Tj)(e)){case"year":case"month":i[(0,o.vh)(n)](0);case"day":i[(0,o.f5)(n)](1);case"hour":i[(0,o.En)(n)](0);case"minute":i[(0,o.eN)(n)](0);case"second":i[(0,o.rM)(n)](0),i[(0,o.cb)(n)](0)}return i.getTime()}l.Z.registerClass(h);const y=h},5021:(t,e,n)=>{"use strict";n.d(e,{Fv:()=>h,Qf:()=>o,XS:()=>u,bA:()=>c,lM:()=>r,lb:()=>s,r1:()=>a});var i=n(5669);function r(t){return"interval"===t.type||"log"===t.type}function o(t,e,n,r){var o={},a=t[1]-t[0],u=o.interval=(0,i.kx)(a/e,!0);null!=n&&ur&&(u=o.interval=r);var h=o.intervalPrecision=s(u);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),l(t,0,e),l(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[(0,i.NM)(Math.ceil(t[0]/u)*u,h),(0,i.NM)(Math.floor(t[1]/u)*u,h)],t),o}function a(t){var e=Math.pow(10,(0,i.xW)(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,(0,i.NM)(n*e)}function s(t){return(0,i.p8)(t)+2}function l(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function u(t,e){return t>=e[0]&&t<=e[1]}function h(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function c(t,e){return t*(e[1]-e[0])+e[0]}},4251:(t,e,n)=>{"use strict";n.d(e,{PT:()=>l,Qj:()=>d,au:()=>g,dm:()=>u,pw:()=>h,u9:()=>s});var i=n(655),r=n(3051),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e,n,o=this;return n=o,r.isFunction(n)&&/^class\s/.test(Function.prototype.toString.call(n))?e=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o):(e=function(){(t.$constructor||o).apply(this,arguments)},r.inherits(e,this)),r.extend(e.prototype,t),e[a]=!0,e.extend=this.extend,e.superCall=p,e.superApply=f,e.superClass=o,e}}function h(t,e){t.extend=e.extend}var c=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",c++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function p(t,e){for(var n=[],i=2;i{"use strict";n.d(e,{Kr:()=>a,ZL:()=>u,cj:()=>s,jS:()=>l});var i=n(3051),r=n(4251),o=Math.round(10*Math.random());function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.each(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.each(t,(function(t){i.indexOf(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.each(l,(function(t){i.indexOf(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,h={};for(i.each(t,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(o.call(a,c,d.originalDeps.slice()),delete h[c]),i.each(d.successor,p?g:f)}i.each(h,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}}}function u(t,e){return i.merge(i.merge({},t,!0),e,!0)}},8625:(t,e,n)=>{"use strict";n.d(e,{I:()=>g});var i=Math.round(9*Math.random()),r="function"==typeof Object.defineProperty;const o=function(){function t(){this._id="__ec_inner_"+i++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return r?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var a=n(2528),s=n(3051),l=n(5669),u=n(1525),h=n(7772),c=n(3132),d=new o,p=new a.ZP(100),f=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function g(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&d.delete(t);var o=d.get(t);if(o)return o;var a=(0,s.defaults)(t,{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});"none"===a.backgroundColor&&(a.backgroundColor=null);var g={repeat:"repeat"};return function(t){for(var e,o=[n],d=!0,g=0;g{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},8988:(t,e,n)=>{"use strict";n.d(e,{A0:()=>v,F1:()=>c,Lz:()=>x,MI:()=>b,MY:()=>l,OD:()=>a,ew:()=>_,kF:()=>g,mr:()=>y,uX:()=>d,wx:()=>m,zW:()=>s});var i=n(3051),r=n(5669),o=n(5015);function a(t){if(!(0,r.kE)(t))return i.isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var l=i.normalizeCssArray,u=/([&<>"'])/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"};function c(t){return null==t?"":(t+"").replace(u,(function(t,e){return h[e]}))}function d(t,e,n){function s(t){return t&&i.trim(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,h=t instanceof Date;if(u||h){var c=u?(0,r.sG)(t):t;if(!isNaN(+c))return(0,o.WU)(c,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(h)return"-"}if("ordinal"===e)return i.isStringSafe(t)?s(t):i.isNumber(t)&&l(t)?t+"":"-";var d=(0,r.FK)(t);return l(d)?a(d):i.isStringSafe(t)?s(t):"boolean"==typeof t?t+"":"-"}var p=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(0,r.sG)(e),a=n?"getUTC":"get",s=i[a+"FullYear"](),l=i[a+"Month"]()+1,u=i[a+"Date"](),h=i[a+"Hours"](),c=i[a+"Minutes"](),d=i[a+"Seconds"](),p=i[a+"Milliseconds"]();return t=t.replace("MM",(0,o.vk)(l,2)).replace("M",l).replace("yyyy",s).replace("yy",(0,o.vk)(s%100+"",2)).replace("dd",(0,o.vk)(u,2)).replace("d",u).replace("hh",(0,o.vk)(h,2)).replace("h",h).replace("mm",(0,o.vk)(c,2)).replace("m",c).replace("ss",(0,o.vk)(d,2)).replace("s",d).replace("SSS",(0,o.vk)(p,3))}function _(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function x(t,e){return e=e||"transparent",i.isString(t)?t:i.isObject(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function b(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},1177:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Arc:()=>x.Z,BezierCurve:()=>_.Z,BoundingRect:()=>T.Z,Circle:()=>c.Z,CompoundPath:()=>b.Z,Ellipse:()=>d.Z,Group:()=>u.Z,Image:()=>l.ZP,IncrementalDisplayable:()=>C.Z,Line:()=>y.Z,LinearGradient:()=>w.Z,OrientedBoundingRect:()=>M.Z,Path:()=>a.ZP,Point:()=>A.Z,Polygon:()=>g.Z,Polyline:()=>m.Z,RadialGradient:()=>S.Z,Rect:()=>v.Z,Ring:()=>f.Z,Sector:()=>p.C,Text:()=>h.ZP,applyTransform:()=>q,clipPointsByRect:()=>$,clipRectByRect:()=>tt,createIcon:()=>et,extendPath:()=>z,extendShape:()=>k,getShapeClass:()=>Z,getTransform:()=>Y,groupTransition:()=>Q,initProps:()=>P.KZ,isElementRemoved:()=>P.eq,lineLineIntersect:()=>it,linePolygonIntersect:()=>nt,makeImage:()=>V,makePath:()=>F,mergePath:()=>H,registerShape:()=>B,removeElement:()=>P.bX,removeElementWithFadeOut:()=>P.XD,resizePath:()=>U,setTooltipConfig:()=>ot,subPixelOptimize:()=>X,subPixelOptimizeLine:()=>W,subPixelOptimizeRect:()=>j,transformDirection:()=>K,traverseElements:()=>st,updateProps:()=>P.D});var i=n(7494),r=n(2892),o=n(5280),a=n(327),s=n(7411),l=n(4535),u=n(8154),h=n(6498),c=n(9538),d=n(2797),p=n(7214),f=n(5795),g=n(5094),m=n(2514),v=n(5151),y=n(2095),_=n(4174),x=n(4826),b=n(2776),w=n(4438),S=n(6369),T=n(479),M=n(1587),A=n(1610),C=n(1754),D=n(4111),I=n(3051),L=n(106),P=n(9266),O=Math.max,E=Math.min,N={};function k(t){return a.ZP.extend(t)}var R=i.Pc;function z(t,e){return R(t,e)}function B(t,e){N[t]=e}function Z(t){if(N.hasOwnProperty(t))return N[t]}function F(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=G(n,o.getBoundingRect())),U(o,n)),o}function V(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(G(e,r))}}});return i}function G(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var H=i.AA;function U(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function W(t){return D._3(t.shape,t.shape,t.style),t}function j(t){return D.Pw(t.shape,t.shape,t.style),t}var X=D.vu;function Y(t,e){for(var n=r.identity([]);t&&t!==e;)r.mul(n,t.getLocalTransform(),n),t=t.parent;return n}function q(t,e,n){return e&&!(0,I.isArrayLike)(e)&&(e=s.ZP.getLocalTransform(e)),n&&(e=r.invert([],e)),o.applyTransform([],t,e)}function K(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=q(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function J(t){return!t.isGroup}function Q(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){J(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(J(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),(0,P.D)(t,i,n,(0,L.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,I.extend)({},t.shape)),e}}function $(t,e){return(0,I.map)(t,(function(t){var n=t[0];n=O(n,e.x),n=E(n,e.x+e.width);var i=t[1];return i=O(i,e.y),[n,i=E(i,e.y+e.height)]}))}function tt(t,e){var n=O(t.x,e.x),i=E(t.x+t.width,e.x+e.width),r=O(t.y,e.y),o=E(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function et(t,e,n){var i=(0,I.extend)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,I.defaults)(r,n),new l.ZP(i)):F(t.replace("path://",""),i,n,"center")}function nt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,m=rt(f,g,u,h)/p;if(m<0||m>1)return!1;var v=rt(f,g,c,d)/p;return!(v<0||v>1)}function rt(t,e,n,i){return t*i-n*e}function ot(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=(0,I.isString)(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&(0,I.each)((0,I.keys)(l),(function(t){(0,I.hasOwn)(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=(0,L.A)(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:(0,I.defaults)({content:i,formatterParams:s},r)}}function at(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function st(t,e){if(t)if((0,I.isArray)(t))for(var n=0;n{"use strict";n.d(e,{A:()=>i,Q:()=>r});var i=(0,n(2234).Yf)(),r=function(t,e,n,r){if(r){var o=i(r);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var o=i(r);o.seriesIndex=t,o.dataIndex=n,o.dataType=e}))}}},6172:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>c,ME:()=>p,QM:()=>g,QT:()=>_,YD:()=>m,dt:()=>v,gN:()=>l,lq:()=>d,p$:()=>f,tE:()=>y});var i=n(3051),r=n(479),o=n(5669),a=n(8988),s=i.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var c=h;i.curry(h,"vertical"),i.curry(h,"horizontal");function d(t,e,n){var i=e.width,r=e.height,s=(0,o.GM)(t.left,i),l=(0,o.GM)(t.top,r),u=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,r);return(isNaN(s)||isNaN(parseFloat(t.left)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.right)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.top)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.bottom)))&&(h=r),n=a.MY(n||0),{width:Math.max(u-s-n[1]-n[3],0),height:Math.max(h-l-n[0]-n[2],0)}}function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),h=(0,o.GM)(t.right,i),c=(0,o.GM)(t.bottom,s),d=(0,o.GM)(t.width,i),p=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],m=t.aspect;switch(isNaN(d)&&(d=i-h-g-l),isNaN(p)&&(p=s-c-f-u),null!=m&&(isNaN(d)&&isNaN(p)&&(m>i/s?d=.8*i:p=.8*s),isNaN(d)&&(d=m*p),isNaN(p)&&(p=d/m)),isNaN(l)&&(l=i-h-d-g),isNaN(u)&&(u=s-c-p-f),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-p/2-n[0];break;case"bottom":u=s-p-f}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(h||0)),isNaN(p)&&(p=s-f-u-(c||0));var v=new r.Z(l+n[3],u+n[0],d,p);return v.margin=n,v}function f(t,e,n,o,a,s){var l,u=!a||!a.hv||a.hv[0],h=!a||!a.hv||a.hv[1],c=a&&a.boundingMode||"all";if((s=s||t).x=t.x,s.y=t.y,!u&&!h)return!1;if("raw"===c)l="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var d=t.getLocalTransform();(l=l.clone()).applyTransform(d)}var f=p(i.defaults({width:l.width,height:l.height},e),n,o),g=u?f.x-l.x:0,m=h?f.y-l.y:0;return"raw"===c?(s.x=g,s.y=m):(s.x+=g,s.y+=m),s===t&&t.markRedraw(),!0}function g(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]}function m(t){var e=t.layoutMode||t.constructor.layoutMode;return i.isObject(e)?e:e?{type:e}:null}function v(t,e,n){var r=n&&n.ignoreSize;!i.isArray(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){h(e,t)&&(o[t]=l[t]=e[t]),c(o,t)&&a++,c(l,t)&&u++})),r[i])return c(e,n[1])?l[n[2]]=null:c(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var d=0;d{"use strict";n.d(e,{Sh:()=>s,ZK:()=>a,_y:()=>l});var i={},r="undefined"!=typeof console&&console.warn&&console.log;function o(t,e,n){if(r){if(n){if(i[e])return;i[e]=!0}console[t]("[ECharts] "+e)}}function a(t,e){o("warn",t,e)}function s(t){0}function l(t){throw new Error(t)}},2234:(t,e,n)=>{"use strict";n.d(e,{C4:()=>d,C6:()=>D,Cc:()=>h,Co:()=>p,HZ:()=>L,IL:()=>O,O0:()=>b,P$:()=>P,Td:()=>c,U5:()=>v,U9:()=>E,XI:()=>w,Yf:()=>T,ab:()=>f,g0:()=>x,gO:()=>S,iP:()=>I,kF:()=>u,lY:()=>_,pk:()=>k,pm:()=>A,pv:()=>N,yu:()=>y,zH:()=>C});var i=n(3051),r=n(6387),o=n(5669);function a(t,e,n){return(e-t)*n+t}var s="series\0",l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function h(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i{"use strict";n.d(e,{FK:()=>T,GM:()=>a,M9:()=>c,NM:()=>s,NU:()=>o,S$:()=>p,VR:()=>w,Xd:()=>_,YM:()=>f,ZB:()=>h,dt:()=>l,eJ:()=>d,jj:()=>A,kE:()=>M,kx:()=>b,mW:()=>m,nR:()=>S,nl:()=>D,p8:()=>u,sG:()=>y,wW:()=>g,xW:()=>x});var i=n(3051),r=1e-4;function o(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function a(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return i.isString(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function s(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function l(t){return t.sort((function(t,e){return t-e})),t}function u(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return h(t)}function h(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function c(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function d(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var o=Math.pow(10,n),a=i.map(t,(function(t){return(isNaN(t)?0:t)/r*o*100})),s=100*o,l=i.map(a,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),h=i.map(a,(function(t,e){return t-l[e]}));uc&&(c=h[p],d=p);++l[d],h[d]=0,++u}return l[e]/o}function p(t,e){var n=Math.max(u(t),u(e)),i=t+e;return n>20?i:s(i,n)}var f=9007199254740991;function g(t){var e=2*Math.PI;return(t%e+e)%e}function m(t){return t>-1e-4&&t=10&&e++,e}function b(t,e){var n=x(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function w(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function S(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i{"use strict";n.d(e,{$l:()=>Q,Av:()=>ht,C5:()=>nt,CX:()=>p,Gl:()=>k,Hg:()=>x,Ib:()=>ot,JQ:()=>b,Ki:()=>y,L1:()=>g,MA:()=>z,Mh:()=>V,Nj:()=>ut,RW:()=>dt,SJ:()=>W,SX:()=>G,T5:()=>X,UL:()=>K,VP:()=>H,WO:()=>lt,XX:()=>U,aG:()=>pt,ci:()=>et,e9:()=>gt,fD:()=>F,iK:()=>w,k5:()=>rt,oJ:()=>J,og:()=>tt,qc:()=>m,th:()=>ct,vF:()=>it,wU:()=>f,xp:()=>ft,xr:()=>$,yx:()=>_,zI:()=>q,zr:()=>v});var i=n(2528),r=n(3051),o=n(106),a=n(1092),s=n(2234),l=n(327),u=1,h={},c=(0,s.Yf)(),d=(0,s.Yf)(),p=1,f=2,g=["emphasis","blur","select"],m=["normal","emphasis","blur","select"],v=10,y="highlight",_="downplay",x="select",b="unselect",w="toggleSelect";function S(t){return null!=t&&"none"!==t}var T=new i.ZP(100);function M(t){if((0,r.isString)(t)){var e=T.get(t);return e||(e=a.lift(t,-.1),T.put(t,e)),e}if((0,r.isGradientObject)(t)){var n=(0,r.extend)({},t);return n.colorStops=(0,r.map)(t.colorStops,(function(t){return{offset:t.offset,color:a.lift(t.color,-.1)}})),n}return t}function A(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function C(t){A(t,"emphasis",f)}function D(t){t.hoverState===f&&A(t,"normal",0)}function I(t){A(t,"blur",p)}function L(t){t.hoverState===p&&A(t,"normal",0)}function P(t){t.selected=!0}function O(t){t.selected=!1}function E(t,e,n){e(t,n)}function N(t,e,n){E(t,e,n),t.isGroup&&t.traverse((function(t){E(t,e,n)}))}function k(t,e){switch(e){case"emphasis":t.hoverState=f;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.indexOf)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=c(t),u=o&&s.selectFill||s.normalFill,h=o&&s.selectStroke||s.normalStroke;if(S(u)||S(h)){var d=(i=i||{}).style||{};"inherit"===d.fill?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=u):!S(d.fill)&&S(u)?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=M(u)):!S(d.stroke)&&S(h)&&(a||(i=(0,r.extend)({},i),d=(0,r.extend)({},d)),d.stroke=M(h)),i.style=d}}if(i&&null==i.z2){a||(i=(0,r.extend)({},i));var p=t.z2EmphasisLift;i.z2=t.z2+(null!=p?p:v)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.indexOf)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function it(t,e,n){ut(t,!0),N(t,z),ot(t,e,n)}function rt(t,e,n,i){i?function(t){ut(t,!1)}(t):it(t,e,n)}function ot(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var at=["emphasis","blur","select"],st={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function lt(t,e,n,i){n=n||"itemStyle";for(var r=0;r{"use strict";n.d(e,{Cq:()=>S,Pw:()=>y,th:()=>b,zp:()=>w});var i=n(3051),r=n(327),o=n(2095),a=n(5151),s=n(9538),l=n(1177),u=n(479),h=n(423),c=n(5669),d=r.ZP.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),p=r.ZP.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),f=r.ZP.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),g=r.ZP.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),m={line:o.Z,rect:a.Z,roundRect:a.Z,square:a.Z,circle:s.Z,diamond:p,pin:f,arrow:g,triangle:d},v={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},y={};(0,i.each)(m,(function(t,e){y[e]=new t}));var _=r.ZP.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,h.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=y[i];r||(r=y[i="rect"]),v[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function x(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function b(t,e,n,i,r,o,a){var s,h=0===t.indexOf("empty");return h&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?l.makeImage(t.slice(8),new u.Z(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?l.makePath(t.slice(7),{},new u.Z(e,n,i,r),a?"center":"cover"):new _({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=h,s.setColor=x,o&&s.setColor(o),s}function w(t){return(0,i.isArray)(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function S(t,e){if(null!=t)return(0,i.isArray)(t)||(t=[t,t]),[(0,c.GM)(t[0],e[0])||0,(0,c.GM)((0,i.retrieve2)(t[1],t[0]),e[1])||0]}},270:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s,ZH:()=>l});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,h=l[o];if(l[r]!==n||h!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}function l(t,e){var n=t[e];n&&n[i]&&(n.clear&&n.clear(),t[e]=n[i])}},5015:(t,e,n)=>{"use strict";n.d(e,{$K:()=>_,CW:()=>A,En:()=>k,FW:()=>m,MV:()=>L,P5:()=>c,RZ:()=>P,Tj:()=>y,V8:()=>f,WT:()=>s,WU:()=>b,Wp:()=>D,cb:()=>B,dV:()=>u,eN:()=>R,f5:()=>N,fn:()=>I,k7:()=>w,q5:()=>T,rM:()=>z,s2:()=>h,sx:()=>M,vh:()=>E,vk:()=>v,xC:()=>x,xL:()=>O,xz:()=>C,yR:()=>l});var i=n(3051),r=n(5669),o=n(3917),a=n(1497),s=1e3,l=60*s,u=60*l,h=24*u,c=365*h,d={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}"},p="{yyyy}-{MM}-{dd}",f={year:"{yyyy}",month:"{yyyy}-{MM}",day:p,hour:"{yyyy}-{MM}-{dd} "+d.hour,minute:"{yyyy}-{MM}-{dd} "+d.minute,second:"{yyyy}-{MM}-{dd} "+d.second,millisecond:d.none},g=["year","month","day","hour","minute","second","millisecond"],m=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function _(t){return t===y(t)}function x(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function b(t,e,n,i){var s=r.sG(t),l=s[M(n)](),u=s[A(n)]()+1,h=Math.floor((u-1)/3)+1,c=s[C(n)](),d=s["get"+(n?"UTC":"")+"Day"](),p=s[D(n)](),f=(p-1)%12+1,g=s[I(n)](),m=s[L(n)](),y=s[P(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,h+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(c,2)).replace(/{d}/g,c+"").replace(/{eeee}/g,w[d]).replace(/{ee}/g,S[d]).replace(/{e}/g,d+"").replace(/{HH}/g,v(p,2)).replace(/{H}/g,p+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(m,2)).replace(/{s}/g,m+"").replace(/{SSS}/g,v(y,3)).replace(/{S}/g,y+"")}function w(t,e,n,r,o){var a=null;if(i.isString(n))a=n;else if(i.isFunction(n))a=n(t.value,e,{level:t.level});else{var s=i.extend({},d);if(t.level>0)for(var l=0;l=0;--l)if(u[h]){a=u[h];break}a=a||s.none}if(i.isArray(a)){var c=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[c=Math.min(c,a.length-1)]}}return b(new Date(t.value),a,o,r)}function S(t,e){var n=r.sG(t),i=n[A(e)]()+1,o=n[C(e)](),a=n[D(e)](),s=n[I(e)](),l=n[L(e)](),u=0===n[P(e)](),h=u&&0===l,c=h&&0===s,d=c&&0===a,p=d&&1===o;return p&&1===i?"year":p?"month":d?"day":c?"hour":h?"minute":u?"second":"millisecond"}function T(t,e,n){var o=i.isNumber(t)?r.sG(t):t;switch(e=e||S(t,n)){case"year":return o[M(n)]();case"half-year":return o[A(n)]()>=6?1:0;case"quarter":return Math.floor((o[A(n)]()+1)/4);case"month":return o[A(n)]();case"day":return o[C(n)]();case"half-day":return o[D(n)]()/24;case"hour":return o[D(n)]();case"minute":return o[I(n)]();case"second":return o[L(n)]();case"millisecond":return o[P(n)]()}}function M(t){return t?"getUTCFullYear":"getFullYear"}function A(t){return t?"getUTCMonth":"getMonth"}function C(t){return t?"getUTCDate":"getDate"}function D(t){return t?"getUTCHours":"getHours"}function I(t){return t?"getUTCMinutes":"getMinutes"}function L(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"getUTCMilliseconds":"getMilliseconds"}function O(t){return t?"setUTCFullYear":"setFullYear"}function E(t){return t?"setUTCMonth":"setMonth"}function N(t){return t?"setUTCDate":"setDate"}function k(t){return t?"setUTCHours":"setHours"}function R(t){return t?"setUTCMinutes":"setMinutes"}function z(t){return t?"setUTCSeconds":"setSeconds"}function B(t){return t?"setUTCMilliseconds":"setMilliseconds"}},4279:(t,e,n)=>{"use strict";n.d(e,{J5:()=>l,RA:()=>u,Wc:()=>c,XD:()=>o,cy:()=>r,f7:()=>i,fY:()=>h,hL:()=>s,qb:()=>a});var i=(0,n(3051).createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",h="column",c="row"},887:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});var i=n(3051),r="undefined"!=typeof Float32Array,o=r?Float32Array:Array;function a(t){return(0,i.isArray)(t)?r?new Float32Array(t):t:new o(t)}},5797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(2151),a=n(4251),s=n(2234),l=n(6357),u=n(8674),h=n(5682),c=n(1177),d=s.Yf(),p=(0,h.Z)(),f=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){(0,c.traverseElements)(this.group,t)},t.markUpdateMethod=function(t,e){d(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function g(t,e,n){t&&(0,l.Av)(t)&&("emphasis"===e?l.fD:l.Mh)(t,n)}function m(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.each)(s.kF(r),(function(e){g(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){g(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&d(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),_[l]}a.dm(f,["dispose"]),a.au(f);var _={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const x=f},3166:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8154),r=n(2151),o=n(4251),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();o.dm(a),o.au(a);const s=a},2019:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}()},6211:(t,e,n)=>{"use strict";function i(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function r(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function o(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}n.d(e,{LZ:()=>o,Or:()=>i,UL:()=>r})},531:function(t,e){ +(()=>{var t={3721:(t,e,n)=>{var i;self,t.exports=(i=n(125),(()=>{"use strict";var t={468:(t,e,n)=>{n.r(e);var i=n(83);function r(t,e,n){"object"==typeof e&&(n=e,e=null);var i,r=this;if(!(t instanceof Function))for(var s in i=[],t)t.hasOwnProperty(s)&&i.push(s);var l=function(e){if(r.apply(this,arguments),t instanceof Function?o(this,t.call(this,e)):a(this,t,i),this.constructor===l)for(var n=l.__initializers__,s=0;s=400?t.onerror&&t.onerror():t.onload&&t.onload(e.response)},t.onerror&&(e.onerror=t.onerror),e.send(null)}};var z,B={supportWebGL:function(){if(null==z)try{var t=document.createElement("canvas");if(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))throw new Error}catch(t){z=!1}return z}};B.Int8Array="undefined"==typeof Int8Array?Array:Int8Array,B.Uint8Array="undefined"==typeof Uint8Array?Array:Uint8Array,B.Uint16Array="undefined"==typeof Uint16Array?Array:Uint16Array,B.Uint32Array="undefined"==typeof Uint32Array?Array:Uint32Array,B.Int16Array="undefined"==typeof Int16Array?Array:Int16Array,B.Float32Array="undefined"==typeof Float32Array?Array:Float32Array,B.Float64Array="undefined"==typeof Float64Array?Array:Float64Array;var Z={};"undefined"!=typeof window?Z=window:void 0!==n.g&&(Z=n.g),B.requestAnimationFrame=Z.requestAnimationFrame||Z.msRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},B.createCanvas=function(){return document.createElement("canvas")},B.createImage=function(){return new Z.Image},B.request={get:R.get},B.addEventListener=function(t,e,n,i){t.addEventListener(e,n,i)},B.removeEventListener=function(t,e,n){t.removeEventListener(e,n)};const F=B;var V=function(){this.head=null,this.tail=null,this._length=0};V.prototype.insert=function(t){var e=new V.Entry(t);return this.insertEntry(e),e},V.prototype.insertAt=function(t,e){if(!(t<0)){for(var n=this.head,i=0;n&&i!=t;)n=n.next,i++;if(n){var r=new V.Entry(e),o=n.prev;o?(o.next=r,r.prev=o):this.head=r,r.next=n,n.prev=r}else this.insert(e)}},V.prototype.insertBeforeEntry=function(t,e){var n=new V.Entry(t),i=e.prev;i?(i.next=n,n.prev=i):this.head=n,n.next=e,e.prev=n,this._length++},V.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,this.tail=t):this.head=this.tail=t,this._length++},V.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._length--},V.prototype.removeAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e?(this.remove(e),e.value):void 0}},V.prototype.getHead=function(){if(this.head)return this.head.value},V.prototype.getTail=function(){if(this.tail)return this.tail.value},V.prototype.getAt=function(t){if(!(t<0)){for(var e=this.head,n=0;e&&n!=t;)e=e.next,n++;return e.value}},V.prototype.indexOf=function(t){for(var e=this.head,n=0;e;){if(e.value===t)return n;e=e.next,n++}},V.prototype.length=function(){return this._length},V.prototype.isEmpty=function(){return 0===this._length},V.prototype.forEach=function(t,e){for(var n=this.head,i=0,r=void 0!==e;n;)r?t.call(e,n.value,i):t(n.value,i),n=n.next,i++},V.prototype.clear=function(){this.tail=this.head=null,this._length=0},V.Entry=function(t){this.value=t,this.next=null,this.prev=null};const G=V;var H=function(t){this._list=new G,this._map={},this._maxSize=t||10};H.prototype.setMaxSize=function(t){this._maxSize=t},H.prototype.put=function(t,e){if(!this._map.hasOwnProperty(t)){var n=this._list.length();if(n>=this._maxSize&&n>0){var i=this._list.head;this._list.remove(i),delete this._map[i.key]}var r=this._list.insert(e);r.key=t,this._map[t]=r}},H.prototype.get=function(t){var e=this._map[t];if(this._map.hasOwnProperty(t))return e!==this._list.tail&&(this._list.remove(e),this._list.insertEntry(e)),e.value},H.prototype.remove=function(t){var e=this._map[t];void 0!==e&&(delete this._map[t],this._list.remove(e))},H.prototype.clear=function(){this._list.clear(),this._map={}};const U=H;var W={},j={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 X(t){return(t=Math.round(t))<0?0:t>255?255:t}function Y(t){return t<0?0:t>1?1:t}function q(t){return t.length&&"%"===t.charAt(t.length-1)?X(parseFloat(t)/100*255):X(parseInt(t,10))}function K(t){return t.length&&"%"===t.charAt(t.length-1)?Y(parseFloat(t)/100):Y(parseFloat(t))}function J(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Q(t,e,n){return t+(e-t)*n}function $(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function tt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var et=new U(20),nt=null;function it(t,e){nt&&tt(nt,e),nt=et.put(t,nt||e.slice())}function rt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=K(t[1]),r=K(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return $(e=e||[],X(255*J(a,o,n+1/3)),X(255*J(a,o,n)),X(255*J(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}W.parse=function(t,e){if(t){e=e||[];var n=et.get(t);if(n)return tt(e,n);var i,r=(t+="").replace(/ /g,"").toLowerCase();if(r in j)return tt(e,j[r]),it(t,e),e;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?($(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),it(t,e),e):void $(e,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?($(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),it(t,e),e):void $(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void $(e,0,0,0,1);u=K(l.pop());case"rgb":return 3!==l.length?void $(e,0,0,0,1):($(e,q(l[0]),q(l[1]),q(l[2]),u),it(t,e),e);case"hsla":return 4!==l.length?void $(e,0,0,0,1):(l[3]=K(l[3]),rt(l,e),it(t,e),e);case"hsl":return 3!==l.length?void $(e,0,0,0,1):(rt(l,e),it(t,e),e);default:return}}$(e,0,0,0,1)}},W.parseToFloat=function(t,e){if(e=W.parse(t,e))return e[0]/=255,e[1]/=255,e[2]/=255,e},W.lift=function(t,e){var n=W.parse(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return W.stringify(n,4===n.length?"rgba":"rgb")}},W.toHex=function(t){var e=W.parse(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},W.fastLerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=X(Q(a[0],s[0],l)),n[1]=X(Q(a[1],s[1],l)),n[2]=X(Q(a[2],s[2],l)),n[3]=Y(Q(a[3],s[3],l)),n}},W.fastMapToColor=W.fastLerp,W.lerp=function(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=W.parse(e[r]),s=W.parse(e[o]),l=i-r,u=W.stringify([X(Q(a[0],s[0],l)),X(Q(a[1],s[1],l)),X(Q(a[2],s[2],l)),Y(Q(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}},W.mapToColor=W.lerp,W.modifyHSL=function(t,e,n,i){if(t=W.parse(t))return t=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(t[1]=K(n)),null!=i&&(t[2]=K(i)),W.stringify(rt(t),"rgba");var r},W.modifyAlpha=function(t,e){if((t=W.parse(t))&&null!=e)return t[3]=Y(e),W.stringify(t,"rgba")},W.stringify=function(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}};var ot=W.parseToFloat,at={};function st(t){var e=Object.keys(t);e.sort();for(var n=[],i=0;i=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(t,e){if("object"==typeof t)for(var n in t){var i=t[n];this.setUniform(n,i)}else this.setUniform(t,e)},get:function(t){var e=this.uniforms[t];if(e)return e.value},attachShader:function(t,e){var n=this.uniforms;this.uniforms=t.createUniforms(),this.shader=t;var i=this.uniforms;this._enabledUniforms=Object.keys(i),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter((function(t){var e=this.uniforms[t].type;return"t"===e||"tv"===e}),this);var r=this.vertexDefines,o=this.fragmentDefines;if(this.vertexDefines=p.clone(t.vertexDefines),this.fragmentDefines=p.clone(t.fragmentDefines),e){for(var a in n)i[a]&&(i[a].value=n[a].value);p.defaults(this.vertexDefines,r),p.defaults(this.fragmentDefines,o)}var s={};for(var l in t.textures)s[l]={shaderType:t.textures[l].shaderType,type:t.textures[l].type,enabled:!(!e||!this._textureStatus[l])&&this._textureStatus[l].enabled};this._textureStatus=s,this._programKey=""},clone:function(){var t=new this.constructor({name:this.name,shader:this.shader});for(var e in this.uniforms)t.uniforms[e].value=this.uniforms[e].value;return t.depthTest=this.depthTest,t.depthMask=this.depthMask,t.transparent=this.transparent,t.blend=this.blend,t.vertexDefines=p.clone(this.vertexDefines),t.fragmentDefines=p.clone(this.fragmentDefines),t.enableTexture(this.getEnabledTextures()),t.precision=this.precision,t},define:function(t,e,n){var i=this.vertexDefines,r=this.fragmentDefines;"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<3&&(n=e,e=t,t="both"),n=null!=n?n:null,"vertex"!==t&&"both"!==t||i[e]!==n&&(i[e]=n,this._programKey=""),"fragment"!==t&&"both"!==t||r[e]!==n&&(r[e]=n,"both"!==t&&(this._programKey=""))},undefine:function(t,e){"vertex"!==t&&"fragment"!==t&&"both"!==t&&arguments.length<2&&(e=t,t="both"),"vertex"!==t&&"both"!==t||this.isDefined("vertex",e)&&(delete this.vertexDefines[e],this._programKey=""),"fragment"!==t&&"both"!==t||this.isDefined("fragment",e)&&(delete this.fragmentDefines[e],"both"!==t&&(this._programKey=""))},isDefined:function(t,e){switch(t){case"vertex":return void 0!==this.vertexDefines[e];case"fragment":return void 0!==this.fragmentDefines[e]}},getDefine:function(t,e){switch(t){case"vertex":return this.vertexDefines[e];case"fragment":return this.fragmentDefines[e]}},enableTexture:function(t){if(Array.isArray(t))for(var e=0;e0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},pt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},pt.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},pt.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},pt.random=function(t,e){e=e||1;var n=2*GLMAT_RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},pt.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},pt.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},pt.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},pt.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},pt.forEach=(ut=pt.create(),function(t,e,n,i,r,o){var a,s;for(e||(e=2),n||(n=0),s=i?Math.min(i*e+n,t.length):t.length,a=n;a0&&i.push("#define "+r.toUpperCase()+"_COUNT "+o)}if(n)for(var a=0;al.getMaxJointNumber()&&(d.USE_SKIN_MATRICES_TEXTURE=null),c+="\n"+Mt(d)+"\n"}o&&(c+="\n#define INSTANCING\n");var p=c+Mt(e.vertexDefines,s,h),f=c+Mt(e.fragmentDefines,s,h),g=p+"\n"+e.shader.vertex,m=["OES_standard_derivatives","EXT_shader_texture_lod"].filter((function(t){return null!=l.getGLExtension(t)}));m.indexOf("EXT_shader_texture_lod")>=0&&(f+="\n#define SUPPORT_TEXTURE_LOD"),m.indexOf("OES_standard_derivatives")>=0&&(f+="\n#define SUPPORT_STANDARD_DERIVATIVES");var v,y,_=function(t){for(var e=[],n=0;n=0){if(1!==s&&4!==s){Vt();break}s=2,u=[]}else if(1!==s)if(4!==s)h(c),s=0;else{var d=c;Nt.indexOf(d)>=0||kt.indexOf(d)>=0||Rt.indexOf(d)>=0?l[a].semantic=d:"ignore"===d||"unconfigurable"===d?l[a].ignore=!0:l[a].value="bool"===t?"true"===d:parseFloat(d)}else l[a].value="bool"===t?"true"===c:parseFloat(c),u=null;else{if(2!==s){Vt();break}if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else l[a].value=new F.Float32Array(u),u=null,s=5;else if(2===s){if(!(u instanceof Array)){Vt();break}u.push(+i[++o])}else s=5;else s=4;else{if(0!==s&&3!==s){Vt();break}s=1}}return l}function Ht(t,e){"object"==typeof t&&(e=t.fragment,t=t.vertex),t=Ft(t),e=Ft(e),this._shaderID=function(t,e){var n="vertex:"+t+"fragment:"+e;if(Bt[n])return Bt[n];var i=p.genGUID();return Bt[n]=i,Zt[i]={vertex:t,fragment:e},i}(t,e),this._vertexCode=Ht.parseImport(t),this._fragmentCode=Ht.parseImport(e),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}Ht.prototype={constructor:Ht,createUniforms:function(){var t={};for(var e in this.uniformTemplates){var n=this.uniformTemplates[e];t[e]={type:n.type,value:n.value()}}return t},_parseImport:function(){this._vertexCode=Ht.parseImport(this.vertex),this._fragmentCode=Ht.parseImport(this.fragment)},_addSemanticUniform:function(t,e,n){if(Nt.indexOf(n)>=0)this.attributeSemantics[n]={symbol:t,type:e};else if(Rt.indexOf(n)>=0){var i=!1,r=n;n.match(/TRANSPOSE$/)&&(i=!0,r=n.slice(0,-9)),this.matrixSemantics[n]={symbol:t,type:e,isTranspose:i,semanticNoTranspose:r}}else kt.indexOf(n)>=0&&(this.uniformSemantics[n]={symbol:t,type:e})},_addMaterialUniform:function(t,e,n,i,r,o){o[t]={type:n,value:r?Et.array:i||Et[e],semantic:null}},_parseUniforms:function(){var t={},e=this;function n(t){return null!=t?function(){return t}:null}function i(i,r,o){var a=Gt(r,o),s=[];for(var l in a){var u=a[l],h=u.semantic,c=l,d=Pt[r],p=n(a[l].value);a[l].isArray&&(c+="["+a[l].arraySize+"]",d+="v"),s.push(c),e._uniformList.push(l),u.ignore||("sampler2D"!==r&&"samplerCube"!==r||(e.textures[l]={shaderType:"fragment",type:r}),h?e._addSemanticUniform(l,d,h):e._addMaterialUniform(l,r,d,p,a[l].isArray,t))}return s.length>0?"uniform "+r+" "+s.join(",")+";\n":""}this._uniformList=[],this._vertexCode=this._vertexCode.replace(It,i),this._fragmentCode=this._fragmentCode.replace(It,i),e.matrixSemanticKeys=Object.keys(this.matrixSemantics),this.uniformTemplates=t},_parseAttributes:function(){var t={},e=this;this._vertexCode=this._vertexCode.replace(Dt,(function(n,i,r){var o=Gt(i,r),a=zt[i]||1,s=[];for(var l in o){var u=o[l].semantic;if(t[l]={type:"float",size:a,semantic:u||null},u){if(Nt.indexOf(u)<0)throw new Error('Unkown semantic "'+u+'"');e.attributeSemantics[u]={symbol:l,type:i}}s.push(l)}return"attribute "+i+" "+s.join(",")+";\n"})),this.attributes=t},_parseDefines:function(){var t=this;function e(e,n,i){var r=t.fragmentDefines;return r[n]||(r[n]="false"!==i&&("true"===i||(i?isNaN(parseFloat(i))?i.trim():parseFloat(i):null))),""}this._vertexCode=this._vertexCode.replace(Lt,e),this._fragmentCode=this._fragmentCode.replace(Lt,e)},clone:function(){var t=Zt[this._shaderID];return new Ht(t.vertex,t.fragment)}},Object.defineProperty&&(Object.defineProperty(Ht.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(Ht.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(Ht.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(Ht.prototype,"uniforms",{get:function(){return this._uniformList}}));var Ut=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;Ht.parseImport=function(t){return t.replace(Ut,(function(t,e,n){return(t=Ht.source(n))?Ht.parseImport(t):(console.error('Shader chunk "'+n+'" not existed in library'),"")}))};var Wt=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;Ht.import=function(t){t.replace(Wt,(function(t,e,n,i){if(i=i.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"")){for(var r,o=n.split("."),a=Ht.codes,s=0;s 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n gl_FragColor = vec4(0.0,0.0,0.0,1.0);\n}\n@end";var Yt={create:function(){var t=new ct(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},clone:function(t){var e=new ct(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},transpose:function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},invert:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15],y=n*s-i*a,_=n*l-r*a,x=n*u-o*a,b=i*l-r*s,w=i*u-o*s,S=r*u-o*l,T=h*g-c*f,M=h*m-d*f,C=h*v-p*f,A=c*m-d*g,I=c*v-p*g,D=d*v-p*m,L=y*D-_*I+x*A+b*C-w*M+S*T;return L?(L=1/L,t[0]=(s*D-l*I+u*A)*L,t[1]=(r*I-i*D-o*A)*L,t[2]=(g*S-m*w+v*b)*L,t[3]=(d*w-c*S-p*b)*L,t[4]=(l*C-a*D-u*M)*L,t[5]=(n*D-r*C+o*M)*L,t[6]=(m*x-f*S-v*_)*L,t[7]=(h*S-d*x+p*_)*L,t[8]=(a*I-s*C+u*T)*L,t[9]=(i*C-n*I-o*T)*L,t[10]=(f*w-g*x+v*y)*L,t[11]=(c*x-h*w-p*y)*L,t[12]=(s*M-a*A-l*T)*L,t[13]=(n*A-i*M+r*T)*L,t[14]=(g*_-f*b-m*y)*L,t[15]=(h*b-c*_+d*y)*L,t):null},adjoint:function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15];return t[0]=s*(d*v-p*m)-c*(l*v-u*m)+g*(l*p-u*d),t[1]=-(i*(d*v-p*m)-c*(r*v-o*m)+g*(r*p-o*d)),t[2]=i*(l*v-u*m)-s*(r*v-o*m)+g*(r*u-o*l),t[3]=-(i*(l*p-u*d)-s*(r*p-o*d)+c*(r*u-o*l)),t[4]=-(a*(d*v-p*m)-h*(l*v-u*m)+f*(l*p-u*d)),t[5]=n*(d*v-p*m)-h*(r*v-o*m)+f*(r*p-o*d),t[6]=-(n*(l*v-u*m)-a*(r*v-o*m)+f*(r*u-o*l)),t[7]=n*(l*p-u*d)-a*(r*p-o*d)+h*(r*u-o*l),t[8]=a*(c*v-p*g)-h*(s*v-u*g)+f*(s*p-u*c),t[9]=-(n*(c*v-p*g)-h*(i*v-o*g)+f*(i*p-o*c)),t[10]=n*(s*v-u*g)-a*(i*v-o*g)+f*(i*u-o*s),t[11]=-(n*(s*p-u*c)-a*(i*p-o*c)+h*(i*u-o*s)),t[12]=-(a*(c*m-d*g)-h*(s*m-l*g)+f*(s*d-l*c)),t[13]=n*(c*m-d*g)-h*(i*m-r*g)+f*(i*d-r*c),t[14]=-(n*(s*m-l*g)-a*(i*m-r*g)+f*(i*l-r*s)),t[15]=n*(s*d-l*c)-a*(i*d-r*c)+h*(i*l-r*s),t},determinant:function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],m=t[15];return(e*a-n*o)*(c*m-d*g)-(e*s-i*o)*(h*m-d*f)+(e*l-r*o)*(h*g-c*f)+(n*s-i*a)*(u*m-d*p)-(n*l-r*a)*(u*g-c*p)+(i*l-r*s)*(u*f-h*p)},multiply:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],g=e[12],m=e[13],v=e[14],y=e[15],_=n[0],x=n[1],b=n[2],w=n[3];return t[0]=_*i+x*s+b*c+w*g,t[1]=_*r+x*l+b*d+w*m,t[2]=_*o+x*u+b*p+w*v,t[3]=_*a+x*h+b*f+w*y,_=n[4],x=n[5],b=n[6],w=n[7],t[4]=_*i+x*s+b*c+w*g,t[5]=_*r+x*l+b*d+w*m,t[6]=_*o+x*u+b*p+w*v,t[7]=_*a+x*h+b*f+w*y,_=n[8],x=n[9],b=n[10],w=n[11],t[8]=_*i+x*s+b*c+w*g,t[9]=_*r+x*l+b*d+w*m,t[10]=_*o+x*u+b*p+w*v,t[11]=_*a+x*h+b*f+w*y,_=n[12],x=n[13],b=n[14],w=n[15],t[12]=_*i+x*s+b*c+w*g,t[13]=_*r+x*l+b*d+w*m,t[14]=_*o+x*u+b*p+w*v,t[15]=_*a+x*h+b*f+w*y,t},multiplyAffine:function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[4],s=e[5],l=e[6],u=e[8],h=e[9],c=e[10],d=e[12],p=e[13],f=e[14],g=n[0],m=n[1],v=n[2];return t[0]=g*i+m*a+v*u,t[1]=g*r+m*s+v*h,t[2]=g*o+m*l+v*c,g=n[4],m=n[5],v=n[6],t[4]=g*i+m*a+v*u,t[5]=g*r+m*s+v*h,t[6]=g*o+m*l+v*c,g=n[8],m=n[9],v=n[10],t[8]=g*i+m*a+v*u,t[9]=g*r+m*s+v*h,t[10]=g*o+m*l+v*c,g=n[12],m=n[13],v=n[14],t[12]=g*i+m*a+v*u+d,t[13]=g*r+m*s+v*h+p,t[14]=g*o+m*l+v*c+f,t}};Yt.mul=Yt.multiply,Yt.mulAffine=Yt.multiplyAffine,Yt.translate=function(t,e,n){var i,r,o,a,s,l,u,h,c,d,p,f,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],p=e[10],f=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=h,t[8]=c,t[9]=d,t[10]=p,t[11]=f,t[12]=i*g+s*m+c*v+e[12],t[13]=r*g+l*m+d*v+e[13],t[14]=o*g+u*m+p*v+e[14],t[15]=a*g+h*m+f*v+e[15]),t},Yt.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},Yt.rotate=function(t,e,n,i){var r,o,a,s,l,u,h,c,d,p,f,g,m,v,y,_,x,b,w,S,T,M,C,A,I=i[0],D=i[1],L=i[2],P=Math.sqrt(I*I+D*D+L*L);return Math.abs(P)0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},Kt.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},Kt.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},Kt.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},Kt.random=function(t,e){e=e||1;var n=2*dt()*Math.PI,i=2*dt()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t},Kt.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t},Kt.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},Kt.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Kt.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},Kt.forEach=function(){var t=Kt.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=3),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s1?0:Math.acos(r)};const Jt=Kt;jt.import(Xt);var Qt=qt.create,$t={};function te(t){return t.material}function ee(t,e,n){return e.uniforms[n].value}function ne(t,e,n,i){return n!==i}function ie(t){return!0}function re(){}var oe={float:T,byte:5120,ubyte:S,short:5122,ushort:5123};function ae(t,e,n){this.availableAttributes=t,this.availableAttributeSymbols=e,this.indicesBuffer=n,this.vao=null}function se(t){var e,n;this.bind=function(t){e||((e=F.createCanvas()).width=e.height=1,e.getContext("2d"));var i=t.gl,r=!n;r&&(n=i.createTexture()),i.bindTexture(i.TEXTURE_2D,n),r&&i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)},this.unbind=function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},this.isRenderable=function(){return!0}}var le=g.extend((function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},maxJointNumber:20,__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}}),(function(){this.canvas||(this.canvas=F.createCanvas());var t=this.canvas;try{var e={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),!this.gl)throw new Error;this._glinfo=new y(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(t){throw"Error creating WebGL Context "+t}this._programMgr=new At(this),this._placeholderTexture=new se(this)}),{resize:function(t,e){var n=this.canvas,i=this.devicePixelRatio;null!=t?(n.style&&(n.style.width=t+"px",n.style.height=e+"px"),n.width=t*i,n.height=e*i,this._width=t,this._height=e):(this._width=n.width/i,this._height=n.height/i),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var t=this.viewport;return t.width/t.height},setDevicePixelRatio:function(t){this.devicePixelRatio=t,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(t){return this._glinfo.getExtension(t)},getGLParameter:function(t){return this._glinfo.getParameter(t)},setViewport:function(t,e,n,i,r){if("object"==typeof t){var o=t;t=o.x,e=o.y,n=o.width,i=o.height,r=o.devicePixelRatio}r=r||this.devicePixelRatio,this.gl.viewport(t*r,e*r,n*r,i*r),this.viewport={x:t,y:e,width:n,height:i,devicePixelRatio:r}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var t=this._clearStack.pop();this.clearColor=t.clearColor,this.clearBit=t.clearBit}},bindSceneRendering:function(t){this._sceneRendering=t},render:function(t,e,n,i){var r=this.gl,o=this.clearColor;if(this.clearBit){r.colorMask(!0,!0,!0,!0),r.depthMask(!0);var a=this.viewport,s=!1,l=a.devicePixelRatio;(a.width!==this._width||a.height!==this._height||l&&l!==this.devicePixelRatio||a.x||a.y)&&(s=!0,r.enable(r.SCISSOR_TEST),r.scissor(a.x*l,a.y*l,a.width*l,a.height*l)),r.clearColor(o[0],o[1],o[2],o[3]),r.clear(this.clearBit),s&&r.disable(r.SCISSOR_TEST)}if(n||t.update(!1),t.updateLights(),e=e||t.getMainCamera()){e.update();var u=t.updateRenderList(e,!0);this._sceneRendering=t;var h=u.opaque,c=u.transparent,d=t.material;t.trigger("beforerender",this,t,e,u),i?(this.renderPreZ(h,t,e),r.depthFunc(r.LEQUAL)):r.depthFunc(r.LESS);for(var p=Qt(),f=Jt.create(),g=0;g0){var s=t[r-1],l=s.joints?s.joints.length:0;if((o.joints?o.joints.length:0)===l&&o.material===s.material&&o.lightGroup===s.lightGroup){o.__program=s.__program;continue}}var u=this._programMgr.getProgram(o,a,e);this.validateProgram(u),o.__program=u}},renderPass:function(t,e,n){this.trigger("beforerenderpass",this,t,e,n),(n=n||{}).getMaterial=n.getMaterial||te,n.getUniform=n.getUniform||ee,n.isMaterialChanged=n.isMaterialChanged||ne,n.beforeRender=n.beforeRender||re,n.afterRender=n.afterRender||re;var i=n.ifRender||ie;this.updatePrograms(t,this._sceneRendering,n),n.sortCompare&&t.sort(n.sortCompare);var r=this.viewport,o=r.devicePixelRatio,a=[r.x*o,r.y*o,r.width*o,r.height*o],s=this.devicePixelRatio,l=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*s,this._height*s],u=[a[2],a[3]],h=Date.now();e?(qt.copy(ue.VIEW,e.viewMatrix.array),qt.copy(ue.PROJECTION,e.projectionMatrix.array),qt.copy(ue.VIEWINVERSE,e.worldTransform.array)):(qt.identity(ue.VIEW),qt.identity(ue.PROJECTION),qt.identity(ue.VIEWINVERSE)),qt.multiply(ue.VIEWPROJECTION,ue.PROJECTION,ue.VIEW),qt.invert(ue.PROJECTIONINVERSE,ue.PROJECTION),qt.invert(ue.VIEWPROJECTIONINVERSE,ue.VIEWPROJECTION);for(var c,d,p,f,g,m,v,y,_,x,b,w,S=this.gl,T=this._sceneRendering,M=0;Mthis.getMaxJointNumber()){var o=r.getSubSkinMatricesTexture(t.__uid__,t.joints);e.useTextureSlot(this,o,n),e.setUniform(i,"1i","skinMatricesTexture",n),e.setUniform(i,"1f","skinMatricesTextureSize",o.width)}else{var a=r.getSubSkinMatrices(t.__uid__,t.joints);e.setUniformOfSemantic(i,"SKIN_MATRIX",a)}},_renderObject:function(t,e,n){var i=this.gl,r=t.geometry,o=t.mode;null==o&&(o=4);var a=null,s=t.isInstancedMesh&&t.isInstancedMesh();if(!s||(a=this.getGLExtension("ANGLE_instanced_arrays"))){var l;if(s&&(l=this._bindInstancedAttributes(t,n,a)),e.indicesBuffer){var u=this.getGLExtension("OES_element_index_uint")&&r.indices instanceof Uint32Array?i.UNSIGNED_INT:i.UNSIGNED_SHORT;s?a.drawElementsInstancedANGLE(o,e.indicesBuffer.count,u,0,t.getInstanceCount()):i.drawElements(o,e.indicesBuffer.count,u,0)}else s?a.drawArraysInstancedANGLE(o,0,r.vertexCount,t.getInstanceCount()):i.drawArrays(o,0,r.vertexCount);if(s)for(var h=0;hn?n:t}ce.add=function(t,e,n){return Jt.add(t.array,e.array,n.array),t._dirty=!0,t},ce.set=function(t,e,n,i){Jt.set(t.array,e,n,i),t._dirty=!0},ce.copy=function(t,e){return Jt.copy(t.array,e.array),t._dirty=!0,t},ce.cross=function(t,e,n){return Jt.cross(t.array,e.array,n.array),t._dirty=!0,t},ce.distance=ce.dist=function(t,e){return Jt.distance(t.array,e.array)},ce.divide=ce.div=function(t,e,n){return Jt.divide(t.array,e.array,n.array),t._dirty=!0,t},ce.dot=function(t,e){return Jt.dot(t.array,e.array)},ce.len=function(t){return Jt.length(t.array)},ce.lerp=function(t,e,n,i){return Jt.lerp(t.array,e.array,n.array,i),t._dirty=!0,t},ce.min=function(t,e,n){return Jt.min(t.array,e.array,n.array),t._dirty=!0,t},ce.max=function(t,e,n){return Jt.max(t.array,e.array,n.array),t._dirty=!0,t},ce.multiply=ce.mul=function(t,e,n){return Jt.multiply(t.array,e.array,n.array),t._dirty=!0,t},ce.negate=function(t,e){return Jt.negate(t.array,e.array),t._dirty=!0,t},ce.normalize=function(t,e){return Jt.normalize(t.array,e.array),t._dirty=!0,t},ce.random=function(t,e){return Jt.random(t.array,e),t._dirty=!0,t},ce.scale=function(t,e,n){return Jt.scale(t.array,e.array,n),t._dirty=!0,t},ce.scaleAndAdd=function(t,e,n,i){return Jt.scaleAndAdd(t.array,e.array,n.array,i),t._dirty=!0,t},ce.squaredDistance=ce.sqrDist=function(t,e){return Jt.sqrDist(t.array,e.array)},ce.squaredLength=ce.sqrLen=function(t){return Jt.sqrLen(t.array)},ce.subtract=ce.sub=function(t,e,n){return Jt.subtract(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat3=function(t,e,n){return Jt.transformMat3(t.array,e.array,n.array),t._dirty=!0,t},ce.transformMat4=function(t,e,n){return Jt.transformMat4(t.array,e.array,n.array),t._dirty=!0,t},ce.transformQuat=function(t,e,n){return Jt.transformQuat(t.array,e.array,n.array),t._dirty=!0,t};var ge=Math.atan2,me=Math.asin,ve=Math.abs;ce.eulerFromQuat=function(t,e,n){t._dirty=!0,e=e.array;var i=t.array,r=e[0],o=e[1],a=e[2],s=e[3],l=r*r,u=o*o,h=a*a,c=s*s;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":i[0]=ge(2*(r*s-o*a),c-l-u+h),i[1]=me(fe(2*(r*a+o*s),-1,1)),i[2]=ge(2*(a*s-r*o),c+l-u-h);break;case"YXZ":i[0]=me(fe(2*(r*s-o*a),-1,1)),i[1]=ge(2*(r*a+o*s),c-l-u+h),i[2]=ge(2*(r*o+a*s),c-l+u-h);break;case"ZXY":i[0]=me(fe(2*(r*s+o*a),-1,1)),i[1]=ge(2*(o*s-a*r),c-l-u+h),i[2]=ge(2*(a*s-r*o),c-l+u-h);break;case"ZYX":i[0]=ge(2*(r*s+a*o),c-l-u+h),i[1]=me(fe(2*(o*s-r*a),-1,1)),i[2]=ge(2*(r*o+a*s),c+l-u-h);break;case"YZX":i[0]=ge(2*(r*s-a*o),c-l+u-h),i[1]=ge(2*(o*s-r*a),c+l-u-h),i[2]=me(fe(2*(r*o+a*s),-1,1));break;case"XZY":i[0]=ge(2*(r*s+o*a),c-l+u-h),i[1]=ge(2*(r*a+o*s),c+l-u-h),i[2]=me(fe(2*(a*s-r*o),-1,1));break;default:console.warn("Unkown order: "+n)}return t},ce.eulerFromMat3=function(t,e,n){var i=e.array,r=i[0],o=i[3],a=i[6],s=i[1],l=i[4],u=i[7],h=i[2],c=i[5],d=i[8],p=t.array;switch(n=(n||"XYZ").toUpperCase()){case"XYZ":p[1]=me(fe(a,-1,1)),ve(a)<.99999?(p[0]=ge(-u,d),p[2]=ge(-o,r)):(p[0]=ge(c,l),p[2]=0);break;case"YXZ":p[0]=me(-fe(u,-1,1)),ve(u)<.99999?(p[1]=ge(a,d),p[2]=ge(s,l)):(p[1]=ge(-h,r),p[2]=0);break;case"ZXY":p[0]=me(fe(c,-1,1)),ve(c)<.99999?(p[1]=ge(-h,d),p[2]=ge(-o,l)):(p[1]=0,p[2]=ge(s,r));break;case"ZYX":p[1]=me(-fe(h,-1,1)),ve(h)<.99999?(p[0]=ge(c,d),p[2]=ge(s,r)):(p[0]=0,p[2]=ge(-o,l));break;case"YZX":p[2]=me(fe(s,-1,1)),ve(s)<.99999?(p[0]=ge(-u,l),p[1]=ge(-h,r)):(p[0]=0,p[1]=ge(a,d));break;case"XZY":p[2]=me(-fe(o,-1,1)),ve(o)<.99999?(p[0]=ge(c,l),p[1]=ge(a,r)):(p[0]=ge(-u,d),p[1]=0);break;default:console.warn("Unkown order: "+n)}return t._dirty=!0,t},Object.defineProperties(ce,{POSITIVE_X:{get:function(){return new ce(1,0,0)}},NEGATIVE_X:{get:function(){return new ce(-1,0,0)}},POSITIVE_Y:{get:function(){return new ce(0,1,0)}},NEGATIVE_Y:{get:function(){return new ce(0,-1,0)}},POSITIVE_Z:{get:function(){return new ce(0,0,1)}},NEGATIVE_Z:{get:function(){return new ce(0,0,-1)}},UP:{get:function(){return new ce(0,1,0)}},ZERO:{get:function(){return new ce}}});const ye=ce;var _e,xe,be,we,Se,Te=function(t,e){this.origin=t||new ye,this.direction=e||new ye};Te.prototype={constructor:Te,intersectPlane:function(t,e){var n=t.normal.array,i=t.distance,r=this.origin.array,o=this.direction.array,a=Jt.dot(n,o);if(0===a)return null;e||(e=new ye);var s=(Jt.dot(n,r)-i)/a;return Jt.scaleAndAdd(e.array,r,o,-s),e._dirty=!0,e},mirrorAgainstPlane:function(t){var e=Jt.dot(t.normal.array,this.direction.array);Jt.scaleAndAdd(this.direction.array,this.direction.array,t.normal.array,2*-e),this.direction._dirty=!0},distanceToPoint:(Se=Jt.create(),function(t){Jt.sub(Se,t,this.origin.array);var e=Jt.dot(Se,this.direction.array);if(e<0)return Jt.distance(this.origin.array,t);var n=Jt.lenSquared(Se);return Math.sqrt(n-e*e)}),intersectSphere:function(){var t=Jt.create();return function(e,n,i){var r=this.origin.array,o=this.direction.array;e=e.array,Jt.sub(t,e,r);var a=Jt.dot(t,o),s=Jt.squaredLength(t)-a*a,l=n*n;if(!(s>l)){var u=Math.sqrt(l-s),h=a-u,c=a+u;return i||(i=new ye),h<0?c<0?null:(Jt.scaleAndAdd(i.array,r,o,c),i):(Jt.scaleAndAdd(i.array,r,o,h),i)}}}(),intersectBoundingBox:function(t,e){var n,i,r,o,a,s,l=this.direction.array,u=this.origin.array,h=t.min.array,c=t.max.array,d=1/l[0],p=1/l[1],f=1/l[2];if(d>=0?(n=(h[0]-u[0])*d,i=(c[0]-u[0])*d):(i=(h[0]-u[0])*d,n=(c[0]-u[0])*d),p>=0?(r=(h[1]-u[1])*p,o=(c[1]-u[1])*p):(o=(h[1]-u[1])*p,r=(c[1]-u[1])*p),n>o||r>i)return null;if((r>n||n!=n)&&(n=r),(o=0?(a=(h[2]-u[2])*f,s=(c[2]-u[2])*f):(s=(h[2]-u[2])*f,a=(c[2]-u[2])*f),n>s||a>i)return null;if((a>n||n!=n)&&(n=a),(s=0?n:i;return e||(e=new ye),Jt.scaleAndAdd(e.array,u,l,g),e},intersectTriangle:(_e=Jt.create(),xe=Jt.create(),be=Jt.create(),we=Jt.create(),function(t,e,n,i,r,o){var a=this.direction.array,s=this.origin.array;t=t.array,e=e.array,n=n.array,Jt.sub(_e,e,t),Jt.sub(xe,n,t),Jt.cross(we,xe,a);var l=Jt.dot(_e,we);if(i){if(l>-1e-5)return null}else if(l>-1e-5&&l<1e-5)return null;Jt.sub(be,s,t);var u=Jt.dot(we,be)/l;if(u<0||u>1)return null;Jt.cross(we,_e,be);var h=Jt.dot(a,we)/l;if(h<0||h>1||u+h>1)return null;Jt.cross(we,_e,xe);var c=-Jt.dot(be,we)/l;return c<0?null:(r||(r=new ye),o&&ye.set(o,1-u-h,u,h),Jt.scaleAndAdd(r.array,s,a,c),r)}),applyTransform:function(t){ye.add(this.direction,this.direction,this.origin),ye.transformMat4(this.origin,this.origin,t),ye.transformMat4(this.direction,this.direction,t),ye.sub(this.direction,this.direction,this.origin),ye.normalize(this.direction,this.direction)},copy:function(t){ye.copy(this.origin,t.origin),ye.copy(this.direction,t.direction)},clone:function(){var t=new Te;return t.copy(this),t}};const Me=Te;var Ce={create:function(){var t=new ct(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},clone:function(t){var e=new ct(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},fromValues:function(t,e,n,i){var r=new ct(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},set:function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},subtract:function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}};Ce.sub=Ce.subtract,Ce.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},Ce.mul=Ce.multiply,Ce.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},Ce.div=Ce.divide,Ce.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},Ce.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},Ce.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},Ce.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},Ce.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},Ce.dist=Ce.distance,Ce.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},Ce.sqrDist=Ce.squaredDistance,Ce.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},Ce.len=Ce.length,Ce.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},Ce.sqrLen=Ce.squaredLength,Ce.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},Ce.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},Ce.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},Ce.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},Ce.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},Ce.random=function(t,e){return e=e||1,t[0]=dt(),t[1]=dt(),t[2]=dt(),t[3]=dt(),Ce.normalize(t,t),Ce.scale(t,t,e),t},Ce.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},Ce.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],h=u*i+s*o-l*r,c=u*r+l*i-a*o,d=u*o+a*r-s*i,p=-a*i-s*r-l*o;return t[0]=h*u+p*-a+c*-l-d*-s,t[1]=c*u+p*-s+d*-a-h*-l,t[2]=d*u+p*-l+h*-s-c*-a,t},Ce.forEach=function(){var t=Ce.create();return function(e,n,i,r,o,a){var s,l;for(n||(n=4),i||(i=0),l=r?Math.min(r*n+i,e.length):e.length,s=i;s.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(Jt.cross(Le,e,n),t[0]=Le[0],t[1]=Le[1],t[2]=Le[2],t[3]=1+i,Ne.normalize(t,t))}),Ne.setAxes=(Ee=De.create(),function(t,e,n,i){return Ee[0]=n[0],Ee[3]=n[1],Ee[6]=n[2],Ee[1]=i[0],Ee[4]=i[1],Ee[7]=i[2],Ee[2]=-e[0],Ee[5]=-e[1],Ee[8]=-e[2],Ne.normalize(t,Ne.fromMat3(t,Ee))}),Ne.clone=Ae.clone,Ne.fromValues=Ae.fromValues,Ne.copy=Ae.copy,Ne.set=Ae.set,Ne.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},Ne.setAxisAngle=function(t,e,n){n*=.5;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},Ne.add=Ae.add,Ne.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],h=n[3];return t[0]=i*h+a*s+r*u-o*l,t[1]=r*h+a*l+o*s-i*u,t[2]=o*h+a*u+i*l-r*s,t[3]=a*h-i*s-r*l-o*u,t},Ne.mul=Ne.multiply,Ne.scale=Ae.scale,Ne.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+a*s,t[1]=r*l+o*s,t[2]=o*l-r*s,t[3]=a*l-i*s,t},Ne.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l-o*s,t[1]=r*l+a*s,t[2]=o*l+i*s,t[3]=a*l-r*s,t},Ne.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),l=Math.cos(n);return t[0]=i*l+r*s,t[1]=r*l-i*s,t[2]=o*l+a*s,t[3]=a*l-o*s,t},Ne.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},Ne.dot=Ae.dot,Ne.lerp=Ae.lerp,Ne.slerp=function(t,e,n,i){var r,o,a,s,l,u=e[0],h=e[1],c=e[2],d=e[3],p=n[0],f=n[1],g=n[2],m=n[3];return(o=u*p+h*f+c*g+d*m)<0&&(o=-o,p=-p,f=-f,g=-g,m=-m),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,l=Math.sin(i*r)/a):(s=1-i,l=i),t[0]=s*u+l*p,t[1]=s*h+l*f,t[2]=s*c+l*g,t[3]=s*d+l*m,t},Ne.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},Ne.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},Ne.length=Ae.length,Ne.len=Ne.length,Ne.squaredLength=Ae.squaredLength,Ne.sqrLen=Ne.squaredLength,Ne.normalize=Ae.normalize,Ne.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t};const ke=Ne;var Re,ze,Be,Ze,Fe=function(){this._axisX=new ye,this._axisY=new ye,this._axisZ=new ye,this.array=qt.create(),this._dirty=!0};Fe.prototype={constructor:Fe,setArray:function(t){for(var e=0;e0){var e=this.min,n=this.max,i=e.array,r=n.array;en(i,t[0]),en(r,t[0]);for(var o=1;or[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1]),a[2]>r[2]&&(r[2]=a[2])}e._dirty=!0,n._dirty=!0}},union:function(t){var e=this.min,n=this.max;return Jt.min(e.array,e.array,t.min.array),Jt.max(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersection:function(t){var e=this.min,n=this.max;return Jt.max(e.array,e.array,t.min.array),Jt.min(n.array,n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},intersectBoundingBox:function(t){var e=this.min.array,n=this.max.array,i=t.min.array,r=t.max.array;return!(e[0]>r[0]||e[1]>r[1]||e[2]>r[2]||n[0]=r[0]&&n[1]>=r[1]&&n[2]>=r[2]},containPoint:function(t){var e=this.min.array,n=this.max.array,i=t.array;return e[0]<=i[0]&&e[1]<=i[1]&&e[2]<=i[2]&&n[0]>=i[0]&&n[1]>=i[1]&&n[2]>=i[2]},isFinite:function(){var t=this.min.array,e=this.max.array;return isFinite(t[0])&&isFinite(t[1])&&isFinite(t[2])&&isFinite(e[0])&&isFinite(e[1])&&isFinite(e[2])},applyTransform:function(t){this.transformFrom(this,t)},transformFrom:(Ye=Jt.create(),qe=Jt.create(),Ke=Jt.create(),Je=Jt.create(),Qe=Jt.create(),$e=Jt.create(),function(t,e){var n=t.min.array,i=t.max.array,r=e.array;return Ye[0]=r[0]*n[0],Ye[1]=r[1]*n[0],Ye[2]=r[2]*n[0],qe[0]=r[0]*i[0],qe[1]=r[1]*i[0],qe[2]=r[2]*i[0],Ke[0]=r[4]*n[1],Ke[1]=r[5]*n[1],Ke[2]=r[6]*n[1],Je[0]=r[4]*i[1],Je[1]=r[5]*i[1],Je[2]=r[6]*i[1],Qe[0]=r[8]*n[2],Qe[1]=r[9]*n[2],Qe[2]=r[10]*n[2],$e[0]=r[8]*i[2],$e[1]=r[9]*i[2],$e[2]=r[10]*i[2],n=this.min.array,i=this.max.array,n[0]=Math.min(Ye[0],qe[0])+Math.min(Ke[0],Je[0])+Math.min(Qe[0],$e[0])+r[12],n[1]=Math.min(Ye[1],qe[1])+Math.min(Ke[1],Je[1])+Math.min(Qe[1],$e[1])+r[13],n[2]=Math.min(Ye[2],qe[2])+Math.min(Ke[2],Je[2])+Math.min(Qe[2],$e[2])+r[14],i[0]=Math.max(Ye[0],qe[0])+Math.max(Ke[0],Je[0])+Math.max(Qe[0],$e[0])+r[12],i[1]=Math.max(Ye[1],qe[1])+Math.max(Ke[1],Je[1])+Math.max(Qe[1],$e[1])+r[13],i[2]=Math.max(Ye[2],qe[2])+Math.max(Ke[2],Je[2])+Math.max(Qe[2],$e[2])+r[14],this.min._dirty=!0,this.max._dirty=!0,this}),applyProjection:function(t){var e=this.min.array,n=this.max.array,i=t.array,r=e[0],o=e[1],a=e[2],s=n[0],l=n[1],u=e[2],h=n[0],c=n[1],d=n[2];if(1===i[15])e[0]=i[0]*r+i[12],e[1]=i[5]*o+i[13],n[2]=i[10]*a+i[14],n[0]=i[0]*h+i[12],n[1]=i[5]*c+i[13],e[2]=i[10]*d+i[14];else{var p=-1/a;e[0]=i[0]*r*p,e[1]=i[5]*o*p,n[2]=(i[10]*a+i[14])*p,p=-1/u,n[0]=i[0]*s*p,n[1]=i[5]*l*p,p=-1/d,e[2]=(i[10]*d+i[14])*p}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var t=this.vertices;if(!t){t=[];for(var e=0;e<8;e++)t[e]=Jt.fromValues(0,0,0);this.vertices=t}var n=this.min.array,i=this.max.array;return tn(t[0],n[0],n[1],n[2]),tn(t[1],n[0],i[1],n[2]),tn(t[2],i[0],n[1],n[2]),tn(t[3],i[0],i[1],n[2]),tn(t[4],n[0],n[1],i[2]),tn(t[5],n[0],i[1],i[2]),tn(t[6],i[0],n[1],i[2]),tn(t[7],i[0],i[1],i[2]),this},copy:function(t){var e=this.min,n=this.max;return en(e.array,t.min.array),en(n.array,t.max.array),e._dirty=!0,n._dirty=!0,this},clone:function(){var t=new nn;return t.copy(this),t}};const rn=nn;var on,an,sn=0;const ln=g.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},(function(){this.name||(this.name=(this.type||"NODE")+"_"+sn++),this.position||(this.position=new ye),this.rotation||(this.rotation=new Xe),this.scale||(this.scale=new ye(1,1,1)),this.worldTransform=new He,this.localTransform=new He,this._children=[]}),{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(t){var e=this._scene;if(e){var n=e._nodeRepository;delete n[this.name],n[t]=this}this.name=t},add:function(t){var e=t._parent;if(e!==this){e&&e.remove(t),t._parent=this,this._children.push(t);var n=this._scene;n&&n!==t.scene&&t.traverse(this._addSelfToScene,this),t._needsUpdateWorldTransform=!0}},remove:function(t){var e=this._children,n=e.indexOf(t);n<0||(e.splice(n,1),t._parent=null,this._scene&&t.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var t=this._children,e=0;e0},beforeRender:function(t){},afterRender:function(t,e){},getBoundingBox:function(t,e){return e=ln.prototype.getBoundingBox.call(this,t,e),this.geometry&&this.geometry.boundingBox&&e.union(this.geometry.boundingBox),e},clone:(un=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"],function(){var t=ln.prototype.clone.call(this);t.geometry=this.geometry,t.material=this.material;for(var e=0;e=0&&m[f]>1e-4&&(Jt.transformMat4(S,g,d[v[f]]),Jt.scaleAndAdd(y,y,S,m[f]));T.set(p,y)}}for(p=0;p>e;return t+1},dispose:function(t){var e=this._cache;e.use(t.__uid__);var n=e.get("webgl_texture");n&&t.gl.deleteTexture(n),e.deleteContext(t.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(wn.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t}}),Object.defineProperty(wn.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t}}),wn.BYTE=5120,wn.UNSIGNED_BYTE=S,wn.SHORT=5122,wn.UNSIGNED_SHORT=5123,wn.INT=5124,wn.UNSIGNED_INT=5125,wn.FLOAT=T,wn.HALF_FLOAT=36193,wn.UNSIGNED_INT_24_8_WEBGL=34042,wn.DEPTH_COMPONENT=M,wn.DEPTH_STENCIL=34041,wn.ALPHA=6406,wn.RGB=6407,wn.RGBA=C,wn.LUMINANCE=6409,wn.LUMINANCE_ALPHA=6410,wn.SRGB=35904,wn.SRGB_ALPHA=35906,wn.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,wn.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,wn.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,wn.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,wn.NEAREST=A,wn.LINEAR=I,wn.NEAREST_MIPMAP_NEAREST=D,wn.LINEAR_MIPMAP_NEAREST=L,wn.NEAREST_MIPMAP_LINEAR=P,wn.LINEAR_MIPMAP_LINEAR=O,wn.REPEAT=E,wn.CLAMP_TO_EDGE=N,wn.MIRRORED_REPEAT=33648;const Sn=wn;var Tn=cn.extend({skeleton:null,joints:null},(function(){this.joints||(this.joints=[])}),{offsetMatrix:null,isInstancedMesh:function(){return!1},isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},clone:function(){var t=cn.prototype.clone.call(this);return t.skeleton=this.skeleton,this.joints&&(t.joints=this.joints.slice()),t}});Tn.POINTS=0,Tn.LINES=1,Tn.LINE_LOOP=2,Tn.LINE_STRIP=3,Tn.TRIANGLES=4,Tn.TRIANGLE_STRIP=5,Tn.TRIANGLE_FAN=6,Tn.BACK=x,Tn.FRONT=_,Tn.FRONT_AND_BACK=1032,Tn.CW=b,Tn.CCW=w;const Mn=Tn,Cn={isPowerOfTwo:function(t){return 0==(t&t-1)},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}};var An=Cn.isPowerOfTwo;function In(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}var Dn=Sn.extend((function(){return{image:null,pixels:null,mipmaps:[],convertToPOT:!1}}),{textureType:"texture2D",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type,r=!(!this.convertToPOT||this.mipmaps.length||!this.image||this.wrapS!==Sn.REPEAT&&this.wrapT!==Sn.REPEAT||!this.NPOT);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r?this.wrapS:this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,r?this.wrapT:this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r?this.magFilter:this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r?this.minFilter:this.getAvailableMinFilter());var o=t.getGLExtension("EXT_texture_filter_anisotropic");if(o&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_2D,o.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var a=this.width,s=this.height,l=0;l=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT?t.compressedTexImage2D(t.TEXTURE_2D,n,o,i,r,0,e.pixels):t.texImage2D(t.TEXTURE_2D,n,o,i,r,0,o,a,e.pixels)},generateMipmap:function(t){var e=t.gl;this.useMipmap&&!this.NPOT&&(e.bindTexture(e.TEXTURE_2D,this._cache.get("webgl_texture")),e.generateMipmap(e.TEXTURE_2D))},isPowerOfTwo:function(){return An(this.width)&&An(this.height)},isRenderable:function(){return this.image?this.image.width>0&&this.image.height>0:!(!this.width||!this.height)},bind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,this.getWebGLTexture(t))},unbind:function(t){t.gl.bindTexture(t.gl.TEXTURE_2D,null)},load:function(t,e){var n=F.createImage();e&&(n.crossOrigin=e);var i=this;return n.onload=function(){i.dirty(),i.trigger("success",i)},n.onerror=function(){i.trigger("error",i)},n.src=t,this.image=n,this}});Object.defineProperty(Dn.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(t){this.image?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Dn.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(t){this.image?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ln=Dn;function Pn(t){return{byte:F.Int8Array,ubyte:F.Uint8Array,short:F.Int16Array,ushort:F.Uint16Array}[t]||F.Float32Array}function On(t){return"attr_"+t}function En(t,e,n,i){switch(this.name=t,this.type=e,this.size=n,this.semantic=i||"",this.value=null,n){case 1:this.get=function(t){return this.value[t]},this.set=function(t,e){this.value[t]=e},this.copy=function(t,e){this.value[t]=this.value[t]};break;case 2:this.get=function(t,e){var n=this.value;return e[0]=n[2*t],e[1]=n[2*t+1],e},this.set=function(t,e){var n=this.value;n[2*t]=e[0],n[2*t+1]=e[1]},this.copy=function(t,e){var n=this.value;e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]};break;case 3:this.get=function(t,e){var n=3*t,i=this.value;return e[0]=i[n],e[1]=i[n+1],e[2]=i[n+2],e},this.set=function(t,e){var n=3*t,i=this.value;i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2]},this.copy=function(t,e){var n=this.value;e*=3,n[t*=3]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2]};break;case 4:this.get=function(t,e){var n=this.value,i=4*t;return e[0]=n[i],e[1]=n[i+1],e[2]=n[i+2],e[3]=n[i+3],e},this.set=function(t,e){var n=this.value,i=4*t;n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3]},this.copy=function(t,e){var n=this.value;e*=4,n[t*=4]=n[e],n[t+1]=n[e+1],n[t+2]=n[e+2],n[t+3]=n[e+3]}}}function Nn(t,e,n,i,r){this.name=t,this.type=e,this.buffer=n,this.size=i,this.semantic=r,this.symbol="",this.needsRemove=!1}function kn(t){this.buffer=t,this.count=0}En.prototype.init=function(t){if(!this.value||this.value.length!==t*this.size){var e=Pn(this.type);this.value=new e(t*this.size)}},En.prototype.fromArray=function(t){var e,n=Pn(this.type);if(t[0]&&t[0].length){var i=0,r=this.size;e=new n(t.length*r);for(var o=0;o=0){e||(e=[]);var n=this.indices;return e[0]=n[3*t],e[1]=n[3*t+1],e[2]=n[3*t+2],e}},setTriangleIndices:function(t,e){var n=this.indices;n[3*t]=e[0],n[3*t+1]=e[1],n[3*t+2]=e[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(t){var e,n=this.vertexCount>65535?F.Uint32Array:F.Uint16Array;if(t[0]&&t[0].length){var i=0;e=new n(3*t.length);for(var r=0;r=0&&(e.splice(n,1),delete this.attributes[t],!0)},getAttribute:function(t){return this.attributes[t]},getEnabledAttributes:function(){var t=this._enabledAttributes,e=this._attributeList;if(t)return t;for(var n=[],i=this.vertexCount,r=0;ro[0]&&(o[0]=s),l>o[1]&&(o[1]=l),u>o[2]&&(o[2]=u)}n._dirty=!0,i._dirty=!0}},generateVertexNormals:function(){if(this.vertexCount){var t=this.indices,e=this.attributes,n=e.position.value,i=e.normal.value;if(i&&i.length===n.length)for(var r=0;r65535&&(this.indices=new F.Uint32Array(this.indices));for(var t=this.attributes,e=this.indices,n=this.getEnabledAttributes(),i={},r=0;rthis.distance,r=1;r<8;r++)if(Jt.dot(e[r].array,n)>this.distance!=i)return!0},intersectLine:(Qn=Jt.create(),function(t,e,n){var i=this.distanceToPoint(t),r=this.distanceToPoint(e);if(i>0&&r>0||i<0&&r<0)return null;var o=this.normal.array,a=this.distance,s=t.array;Jt.sub(Qn,e.array,t.array),Jt.normalize(Qn,Qn);var l=Jt.dot(o,Qn);if(0===l)return null;n||(n=new ye);var u=(Jt.dot(o,s)-a)/l;return Jt.scaleAndAdd(n.array,s,Qn,-u),n._dirty=!0,n}),applyTransform:(qn=qt.create(),Kn=Ae.create(),Jn=Ae.create(),Jn[3]=1,function(t){t=t.array,Jt.scale(Jn,this.normal.array,this.distance),Ae.transformMat4(Jn,Jn,t),this.distance=Jt.dot(Jn,this.normal.array),qt.invert(qn,t),qt.transpose(qn,qn),Kn[3]=0,Jt.copy(Kn,this.normal.array),Ae.transformMat4(Kn,Kn,qn),Jt.copy(this.normal.array,Kn)}),copy:function(t){Jt.copy(this.normal.array,t.normal.array),this.normal._dirty=!0,this.distance=t.distance},clone:function(){var t=new $n;return t.copy(this),t}};const ti=$n;var ei,ni=Jt.set,ii=Jt.copy,ri=Jt.transformMat4,oi=Math.min,ai=Math.max,si=function(){this.planes=[];for(var t=0;t<6;t++)this.planes.push(new ti);for(this.boundingBox=new rn,this.vertices=[],t=0;t<8;t++)this.vertices[t]=Jt.fromValues(0,0,0)};si.prototype={setFromProjection:function(t){var e=this.planes,n=t.array,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],h=n[7],c=n[8],d=n[9],p=n[10],f=n[11],g=n[12],m=n[13],v=n[14],y=n[15];ni(e[0].normal.array,a-i,h-s,f-c),e[0].distance=-(y-g),e[0].normalize(),ni(e[1].normal.array,a+i,h+s,f+c),e[1].distance=-(y+g),e[1].normalize(),ni(e[2].normal.array,a+r,h+l,f+d),e[2].distance=-(y+m),e[2].normalize(),ni(e[3].normal.array,a-r,h-l,f-d),e[3].distance=-(y-m),e[3].normalize(),ni(e[4].normal.array,a-o,h-u,f-p),e[4].distance=-(y-v),e[4].normalize(),ni(e[5].normal.array,a+o,h+u,f+p),e[5].distance=-(y+v),e[5].normalize();var _=this.boundingBox,x=this.vertices;if(0===y){var b=l/i,w=-v/(p-1),S=-v/(p+1),T=-S/l,M=-w/l;_.min.set(-T*b,-T,S),_.max.set(T*b,T,w),ni(x[0],-T*b,-T,S),ni(x[1],-T*b,T,S),ni(x[2],T*b,-T,S),ni(x[3],T*b,T,S),ni(x[4],-M*b,-M,w),ni(x[5],-M*b,M,w),ni(x[6],M*b,-M,w),ni(x[7],M*b,M,w)}else{var C=(-1-g)/i,A=(1-g)/i,I=(1-m)/l,D=(-1-m)/l,L=(-1-v)/p,P=(1-v)/p;_.min.set(Math.min(C,A),Math.min(D,I),Math.min(P,L)),_.max.set(Math.max(A,C),Math.max(I,D),Math.max(L,P));var O=_.min.array,E=_.max.array;ni(x[0],O[0],O[1],O[2]),ni(x[1],O[0],E[1],O[2]),ni(x[2],E[0],O[1],O[2]),ni(x[3],E[0],E[1],O[2]),ni(x[4],O[0],O[1],E[2]),ni(x[5],O[0],E[1],E[2]),ni(x[6],E[0],O[1],E[2]),ni(x[7],E[0],E[1],E[2])}},getTransformedBoundingBox:(ei=Jt.create(),function(t,e){var n=this.vertices,i=e.array,r=t.min,o=t.max,a=r.array,s=o.array,l=n[0];ri(ei,l,i),ii(a,ei),ii(s,ei);for(var u=1;u<8;u++)l=n[u],ri(ei,l,i),a[0]=oi(ei[0],a[0]),a[1]=oi(ei[1],a[1]),a[2]=oi(ei[2],a[2]),s[0]=ai(ei[0],s[0]),s[1]=ai(ei[1],s[1]),s[2]=ai(ei[2],s[2]);return r._dirty=!0,o._dirty=!0,t})};const li=si;var ui;const hi=ln.extend((function(){return{projectionMatrix:new He,invProjectionMatrix:new He,viewMatrix:new He,frustum:new li}}),(function(){this.update(!0)}),{update:function(t){ln.prototype.update.call(this,t),He.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),He.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(t){He.copy(this.viewMatrix,t),He.invert(this.worldTransform,t),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(t){He.copy(this.projectionMatrix,t),He.invert(this.invProjectionMatrix,t),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:(ui=Ae.create(),function(t,e){var n=void 0!==e?e:new Me,i=t.array[0],r=t.array[1];return Ae.set(ui,i,r,-1,1),Ae.transformMat4(ui,ui,this.invProjectionMatrix.array),Ae.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(n.origin.array,ui,1/ui[3]),Ae.set(ui,i,r,1,1),Ae.transformMat4(ui,ui,this.invProjectionMatrix.array),Ae.transformMat4(ui,ui,this.worldTransform.array),Jt.scale(ui,ui,1/ui[3]),Jt.sub(n.direction.array,ui,n.origin.array),Jt.normalize(n.direction.array,n.direction.array),n.direction._dirty=!0,n.origin._dirty=!0,n})});var ci,di,pi=qt.create(),fi=qt.create(),gi={};function mi(t){var e=[],n=Object.keys(t);n.sort();for(var i=0;i0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(t)):t instanceof Yn&&this.lights.push(t),t.name&&(this._nodeRepository[t.name]=t)},removeFromScene:function(t){var e;t instanceof hi?(e=this._cameraList.indexOf(t))>=0&&this._cameraList.splice(e,1):t instanceof Yn&&(e=this.lights.indexOf(t))>=0&&this.lights.splice(e,1),t.name&&delete this._nodeRepository[t.name]},getNode:function(t){return this._nodeRepository[t]},setMainCamera:function(t){var e=this._cameraList.indexOf(t);e>=0&&this._cameraList.splice(e,1),this._cameraList.unshift(t)},getMainCamera:function(){return this._cameraList[0]},getLights:function(){return this.lights},updateLights:function(){var t=this.lights;this._previousLightNumber=this._lightNumber;for(var e={},n=0;n0&&this._doUpdateRenderList(a,e,n,i,r)}},isFrustumCulled:(ci=new rn,di=new He,function(t,e,n){var i=t.boundingBox;if(i||(i=t.skeleton&&t.skeleton.boundingBox?t.skeleton.boundingBox:t.geometry.boundingBox),!i)return!1;if(di.array=n,ci.transformFrom(i,di),t.castShadow&&this.viewBoundingBoxLastFrame.union(ci),t.frustumCulling){if(!ci.intersectBoundingBox(e.frustum.boundingBox))return!0;di.array=e.projectionMatrix.array,ci.max.array[2]>0&&ci.min.array[2]<0&&(ci.max.array[2]=-1e-20),ci.applyProjection(di);var r=ci.min.array,o=ci.max.array;if(o[0]<-1||r[0]>1||o[1]<-1||r[1]>1||o[2]<-1||r[2]>1)return!0}return!1}),_updateLightUniforms:function(){var t=this.lights;t.sort(yi);var e=this._lightUniforms;for(var n in e)for(var i in e[n])e[n][i].value.length=0;for(var r=0;r=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new xi(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();var Si=Cn.isPowerOfTwo,Ti=["px","nx","py","ny","pz","nz"],Mi=Sn.extend((function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}}),{textureType:"textureCube",update:function(t){var e=t.gl;e.bindTexture(e.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(t);var n=this.format,i=this.type;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,this.getAvailableWrapS()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,this.getAvailableWrapT()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var r=t.getGLExtension("EXT_texture_filter_anisotropic");if(r&&this.anisotropic>1&&e.texParameterf(e.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),36193===i&&(t.getGLExtension("OES_texture_half_float")||(i=T)),this.mipmaps.length)for(var o=this.width,a=this.height,s=0;s0&&t.height>0}Object.defineProperty(Mi.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==t&&this.dirty(),this._width=t)}}),Object.defineProperty(Mi.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(t){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==t&&this.dirty(),this._height=t)}});const Ai=Mi,Ii=hi.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var t=this.fov/180*Math.PI;this.projectionMatrix.perspective(t,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array,e=2*Math.atan(1/t[5]);this.fov=e/Math.PI*180,this.aspect=t[5]/t[0],this.near=t[14]/(t[10]-1),this.far=t[14]/(t[10]+1)},clone:function(){var t=hi.prototype.clone.call(this);return t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t}});var Di="framebuffer",Li="renderbuffer",Pi="renderbuffer_width",Oi="renderbuffer_height",Ei="renderbuffer_attached",Ni="depthtexture_attached",ki=36160,Ri=36161,zi=36096,Bi=g.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},(function(){this._cache=new bn,this._textures={}}),{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(t){if(t.__currentFrameBuffer){if(t.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}t.__currentFrameBuffer=this;var e=t.gl;e.bindFramebuffer(ki,this._getFrameBufferGL(t)),this._boundRenderer=t;var n=this._cache;n.put("viewport",t.viewport);var i,r,o=!1;for(var a in this._textures){o=!0;var s=this._textures[a];s&&(i=s.texture.width,r=s.texture.height,this._doAttach(t,s.texture,a,s.target))}this._width=i,this._height=r,!o&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?t.setViewport(this.viewport):t.setViewport(0,0,i,r,1);var l=n.get("attached_textures");if(l)for(var a in l)if(!this._textures[a]){var u=l[a];this._doDetach(e,a,u)}if(!n.get(Ni)&&this.depthBuffer){n.miss(Li)&&n.put(Li,e.createRenderbuffer());var h=n.get(Li);i===n.get(Pi)&&r===n.get(Oi)||(e.bindRenderbuffer(Ri,h),e.renderbufferStorage(Ri,e.DEPTH_COMPONENT16,i,r),n.put(Pi,i),n.put(Oi,r),e.bindRenderbuffer(Ri,null)),n.get(Ei)||(e.framebufferRenderbuffer(ki,zi,Ri,h),n.put(Ei,!0))}},unbind:function(t){t.__currentFrameBuffer=null,t.gl.bindFramebuffer(ki,null),this._boundRenderer=null,this._cache.use(t.__uid__);var e=this._cache.get("viewport");e&&t.setViewport(e),this.updateMipmap(t)},updateMipmap:function(t){var e=t.gl;for(var n in this._textures){var i=this._textures[n];if(i){var r=i.texture;if(!r.NPOT&&r.useMipmap&&r.minFilter===Sn.LINEAR_MIPMAP_LINEAR){var o="textureCube"===r.textureType?34067:3553;e.bindTexture(o,r.getWebGLTexture(t)),e.generateMipmap(o),e.bindTexture(o,null)}}}},checkStatus:function(t){return t.checkFramebufferStatus(ki)},_getFrameBufferGL:function(t){var e=this._cache;return e.use(t.__uid__),e.miss(Di)&&e.put(Di,t.gl.createFramebuffer()),e.get(Di)},attach:function(t,e,n){if(!t.width)throw new Error("The texture attached to color buffer is not a valid.");e=e||36064,n=n||3553;var i,r=this._boundRenderer;if(r&&r.gl){var o=this._cache;o.use(r.__uid__),i=o.get("attached_textures")}var a=this._textures[e];if(!a||a.target!==n||a.texture!==t||!i||null==i[e]){var s=!0;r&&(s=this._doAttach(r,t,e,n),this.viewport||r.setViewport(0,0,t.width,t.height,1)),s&&(this._textures[e]=this._textures[e]||{},this._textures[e].texture=t,this._textures[e].target=n)}},_doAttach:function(t,e,n,i){var r=t.gl,o=e.getWebGLTexture(t),a=this._cache.get("attached_textures");if(a&&a[n]){var s=a[n];if(s.texture===e&&s.target===i)return}var l=!0;if(((n=+n)===zi||n===k)&&(t.getGLExtension("WEBGL_depth_texture")||(console.error("Depth texture is not supported by the browser"),l=!1),e.format!==M&&34041!==e.format&&(console.error("The texture attached to depth buffer is not a valid."),l=!1),l)){var u=this._cache.get(Li);u&&(r.framebufferRenderbuffer(ki,zi,Ri,null),r.deleteRenderbuffer(u),this._cache.put(Li,!1)),this._cache.put(Ei,!1),this._cache.put(Ni,!0)}return r.framebufferTexture2D(ki,n,i,o,0),a||(a={},this._cache.put("attached_textures",a)),a[n]=a[n]||{},a[n].texture=e,a[n].target=i,l},_doDetach:function(t,e,n){t.framebufferTexture2D(ki,e,n,null,0);var i=this._cache.get("attached_textures");i&&i[e]&&(i[e]=null),e!==zi&&e!==k||this._cache.put(Ni,!1)},detach:function(t,e){this._textures[t]=null,this._boundRenderer&&(this._cache.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,t,e))},dispose:function(t){var e=t.gl,n=this._cache;n.use(t.__uid__);var i=n.get(Li);i&&e.deleteRenderbuffer(i);var r=n.get(Di);r&&e.deleteFramebuffer(r),n.deleteContext(t.__uid__),this._textures={}}});Bi.DEPTH_ATTACHMENT=zi,Bi.COLOR_ATTACHMENT0=36064,Bi.STENCIL_ATTACHMENT=36128,Bi.DEPTH_STENCIL_ATTACHMENT=k;const Zi=Bi;var Fi=["px","nx","py","ny","pz","nz"];const Vi=g.extend((function(){var t={position:new ye,far:1e3,near:.1,texture:null,shadowMapPass:null},e=t._cameras={px:new Ii({fov:90}),nx:new Ii({fov:90}),py:new Ii({fov:90}),ny:new Ii({fov:90}),pz:new Ii({fov:90}),nz:new Ii({fov:90})};return e.px.lookAt(ye.POSITIVE_X,ye.NEGATIVE_Y),e.nx.lookAt(ye.NEGATIVE_X,ye.NEGATIVE_Y),e.py.lookAt(ye.POSITIVE_Y,ye.POSITIVE_Z),e.ny.lookAt(ye.NEGATIVE_Y,ye.NEGATIVE_Z),e.pz.lookAt(ye.POSITIVE_Z,ye.NEGATIVE_Y),e.nz.lookAt(ye.NEGATIVE_Z,ye.NEGATIVE_Y),t._frameBuffer=new Zi,t}),{getCamera:function(t){return this._cameras[t]},render:function(t,e,n){var i=t.gl;n||e.update();for(var r=this.texture.width,o=2*Math.atan(r/(r-.5))/Math.PI*180,a=0;a<6;a++){var s=Fi[a],l=this._cameras[s];if(ye.copy(l.position,this.position),l.far=this.far,l.near=this.near,l.fov=o,this.shadowMapPass){l.update();var u=e.getBoundingBox();u.applyTransform(l.viewMatrix),e.viewBoundingBoxLastFrame.copy(u),this.shadowMapPass.render(t,e,l,!0)}this._frameBuffer.attach(this.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+a),this._frameBuffer.bind(t),t.render(e,l,!0),this._frameBuffer.unbind(t)}},dispose:function(t){this._frameBuffer.dispose(t)}}),Gi=Hn.extend({dynamic:!1,widthSegments:1,heightSegments:1},(function(){this.build()}),{build:function(){for(var t=this.heightSegments,e=this.widthSegments,n=this.attributes,i=[],r=[],o=[],a=[],s=0;s<=t;s++)for(var l=s/t,u=0;u<=e;u++){var h=u/e;if(i.push([2*h-1,2*l-1,0]),r&&r.push([h,l]),o&&o.push([0,0,1]),u0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),t.renderPass([this],n)}}),Xi=ji;function Yi(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}var qi=Yi("DXT1"),Ki=Yi("DXT3"),Ji=Yi("DXT5");const Qi=function(t,e){var n=new Int32Array(t,0,31);if(542327876!==n[0])return null;if(4&!n(20))return null;var i,r,o=n(21),a=n[4],s=n[3],l=512&n[28],u=131072&n[2];switch(o){case qi:i=8,r=Sn.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ki:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ji:i=16,r=Sn.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var h=n[1]+4,c=l?6:1,d=1;u&&(d=Math.max(1,n[7]));for(var p=[],f=0;f0){var r=Math.pow(2,t[3]-128-8+i);e[n+0]=t[0]*r,e[n+1]=t[1]*r,e[n+2]=t[2]*r}else e[n+0]=0,e[n+1]=0,e[n+2]=0;return e[n+3]=1,e}function er(t,e,n,i){for(var r,o,a=0,s=0,l=i;l>0;)if(t[s][0]=e[n++],t[s][1]=e[n++],t[s][2]=e[n++],t[s][3]=e[n++],1===t[s][0]&&1===t[s][1]&&1===t[s][2]){for(var u=t[s][3]<>>0;u>0;u--)r=t[s-1],(o=t[s])[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],s++,l--;a+=8}else s++,l--,a=0;return n}function nr(t,e,n,i){if(i<8|i>32767)return er(t,e,n,i);if(2!=(r=e[n++]))return er(t,e,n-1,i);if(t[0][1]=e[n++],t[0][2]=e[n++],r=e[n++],(t[0][2]<<8>>>0|r)>>>0!==i)return null;for(var r=0;r<4;r++)for(var o=0;o128){a=(127&a)>>>0;for(var s=e[n++];a--;)t[o++][r]=s}else for(;a--;)t[o++][r]=e[n++]}return n}const ir=function(t,e,n){null==n&&(n=0);var i=new Uint8Array(t),r=i.length;if("#?"===function(t,e,n){for(var i="",r=0;r<2;r++)i+=$i(t[r]);return i}(i)){for(var o=2;o=r)){o+=2;for(var a="";o20)return console.warn("Given image is not a height map"),t}var d,p,f,g;l%(4*i)==0?(d=a.data[l],f=a.data[l+4]):l%(4*i)==4*(i-1)?(d=a.data[l-4],f=a.data[l]):(d=a.data[l-4],f=a.data[l+4]),l<4*i?(p=a.data[l],g=a.data[l+4*i]):l>i*(r-1)*4?(p=a.data[l-4*i],g=a.data[l]):(p=a.data[l-4*i],g=a.data[l+4*i]),s.data[l]=d-f+127,s.data[l+1]=p-g+127,s.data[l+2]=255,s.data[l+3]=255}return o.putImageData(s,0,0),n},isHeightImage:function(t,e,n){if(!t||!t.width||!t.height)return!1;var i=document.createElement("canvas"),r=i.getContext("2d"),o=e||32;n=n||20,i.width=i.height=o,r.drawImage(t,0,0,o,o);for(var a=r.getImageData(0,0,o,o),s=0;sn)return!1}return!0},_fetchTexture:function(t,e,n){F.request.get({url:t,responseType:"arraybuffer",onload:e,onerror:n})},createChessboard:function(t,e,n,i){t=t||512,e=e||64,n=n||"black",i=i||"white";var r=Math.ceil(t/e),o=document.createElement("canvas");o.width=t,o.height=t;var a=o.getContext("2d");a.fillStyle=i,a.fillRect(0,0,t,t),a.fillStyle=n;for(var s=0;s=0||(ar.forEach((function(e){t.on(e,this[sr(e)],this)}),this),this._meshes.push(t))},detachFromMesh:function(t){var e=this._meshes.indexOf(t);e>=0&&this._meshes.splice(e,1),ar.forEach((function(e){t.off(e,this[sr(e)])}),this)},dispose:function(){this._meshes.forEach((function(t){this.detachFromMesh(t)}),this)}};const ur=lr,hr=hi.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var t=this.projectionMatrix.array;this.left=(-1-t[12])/t[0],this.right=(1-t[12])/t[0],this.top=(1-t[13])/t[5],this.bottom=(-1-t[13])/t[5],this.near=-(-1-t[14])/t[10],this.far=-(1-t[14])/t[10]},clone:function(){var t=hi.prototype.clone.call(this);return t.left=this.left,t.right=this.right,t.near=this.near,t.far=this.far,t.top=this.top,t.bottom=this.bottom,t}});jt.import("\n@export clay.compositor.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nvarying vec2 v_Texcoord;\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end");var cr=new Gi,dr=new Mn({geometry:cr,frustumCulling:!1}),pr=new hr;const fr=g.extend((function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}}),(function(){var t=new jt(jt.source("clay.compositor.vertex"),this.fragment),e=new lt({shader:t});e.enableTexturesAll(),this.material=e}),{setUniform:function(t,e){this.material.setUniform(t,e)},getUniform:function(t){var e=this.material.uniforms[t];if(e)return e.value},attachOutput:function(t,e){this.outputs||(this.outputs={}),e=e||36064,this.outputs[e]=t},detachOutput:function(t){for(var e in this.outputs)this.outputs[e]===t&&(this.outputs[e]=null)},bind:function(t,e){if(this.outputs)for(var n in this.outputs){var i=this.outputs[n];i&&e.attach(i,n)}e&&e.bind(t)},unbind:function(t,e){e.unbind(t)},render:function(t,e){var n=t.gl;if(e){this.bind(t,e);var i=t.getGLExtension("EXT_draw_buffers");if(i&&this.outputs){var r=[];for(var o in this.outputs)(o=+o)>=n.COLOR_ATTACHMENT0&&o<=n.COLOR_ATTACHMENT0+8&&r.push(o);i.drawBuffersEXT(r)}}this.trigger("beforerender",this,t);var a=this.clearDepth?n.DEPTH_BUFFER_BIT:0;if(n.depthMask(!0),this.clearColor){a|=n.COLOR_BUFFER_BIT,n.colorMask(!0,!0,!0,!0);var s=this.clearColor;Array.isArray(s)&&n.clearColor(s[0],s[1],s[2],s[3])}n.clear(a),this.blendWithPrevious?(n.enable(n.BLEND),this.material.transparent=!0):(n.disable(n.BLEND),this.material.transparent=!1),this.renderQuad(t),this.trigger("afterrender",this,t),e&&this.unbind(t,e)},renderQuad:function(t){dr.material=this.material,t.renderPass([dr],pr)},dispose:function(t){}});var gr={},mr=["px","nx","py","ny","pz","nz"];gr.prefilterEnvironmentMap=function(t,e,n,i,r){r&&i||(i=gr.generateNormalDistribution(),r=gr.integrateBRDF(t,i));var o=(n=n||{}).width||64,a=n.height||64,s=n.type||e.type,l=new Ai({width:o,height:a,type:s,flipY:!1,mipmaps:[]});l.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var u=Math.min(o,a),h=Math.log(u)/Math.log(2)+1,c=new lt({shader:new jt({vertex:jt.source("clay.skybox.vertex"),fragment:"#define SHADER_NAME prefilter\n#define SAMPLE_NUMBER 1024\n#define PI 3.14159265358979\nuniform mat4 viewInverse : VIEWINVERSE;\nuniform samplerCube environmentMap;\nuniform sampler2D normalDistribution;\nuniform float roughness : 0.5;\nvarying vec2 v_Texcoord;\nvarying vec3 v_WorldPosition;\n@import clay.util.rgbm\nvec3 importanceSampleNormal(float i, float roughness, vec3 N) {\n vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;\n vec3 upVector = abs(N.y) > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvoid main() {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(v_WorldPosition - eyePos);\n vec3 N = V;\n vec3 prefilteredColor = vec3(0.0);\n float totalWeight = 0.0;\n float fMaxSampleNumber = float(SAMPLE_NUMBER);\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fMaxSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(dot(N, L), 0.0, 1.0);\n if (NoL > 0.0) {\n prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;\n totalWeight += NoL;\n }\n }\n gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));\n}\n"})});c.set("normalDistribution",i),n.encodeRGBM&&c.define("fragment","RGBM_ENCODE"),n.decodeRGBM&&c.define("fragment","RGBM_DECODE");var d,p=new _i;if("texture2D"===e.textureType){var f=new Ai({width:o,height:a,type:s===Sn.FLOAT?Sn.HALF_FLOAT:s});or.panoramaToCubeMap(t,e,f,{encodeRGBM:n.decodeRGBM}),e=f}(d=new ji({scene:p,material:c})).material.set("environmentMap",e);var g=new Vi({texture:l});n.encodeRGBM&&(s=l.type=Sn.UNSIGNED_BYTE);for(var m=new Ln({width:o,height:a,type:s}),v=new Zi({depthBuffer:!1}),y=F[s===Sn.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_=0;_ 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nfloat G_Smith(float roughness, float NoV, float NoL) {\n float k = roughness * roughness / 2.0;\n float G1V = NoV / (NoV * (1.0 - k) + k);\n float G1L = NoL / (NoL * (1.0 - k) + k);\n return G1L * G1V;\n}\nvoid main() {\n vec2 uv = gl_FragCoord.xy / viewportSize;\n float NoV = uv.x;\n float roughness = uv.y;\n vec3 V;\n V.x = sqrt(1.0 - NoV * NoV);\n V.y = 0.0;\n V.z = NoV;\n float A = 0.0;\n float B = 0.0;\n for (int i = 0; i < SAMPLE_NUMBER; i++) {\n vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);\n vec3 L = reflect(-V, H);\n float NoL = clamp(L.z, 0.0, 1.0);\n float NoH = clamp(H.z, 0.0, 1.0);\n float VoH = clamp(dot(V, H), 0.0, 1.0);\n if (NoL > 0.0) {\n float G = G_Smith(roughness, NoV, NoL);\n float G_Vis = G * VoH / (NoH * NoV);\n float Fc = pow(1.0 - VoH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);\n}\n"}),r=new Ln({width:512,height:256,type:Sn.HALF_FLOAT,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1});return i.setUniform("normalDistribution",e),i.setUniform("viewportSize",[512,256]),i.attachOutput(r),i.render(t,n),n.dispose(t),r},gr.generateNormalDistribution=function(t,e){for(var n=new Ln({width:t=t||256,height:e=e||1024,type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,wrapS:Sn.CLAMP_TO_EDGE,wrapT:Sn.CLAMP_TO_EDGE,useMipmap:!1}),i=new Float32Array(e*t*4),r=[],o=0;o>>16)>>>0;u=(((16711935&(u=((252645135&(u=((858993459&(u=((1431655765&u)<<1|(2863311530&u)>>>1)>>>0))<<2|(3435973836&u)>>>2)>>>0))<<4|(4042322160&u)>>>4)>>>0))<<8|(4278255360&u)>>>8)>>>0)/4294967296;var h=Math.sqrt((1-u)/(1+(s*s-1)*u));r[l]=h}for(l=0;l65535?Uint32Array:Uint16Array,y=this.indices=new v(e*t*6),_=this.radius,x=this.phiStart,b=this.phiLength,w=this.thetaStart,S=this.thetaLength,T=[],M=[],C=0,A=1/(_=this.radius);for(d=0;d<=t;d++)for(c=0;c<=e;c++)u=c/e,h=d/t,a=-_*Math.cos(x+u*b)*Math.sin(w+h*S),s=_*Math.cos(w+h*S),l=_*Math.sin(x+u*b)*Math.sin(w+h*S),T[0]=a,T[1]=s,T[2]=l,M[0]=u,M[1]=h,n.set(C,T),i.set(C,M),T[0]*=A,T[1]*=A,T[2]*=A,r.set(C,T),C++;var I=e+1,D=0;for(d=0;d255?255:t}function Jr(t){return t<0?0:t>1?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100*255):Kr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Jr(parseFloat(e)/100):Jr(parseFloat(e))}function to(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function eo(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function no(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var io=new wi(20),ro=null;function oo(t,e){ro&&no(ro,e),ro=io.put(t,ro||e.slice())}function ao(t,e){if(t){e=e||[];var n=io.get(t);if(n)return no(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in qr)return no(e,qr[i]),oo(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(eo(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),oo(t,e),e):void eo(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(eo(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),oo(t,e),e):void eo(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?eo(e,+u[0],+u[1],+u[2],1):eo(e,0,0,0,1);h=$r(u.pop());case"rgb":return 3!==u.length?void eo(e,0,0,0,1):(eo(e,Qr(u[0]),Qr(u[1]),Qr(u[2]),h),oo(t,e),e);case"hsla":return 4!==u.length?void eo(e,0,0,0,1):(u[3]=$r(u[3]),so(u,e),oo(t,e),e);case"hsl":return 3!==u.length?void eo(e,0,0,0,1):(so(u,e),oo(t,e),e);default:return}}eo(e,0,0,0,1)}}function so(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),r=$r(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return eo(e=e||[],Kr(255*to(a,o,n+1/3)),Kr(255*to(a,o,n)),Kr(255*to(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}var lo=Object.prototype.toString,uo=Array.prototype,ho=uo.forEach,co=uo.filter,po=uo.slice,fo=uo.map,go=function(){}.constructor,mo=go?go.prototype:null;function vo(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function yo(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ra)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(_o(e)){var r=function(t){return _o(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&No(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=ao(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!No(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&Eo(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var d=h.percent-c.percent;if(0!==d){var p=(e-c.percent)/d,f=i?this._additiveValue:u?Zo:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Ro(f,m,g,v,y,p,p*p,p*p*p):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0?1===l?Lo(f,c[r],h[r],p):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],p),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(ao(t[n],Zo),Po(Zo,Zo,i,1),t[n]=Bo(Zo)):t[n]=t[n]+i:1===e?Po(t[n],t[n],i,1):2===e&&Oo(t[n],t[n],i,1)},t}();const Vo=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?function(){for(var t=[],e=0;e0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),Go={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(t,e){var n;if(this._animators=this._animators||[],t){for(var i=t.split("."),r=this,o=0,a=i.length;o=0&&s.splice(t,1)})),s.push(l),this.__zr&&this.__zr.animation.addAnimator(l),l},stopAnimation:function(t){this._animators=this._animators||[];for(var e=this._animators,n=e.length,i=0;i 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.y) * weight.y;\n}\nif (weight.z > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.z) * weight.z;\n}\nfloat weightW = 1.0-weight.x-weight.y-weight.z;\nif (weightW > 1e-4)\n{\n skinMatrixWS += getSkinMatrix(joint.w) * weightW;\n}\n@end\n@export clay.chunk.instancing_header\n#ifdef INSTANCING\nattribute vec4 instanceMat1;\nattribute vec4 instanceMat2;\nattribute vec4 instanceMat3;\n#endif\n@end\n@export clay.chunk.instancing_matrix\nmat4 instanceMat = mat4(\n vec4(instanceMat1.xyz, 0.0),\n vec4(instanceMat2.xyz, 0.0),\n vec4(instanceMat3.xyz, 0.0),\n vec4(instanceMat1.w, instanceMat2.w, instanceMat3.w, 1.0)\n);\n@end\n@export clay.util.parallax_correct\nvec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {\n vec3 first = (boxMax - pos) / dir;\n vec3 second = (boxMin - pos) / dir;\n vec3 further = max(first, second);\n float dist = min(further.x, min(further.y, further.z));\n vec3 fixedPos = pos + dir * dist;\n vec3 boxCenter = (boxMax + boxMin) * 0.5;\n return normalize(fixedPos - boxCenter);\n}\n@end\n@export clay.util.clamp_sample\nvec4 clampSample(const in sampler2D texture, const in vec2 coord)\n{\n#ifdef STEREO\n float eye = step(0.5, coord.x) * 0.5;\n vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));\n#else\n vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));\n#endif\n return texture2D(texture, coordClamped);\n}\n@end\n@export clay.util.ACES\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\n@end";function Uo(t){return t instanceof HTMLCanvasElement||t instanceof HTMLImageElement||t instanceof Image}Object.assign(ln.prototype,Go),jt.import(Ho),jt.import(Xt),jt.import("\n@export ecgl.common.transformUniforms\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nuniform mat4 world : WORLD;\n@end\n\n@export ecgl.common.attributes\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 normal : NORMAL;\n@end\n\n@export ecgl.common.uv.header\nuniform vec2 uvRepeat : [1.0, 1.0];\nuniform vec2 uvOffset : [0.0, 0.0];\nuniform vec2 detailUvRepeat : [1.0, 1.0];\nuniform vec2 detailUvOffset : [0.0, 0.0];\n\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n@export ecgl.common.uv.main\nv_Texcoord = texcoord * uvRepeat + uvOffset;\nv_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;\n@end\n\n@export ecgl.common.uv.fragmentHeader\nvarying vec2 v_Texcoord;\nvarying vec2 v_DetailTexcoord;\n@end\n\n\n@export ecgl.common.albedo.main\n\n vec4 albedoTexel = vec4(1.0);\n#ifdef DIFFUSEMAP_ENABLED\n albedoTexel = texture2D(diffuseMap, v_Texcoord);\n #ifdef SRGB_DECODE\n albedoTexel = sRGBToLinear(albedoTexel);\n #endif\n#endif\n\n#ifdef DETAILMAP_ENABLED\n vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);\n #ifdef SRGB_DECODE\n detailTexel = sRGBToLinear(detailTexel);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);\n albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexHeader\n\n#ifdef WIREFRAME_QUAD\nattribute vec4 barycentric;\nvarying vec4 v_Barycentric;\n#elif defined(WIREFRAME_TRIANGLE)\nattribute vec3 barycentric;\nvarying vec3 v_Barycentric;\n#endif\n\n@end\n\n@export ecgl.common.wireframe.vertexMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n v_Barycentric = barycentric;\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentHeader\n\nuniform float wireframeLineWidth : 1;\nuniform vec4 wireframeLineColor: [0, 0, 0, 0.5];\n\n#ifdef WIREFRAME_QUAD\nvarying vec4 v_Barycentric;\nfloat edgeFactor () {\n vec4 d = fwidth(v_Barycentric);\n vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(min(a4.x, a4.y), a4.z), a4.w);\n}\n#elif defined(WIREFRAME_TRIANGLE)\nvarying vec3 v_Barycentric;\nfloat edgeFactor () {\n vec3 d = fwidth(v_Barycentric);\n vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);\n return min(min(a3.x, a3.y), a3.z);\n}\n#endif\n\n@end\n\n\n@export ecgl.common.wireframe.fragmentMain\n\n#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)\n if (wireframeLineWidth > 0.) {\n vec4 lineColor = wireframeLineColor;\n#ifdef SRGB_DECODE\n lineColor = sRGBToLinear(lineColor);\n#endif\n\n gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);\n }\n#endif\n@end\n\n\n\n\n@export ecgl.common.bumpMap.header\n\n#ifdef BUMPMAP_ENABLED\nuniform sampler2D bumpMap;\nuniform float bumpScale : 1.0;\n\n\nvec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)\n{\n vec2 dSTdx = dFdx(v_Texcoord);\n vec2 dSTdy = dFdy(v_Texcoord);\n\n float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;\n float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;\n float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;\n\n vec3 vSigmaX = dFdx(surfPos);\n vec3 vSigmaY = dFdy(surfPos);\n vec3 vN = surfNormal;\n\n vec3 R1 = cross(vSigmaY, vN);\n vec3 R2 = cross(vN, vSigmaX);\n\n float fDet = dot(vSigmaX, R1);\n\n vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);\n return normalize(abs(fDet) * baseNormal - vGrad);\n\n}\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexHeader\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.vertexMain\n\n#ifdef NORMALMAP_ENABLED\n if (dot(tangent, tangent) > 0.0) {\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n }\n#endif\n\n@end\n\n\n@export ecgl.common.normalMap.fragmentHeader\n\n#ifdef NORMALMAP_ENABLED\nuniform sampler2D normalMap;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@end\n\n@export ecgl.common.normalMap.fragmentMain\n#ifdef NORMALMAP_ENABLED\n if (dot(v_Tangent, v_Tangent) > 0.0) {\n vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;\n if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;\n mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);\n N = normalize(tbn * N);\n }\n }\n#endif\n@end\n\n\n\n@export ecgl.common.vertexAnimation.header\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevNormal;\nuniform float percent;\n#endif\n\n@end\n\n@export ecgl.common.vertexAnimation.main\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n vec3 norm = mix(prevNormal, normal, percent);\n#else\n vec3 pos = position;\n vec3 norm = normal;\n#endif\n\n@end\n\n\n@export ecgl.common.ssaoMap.header\n#ifdef SSAOMAP_ENABLED\nuniform sampler2D ssaoMap;\nuniform vec4 viewport : VIEWPORT;\n#endif\n@end\n\n@export ecgl.common.ssaoMap.main\n float ao = 1.0;\n#ifdef SSAOMAP_ENABLED\n ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;\n#endif\n@end\n\n\n\n\n@export ecgl.common.diffuseLayer.header\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\nuniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];\nuniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.header\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\nuniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];\nuniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];\n#endif\n\n@end\n\n@export ecgl.common.layers.header\n@import ecgl.common.diffuseLayer.header\n@import ecgl.common.emissiveLayer.header\n@end\n\n@export ecgl.common.diffuseLayer.main\n\n#if (LAYER_DIFFUSEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{\n float intensity = layerDiffuseIntensity[_idx_];\n vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);\n albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;\n }}\n#endif\n\n@end\n\n@export ecgl.common.emissiveLayer.main\n\n#if (LAYER_EMISSIVEMAP_COUNT > 0)\n for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)\n {{\n vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];\n #ifdef SRGB_DECODE\n texel2 = sRGBToLinear(texel2);\n #endif\n float intensity = layerEmissionIntensity[_idx_];\n gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;\n }}\n#endif\n\n@end\n"),jt.import("@export ecgl.color.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\n@import ecgl.common.uv.header\n\nattribute vec2 texcoord : TEXCOORD_0;\nattribute vec3 position: POSITION;\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\nattribute vec3 normal: NORMAL;\nuniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;\nvarying vec3 v_Normal;\n#endif\n\nvoid main()\n{\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n @import ecgl.common.uv.main\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef ATMOSPHERE_ENABLED\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n@export ecgl.color.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\nvarying vec3 v_Normal;\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.layers.header\n\n@import ecgl.common.uv.fragmentHeader\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n\n}\n@end"),jt.import("/**\n * http: */\n\n@export ecgl.lambert.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n\n@import ecgl.common.attributes\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.vertexAnimation.header\n\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n}\n\n@end\n\n\n@export ecgl.lambert.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\nuniform sampler2D detailMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color);\n#else\n gl_FragColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n gl_FragColor *= sRGBToLinear(v_Color);\n #else\n gl_FragColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n gl_FragColor *= albedoTexel;\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseColor = vec3(0.0, 0.0, 0.0);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n diffuseColor += ambientLightColor[i] * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n vec3 lightColor = directionalLightColor[i];\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor.rgb *= diffuseColor;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.realistic.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\n\n@import ecgl.common.wireframe.vertexHeader\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\nattribute vec4 tangent : TANGENT;\nvarying vec3 v_Tangent;\nvarying vec3 v_Bitangent;\n#endif\n\n@import ecgl.common.vertexAnimation.header\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nvoid main()\n{\n\n @import ecgl.common.uv.main\n\n @import ecgl.common.vertexAnimation.main\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n#ifdef VERTEX_COLOR\n v_Color = a_Color;\n#endif\n\n#ifdef NORMALMAP_ENABLED\n v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);\n v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);\n#endif\n\n @import ecgl.common.wireframe.vertexMain\n\n}\n\n@end\n\n\n\n@export ecgl.realistic.fragment\n\n#define LAYER_DIFFUSEMAP_COUNT 0\n#define LAYER_EMISSIVEMAP_COUNT 0\n#define PI 3.14159265358979\n#define ROUGHNESS_CHANEL 0\n#define METALNESS_CHANEL 1\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform sampler2D diffuseMap;\n\nuniform sampler2D detailMap;\nuniform sampler2D metalnessMap;\nuniform sampler2D roughnessMap;\n\n@import ecgl.common.layers.header\n\nuniform float emissionIntensity: 1.0;\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nuniform float metalness : 0.0;\nuniform float roughness : 0.5;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef ATMOSPHERE_ENABLED\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform vec3 glowColor;\nuniform float glowPower;\n#endif\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n@import clay.header.ambient_cubemap_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n@import ecgl.common.normalMap.fragmentHeader\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import clay.util.rgbm\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n\nfloat D_Phong(float g, float ndh) {\n float a = pow(8192.0, g);\n return (a + 2.0) / 8.0 * pow(ndh, a);\n}\n\nvoid main()\n{\n vec4 albedoColor = color;\n\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n albedoColor *= sRGBToLinear(v_Color);\n #else\n albedoColor *= v_Color;\n #endif\n#endif\n\n @import ecgl.common.albedo.main\n\n @import ecgl.common.diffuseLayer.main\n\n albedoColor *= albedoTexel;\n\n float m = metalness;\n\n#ifdef METALNESSMAP_ENABLED\n float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];\n m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 baseColor = albedoColor.rgb;\n albedoColor.rgb = baseColor * (1.0 - m);\n vec3 specFactor = mix(vec3(0.04), baseColor, m);\n\n float g = 1.0 - roughness;\n\n#ifdef ROUGHNESSMAP_ENABLED\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n#endif\n\n vec3 N = v_Normal;\n\n#ifdef DOUBLE_SIDED\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n@import ecgl.common.normalMap.fragmentMain\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n vec3 diffuseTerm = vec3(0.0);\n vec3 specularTerm = vec3(0.0);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n vec3 fresnelTerm = F_Schlick(ndv, specFactor);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;\n }}\n#endif\n\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;\n }}\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)\n {{\n vec3 L = -directionalLightDirection[_idx_];\n vec3 lc = directionalLightColor[_idx_];\n\n vec3 H = normalize(L + V);\n float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[_idx_];\n }\n#endif\n\n vec3 li = lc * ndl * shadowContrib;\n\n diffuseTerm += li;\n specularTerm += li * fresnelTerm * D_Phong(g, ndh);\n }}\n#endif\n\n\n#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT\n vec3 L = reflect(-V, N);\n L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);\n float rough2 = clamp(1.0 - g, 0.0, 1.0);\n float bias2 = rough2 * 5.0;\n vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;\n vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;\n vec3 envTexel2;\n for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)\n {{\n envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 8.12);\n specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;\n }}\n#endif\n\n gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;\n gl_FragColor.a = albedoColor.a;\n\n#ifdef ATMOSPHERE_ENABLED\n float atmoIntensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor.rgb += glowColor * atmoIntensity;\n#endif\n\n#ifdef SRGB_ENCODE\n gl_FragColor = linearTosRGB(gl_FragColor);\n#endif\n\n @import ecgl.common.emissiveLayer.main\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end"),jt.import("@export ecgl.hatching.vertex\n\n@import ecgl.realistic.vertex\n\n@end\n\n\n@export ecgl.hatching.fragment\n\n#define NORMAL_UP_AXIS 1\n#define NORMAL_FRONT_AXIS 2\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform vec4 color : [0.0, 0.0, 0.0, 1.0];\nuniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n#ifdef AMBIENT_LIGHT_COUNT\n@import clay.header.ambient_light\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n@import clay.header.ambient_sh_light\n#endif\n\n#ifdef DIRECTIONAL_LIGHT_COUNT\n@import clay.header.directional_light\n#endif\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\n\n@import ecgl.common.ssaoMap.header\n\n@import ecgl.common.bumpMap.header\n\n@import clay.util.srgb\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.plugin.compute_shadow_map\n\nuniform sampler2D hatch1;\nuniform sampler2D hatch2;\nuniform sampler2D hatch3;\nuniform sampler2D hatch4;\nuniform sampler2D hatch5;\nuniform sampler2D hatch6;\n\nfloat shade(in float tone) {\n vec4 c = vec4(1. ,1., 1., 1.);\n float step = 1. / 6.;\n vec2 uv = v_DetailTexcoord;\n if (tone <= step / 2.0) {\n c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);\n }\n else if (tone <= step) {\n c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);\n }\n if(tone > step && tone <= 2. * step){\n c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));\n }\n if(tone > 2. * step && tone <= 3. * step){\n c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));\n }\n if(tone > 3. * step && tone <= 4. * step){\n c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));\n }\n if(tone > 4. * step && tone <= 5. * step){\n c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));\n }\n if(tone > 5. * step){\n c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));\n }\n\n return c.r;\n}\n\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n vec4 inkColor = sRGBToLinear(color);\n#else\n vec4 inkColor = color;\n#endif\n\n#ifdef VERTEX_COLOR\n #ifdef SRGB_DECODE\n inkColor *= sRGBToLinear(v_Color);\n #else\n inkColor *= v_Color;\n #endif\n#endif\n\n vec3 N = v_Normal;\n#ifdef DOUBLE_SIDED\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n N = -N;\n }\n#endif\n\n float tone = 0.0;\n\n float ambientFactor = 1.0;\n\n#ifdef BUMPMAP_ENABLED\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n ambientFactor = dot(v_Normal, N);\n#endif\n\n vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);\n\n @import ecgl.common.ssaoMap.main\n\n#ifdef AMBIENT_LIGHT_COUNT\n for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)\n {\n tone += dot(ambientLightColor[i], w) * ambientFactor * ao;\n }\n#endif\n#ifdef AMBIENT_SH_LIGHT_COUNT\n for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)\n {{\n tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;\n }}\n#endif\n#ifdef DIRECTIONAL_LIGHT_COUNT\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];\n if(shadowEnabled)\n {\n computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);\n }\n#endif\n for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)\n {\n vec3 lightDirection = -directionalLightDirection[i];\n float lightTone = dot(directionalLightColor[i], w);\n\n float shadowContrib = 1.0;\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n if (shadowEnabled)\n {\n shadowContrib = shadowContribsDir[i];\n }\n#endif\n\n float ndl = dot(N, normalize(lightDirection)) * shadowContrib;\n\n tone += lightTone * clamp(ndl, 0.0, 1.0);\n }\n#endif\n\n gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));\n }\n@end\n"),jt.import("@export ecgl.sm.depth.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nuniform float percent : 1.0;\n#endif\n\nvarying vec4 v_ViewPosition;\nvarying vec2 v_Texcoord;\n\nvoid main(){\n\n#ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n#else\n vec3 pos = position;\n#endif\n\n v_ViewPosition = worldViewProjection * vec4(pos, 1.0);\n gl_Position = v_ViewPosition;\n\n v_Texcoord = texcoord;\n\n}\n@end\n\n\n\n@export ecgl.sm.depth.fragment\n\n@import clay.sm.depth.fragment\n\n@end");var Wo=_i.prototype.addToScene,jo=_i.prototype.removeFromScene;_i.prototype.addToScene=function(t){if(Wo.call(this,t),this.__zr){var e=this.__zr;t.traverse((function(t){t.__zr=e,t.addAnimatorsToZr&&t.addAnimatorsToZr(e)}))}},_i.prototype.removeFromScene=function(t){jo.call(this,t),t.traverse((function(t){var e=t.__zr;t.__zr=null,e&&t.removeAnimatorsFromZr&&t.removeAnimatorsFromZr(e)}))},lt.prototype.setTextureImage=function(t,e,n,i){if(this.shader){var r,o=n.getZr(),a=this;return a.autoUpdateTextureStatus=!1,a.disableTexture(t),!(s=e)||"none"===s||(r=Xo.loadTexture(e,n,i,(function(e){a.enableTexture(t),o&&o.refresh()})),a.set(t,r)),r}var s};var Xo={};Xo.Renderer=he,Xo.Node=ln,Xo.Mesh=Mn,Xo.Shader=jt,Xo.Material=lt,Xo.Texture=Sn,Xo.Texture2D=Ln,Xo.Geometry=Hn,Xo.SphereGeometry=Ar,Xo.PlaneGeometry=Gi,Xo.CubeGeometry=Wi,Xo.AmbientLight=Ir,Xo.DirectionalLight=Dr,Xo.PointLight=Lr,Xo.SpotLight=Pr,Xo.PerspectiveCamera=Ii,Xo.OrthographicCamera=hr,Xo.Vector2=vt,Xo.Vector3=ye,Xo.Vector4=kr,Xo.Quaternion=Xe,Xo.Matrix2=Zr,Xo.Matrix2d=Hr,Xo.Matrix3=Wr,Xo.Matrix4=He,Xo.Plane=ti,Xo.Ray=Me,Xo.BoundingBox=rn,Xo.Frustum=li;var Yo=null;function qo(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))}function Ko(t){if((t.wrapS===Sn.REPEAT||t.wrapT===Sn.REPEAT)&&t.image){var e=qo(t.width),n=qo(t.height);if(e!==t.width||n!==t.height){var i=document.createElement("canvas");i.width=e,i.height=n,i.getContext("2d").drawImage(t.image,0,0,e,n),t.image=i}}}Xo.loadTexture=function(t,e,n,i){"function"==typeof n&&(i=n,n={}),n=n||{};for(var r=Object.keys(n).sort(),o="",a=0;a3?e[3]=t[3]:e[3]=1,e):((e=i.color.parse(t||"#000",e)||[0,0,0,0])[0]/=255,e[1]/=255,e[2]/=255,e)},Xo.directionFromAlphaBeta=function(t,e){var n=t/180*Math.PI+Math.PI/2,i=-e/180*Math.PI+Math.PI/2,r=[],o=Math.sin(n);return r[0]=o*Math.cos(i),r[1]=-Math.cos(n),r[2]=o*Math.sin(i),r},Xo.getShadowResolution=function(t){var e=1024;switch(t){case"low":e=512;break;case"medium":break;case"high":e=2048;break;case"ultra":e=4096}return e},Xo.COMMON_SHADERS=["lambert","color","realistic","hatching","shadow"],Xo.createShader=function(t){"ecgl.shadow"===t&&(t="ecgl.displayShadow");var e=jt.source(t+".vertex"),n=jt.source(t+".fragment");e||console.error("Vertex shader of '%s' not exits",t),n||console.error("Fragment shader of '%s' not exits",t);var i=new jt(e,n);return i.name=t,i},Xo.createMaterial=function(t,e){e instanceof Array||(e=[e]);var n=Xo.createShader(t),i=new lt({shader:n});return e.forEach((function(t){"string"==typeof t&&i.define(t)})),i},Xo.setMaterialFromModel=function(t,e,n,i){e.autoUpdateTextureStatus=!1;var r=n.getModel(t+"Material"),o=r.get("detailTexture"),a=Mr(r.get("textureTiling"),1),s=Mr(r.get("textureOffset"),0);"number"==typeof a&&(a=[a,a]),"number"==typeof s&&(s=[s,s]);var l=a[0]>1||a[1]>1?Xo.Texture.REPEAT:Xo.Texture.CLAMP_TO_EDGE,u={anisotropic:8,wrapS:l,wrapT:l};if("realistic"===t){var h=r.get("roughness"),c=r.get("metalness");null!=c?isNaN(c)&&(e.setTextureImage("metalnessMap",c,i,u),c=Mr(r.get("metalnessAdjust"),.5)):c=0,null!=h?isNaN(h)&&(e.setTextureImage("roughnessMap",h,i,u),h=Mr(r.get("roughnessAdjust"),.5)):h=.5;var d=r.get("normalTexture");e.setTextureImage("detailMap",o,i,u),e.setTextureImage("normalMap",d,i,u),e.set({roughness:h,metalness:c,detailUvRepeat:a,detailUvOffset:s})}else if("lambert"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("color"===t)e.setTextureImage("detailMap",o,i,u),e.set({detailUvRepeat:a,detailUvOffset:s});else if("hatching"===t){var p=r.get("hatchingTextures")||[];p.length;for(var f=0;f<6;f++)e.setTextureImage("hatch"+(f+1),p[f],i,{anisotropic:8,wrapS:Xo.Texture.REPEAT,wrapT:Xo.Texture.REPEAT});e.set({detailUvRepeat:a,detailUvOffset:s})}},Xo.updateVertexAnimation=function(t,e,n,i){var r=i.get("animation"),o=i.get("animationDurationUpdate"),a=i.get("animationEasingUpdate"),s=n.shadowDepthMaterial;if(r&&e&&o>0&&e.geometry.vertexCount===n.geometry.vertexCount){n.material.define("vertex","VERTEX_ANIMATION"),n.ignorePreZ=!0,s&&s.define("vertex","VERTEX_ANIMATION");for(var l=0;l=0&&this._viewsToDispose.splice(e,1),this.views.push(t),t.layer=this;var n=this.zr;t.scene.traverse((function(t){t.__zr=n,t.addAnimatorsToZr&&t.addAnimatorsToZr(n)}))}},$o.prototype.removeView=function(t){if(t.layer===this){var e=this.views.indexOf(t);e>=0&&(this.views.splice(e,1),t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t))}},$o.prototype.removeViewsAll=function(){this.views.forEach((function(t){t.scene.traverse(ta,this),t.layer=null,this._viewsToDispose.push(t)}),this),this.views.length=0},$o.prototype.resize=function(t,e){this.renderer.resize(t,e)},$o.prototype.clear=function(){var t=this.renderer.gl,e=this._backgroundColor||[0,0,0,0];t.clearColor(e[0],e[1],e[2],e[3]),t.depthMask(!0),t.colorMask(!0,!0,!0,!0),t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT)},$o.prototype.clearDepth=function(){var t=this.renderer.gl;t.clear(t.DEPTH_BUFFER_BIT)},$o.prototype.clearColor=function(){var t=this.renderer.gl;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)},$o.prototype.needsRefresh=function(){this.zr.refresh()},$o.prototype.refresh=function(t){this._backgroundColor=t?Jo.parseColor(t):[0,0,0,0],this.renderer.clearColor=this._backgroundColor;for(var e=0;e20)){t=t.event;var i=this.pickObject(t.offsetX,t.offsetY);i&&(this._dispatchEvent(t.type,t,i),this._dispatchDataEvent(t.type,t,i));var r=this._clickToSetFocusPoint(t);r&&r.view.setDOFFocusOnPoint(r.distance)&&this.zr.refresh()}}},$o.prototype._clickToSetFocusPoint=function(t){for(var e=this.renderer,n=e.viewport,i=this.views.length-1;i>=0;i--){var r=this.views[i];if(r.hasDOF()&&r.containPoint(t.offsetX,t.offsetY)){this._picking.scene=r.scene,this._picking.camera=r.camera,e.viewport=r.viewport;var o=this._picking.pick(t.offsetX,t.offsetY,!0);if(o)return o.view=r,o}}e.viewport=n},$o.prototype.onglobalout=function(t){var e=this._hovered;e&&this._dispatchEvent("mouseout",t,{target:e.target})},$o.prototype.pickObject=function(t,e){for(var n=[],i=this.renderer,r=i.viewport,o=0;o=0&&(c.dataIndex=this._lastDataIndex,c.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0):null!=s&&s!==this._lastEventData&&(null!=this._lastEventData&&(c.eventData=this._lastEventData,this.zr.handler.dispatchToElement(h,"mouseout",e)),l=!0),this._lastEventData=s,this._lastDataIndex=o,this._lastSeriesIndex=a),c.eventData=s,c.dataIndex=o,c.seriesIndex=a,(null!=s||parseInt(o,10)>=0&&parseInt(a,10)>=0)&&(this.zr.handler.dispatchToElement(h,t,e),l&&this.zr.handler.dispatchToElement(h,"mouseover",e))},$o.prototype._dispatchToView=function(t,e){for(var n=0;nt&&a=0&&(function(t){la(t,"itemStyle"),la(t,"lineStyle"),la(t,"areaStyle"),la(t,"label")}(e),"mapbox"===e.coordinateSystem&&(e.coordinateSystem="mapbox3D",t.mapbox3D=t.mapbox))})),ua(t.xAxis3D),ua(t.yAxis3D),ua(t.zAxis3D),ua(t.grid3D),la(t.geo3D)}));const ca={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(t){t=t||{},this.option.viewControl=this.option.viewControl||{},null!=t.alpha&&(this.option.viewControl.alpha=t.alpha),null!=t.beta&&(this.option.viewControl.beta=t.beta),null!=t.distance&&(this.option.viewControl.distance=t.distance),null!=t.center&&(this.option.viewControl.center=t.center)}},da={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}},pa={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}};var fa=i.ComponentModel.extend({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});i.util.merge(fa.prototype,ca),i.util.merge(fa.prototype,da),i.util.merge(fa.prototype,pa);const ga=fa;function ma(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function va(){var t="__ec_inner_"+ya++;return function(e){return e[t]||(e[t]={})}}var ya=Math.round(9*Math.random()),_a={};function xa(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||_a;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||_a).rich;if(n){e=e||{};for(var i=wo(n),r=0;r0&&this._notFirst?this.animateTo({alpha:u,beta:h,center:c,distance:o,orthographicSize:a,easing:l.animationEasingUpdate,duration:l.animationDurationUpdate}):(this.setDistance(o),this.setAlpha(u),this.setBeta(h),this.setCenter(c),this.setOrthographicSize(a)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){},animateTo:function(t){var e=this.zr,n=this,i={},r={};return null!=t.distance&&(i.distance=this.getDistance(),r.distance=t.distance),null!=t.orthographicSize&&(i.orthographicSize=this.getOrthographicSize(),r.orthographicSize=t.orthographicSize),null!=t.alpha&&(i.alpha=this.getAlpha(),r.alpha=t.alpha),null!=t.beta&&(i.beta=this.getBeta(),r.beta=t.beta),null!=t.center&&(i.center=this.getCenter(),r.center=t.center),this._addAnimator(e.animation.animate(i).when(t.duration||1e3,r).during((function(){null!=i.alpha&&n.setAlpha(i.alpha),null!=i.beta&&n.setBeta(i.beta),null!=i.distance&&n.setDistance(i.distance),null!=i.center&&n.setCenter(i.center),null!=i.orthographicSize&&n.setOrthographicSize(i.orthographicSize),n._needsUpdate=!0}))).start(t.easing||"linear")},stopAllAnimation:function(){for(var t=0;t0},_update:function(t){if(this._rotating){var e=("cw"===this.autoRotateDirection?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=e*t/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(t=Math.min(t,50),this._updateDistanceOrSize(t),this._updatePan(t),this._updateRotate(t),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(t){var e=this._rotateVelocity;this._phi=e.y*t/20+this._phi,this._theta=e.x*t/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(e,Math.pow(this.damping,t/16))},_updateDistanceOrSize:function(t){"perspective"===this._projection?this._setDistance(this._distance+this._zoomSpeed*t/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*t/20),this._zoomSpeed*=Math.pow(this.damping,t/16)},_setDistance:function(t){this._distance=Math.max(Math.min(t,this.maxDistance),this.minDistance)},_setOrthoSize:function(t){this._orthoSize=Math.max(Math.min(t,this.maxOrthographicSize),this.minOrthographicSize);var e=this.getCamera(),n=this._orthoSize,i=n/this.viewGL.viewport.height*this.viewGL.viewport.width;e.left=-i/2,e.right=i/2,e.top=n/2,e.bottom=-n/2},_updatePan:function(t){var e=this._panVelocity,n=this._distance,i=this.getCamera(),r=i.worldTransform.y,o=i.worldTransform.x;this._center.scaleAndAdd(o,-e.x*n/200).scaleAndAdd(r,-e.y*n/200),this._vectorDamping(e,0)},_updateTransform:function(){var t=this.getCamera(),e=new ye,n=this._theta+Math.PI/2,i=this._phi+Math.PI/2,r=Math.sin(n);e.x=r*Math.cos(i),e.y=-Math.cos(n),e.z=r*Math.sin(i),t.position.copy(this._center).scaleAndAdd(e,this._distance),t.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var t=this.autoRotateAfterStill,e=this;!isNaN(t)&&t>0&&(this._stillTimeout=setTimeout((function(){e._rotating=!0}),1e3*t))},_vectorDamping:function(t,e){var n=t.len();(n*=e)<1e-4&&(n=0),t.normalize().scale(n)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var t=this.getCamera().worldTransform.z,e=Math.asin(t.y),n=Math.atan2(t.x,t.z);this._theta=e,this._phi=-n,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(t){if(!t.target&&!this._isAnimating()){var e=t.offsetX,n=t.offsetY;this.viewGL&&!this.viewGL.containPoint(e,n)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),t.event.targetTouches?1===t.event.targetTouches.length&&(this._mode="rotate"):t.event.button===Ca[this.rotateMouseButton]?this._mode="rotate":t.event.button===Ca[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=t.offsetX,this._mouseY=t.offsetY)}},_mouseMoveHandler:function(t){if(!(t.target&&t.target.__isGLToZRProxy||this._isAnimating())){var e=Aa(this.panSensitivity),n=Aa(this.rotateSensitivity);"rotate"===this._mode?(this._rotateVelocity.y=(t.offsetX-this._mouseX)/this.zr.getHeight()*2*n[0],this._rotateVelocity.x=(t.offsetY-this._mouseY)/this.zr.getWidth()*2*n[1]):"pan"===this._mode&&(this._panVelocity.x=(t.offsetX-this._mouseX)/this.zr.getWidth()*e[0]*400,this._panVelocity.y=(-t.offsetY+this._mouseY)/this.zr.getHeight()*e[1]*400),this._mouseX=t.offsetX,this._mouseY=t.offsetY,t.event.preventDefault()}},_mouseWheelHandler:function(t){if(!this._isAnimating()){var e=t.event.wheelDelta||-t.event.detail;this._zoomHandler(t,e)}},_pinchHandler:function(t){this._isAnimating()||(this._zoomHandler(t,t.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(t,e){if(0!==e){var n,i=t.offsetX,r=t.offsetY;this.viewGL&&!this.viewGL.containPoint(i,r)||(n="perspective"===this._projection?Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(e>0?-1:1)*n*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&"rotate"===this._mode&&this._startCountingStill(),t.event.preventDefault())}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return"right"===this.rotateMouseButton||"right"===this.panMouseButton},_contextMenuHandler:function(t){this._isRightMouseButtonUsed()&&t.preventDefault()},_addAnimator:function(t){var e=this._animators;return e.push(t),t.done((function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),t}});Object.defineProperty(Ia.prototype,"autoRotate",{get:function(t){return this._autoRotate},set:function(t){this._autoRotate=t,this._rotating=t}});const Da=Ia,La={convertToDynamicArray:function(t){t&&this.resetOffset();var e=this.attributes;for(var n in e)t||!e[n].value?e[n].value=[]:e[n].value=Array.prototype.slice.call(e[n].value);t||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var t=this.attributes;for(var e in t)t[e].value&&t[e].value.length>0?t[e].value=new Float32Array(t[e].value):t[e].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}},Pa={vec2:ft,vec3:Jt,vec4:Ae,mat2:zr,mat2d:Vr,mat3:De,mat4:qt,quat:ke};var Oa=Pa.vec3,Ea=[[0,0],[1,1]],Na=Hn.extend((function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),positionPrev:new Hn.Attribute("positionPrev","float",3),positionNext:new Hn.Attribute("positionNext","float",3),prevPositionPrev:new Hn.Attribute("prevPositionPrev","float",3),prevPosition:new Hn.Attribute("prevPosition","float",3),prevPositionNext:new Hn.Attribute("prevPositionNext","float",3),offset:new Hn.Attribute("offset","float",1),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(t){var e=this.attributes;this.vertexCount!==t&&(e.position.init(t),e.color.init(t),this.useNativeLine||(e.positionPrev.init(t),e.positionNext.init(t),e.offset.init(t)),t>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Oa.dist(t,e)+Oa.dist(n,e)+Oa.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Ea)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Ea)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/3,this.useNativeLine?0:2*Math.max(e-1,0)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=t[2],u=e[0],h=e[1],c=e[2],d=n[0],p=n[1],f=n[2],g=i[0],m=i[1],v=i[2],y=this._getCubicCurveApproxStep(t,e,n,i),_=y*y,x=_*y,b=3*y,w=3*_,S=6*_,T=6*x,M=a-2*u+d,C=s-2*h+p,A=l-2*c+f,I=3*(u-d)-a+g,D=3*(h-p)-s+m,L=3*(c-f)-l+v,P=a,O=s,E=l,N=(u-a)*b+M*w+I*x,k=(h-s)*b+C*w+D*x,R=(c-l)*b+A*w+L*x,z=M*S+I*T,B=C*S+D*T,Z=A*S+L*T,F=I*T,V=D*T,G=L*T,H=0,U=0,W=Math.ceil(1/y),j=new Float32Array(3*(W+1)),X=(j=[],0);for(U=0;U1&&(P=N>0?Math.min(P,g):Math.max(P,g),O=k>0?Math.min(O,m):Math.max(O,m),E=R>0?Math.min(E,v):Math.max(E,v));return this.addPolyline(j,r,o)},addLine:function(t,e,n,i){return this.addPolyline([t,e],n,i)},addPolyline:function(t,e,n,i,r){if(t.length){var o="number"!=typeof t[0];if(null==r&&(r=o?t.length:t.length/3),!(r<2)){null==i&&(i=0),null==n&&(n=1),this._itemVertexOffsets.push(this._vertexOffset);var a,s,l=(o="number"!=typeof t[0])?"number"!=typeof e[0]:e.length/4===r,u=this.attributes.position,h=this.attributes.positionPrev,c=this.attributes.positionNext,d=this.attributes.color,p=this.attributes.offset,f=this.indices,g=this._vertexOffset;n=Math.max(n,.01);for(var m=i;m1&&(u.copy(g,g-1),d.copy(g,g-1),g++):(m0&&(c.set(g-2,a),c.set(g-1,a)),u.set(g,a),u.set(g+1,a),d.set(g,s),d.set(g+1,s),p.set(g,n/2),p.set(g+1,-n/2),g+=2),this.useNativeLine)d.set(g,s),u.set(g,a),g++;else if(m>0){var _=3*this._triangleOffset;(f=this.indices)[_]=g-4,f[_+1]=g-3,f[_+2]=g-2,f[_+3]=g-3,f[_+4]=g-1,f[_+5]=g-2,this._triangleOffset+=2}}if(!this.useNativeLine){var x=this._vertexOffset,b=this._vertexOffset+2*r;h.copy(x,x+2),h.copy(x+1,x+3),c.copy(b-1,b-3),c.copy(b-2,b-4)}return this._vertexOffset=g,this._vertexOffset}}},setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=ta&&(r=this._x=0,o+=this._rowHeight+l,this._y=o,this._rowHeight=0),this._x+=e+l,this._rowHeight=Math.max(this._rowHeight,n),o+n+l>s)return null;t.x+=this.offsetX*this.dpr+r,t.y+=this.offsetY*this.dpr+o,this._zr.add(t);var u=[this.offsetX/this.width,this.offsetY/this.height];return[[r/a+u[0],o/s+u[1]],[(r+e)/a+u[0],(o+n)/s+u[1]]]},_fitElement:function(t,e,n){var i=t.getBoundingRect(),r=e/i.width,o=n/i.height;t.x=-i.x*r,t.y=-i.y*o,t.scaleX=r,t.scaleY=o,t.update()}},za.prototype={clear:function(){for(var t=0;t=t)){var r=(n+this._nodeWidth)*this._dpr,o=(i+this._nodeHeight)*this._dpr;try{this._zr.resize({width:r,height:o})}catch(t){this._canvas.width=r,this._canvas.height=o}var a=new Ra(this._zr,n,i,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(a),a}},add:function(t,e,n){if(this._coords[t.id])return this._coords[t.id];var i=this._getCurrentNode().add(t,e,n);if(!i){var r=this._expand();if(!r)return;i=r.add(t,e,n)}return this._coords[t.id]=i,i},getCoordsScale:function(){var t=this._dpr;return[this._nodeWidth/this._canvas.width*t,this._nodeHeight/this._canvas.height*t]},getCoords:function(t){return this._coords[t]},dispose:function(){this._zr.dispose()}};const Ba=za;function Za(){}Za.prototype={constructor:Za,setScene:function(t){this._scene=t,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(t){this._lightRoot=t,this.mainLight=new Jo.DirectionalLight({shadowBias:.005}),this.ambientLight=new Jo.AmbientLight,t.add(this.mainLight),t.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(t){var e=this.mainLight,n=this.ambientLight,i=t.getModel("light"),r=i.getModel("main"),o=i.getModel("ambient");e.intensity=r.get("intensity"),n.intensity=o.get("intensity"),e.color=Jo.parseColor(r.get("color")).slice(0,3),n.color=Jo.parseColor(o.get("color")).slice(0,3);var a=r.get("alpha")||0,s=r.get("beta")||0;e.position.setArray(Jo.directionFromAlphaBeta(a,s)),e.lookAt(Jo.Vector3.ZERO),e.castShadow=r.get("shadow"),e.shadowResolution=Jo.getShadowResolution(r.get("shadowQuality"))},updateAmbientCubemap:function(t,e,n){var i=e.getModel("light.ambientCubemap"),r=i.get("texture");if(r){this._cubemapLightsCache=this._cubemapLightsCache||{};var o=this._cubemapLightsCache[r];if(!o){var a=this;o=this._cubemapLightsCache[r]=Jo.createAmbientCubemap(i.option,t,n,(function(){a._isSkyboxFromAmbientCubemap&&a._skybox.setEnvironmentMap(o.specular.cubemap),n.getZr().refresh()}))}this._lightRoot.add(o.diffuse),this._lightRoot.add(o.specular),this._currentCubemapLights=o}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(t,e,n){var r=e.get("environment"),o=this,a=(o._skybox=o._skybox||new ji,o._skybox);if(r&&"none"!==r)if("auto"===r)if(this._isSkyboxFromAmbientCubemap=!0,this._currentCubemapLights){var s=this._currentCubemapLights.specular.cubemap;a.setEnvironmentMap(s),this._scene&&a.attachScene(this._scene),a.material.set("lod",3)}else this._skybox&&this._skybox.detachScene();else if("object"==typeof r&&r.colorStops||"string"==typeof r&&i.color.parse(r)){this._isSkyboxFromAmbientCubemap=!1;var l=new Jo.Texture2D({anisotropic:8,flipY:!1});a.setEnvironmentMap(l);var u=l.image=document.createElement("canvas");u.width=u.height=16;var h=u.getContext("2d"),c=new i.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:r}});i.innerDrawElementOnCanvas(h,c),a.attachScene(this._scene)}else this._isSkyboxFromAmbientCubemap=!1,l=Jo.loadTexture(r,n,{anisotropic:8,flipY:!1}),a.setEnvironmentMap(l),a.attachScene(this._scene);else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var d=e.coordinateSystem;if(this._skybox)if(!d||!d.viewGL||"auto"===r||r.match&&r.match(/.hdr$/))this._skybox.material.undefine("fragment","SRGB_DECODE");else{var p=d.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[p]("fragment","SRGB_DECODE")}}};const Fa=Za;var Va=Pa.vec3,Ga=Hn.extend((function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR")}}}),{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(t){var e=this.attributes,n=this.getQuadVertexCount()*t,i=this.getQuadTriangleCount()*t;this.vertexCount!==n&&(e.position.init(n),e.normal.init(n),e.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var t=Va.create(),e=Va.create(),n=Va.create(),i=[0,3,1,3,2,1];return function(r,o){var a=this.attributes.position,s=this.attributes.normal,l=this.attributes.color;Va.sub(t,r[1],r[0]),Va.sub(e,r[2],r[1]),Va.cross(n,t,e),Va.normalize(n,n);for(var u=0;u<4;u++)a.set(this._vertexOffset+u,r[u]),l.set(this._vertexOffset+u,o),s.set(this._vertexOffset+u,n);var h=3*this._faceOffset;for(u=0;u<6;u++)this.indices[h+u]=i[u]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});i.util.defaults(Ga.prototype,La);const Ha=Ga;var Ua=Mr,Wa={x:0,y:2,z:1};function ja(t,e,n){this.rootNode=new Jo.Node;var i=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:e,castShadow:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:1}),r=new Jo.Mesh({geometry:new Ha,material:n,castShadow:!1,culling:!1,ignorePicking:!0,$ignorePicking:!0,renderOrder:0});this.rootNode.add(r),this.rootNode.add(i),this.faceInfo=t,this.plane=new Jo.Plane,this.linesMesh=i,this.quadsMesh=r}ja.prototype.update=function(t,e,n){var i=t.coordinateSystem,r=[i.getAxis(this.faceInfo[0]),i.getAxis(this.faceInfo[1])],o=this.linesMesh.geometry,a=this.quadsMesh.geometry;o.convertToDynamicArray(!0),a.convertToDynamicArray(!0),this._updateSplitLines(o,r,t,n),this._udpateSplitAreas(a,r,t,n),o.convertToTypedArray(),a.convertToTypedArray();var s=i.getAxis(this.faceInfo[2]);!function(t,e,n,i){var r=[0,0,0],o=i<0?n.getExtentMin():n.getExtentMax();r[Wa[n.dim]]=o,t.position.setArray(r),t.rotation.identity(),e.distance=-Math.abs(o),e.normal.set(0,0,0),"x"===n.dim?(t.rotation.rotateY(i*Math.PI/2),e.normal.x=-i):"z"===n.dim?(t.rotation.rotateX(-i*Math.PI/2),e.normal.y=-i):(i>0&&t.rotation.rotateY(Math.PI),e.normal.z=-i)}(this.rootNode,this.plane,s,this.faceInfo[3])},ja.prototype._updateSplitLines=function(t,e,n,r){var o=r.getDevicePixelRatio();e.forEach((function(r,a){var s=r.model,l=e[1-a].getExtent();if(!r.scale.isBlank()){var u=s.getModel("splitLine",n.getModel("splitLine"));if(u.get("show")){var h=u.getModel("lineStyle"),c=h.get("color"),d=Ua(h.get("opacity"),1),p=Ua(h.get("width"),1);c=i.util.isArray(c)?c:[c];for(var f=r.getTicksCoords({tickModel:u}),g=0,m=0;m65535?new Uint32Array(3*n):new Uint16Array(3*n))},setSpriteAlign:function(t,e,n,i,r){var o,a,s,l;switch(null==n&&(n="left"),null==i&&(i="top"),r=r||0,n){case"left":o=r,s=e[0]+r;break;case"center":case"middle":o=-e[0]/2,s=e[0]/2;break;case"right":o=-e[0]-r,s=-r}switch(i){case"bottom":a=r,l=e[1]+r;break;case"middle":a=-e[1]/2,l=e[1]/2;break;case"top":a=-e[1]-r,l=-r}var u=4*t,h=this.attributes.offset;h.set(u,[o,l]),h.set(u+1,[s,l]),h.set(u+2,[s,a]),h.set(u+3,[o,a])},addSprite:function(t,e,n,i,r,o){var a=this._vertexOffset;this.setSprite(this._vertexOffset/4,t,e,n,i,r,o);for(var s=0;s 0.0) {\n currProj = clipNear(currProj, nextProj);\n }\n else if (prevProj.w > 0.0) {\n currProj = clipNear(currProj, prevProj);\n }\n }\n\n vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;\n vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;\n\n vec2 dir;\n float len = offset;\n if (position == positionPrev) {\n dir = normalize(nextScreen - currScreen);\n }\n else if (position == positionNext) {\n dir = normalize(currScreen - prevScreen);\n }\n else {\n vec2 dirA = normalize(currScreen - prevScreen);\n vec2 dirB = normalize(nextScreen - currScreen);\n\n vec2 tanget = normalize(dirA + dirB);\n\n float miter = 1.0 / max(dot(tanget, dirA), 0.5);\n len *= miter;\n dir = tanget;\n }\n\n dir = vec2(-dir.y, dir.x) * len;\n currScreen += dir;\n\n currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);\n@end\n\n\n@export ecgl.meshLines3D.vertex\n\nattribute vec3 position: POSITION;\nattribute vec3 positionPrev;\nattribute vec3 positionNext;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute vec3 prevPositionPrev;\nattribute vec3 prevPositionNext;\nuniform float percent : 1.0;\n#endif\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\nuniform float near : NEAR;\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.vertexHeader\n\n@import ecgl.lines3D.clipNear\n\nvoid main()\n{\n @import ecgl.lines3D.expandLine\n\n gl_Position = currProj;\n\n v_Color = a_Color;\n\n @import ecgl.common.wireframe.vertexMain\n}\n@end\n\n\n@export ecgl.meshLines3D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\n@import ecgl.common.wireframe.fragmentHeader\n\n@import clay.util.srgb\n\nvoid main()\n{\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n}\n\n@end";var rs=Mr;Jo.Shader.import(is);var os={x:0,y:2,z:1};const as=i.ComponentView.extend({type:"grid3D",__ecgl__:!0,init:function(t,e){var n=new Jo.Material({shader:Jo.createShader("ecgl.color"),depthMask:!1,transparent:!0}),i=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});n.define("fragment","DOUBLE_SIDED"),n.define("both","VERTEX_COLOR"),this.groupGL=new Jo.Node,this._control=new Da({zr:e.getZr()}),this._control.init(),this._faces=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]].map((function(t){var e=new Xa(t,i,n);return this.groupGL.add(e.rootNode),e}),this),this._axes=["x","y","z"].map((function(t){var e=new ns(t,i);return this.groupGL.add(e.rootNode),e}),this);var r=e.getDevicePixelRatio();this._axisLabelSurface=new Ba({width:256,height:256,devicePixelRatio:r}),this._axisLabelSurface.onupdate=function(){e.getZr().refresh()},this._axisPointerLineMesh=new Jo.Mesh({geometry:new ka({useNativeLine:!1}),material:i,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new Ba({width:128,height:128,devicePixelRatio:r}),this._axisPointerLabelsMesh=new Ja({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot)},render:function(t,e,n){this._model=t,this._api=n;var i=t.coordinateSystem;i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL);var r=this._control;r.setViewGL(i.viewGL);var o=t.getModel("viewControl");r.setFromViewControlModel(o,0),this._axisLabelSurface.clear(),r.off("update"),t.get("show")&&(this._faces.forEach((function(i){i.update(t,e,n)}),this),this._axes.forEach((function(e){e.update(t,this._axisLabelSurface,n)}),this)),r.on("update",this._onCameraChange.bind(this,t,n),this),this._sceneHelper.setScene(i.viewGL.scene),this._sceneHelper.updateLight(t),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._initMouseHandler(t)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},showAxisPointer:function(t,e,n,i){this._doShowAxisPointer(),this._updateAxisPointer(i.value)},hideAxisPointer:function(t,e,n,i){this._doHideAxisPointer()},_initMouseHandler:function(t){var e=t.coordinateSystem.viewGL;t.get("show")&&t.get("axisPointer.show")?e.on("mousemove",this._updateAxisPointerOnMousePosition,this):e.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(t){if(!t.target){for(var e,n=this._model.coordinateSystem,i=n.viewGL,r=i.castRay(t.offsetX,t.offsetY,new Jo.Ray),o=0;oi[1]?0:1,a=this._faces[2*n+o],s=this._faces[2*n+1-o];a.rootNode.invisible=!0,s.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var t=this._model.coordinateSystem,e=t.getAxis("x"),n=t.getAxis("y"),i=t.getAxis("z"),r=i.getExtentMax(),o=i.getExtentMin(),a=e.getExtentMin(),s=e.getExtentMax(),l=n.getExtentMax(),u=n.getExtentMin(),h=this._axes[0].rootNode,c=this._axes[1].rootNode,d=this._axes[2].rootNode,p=this._faces,f=p[4].rootNode.invisible?u:l,g=p[2].rootNode.invisible?r:o,m=p[0].rootNode.invisible?a:s,v=p[2].rootNode.invisible?r:o,y=p[0].rootNode.invisible?s:a,_=p[4].rootNode.invisible?u:l;h.rotation.identity(),c.rotation.identity(),d.rotation.identity(),p[4].rootNode.invisible&&(this._axes[0].flipped=!0,h.rotation.rotateX(Math.PI)),p[0].rootNode.invisible&&(this._axes[1].flipped=!0,c.rotation.rotateZ(Math.PI)),p[4].rootNode.invisible&&(this._axes[2].flipped=!0,d.rotation.rotateY(Math.PI)),h.position.set(0,g,f),c.position.set(m,v,0),d.position.set(y,0,_),h.update(),c.update(),d.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var t=this._control.getCamera(),e=[new Jo.Vector4,new Jo.Vector4],n=new Jo.Vector4;this.groupGL.getWorldPosition(n),n.w=1,n.transformMat4(t.viewMatrix).transformMat4(t.projectionMatrix),n.x/=n.w,n.y/=n.w,this._axes.forEach((function(i){for(var r=i.axisLineCoords,o=(i.labelsMesh.geometry,0);on.y?"bottom":"top"):(s="middle",a=h>n.x?"left":"right"),i.setSpriteAlign(a,s,this._api)}),this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(t){var e=this._model.coordinateSystem,n=e.dataToPoint(t),i=this._axisPointerLineMesh.geometry,r=this._model.getModel("axisPointer"),o=this._api.getDevicePixelRatio();function a(t){return Mr(t.model.get("axisPointer.show"),r.get("show"))}function s(t){var e=t.model.getModel("axisPointer",r).getModel("lineStyle"),n=Jo.parseColor(e.get("color")),i=rs(e.get("width"),1),o=rs(e.get("opacity"),1);return n[3]*=o,{color:n,lineWidth:i}}i.convertToDynamicArray(!0);for(var l=0;lf&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}ms.x=ys.x=n.x,ms.y=_s.y=n.y,vs.x=_s.x=n.x+n.width,vs.y=ys.y=n.y+n.height,ms.transform(i),_s.transform(i),vs.transform(i),ys.transform(i),e.x=fs(ms.x,vs.x,ys.x,_s.x),e.y=fs(ms.y,vs.y,ys.y,_s.y);var l=gs(ms.x,vs.x,ys.x,_s.x),u=gs(ms.y,vs.y,ys.y,_s.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}();function Ss(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}function Ts(t,e,n){n=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}(n||0);var i=e.width,r=e.height,o=ma(t.left,i),a=ma(t.top,r),s=ma(t.right,i),l=ma(t.bottom,r),u=ma(t.width,i),h=ma(t.height,r),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=p&&(isNaN(u)&&isNaN(h)&&(p>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ws(o+n[3],a+n[0],u,h);return f.margin=n,f}So(Ss,"vertical"),So(Ss,"horizontal");var Ms=function(){this._pool={},this._allocatedTextures=[]};Ms.prototype={constructor:Ms,get:function(t){var e=Is(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]);var n=this._pool[e];if(!n.length){var i=new Ln(t);return this._allocatedTextures.push(i),i}return n.pop()},put:function(t){var e=Is(t);this._pool.hasOwnProperty(e)||(this._pool[e]=[]),this._pool[e].push(t)},clear:function(t){for(var e=0;e 0.0) {\n if (texture2D(alphaMap, v_Texcoord).a <= alphaCutoff) {\n discard;\n }\n }\n#ifdef USE_VSM\n depth = depth * 0.5 + 0.5;\n float moment1 = depth;\n float moment2 = depth * depth;\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n moment2 += 0.25*(dx*dx+dy*dy);\n #endif\n gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);\n#else\n #ifdef SUPPORT_STANDARD_DERIVATIVES\n float dx = dFdx(depth);\n float dy = dFdy(depth);\n depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;\n #else\n depth += bias;\n #endif\n gl_FragColor = encodeFloat(depth * 0.5 + 0.5);\n#endif\n}\n@end\n@export clay.sm.debug_depth\nuniform sampler2D depthMap;\nvarying vec2 v_Texcoord;\n@import clay.util.decode_float\nvoid main() {\n vec4 tex = texture2D(depthMap, v_Texcoord);\n#ifdef USE_VSM\n gl_FragColor = vec4(tex.rgb, 1.0);\n#else\n float depth = decodeFloat(tex);\n gl_FragColor = vec4(depth, depth, depth, 1.0);\n#endif\n}\n@end\n@export clay.sm.distance.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 world : WORLD;\nattribute vec3 position : POSITION;\n@import clay.chunk.skinning_header\nvarying vec3 v_WorldPosition;\nvoid main (){\n vec4 P = vec4(position, 1.0);\n#ifdef SKINNING\n @import clay.chunk.skin_matrix\n P = skinMatrixWS * P;\n#endif\n#ifdef INSTANCING\n @import clay.chunk.instancing_matrix\n P = instanceMat * P;\n#endif\n gl_Position = worldViewProjection * P;\n v_WorldPosition = (world * P).xyz;\n}\n@end\n@export clay.sm.distance.fragment\nuniform vec3 lightPosition;\nuniform float range : 100;\nvarying vec3 v_WorldPosition;\n@import clay.util.encode_float\nvoid main(){\n float dist = distance(lightPosition, v_WorldPosition);\n#ifdef USE_VSM\n gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);\n#else\n dist = dist / range;\n gl_FragColor = encodeFloat(dist);\n#endif\n}\n@end\n@export clay.plugin.shadow_map_common\n@import clay.util.decode_float\nfloat tapShadowMap(sampler2D map, vec2 uv, float z){\n vec4 tex = texture2D(map, uv);\n return step(z, decodeFloat(tex) * 2.0 - 1.0);\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {\n float shadowContrib = tapShadowMap(map, uv, z);\n vec2 offset = vec2(1.0 / textureSize) * scale;\n#ifdef PCF_KERNEL_SIZE\n for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{\n shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);\n }}\n return shadowContrib / float(PCF_KERNEL_SIZE + 1);\n#else\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);\n shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);\n shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);\n return shadowContrib / 9.0;\n#endif\n}\nfloat pcf(sampler2D map, vec2 uv, float z, float textureSize) {\n return pcf(map, uv, z, textureSize, vec2(1.0));\n}\nfloat chebyshevUpperBound(vec2 moments, float z){\n float p = 0.0;\n z = z * 0.5 + 0.5;\n if (z <= moments.x) {\n p = 1.0;\n }\n float variance = moments.y - moments.x * moments.x;\n variance = max(variance, 0.0000001);\n float mD = moments.x - z;\n float pMax = variance / (variance + mD * mD);\n pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);\n return max(p, pMax);\n}\nfloat computeShadowContrib(\n sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset\n) {\n vec4 posInLightSpace = lightVPM * vec4(position, 1.0);\n posInLightSpace.xyz /= posInLightSpace.w;\n float z = posInLightSpace.z;\n if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&\n all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){\n vec2 uv = (posInLightSpace.xy+1.0) / 2.0;\n #ifdef USE_VSM\n vec2 moments = texture2D(map, uv * scale + offset).xy;\n return chebyshevUpperBound(moments, z);\n #else\n return pcf(map, uv * scale + offset, z, textureSize, scale);\n #endif\n }\n return 1.0;\n}\nfloat computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {\n return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));\n}\nfloat computeShadowContribOmni(samplerCube map, vec3 direction, float range)\n{\n float dist = length(direction);\n vec4 shadowTex = textureCube(map, direction);\n#ifdef USE_VSM\n vec2 moments = shadowTex.xy;\n float variance = moments.y - moments.x * moments.x;\n float mD = moments.x - dist;\n float p = variance / (variance + mD * mD);\n if(moments.x + 0.001 < dist){\n return clamp(p, 0.0, 1.0);\n }else{\n return 1.0;\n }\n#else\n return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);\n#endif\n}\n@end\n@export clay.plugin.compute_shadow_map\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)\n#ifdef SPOT_LIGHT_SHADOWMAP_COUNT\nuniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT\n#if defined(SHADOW_CASCADE)\nuniform sampler2D directionalLightShadowMaps[1]:unconfigurable;\nuniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;\nuniform float directionalLightShadowMapSizes[1]:unconfigurable;\nuniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;\nuniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;\n#else\nuniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\nuniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\n#endif\n#ifdef POINT_LIGHT_SHADOWMAP_COUNT\nuniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;\n#endif\nuniform bool shadowEnabled : true;\n#ifdef PCF_KERNEL_SIZE\nuniform vec2 pcfKernel[PCF_KERNEL_SIZE];\n#endif\n@import clay.plugin.shadow_map_common\n#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,\n spotLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)\n#ifdef SHADOW_CASCADE\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)\n / (gl_DepthRange.far - gl_DepthRange.near);\n float shadowContrib;\n shadowContribs[0] = 1.0;\n for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{\n if (\n depth >= shadowCascadeClipsNear[_idx_] &&\n depth <= shadowCascadeClipsFar[_idx_]\n ) {\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[0],\n vec2(1.0 / float(SHADOW_CASCADE), 1.0),\n vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)\n );\n shadowContribs[0] = shadowContrib;\n }\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#else\nvoid computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){\n float shadowContrib;\n for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n shadowContrib = computeShadowContrib(\n directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,\n directionalLightShadowMapSizes[_idx_]\n );\n shadowContribs[_idx_] = shadowContrib;\n }}\n for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n#if defined(POINT_LIGHT_SHADOWMAP_COUNT)\nvoid computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){\n vec3 lightPosition;\n vec3 direction;\n for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{\n lightPosition = pointLightPosition[_idx_];\n direction = position - lightPosition;\n shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);\n }}\n for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{\n shadowContribs[_idx_] = 1.0;\n }}\n}\n#endif\n#endif\n@end");var Es,Ns,ks,Rs,zs,Bs,Zs,Fs=g.extend((function(){return{softShadow:Fs.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"highp",_lastRenderNotCastShadow:!1,_frameBuffer:new Zi,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new Ds}}),(function(){this._gaussianPassH=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new fr({fragment:jt.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new fr({fragment:jt.source("clay.sm.debug_depth")})}),{render:function(t,e,n,i){n||(n=e.getMainCamera()),this.trigger("beforerender",this,t,e,n),this._renderShadowPass(t,e,n,i),this.trigger("afterrender",this,t,e,n)},renderDebug:function(t,e){t.saveClear();var n=t.viewport,i=0,r=e||n.width/4,o=r;for(var a in this.softShadow===Fs.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM"),this._textures){var s=this._textures[a];t.setViewport(i,0,r*s.width/s.height,o),this._outputDepthPass.setUniform("depthMap",s),this._outputDepthPass.render(t),i+=r*s.width/s.height}t.setViewport(n),t.restoreClear()},_updateReceivers:function(t,e){if(e.receiveShadow?(this._receivers.push(e),e.material.set("shadowEnabled",1),e.material.set("pcfKernel",this.kernelPCF)):e.material.set("shadowEnabled",0),this.softShadow===Fs.VSM)e.material.define("fragment","USE_VSM"),e.material.undefine("fragment","PCF_KERNEL_SIZE");else{e.material.undefine("fragment","USE_VSM");var n=this.kernelPCF;n&&n.length?e.material.define("fragment","PCF_KERNEL_SIZE",n.length/2):e.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(t,e){var n=this;e.traverse((function(e){e.isRenderable()&&n._updateReceivers(t,e)}));for(var i=0;i4){console.warn("Support at most 4 cascade");continue}f.shadowCascade>1&&(a=f),this.renderDirectionalLightShadow(t,e,n,f,c,h,u)}else"SPOT_LIGHT"===f.type?this.renderSpotLightShadow(t,e,f,l,s):"POINT_LIGHT"===f.type&&this.renderPointLightShadow(t,e,f,d);this._shadowMapNumber[f.type]++}for(var g in this._shadowMapNumber){var m=this._shadowMapNumber[g],v=g+"_SHADOWMAP_COUNT";for(p=0;p0?y.define("fragment",v,m):y.isDefined("fragment",v)&&y.undefine("fragment",v))}for(p=0;p0){var x=u.map(T);if(_.directionalLightShadowMaps={value:u,type:"tv"},_.directionalLightMatrices={value:h,type:"m4v"},_.directionalLightShadowMapSizes={value:x,type:"1fv"},a){var b=c.slice(),w=c.slice();b.pop(),w.shift(),b.reverse(),w.reverse(),h.reverse(),_.shadowCascadeClipsNear={value:b,type:"1fv"},_.shadowCascadeClipsFar={value:w,type:"1fv"}}}if(s.length>0){var S=s.map(T);(_=e.shadowUniforms).spotLightShadowMaps={value:s,type:"tv"},_.spotLightMatrices={value:l,type:"m4v"},_.spotLightShadowMapSizes={value:S,type:"1fv"}}d.length>0&&(_.pointLightShadowMaps={value:d,type:"tv"})}function T(t){return t.height}},renderDirectionalLightShadow:(Es=new li,Ns=new He,ks=new rn,Rs=new He,zs=new He,Bs=new He,Zs=new He,function(t,e,n,i,r,o,a){var s=this._getDepthMaterial(i),l={getMaterial:function(t){return t.shadowDepthMaterial||s},isMaterialChanged:Os,getUniform:Ps,ifRender:function(t){return t.castShadow},sortCompare:he.opaqueSortCompare};if(!e.viewBoundingBoxLastFrame.isFinite()){var u=e.getBoundingBox();e.viewBoundingBoxLastFrame.copy(u).applyTransform(n.viewMatrix)}var h=Math.min(-e.viewBoundingBoxLastFrame.min.z,n.far),c=Math.max(-e.viewBoundingBoxLastFrame.max.z,n.near),d=this._getDirectionalLightCamera(i,e,n),p=Bs.array;Zs.copy(d.projectionMatrix),qt.invert(zs.array,d.worldTransform.array),qt.multiply(zs.array,zs.array,n.worldTransform.array),qt.multiply(p,Zs.array,zs.array);for(var f=[],g=n instanceof Ii,m=(n.near+n.far)/(n.near-n.far),v=2*n.near*n.far/(n.near-n.far),y=0;y<=i.shadowCascade;y++){var _=c*Math.pow(h/c,y/i.shadowCascade),x=c+(h-c)*y/i.shadowCascade,b=_*i.cascadeSplitLogFactor+x*(1-i.cascadeSplitLogFactor);f.push(b),r.push(-(-b*m+v)/-b)}var w=this._getTexture(i,i.shadowCascade);a.push(w);var S=t.viewport,T=t.gl;for(this._frameBuffer.attach(w),this._frameBuffer.bind(t),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT),y=0;yd?s>p?f[r>0?"px":"nx"]=!0:f[a>0?"pz":"nz"]=!0:d>p?f[o>0?"py":"ny"]=!0:f[a>0?"pz":"nz"]=!0}for(n=0;n0&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))}}),Hs=g.extend((function(){return{nodes:[]}}),{dirty:function(){this._dirty=!0},addNode:function(t){this.nodes.indexOf(t)>=0||(this.nodes.push(t),this._dirty=!0)},removeNode:function(t){"string"==typeof t&&(t=this.getNodeByName(t));var e=this.nodes.indexOf(t);e>=0&&(this.nodes.splice(e,1),this._dirty=!0)},getNodeByName:function(t){for(var e=0;e=n.COLOR_ATTACHMENT0&&h<=n.COLOR_ATTACHMENT0+8&&u.push(h);l.drawBuffersEXT(u)}t.saveClear(),t.clearBit=16640,e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),t.restoreClear(),i.unbind(t)}else e=t.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);this.trigger("afterrender",e),this._rendering=!1,this._rendered=!0}}),js=Gs.extend((function(){return{texture:null,outputs:{color:{}}}}),(function(){}),{getOutput:function(t,e){return this.texture},beforeFrame:function(){},afterFrame:function(){}}),Xs=Gs.extend((function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}}),(function(){var t=new fr({fragment:this.shader});this.pass=t}),{render:function(t,e){this.trigger("beforerender",t),this._rendering=!0;var n=t.gl;for(var i in this.inputLinks){var r=(c=this.inputLinks[i]).node.getOutput(t,c.pin);this.pass.setUniform(i,r)}if(this.outputs){this.pass.outputs={};var o={};for(var a in this.outputs){var s=this.updateParameter(a,t);isNaN(s.width)&&this.updateParameter(a,t);var l=this.outputs[a],u=this._compositor.allocateTexture(s);this._outputTextures[a]=u,"string"==typeof(h=l.attachment||n.COLOR_ATTACHMENT0)&&(h=n[h]),o[h]=u}for(var h in this._compositor.getFrameBuffer().bind(t),o)this._compositor.getFrameBuffer().attach(o[h],h);this.pass.render(t),this._compositor.getFrameBuffer().updateMipmap(t)}else this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(t),this.pass.render(t,e);for(var i in this.inputLinks){var c;(c=this.inputLinks[i]).node.removeReference(c.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",t)},updateParameter:function(t,e){var n,i,r=this.outputs[t],o=r.parameters,a=r._parametersCopy;if(a||(a=r._parametersCopy={}),o)for(var s in o)"width"!==s&&"height"!==s&&(a[s]=o[s]);return n="function"==typeof o.width?o.width.call(this,e):o.width,i="function"==typeof o.height?o.height.call(this,e):o.height,n=Math.ceil(n),i=Math.ceil(i),a.width===n&&a.height===i||this._outputTextures[t]&&this._outputTextures[t].dispose(e),a.width=n,a.height=i,a},setParameter:function(t,e){this.pass.setUniform(t,e)},getParameter:function(t){return this.pass.getUniform(t)},setParameters:function(t){for(var e in t)this.setParameter(e,t[e])},define:function(t,e){this.pass.material.define("fragment",t,e)},undefine:function(t){this.pass.material.undefine("fragment",t)},removeReference:function(t){this._outputReferences[t]--,0===this._outputReferences[t]&&(this.outputs[t].keepLastFrame?(this._prevOutputTextures[t]&&this._compositor.releaseTexture(this._prevOutputTextures[t]),this._prevOutputTextures[t]=this._outputTextures[t]):this._compositor.releaseTexture(this._outputTextures[t]))},clear:function(){Gs.prototype.clear.call(this),this.pass.material.disableTexturesAll()}}),Ys="@export clay.compositor.kernel.gaussian_9\nfloat gaussianKernel[9];\ngaussianKernel[0] = 0.07;\ngaussianKernel[1] = 0.09;\ngaussianKernel[2] = 0.12;\ngaussianKernel[3] = 0.14;\ngaussianKernel[4] = 0.16;\ngaussianKernel[5] = 0.14;\ngaussianKernel[6] = 0.12;\ngaussianKernel[7] = 0.09;\ngaussianKernel[8] = 0.07;\n@end\n@export clay.compositor.kernel.gaussian_13\nfloat gaussianKernel[13];\ngaussianKernel[0] = 0.02;\ngaussianKernel[1] = 0.03;\ngaussianKernel[2] = 0.06;\ngaussianKernel[3] = 0.08;\ngaussianKernel[4] = 0.11;\ngaussianKernel[5] = 0.13;\ngaussianKernel[6] = 0.14;\ngaussianKernel[7] = 0.13;\ngaussianKernel[8] = 0.11;\ngaussianKernel[9] = 0.08;\ngaussianKernel[10] = 0.06;\ngaussianKernel[11] = 0.03;\ngaussianKernel[12] = 0.02;\n@end\n@export clay.compositor.gaussian_blur\n#define SHADER_NAME gaussian_blur\nuniform sampler2D texture;varying vec2 v_Texcoord;\nuniform float blurSize : 2.0;\nuniform vec2 textureSize : [512.0, 512.0];\nuniform float blurDir : 0.0;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main (void)\n{\n @import clay.compositor.kernel.gaussian_9\n vec2 off = blurSize / textureSize;\n off *= vec2(1.0 - blurDir, blurDir);\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n for (int i = 0; i < 9; i++) {\n float w = gaussianKernel[i];\n vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));\n sum += texel * w;\n weightAll += w;\n }\n gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));\n}\n@end\n",qs="\n@export clay.compositor.lut\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform sampler2D lookup;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n float blueColor = tex.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);\n vec4 newColor1 = texture2D(lookup, texPos1);\n vec4 newColor2 = texture2D(lookup, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n gl_FragColor = vec4(newColor.rgb, tex.w);\n}\n@end",Ks="@export clay.compositor.output\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = tex.rgb;\n#ifdef OUTPUT_ALPHA\n gl_FragColor.a = tex.a;\n#else\n gl_FragColor.a = 1.0;\n#endif\n gl_FragColor = encodeHDR(gl_FragColor);\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",Js="@export clay.compositor.bright\nuniform sampler2D texture;\nuniform float threshold : 1;\nuniform float scale : 1.0;\nuniform vec2 textureSize: [512, 512];\nvarying vec2 v_Texcoord;\nconst vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvec4 median(vec4 a, vec4 b, vec4 c)\n{\n return a + b + c - min(min(a, b), c) - max(max(a, b), c);\n}\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n#ifdef ANTI_FLICKER\n vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);\n vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));\n vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));\n vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));\n vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));\n texel = median(median(texel, s1, s2), s3, s4);\n#endif\n float lum = dot(texel.rgb , lumWeight);\n vec4 color;\n if (lum > threshold && texel.a > 0.0)\n {\n color = vec4(texel.rgb * scale, texel.a * scale);\n }\n else\n {\n color = vec4(0.0);\n }\n gl_FragColor = encodeHDR(color);\n}\n@end\n",Qs="@export clay.compositor.downsample\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nfloat brightness(vec3 c)\n{\n return max(max(c.r, c.g), c.b);\n}\n@import clay.util.clamp_sample\nvoid main()\n{\n vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;\n#ifdef ANTI_FLICKER\n vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;\n vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;\n vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;\n vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;\n float s1w = 1.0 / (brightness(s1) + 1.0);\n float s2w = 1.0 / (brightness(s2) + 1.0);\n float s3w = 1.0 / (brightness(s3) + 1.0);\n float s4w = 1.0 / (brightness(s4) + 1.0);\n float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);\n vec4 color = vec4(\n (s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,\n 1.0\n );\n#else\n vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n color *= 0.25;\n#endif\n gl_FragColor = encodeHDR(color);\n}\n@end",$s="\n@export clay.compositor.upsample\n#define HIGH_QUALITY\nuniform sampler2D texture;\nuniform vec2 textureSize : [512, 512];\nuniform float sampleScale: 0.5;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\n@import clay.util.clamp_sample\nvoid main()\n{\n#ifdef HIGH_QUALITY\n vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n gl_FragColor = encodeHDR(s / 16.0);\n#else\n vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;\n vec4 s;\n s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));\n s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));\n gl_FragColor = encodeHDR(s / 4.0);\n#endif\n}\n@end",tl="@export clay.compositor.hdr.composite\n#define TONEMAPPING\nuniform sampler2D texture;\n#ifdef BLOOM_ENABLED\nuniform sampler2D bloom;\n#endif\n#ifdef LENSFLARE_ENABLED\nuniform sampler2D lensflare;\nuniform sampler2D lensdirt;\n#endif\n#ifdef LUM_ENABLED\nuniform sampler2D lum;\n#endif\n#ifdef LUT_ENABLED\nuniform sampler2D lut;\n#endif\n#ifdef COLOR_CORRECTION\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float saturation : 1.0;\n#endif\n#ifdef VIGNETTE\nuniform float vignetteDarkness: 1.0;\nuniform float vignetteOffset: 1.0;\n#endif\nuniform float exposure : 1.0;\nuniform float bloomIntensity : 0.25;\nuniform float lensflareIntensity : 1;\nvarying vec2 v_Texcoord;\n@import clay.util.srgb\nvec3 ACESToneMapping(vec3 color)\n{\n const float A = 2.51;\n const float B = 0.03;\n const float C = 2.43;\n const float D = 0.59;\n const float E = 0.14;\n return (color * (A * color + B)) / (color * (C * color + D) + E);\n}\nfloat eyeAdaption(float fLum)\n{\n return mix(0.2, fLum, 0.5);\n}\n#ifdef LUT_ENABLED\nvec3 lutTransform(vec3 color) {\n float blueColor = color.b * 63.0;\n vec2 quad1;\n quad1.y = floor(floor(blueColor) / 8.0);\n quad1.x = floor(blueColor) - (quad1.y * 8.0);\n vec2 quad2;\n quad2.y = floor(ceil(blueColor) / 8.0);\n quad2.x = ceil(blueColor) - (quad2.y * 8.0);\n vec2 texPos1;\n texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec2 texPos2;\n texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);\n texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);\n vec4 newColor1 = texture2D(lut, texPos1);\n vec4 newColor2 = texture2D(lut, texPos2);\n vec4 newColor = mix(newColor1, newColor2, fract(blueColor));\n return newColor.rgb;\n}\n#endif\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = vec4(0.0);\n vec4 originalTexel = vec4(0.0);\n#ifdef TEXTURE_ENABLED\n texel = decodeHDR(texture2D(texture, v_Texcoord));\n originalTexel = texel;\n#endif\n#ifdef BLOOM_ENABLED\n vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));\n texel.rgb += bloomTexel.rgb * bloomIntensity;\n texel.a += bloomTexel.a * bloomIntensity;\n#endif\n#ifdef LENSFLARE_ENABLED\n texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;\n#endif\n texel.a = min(texel.a, 1.0);\n#ifdef LUM_ENABLED\n float fLum = texture2D(lum, vec2(0.5, 0.5)).r;\n float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));\n float exposureBias = adaptedLumDest * exposure;\n#else\n float exposureBias = exposure;\n#endif\n#ifdef TONEMAPPING\n texel.rgb *= exposureBias;\n texel.rgb = ACESToneMapping(texel.rgb);\n#endif\n texel = linearTosRGB(texel);\n#ifdef LUT_ENABLED\n texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));\n#endif\n#ifdef COLOR_CORRECTION\n texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);\n texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));\n texel.rgb = mix(vec3(lum), texel.rgb, saturation);\n#endif\n#ifdef VIGNETTE\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);\n texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));\n#endif\n gl_FragColor = encodeHDR(texel);\n#ifdef DEBUG\n #if DEBUG == 1\n gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));\n #elif DEBUG == 2\n gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);\n #elif DEBUG == 3\n gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));\n #endif\n#endif\n if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {\n gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));\n }\n#ifdef PREMULTIPLY_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif\n}\n@end",el="@export clay.compositor.blend\n#define SHADER_NAME blend\n#ifdef TEXTURE1_ENABLED\nuniform sampler2D texture1;\nuniform float weight1 : 1.0;\n#endif\n#ifdef TEXTURE2_ENABLED\nuniform sampler2D texture2;\nuniform float weight2 : 1.0;\n#endif\n#ifdef TEXTURE3_ENABLED\nuniform sampler2D texture3;\nuniform float weight3 : 1.0;\n#endif\n#ifdef TEXTURE4_ENABLED\nuniform sampler2D texture4;\nuniform float weight4 : 1.0;\n#endif\n#ifdef TEXTURE5_ENABLED\nuniform sampler2D texture5;\nuniform float weight5 : 1.0;\n#endif\n#ifdef TEXTURE6_ENABLED\nuniform sampler2D texture6;\nuniform float weight6 : 1.0;\n#endif\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = vec4(0.0);\n#ifdef TEXTURE1_ENABLED\n tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;\n#endif\n#ifdef TEXTURE2_ENABLED\n tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;\n#endif\n#ifdef TEXTURE3_ENABLED\n tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;\n#endif\n#ifdef TEXTURE4_ENABLED\n tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;\n#endif\n#ifdef TEXTURE5_ENABLED\n tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;\n#endif\n#ifdef TEXTURE6_ENABLED\n tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;\n#endif\n gl_FragColor = encodeHDR(tex);\n}\n@end",nl="@export clay.compositor.fxaa\nuniform sampler2D texture;\nuniform vec4 viewport : VIEWPORT;\nvarying vec2 v_Texcoord;\n#define FXAA_REDUCE_MIN (1.0/128.0)\n#define FXAA_REDUCE_MUL (1.0/8.0)\n#define FXAA_SPAN_MAX 8.0\n@import clay.util.rgbm\nvoid main()\n{\n vec2 resolution = 1.0 / viewport.zw;\n vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;\n vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;\n vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );\n vec3 rgbM = rgbaM.xyz;\n float opacity = rgbaM.w;\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float lumaNW = dot( rgbNW, luma );\n float lumaNE = dot( rgbNE, luma );\n float lumaSW = dot( rgbSW, luma );\n float lumaSE = dot( rgbSE, luma );\n float lumaM = dot( rgbM, luma );\n float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );\n float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );\n vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );\n float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );\n dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * resolution;\n vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;\n rgbA *= 0.5;\n vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;\n rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;\n rgbB *= 0.25;\n rgbB += rgbA * 0.5;\n float lumaB = dot( rgbB, luma );\n if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )\n {\n gl_FragColor = vec4( rgbA, opacity );\n }\n else {\n gl_FragColor = vec4( rgbB, opacity );\n }\n}\n@end";!function(t){t.import("@export clay.compositor.coloradjust\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nuniform float contrast : 1.0;\nuniform float exposure : 0.0;\nuniform float gamma : 1.0;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = clamp(tex.rgb + vec3(brightness), 0.0, 1.0);\n color = clamp( (color-vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);\n color = clamp( color * pow(2.0, exposure), 0.0, 1.0);\n color = clamp( pow(color, vec3(gamma)), 0.0, 1.0);\n float luminance = dot( color, w );\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.brightness\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float brightness : 0.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = tex.rgb + vec3(brightness);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.contrast\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float contrast : 1.0;\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord);\n vec3 color = (tex.rgb-vec3(0.5))*contrast+vec3(0.5);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.exposure\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float exposure : 0.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb * pow(2.0, exposure);\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.gamma\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float gamma : 1.0;\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = pow(tex.rgb, vec3(gamma));\n gl_FragColor = vec4(color, tex.a);\n}\n@end\n@export clay.compositor.saturation\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float saturation : 1.0;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D(texture, v_Texcoord);\n vec3 color = tex.rgb;\n float luminance = dot(color, w);\n color = mix(vec3(luminance), color, saturation);\n gl_FragColor = vec4(color, tex.a);\n}\n@end"),t.import(Ys),t.import("@export clay.compositor.hdr.log_lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\n@import clay.util.rgbm\nvoid main()\n{\n vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));\n float luminance = dot(tex.rgb, w);\n luminance = log(luminance + 0.001);\n gl_FragColor = encodeHDR(vec4(vec3(luminance), 1.0));\n}\n@end\n@export clay.compositor.hdr.lum_adaption\nvarying vec2 v_Texcoord;\nuniform sampler2D adaptedLum;\nuniform sampler2D currentLum;\nuniform float frameTime : 0.02;\n@import clay.util.rgbm\nvoid main()\n{\n float fAdaptedLum = decodeHDR(texture2D(adaptedLum, vec2(0.5, 0.5))).r;\n float fCurrentLum = exp(encodeHDR(texture2D(currentLum, vec2(0.5, 0.5))).r);\n fAdaptedLum += (fCurrentLum - fAdaptedLum) * (1.0 - pow(0.98, 30.0 * frameTime));\n gl_FragColor = encodeHDR(vec4(vec3(fAdaptedLum), 1.0));\n}\n@end\n@export clay.compositor.lum\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nconst vec3 w = vec3(0.2125, 0.7154, 0.0721);\nvoid main()\n{\n vec4 tex = texture2D( texture, v_Texcoord );\n float luminance = dot(tex.rgb, w);\n gl_FragColor = vec4(vec3(luminance), 1.0);\n}\n@end"),t.import(qs),t.import("@export clay.compositor.vignette\n#define OUTPUT_ALPHA\nvarying vec2 v_Texcoord;\nuniform sampler2D texture;\nuniform float darkness: 1;\nuniform float offset: 1;\n@import clay.util.rgbm\nvoid main()\n{\n vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));\n gl_FragColor.rgb = texel.rgb;\n vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(offset);\n gl_FragColor = encodeHDR(vec4(mix(texel.rgb, vec3(1.0 - darkness), dot(uv, uv)), texel.a));\n}\n@end"),t.import(Ks),t.import(Js),t.import(Qs),t.import($s),t.import(tl),t.import("@export clay.compositor.lensflare\n#define SAMPLE_NUMBER 8\nuniform sampler2D texture;\nuniform sampler2D lenscolor;\nuniform vec2 textureSize : [512, 512];\nuniform float dispersal : 0.3;\nuniform float haloWidth : 0.4;\nuniform float distortion : 1.0;\nvarying vec2 v_Texcoord;\n@import clay.util.rgbm\nvec4 textureDistorted(\n in vec2 texcoord,\n in vec2 direction,\n in vec3 distortion\n) {\n return vec4(\n decodeHDR(texture2D(texture, texcoord + direction * distortion.r)).r,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.g)).g,\n decodeHDR(texture2D(texture, texcoord + direction * distortion.b)).b,\n 1.0\n );\n}\nvoid main()\n{\n vec2 texcoord = -v_Texcoord + vec2(1.0); vec2 textureOffset = 1.0 / textureSize;\n vec2 ghostVec = (vec2(0.5) - texcoord) * dispersal;\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n vec3 distortion = vec3(-textureOffset.x * distortion, 0.0, textureOffset.x * distortion);\n vec4 result = vec4(0.0);\n for (int i = 0; i < SAMPLE_NUMBER; i++)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n float weight = length(vec2(0.5) - offset) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n }\n result *= texture2D(lenscolor, vec2(length(vec2(0.5) - texcoord)) / length(vec2(0.5)));\n float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weight = pow(1.0 - weight, 10.0);\n vec2 offset = fract(texcoord + haloVec);\n result += textureDistorted(offset, normalize(ghostVec), distortion) * weight;\n gl_FragColor = result;\n}\n@end"),t.import(el),t.import(nl)}(jt);var il=/^#source\((.*?)\)/;function rl(t,e,n){var i,r,o,a,s=t.type||"filter";if("filter"===s){var l=t.shader.trim(),u=il.exec(l);if(u?i=jt.source(u[1].trim()):"#"===l.charAt(0)&&(i=e.shaders[l.substr(1)]),i||(i=l),!i)return}if(t.inputs)for(var h in r={},t.inputs)"string"==typeof t.inputs[h]?r[h]=t.inputs[h]:r[h]={node:t.inputs[h].node,pin:t.inputs[h].pin};if(t.outputs)for(var h in o={},t.outputs){var c=t.outputs[h];o[h]={},null!=c.attachment&&(o[h].attachment=c.attachment),null!=c.keepLastFrame&&(o[h].keepLastFrame=c.keepLastFrame),null!=c.outputLastFrame&&(o[h].outputLastFrame=c.outputLastFrame),c.parameters&&(o[h].parameters=sl(c.parameters))}if(a="scene"===s?new Ws({name:t.name,scene:n.scene,camera:n.camera,outputs:o}):"texture"===s?new js({name:t.name,outputs:o}):new Xs({name:t.name,shader:i,inputs:r,outputs:o})){if(t.parameters)for(var h in t.parameters)"string"==typeof(d=t.parameters[h])?"#"===(d=d.trim()).charAt(0)?d=e.textures[d.substr(1)]:a.on("beforerender",ll(h,ul(d))):"function"==typeof d&&a.on("beforerender",d),a.setParameter(h,d);if(t.defines&&a.pass)for(var h in t.defines){var d=t.defines[h];a.pass.material.define("fragment",h,d)}}return a}function ol(t,e){return t}function al(t,e){return e}function sl(t){var e={};if(!t)return e;["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach((function(n){var i=t[n];null!=i&&("string"==typeof i&&(i=Sn[i]),e[n]=i)}));var n=t.scale||1;return["width","height"].forEach((function(i){if(null!=t[i]){var r=t[i];"string"==typeof r?(r=r.trim(),e[i]=(o=ul(r),a=(a=n)||1,function(t){var e=t.getDevicePixelRatio(),n=t.getWidth()*a,i=t.getHeight()*a;return o(n,i,e)})):e[i]=r}var o,a})),e.width||(e.width=ol),e.height||(e.height=al),null!=t.useMipmap&&(e.useMipmap=t.useMipmap),e}function ll(t,e){return function(n){var i=n.getDevicePixelRatio(),r=n.getWidth(),o=n.getHeight(),a=e(r,o,i);this.setParameter(t,a)}}function ul(t){var e=/^expr\((.*)\)$/.exec(t);if(e)try{var n=new Function("width","height","dpr","return "+e[1]);return n(1,1),n}catch(t){throw new Error("Invalid expression.")}}const hl=function(t,e){for(var n=0,i=1/e,r=t;r>0;)n+=i*(r%e),r=Math.floor(r/e),i/=e;return n};function cl(t){for(var e=new Uint8Array(t*t*4),n=0,i=new ye,r=0;r 0.99999) {\n gl_FragColor = vec4(1.0);\n return;\n }\n mat3 kernelBasis;\n#endif\n\n float z = depthTexel.r * 2.0 - 1.0;\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * projectedPos;\n\n vec3 position = p4.xyz / p4.w;\n\n float ao = ssaoEstimator(position, kernelBasis);\n ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n\n@end\n\n\n@export ecgl.ssao.blur\n#define SHADER_NAME SSAO_BLUR\n\nuniform sampler2D ssaoTexture;\n\n#ifdef NORMALTEX_ENABLED\nuniform sampler2D normalTex;\n#endif\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\nuniform int direction: 0.0;\n\n#ifdef DEPTHTEX_ENABLED\nuniform sampler2D depthTex;\nuniform mat4 projection;\nuniform float depthRange : 0.5;\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n#endif\n\nvoid main()\n{\n float kernel[5];\n kernel[0] = 0.122581;\n kernel[1] = 0.233062;\n kernel[2] = 0.288713;\n kernel[3] = 0.233062;\n kernel[4] = 0.122581;\n\n vec2 off = vec2(0.0);\n if (direction == 0) {\n off[0] = blurSize / textureSize.x;\n }\n else {\n off[1] = blurSize / textureSize.y;\n }\n\n vec2 coord = v_Texcoord;\n\n float sum = 0.0;\n float weightAll = 0.0;\n\n#ifdef NORMALTEX_ENABLED\n vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;\n#endif\n#if defined(DEPTHTEX_ENABLED)\n float centerDepth = getLinearDepth(v_Texcoord);\n#endif\n\n for (int i = 0; i < 5; i++) {\n vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));\n\n float w = kernel[i];\n#ifdef NORMALTEX_ENABLED\n vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;\n w *= clamp(dot(normal, centerNormal), 0.0, 1.0);\n#endif\n#ifdef DEPTHTEX_ENABLED\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));\n#endif\n\n weightAll += w;\n sum += texture2D(ssaoTexture, coord).r * w;\n }\n\n gl_FragColor = vec4(vec3(sum / weightAll), 1.0);\n}\n\n@end\n"),fl.prototype.setDepthTexture=function(t){this._depthTex=t},fl.prototype.setNormalTexture=function(t){this._normalTex=t,this._ssaoPass.material[t?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},fl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._ssaoPass,a=this._blurPass;o.setUniform("kernel",this._kernels[n%this._kernels.length]),o.setUniform("depthTex",this._depthTex),null!=this._normalTex&&o.setUniform("normalTex",this._normalTex),o.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var s=new He;He.transpose(s,e.worldTransform),o.setUniform("projection",e.projectionMatrix.array),o.setUniform("projectionInv",e.invProjectionMatrix.array),o.setUniform("viewInverseTranspose",s.array);var l=this._ssaoTexture,u=this._blurTexture,h=this._blurTexture2;l.width=i/2,l.height=r/2,u.width=i,u.height=r,h.width=i,h.height=r,this._framebuffer.attach(l),this._framebuffer.bind(t),t.gl.clearColor(1,1,1,1),t.gl.clear(t.gl.COLOR_BUFFER_BIT),o.render(t),a.setUniform("textureSize",[i/2,r/2]),a.setUniform("projection",e.projectionMatrix.array),this._framebuffer.attach(u),a.setUniform("direction",0),a.setUniform("ssaoTexture",l),a.render(t),this._framebuffer.attach(h),a.setUniform("textureSize",[i,r]),a.setUniform("direction",1),a.setUniform("ssaoTexture",u),a.render(t),this._framebuffer.unbind(t);var c=t.clearColor;t.gl.clearColor(c[0],c[1],c[2],c[3])},fl.prototype.getTargetTexture=function(){return this._blurTexture2},fl.prototype.setParameter=function(t,e){"noiseTexSize"===t?this.setNoiseSize(e):"kernelSize"===t?this.setKernelSize(e):"intensity"===t?this._ssaoPass.material.set("intensity",e):this._ssaoPass.setUniform(t,e)},fl.prototype.setKernelSize=function(t){this._kernelSize=t,this._ssaoPass.material.define("fragment","KERNEL_SIZE",t),this._kernels=this._kernels||[];for(var e=0;e<30;e++)this._kernels[e]=pl(t,e*t,!!this._normalTex)},fl.prototype.setNoiseSize=function(t){var e=this._ssaoPass.getUniform("noiseTex");e?(e.data=cl(t),e.width=e.height=t,e.dirty()):(e=dl(t),this._ssaoPass.setUniform("noiseTex",dl(t))),this._ssaoPass.setUniform("noiseTexSize",[t,t])},fl.prototype.dispose=function(t){this._blurTexture.dispose(t),this._ssaoTexture.dispose(t),this._blurTexture2.dispose(t)};const gl=fl;function ml(t){t=t||{},this._ssrPass=new fr({fragment:jt.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new fr({fragment:jt.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blendPass=new fr({fragment:jt.source("clay.compositor.blend")}),this._blendPass.material.disableTexturesAll(),this._blendPass.material.enableTexture(["texture1","texture2"]),this._ssrPass.setUniform("gBufferTexture1",t.normalTexture),this._ssrPass.setUniform("gBufferTexture2",t.depthTexture),this._blurPass1.setUniform("gBufferTexture1",t.normalTexture),this._blurPass1.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.setUniform("gBufferTexture1",t.normalTexture),this._blurPass2.setUniform("gBufferTexture2",t.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._ssrTexture=new Ln({type:Sn.HALF_FLOAT}),this._texture2=new Ln({type:Sn.HALF_FLOAT}),this._texture3=new Ln({type:Sn.HALF_FLOAT}),this._prevTexture=new Ln({type:Sn.HALF_FLOAT}),this._currentTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi({depthBuffer:!1}),this._normalDistribution=null,this._totalSamples=256,this._samplePerFrame=4,this._ssrPass.material.define("fragment","SAMPLE_PER_FRAME",this._samplePerFrame),this._ssrPass.material.define("fragment","TOTAL_SAMPLES",this._totalSamples),this._downScale=1}jt.import("@export ecgl.ssr.main\n\n#define SHADER_NAME SSR\n#define MAX_ITERATION 20;\n#define SAMPLE_PER_FRAME 5;\n#define TOTAL_SAMPLES 128;\n\nuniform sampler2D sourceTexture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform sampler2D gBufferTexture3;\nuniform samplerCube specularCubemap;\nuniform float specularIntensity: 1;\n\nuniform mat4 projection;\nuniform mat4 projectionInv;\nuniform mat4 toViewSpace;\nuniform mat4 toWorldSpace;\n\nuniform float maxRayDistance: 200;\n\nuniform float pixelStride: 16;\nuniform float pixelStrideZCutoff: 50; \nuniform float screenEdgeFadeStart: 0.9; \nuniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8; \nuniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 1;\n\nuniform float nearZ;\nuniform vec2 viewportSize : VIEWPORT_SIZE;\n\nuniform float jitterOffset: 0;\n\nvarying vec2 v_Texcoord;\n\n#ifdef DEPTH_DECODE\n@import clay.util.decode_float\n#endif\n\n#ifdef PHYSICALLY_CORRECT\nuniform sampler2D normalDistribution;\nuniform float sampleOffset: 0;\nuniform vec2 normalDistributionSize;\n\nvec3 transformNormal(vec3 H, vec3 N) {\n vec3 upVector = N.y > 0.999 ? vec3(1.0, 0.0, 0.0) : vec3(0.0, 1.0, 0.0);\n vec3 tangentX = normalize(cross(N, upVector));\n vec3 tangentZ = cross(N, tangentX);\n return normalize(tangentX * H.x + N * H.y + tangentZ * H.z);\n}\nvec3 importanceSampleNormalGGX(float i, float roughness, vec3 N) {\n float p = fract((i + sampleOffset) / float(TOTAL_SAMPLES));\n vec3 H = texture2D(normalDistribution,vec2(roughness, p)).rgb;\n return transformNormal(H, N);\n}\nfloat G_Smith(float g, float ndv, float ndl) {\n float roughness = 1.0 - g;\n float k = roughness * roughness / 2.0;\n float G1V = ndv / (ndv * (1.0 - k) + k);\n float G1L = ndl / (ndl * (1.0 - k) + k);\n return G1L * G1V;\n}\nvec3 F_Schlick(float ndv, vec3 spec) {\n return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);\n}\n#endif\n\nfloat fetchDepth(sampler2D depthTexture, vec2 uv)\n{\n vec4 depthTexel = texture2D(depthTexture, uv);\n return depthTexel.r * 2.0 - 1.0;\n}\n\nfloat linearDepth(float depth)\n{\n if (projection[3][3] == 0.0) {\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n }\n else {\n return (depth - projection[3][2]) / projection[2][2];\n }\n}\n\nbool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)\n{\n if (rayZFar > rayZNear)\n {\n float t = rayZFar; rayZFar = rayZNear; rayZNear = t;\n }\n float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));\n return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;\n}\n\n\nbool traceScreenSpaceRay(\n vec3 rayOrigin, vec3 rayDir, float jitter,\n out vec2 hitPixel, out vec3 hitPoint, out float iterationCount\n)\n{\n float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)\n ? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;\n\n vec3 rayEnd = rayOrigin + rayDir * rayLength;\n\n vec4 H0 = projection * vec4(rayOrigin, 1.0);\n vec4 H1 = projection * vec4(rayEnd, 1.0);\n\n float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;\n\n vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;\n\n vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;\n vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;\n\n P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;\n vec2 delta = P1 - P0;\n\n bool permute = false;\n if (abs(delta.x) < abs(delta.y)) {\n permute = true;\n delta = delta.yx;\n P0 = P0.yx;\n P1 = P1.yx;\n }\n float stepDir = sign(delta.x);\n float invdx = stepDir / delta.x;\n\n vec3 dQ = (Q1 - Q0) * invdx;\n float dk = (k1 - k0) * invdx;\n\n vec2 dP = vec2(stepDir, delta.y * invdx);\n\n float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);\n float pixStride = 1.0 + strideScaler * pixelStride;\n\n dP *= pixStride; dQ *= pixStride; dk *= pixStride;\n\n vec4 pqk = vec4(P0, Q0.z, k0);\n vec4 dPQK = vec4(dP, dQ.z, dk);\n\n pqk += dPQK * jitter;\n float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n float rayZNear;\n\n bool intersect = false;\n\n vec2 texelSize = 1.0 / viewportSize;\n\n iterationCount = 0.0;\n\n for (int i = 0; i < MAX_ITERATION; i++)\n {\n pqk += dPQK;\n\n rayZNear = rayZFar;\n rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);\n\n hitPixel = permute ? pqk.yx : pqk.xy;\n hitPixel *= texelSize;\n\n intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);\n\n iterationCount += 1.0;\n\n dPQK *= 1.2;\n\n if (intersect) {\n break;\n }\n }\n\n Q0.xy += dQ.xy * iterationCount;\n Q0.z = pqk.z;\n hitPoint = Q0 / pqk.w;\n\n return intersect;\n}\n\nfloat calculateAlpha(\n float iterationCount, float reflectivity,\n vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir\n)\n{\n float alpha = clamp(reflectivity, 0.0, 1.0);\n alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));\n vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;\n float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));\n alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);\n\n float _eyeFadeStart = eyeFadeStart;\n float _eyeFadeEnd = eyeFadeEnd;\n if (_eyeFadeStart > _eyeFadeEnd) {\n float tmp = _eyeFadeEnd;\n _eyeFadeEnd = _eyeFadeStart;\n _eyeFadeStart = tmp;\n }\n\n float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);\n alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);\n\n alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);\n\n return alpha;\n}\n\n@import clay.util.rand\n\n@import clay.util.rgbm\n\nvoid main()\n{\n vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);\n\n if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {\n discard;\n }\n\n float g = normalAndGloss.a;\n#if !defined(PHYSICALLY_CORRECT)\n if (g <= minGlossiness) {\n discard;\n }\n#endif\n\n float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);\n\n vec3 N = normalize(normalAndGloss.rgb * 2.0 - 1.0);\n N = normalize((toViewSpace * vec4(N, 0.0)).xyz);\n\n vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);\n vec4 pos = projectionInv * projectedPos;\n vec3 rayOrigin = pos.xyz / pos.w;\n vec3 V = -normalize(rayOrigin);\n\n float ndv = clamp(dot(N, V), 0.0, 1.0);\n float iterationCount;\n float jitter = rand(fract(v_Texcoord + jitterOffset));\n\n#ifdef PHYSICALLY_CORRECT\n vec4 color = vec4(vec3(0.0), 1.0);\n vec4 albedoMetalness = texture2D(gBufferTexture3, v_Texcoord);\n vec3 albedo = albedoMetalness.rgb;\n float m = albedoMetalness.a;\n vec3 diffuseColor = albedo * (1.0 - m);\n vec3 spec = mix(vec3(0.04), albedo, m);\n\n float jitter2 = rand(fract(v_Texcoord)) * float(TOTAL_SAMPLES);\n\n for (int i = 0; i < SAMPLE_PER_FRAME; i++) {\n vec3 H = importanceSampleNormalGGX(float(i) + jitter2, 1.0 - g, N);\n vec3 rayDir = normalize(reflect(-V, H));\n#else\n vec3 rayDir = normalize(reflect(-V, N));\n#endif\n vec2 hitPixel;\n vec3 hitPoint;\n\n bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);\n\n float dist = distance(rayOrigin, hitPoint);\n\n vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;\n hitNormal = normalize((toViewSpace * vec4(hitNormal, 0.0)).xyz);\n#ifdef PHYSICALLY_CORRECT\n float ndl = clamp(dot(N, rayDir), 0.0, 1.0);\n float vdh = clamp(dot(V, H), 0.0, 1.0);\n float ndh = clamp(dot(N, H), 0.0, 1.0);\n vec3 litTexel = vec3(0.0);\n if (dot(hitNormal, rayDir) < 0.0 && intersect) {\n litTexel = texture2D(sourceTexture, hitPixel).rgb;\n litTexel *= pow(clamp(1.0 - dist / 200.0, 0.0, 1.0), 3.0);\n\n }\n else {\n #ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n litTexel = RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, 0.0), 8.12).rgb * specularIntensity;\n#endif\n }\n color.rgb += ndl * litTexel * (\n F_Schlick(ndl, spec) * G_Smith(g, ndv, ndl) * vdh / (ndh * ndv + 0.001)\n );\n }\n color.rgb /= float(SAMPLE_PER_FRAME);\n#else\n #if !defined(SPECULARCUBEMAP_ENABLED)\n if (dot(hitNormal, rayDir) >= 0.0) {\n discard;\n }\n if (!intersect) {\n discard;\n }\n#endif\n float alpha = clamp(calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir), 0.0, 1.0);\n vec4 color = texture2D(sourceTexture, hitPixel);\n color.rgb *= alpha;\n\n#ifdef SPECULARCUBEMAP_ENABLED\n vec3 rayDirW = normalize(toWorldSpace * vec4(rayDir, 0.0)).rgb;\n alpha = alpha * (intersect ? 1.0 : 0.0);\n float bias = (1.0 -g) * 5.0;\n color.rgb += (1.0 - alpha)\n * RGBMDecode(textureCubeLodEXT(specularCubemap, rayDirW, bias), 8.12).rgb\n * specularIntensity;\n#endif\n\n#endif\n\n gl_FragColor = encodeHDR(color);\n}\n@end\n\n@export ecgl.ssr.blur\n\nuniform sampler2D texture;\nuniform sampler2D gBufferTexture1;\nuniform sampler2D gBufferTexture2;\nuniform mat4 projection;\nuniform float depthRange : 0.05;\n\nvarying vec2 v_Texcoord;\n\nuniform vec2 textureSize;\nuniform float blurSize : 1.0;\n\n#ifdef BLEND\n #ifdef SSAOTEX_ENABLED\nuniform sampler2D ssaoTex;\n #endif\nuniform sampler2D sourceTexture;\n#endif\n\nfloat getLinearDepth(vec2 coord)\n{\n float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;\n return projection[3][2] / (depth * projection[2][3] - projection[2][2]);\n}\n\n@import clay.util.rgbm\n\n\nvoid main()\n{\n @import clay.compositor.kernel.gaussian_9\n\n vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);\n float g = centerNTexel.a;\n float maxBlurSize = clamp(1.0 - g, 0.0, 1.0) * blurSize;\n#ifdef VERTICAL\n vec2 off = vec2(0.0, maxBlurSize / textureSize.y);\n#else\n vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);\n#endif\n\n vec2 coord = v_Texcoord;\n\n vec4 sum = vec4(0.0);\n float weightAll = 0.0;\n\n vec3 cN = centerNTexel.rgb * 2.0 - 1.0;\n float cD = getLinearDepth(v_Texcoord);\n for (int i = 0; i < 9; i++) {\n vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));\n float w = gaussianKernel[i]\n * clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);\n float d = getLinearDepth(coord);\n w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));\n\n weightAll += w;\n sum += decodeHDR(texture2D(texture, coord)) * w;\n }\n\n#ifdef BLEND\n float aoFactor = 1.0;\n #ifdef SSAOTEX_ENABLED\n aoFactor = texture2D(ssaoTex, v_Texcoord).r;\n #endif\n gl_FragColor = encodeHDR(\n sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))\n );\n#else\n gl_FragColor = encodeHDR(sum / weightAll);\n#endif\n}\n\n@end"),ml.prototype.setAmbientCubemap=function(t,e){this._ssrPass.material.set("specularCubemap",t),this._ssrPass.material.set("specularIntensity",e);var n=t&&e;this._ssrPass.material[n?"enableTexture":"disableTexture"]("specularCubemap")},ml.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._ssrTexture,s=this._texture2,l=this._texture3;a.width=this._prevTexture.width=this._currentTexture.width=r/this._downScale,a.height=this._prevTexture.height=this._currentTexture.height=o/this._downScale,s.width=l.width=r,s.height=l.height=o;var u=this._frameBuffer,h=this._ssrPass,c=this._blurPass1,d=this._blurPass2,p=this._blendPass,f=new He,g=new He;He.transpose(f,e.worldTransform),He.transpose(g,e.viewMatrix),h.setUniform("sourceTexture",n),h.setUniform("projection",e.projectionMatrix.array),h.setUniform("projectionInv",e.invProjectionMatrix.array),h.setUniform("toViewSpace",f.array),h.setUniform("toWorldSpace",g.array),h.setUniform("nearZ",e.near);var m=i/this._totalSamples*this._samplePerFrame;if(h.setUniform("jitterOffset",m),h.setUniform("sampleOffset",i*this._samplePerFrame),c.setUniform("textureSize",[a.width,a.height]),d.setUniform("textureSize",[r,o]),d.setUniform("sourceTexture",n),c.setUniform("projection",e.projectionMatrix.array),d.setUniform("projection",e.projectionMatrix.array),u.attach(a),u.bind(t),h.render(t),this._physicallyCorrect&&(u.attach(this._currentTexture),p.setUniform("texture1",this._prevTexture),p.setUniform("texture2",a),p.material.set({weight1:i>=1?.95:0,weight2:i>=1?.05:1}),p.render(t)),u.attach(s),c.setUniform("texture",this._physicallyCorrect?this._currentTexture:a),c.render(t),u.attach(l),d.setUniform("texture",s),d.render(t),u.unbind(t),this._physicallyCorrect){var v=this._prevTexture;this._prevTexture=this._currentTexture,this._currentTexture=v}},ml.prototype.getTargetTexture=function(){return this._texture3},ml.prototype.setParameter=function(t,e){"maxIteration"===t?this._ssrPass.material.define("fragment","MAX_ITERATION",e):this._ssrPass.setUniform(t,e)},ml.prototype.setPhysicallyCorrect=function(t){t?(this._normalDistribution||(this._normalDistribution=vr.generateNormalDistribution(64,this._totalSamples)),this._ssrPass.material.define("fragment","PHYSICALLY_CORRECT"),this._ssrPass.material.set("normalDistribution",this._normalDistribution),this._ssrPass.material.set("normalDistributionSize",[64,this._totalSamples])):this._ssrPass.material.undefine("fragment","PHYSICALLY_CORRECT"),this._physicallyCorrect=t},ml.prototype.setSSAOTexture=function(t){var e=this._blurPass2;t?(e.material.enableTexture("ssaoTex"),e.material.set("ssaoTex",t)):e.material.disableTexture("ssaoTex")},ml.prototype.isFinished=function(t){return!this._physicallyCorrect||t>this._totalSamples/this._samplePerFrame},ml.prototype.dispose=function(t){this._ssrTexture.dispose(t),this._texture2.dispose(t),this._texture3.dispose(t),this._prevTexture.dispose(t),this._currentTexture.dispose(t),this._frameBuffer.dispose(t)};const vl=ml,yl=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925];function _l(t,e,n,i,r){var o=t.gl;e.setUniform(o,"1i",n,r),o.activeTexture(o.TEXTURE0+r),i.isRenderable()?i.bind(t):i.unbind(t)}function xl(t,e,n,i,r){var o,a,s,l,u=t.gl;return function(r,h,c){if(!l||l.material!==r.material){var d=r.material,p=r.__program,f=d.get("roughness");null==f&&(f=1);var g=d.get("normalMap")||e,m=d.get("roughnessMap"),v=d.get("bumpMap"),y=d.get("uvRepeat"),_=d.get("uvOffset"),x=d.get("detailUvRepeat"),b=d.get("detailUvOffset"),w=!!v&&d.isTextureEnabled("bumpMap"),S=!!m&&d.isTextureEnabled("roughnessMap"),T=d.isDefined("fragment","DOUBLE_SIDED");v=v||n,m=m||i,c!==h?(h.set("normalMap",g),h.set("bumpMap",v),h.set("roughnessMap",m),h.set("useBumpMap",w),h.set("useRoughnessMap",S),h.set("doubleSide",T),null!=y&&h.set("uvRepeat",y),null!=_&&h.set("uvOffset",_),null!=x&&h.set("detailUvRepeat",x),null!=b&&h.set("detailUvOffset",b),h.set("roughness",f)):(p.setUniform(u,"1f","roughness",f),o!==g&&_l(t,p,"normalMap",g,0),a!==v&&v&&_l(t,p,"bumpMap",v,1),s!==m&&m&&_l(t,p,"roughnessMap",m,2),null!=y&&p.setUniform(u,"2f","uvRepeat",y),null!=_&&p.setUniform(u,"2f","uvOffset",_),null!=x&&p.setUniform(u,"2f","detailUvRepeat",x),null!=b&&p.setUniform(u,"2f","detailUvOffset",b),p.setUniform(u,"1i","useBumpMap",+w),p.setUniform(u,"1i","useRoughnessMap",+S),p.setUniform(u,"1i","doubleSide",+T)),o=g,a=v,s=m,l=r}}}function bl(t){t=t||{},this._depthTex=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._normalTex=new Ln({type:Sn.HALF_FLOAT}),this._framebuffer=new Zi,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,Zi.DEPTH_ATTACHMENT),this._normalMaterial=new lt({shader:new jt(jt.source("ecgl.normal.vertex"),jt.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=or.createBlank("#000"),this._defaultBumpMap=or.createBlank("#000"),this._defaultRoughessMap=or.createBlank("#000"),this._debugPass=new fr({fragment:jt.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}jt.import("@export ecgl.normal.vertex\n\n@import ecgl.common.transformUniforms\n\n@import ecgl.common.uv.header\n\n@import ecgl.common.attributes\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\n@import ecgl.common.normalMap.vertexHeader\n\n@import ecgl.common.vertexAnimation.header\n\nvoid main()\n{\n\n @import ecgl.common.vertexAnimation.main\n\n @import ecgl.common.uv.main\n\n v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);\n v_WorldPosition = (world * vec4(pos, 1.0)).xyz;\n\n @import ecgl.common.normalMap.vertexMain\n\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n\n}\n\n\n@end\n\n\n@export ecgl.normal.fragment\n\n#define ROUGHNESS_CHANEL 0\n\nuniform bool useBumpMap;\nuniform bool useRoughnessMap;\nuniform bool doubleSide;\nuniform float roughness;\n\n@import ecgl.common.uv.fragmentHeader\n\nvarying vec3 v_Normal;\nvarying vec3 v_WorldPosition;\n\nuniform mat4 viewInverse : VIEWINVERSE;\n\n@import ecgl.common.normalMap.fragmentHeader\n@import ecgl.common.bumpMap.header\n\nuniform sampler2D roughnessMap;\n\nvoid main()\n{\n vec3 N = v_Normal;\n \n bool flipNormal = false;\n if (doubleSide) {\n vec3 eyePos = viewInverse[3].xyz;\n vec3 V = normalize(eyePos - v_WorldPosition);\n\n if (dot(N, V) < 0.0) {\n flipNormal = true;\n }\n }\n\n @import ecgl.common.normalMap.fragmentMain\n\n if (useBumpMap) {\n N = bumpNormal(v_WorldPosition, v_Normal, N);\n }\n\n float g = 1.0 - roughness;\n\n if (useRoughnessMap) {\n float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];\n g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);\n }\n\n if (flipNormal) {\n N = -N;\n }\n\n gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;\n gl_FragColor.a = g;\n}\n@end"),bl.prototype.getDepthTexture=function(){return this._depthTex},bl.prototype.getNormalTexture=function(){return this._normalTex},bl.prototype.update=function(t,e,n){var i=t.getWidth(),r=t.getHeight(),o=this._depthTex,a=this._normalTex,s=this._normalMaterial;o.width=i,o.height=r,a.width=i,a.height=r;var l=e.getRenderList(n).opaque;this._framebuffer.bind(t),t.gl.clearColor(0,0,0,0),t.gl.clear(t.gl.COLOR_BUFFER_BIT|t.gl.DEPTH_BUFFER_BIT),t.gl.disable(t.gl.BLEND),t.renderPass(l,n,{getMaterial:function(){return s},ifRender:function(t){return t.renderNormal},beforeRender:xl(t,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:t.opaqueSortCompare}),this._framebuffer.unbind(t)},bl.prototype.renderDebug=function(t){this._debugPass.render(t)},bl.prototype.dispose=function(t){this._depthTex.dispose(t),this._normalTex.dispose(t)};const wl=bl;function Sl(t){t=t||{},this._edgePass=new fr({fragment:jt.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",t.normalTexture),this._edgePass.setUniform("depthTexture",t.depthTexture),this._targetTexture=new Ln({type:Sn.HALF_FLOAT}),this._frameBuffer=new Zi,this._frameBuffer.attach(this._targetTexture)}Sl.prototype.update=function(t,e,n,i){var r=t.getWidth(),o=t.getHeight(),a=this._targetTexture;a.width=r,a.height=o;var s=this._frameBuffer;s.bind(t),this._edgePass.setUniform("projectionInv",e.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[r,o]),this._edgePass.setUniform("texture",n),this._edgePass.render(t),s.unbind(t)},Sl.prototype.getTargetTexture=function(){return this._targetTexture},Sl.prototype.setParameter=function(t,e){this._edgePass.setUniform(t,e)},Sl.prototype.dispose=function(t){this._targetTexture.dispose(t),this._frameBuffer.dispose(t)};const Tl=Sl,Ml={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]};function Cl(t,e){return{color:{parameters:{width:t,height:e}}}}jt.import(Ys),jt.import(qs),jt.import(Ks),jt.import(Js),jt.import(Qs),jt.import($s),jt.import(tl),jt.import(el),jt.import(nl),jt.import("@export ecgl.dof.coc\n\nuniform sampler2D depth;\n\nuniform float zNear: 0.1;\nuniform float zFar: 2000;\n\nuniform float focalDistance: 3;\nuniform float focalRange: 1;\nuniform float focalLength: 30;\nuniform float fstop: 2.8;\n\nvarying vec2 v_Texcoord;\n\n@import clay.util.encode_float\n\nvoid main()\n{\n float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;\n\n float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));\n\n float aperture = focalLength / fstop;\n\n float coc;\n\n float uppper = focalDistance + focalRange;\n float lower = focalDistance - focalRange;\n if (dist <= uppper && dist >= lower) {\n coc = 0.5;\n }\n else {\n float focalAdjusted = dist > uppper ? uppper : lower;\n\n coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));\n coc = clamp(coc, 0.0, 2.0) / 2.00001;\n\n if (dist < lower) {\n coc = -coc;\n }\n coc = coc * 0.5 + 0.5;\n }\n\n gl_FragColor = encodeFloat(coc);\n}\n@end\n\n\n@export ecgl.dof.composite\n\n#define DEBUG 0\n\nuniform sampler2D original;\nuniform sampler2D blurred;\nuniform sampler2D nearfield;\nuniform sampler2D coc;\nuniform sampler2D nearcoc;\nvarying vec2 v_Texcoord;\n\n@import clay.util.rgbm\n@import clay.util.float\n\nvoid main()\n{\n vec4 blurredColor = texture2D(blurred, v_Texcoord);\n vec4 originalColor = texture2D(original, v_Texcoord);\n\n float fCoc = decodeFloat(texture2D(coc, v_Texcoord));\n\n fCoc = abs(fCoc * 2.0 - 1.0);\n\n float weight = smoothstep(0.0, 1.0, fCoc);\n \n#ifdef NEARFIELD_ENABLED\n vec4 nearfieldColor = texture2D(nearfield, v_Texcoord);\n float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));\n fNearCoc = abs(fNearCoc * 2.0 - 1.0);\n\n gl_FragColor = encodeHDR(\n mix(\n nearfieldColor, mix(originalColor, blurredColor, weight),\n pow(1.0 - fNearCoc, 4.0)\n )\n );\n#else\n gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));\n#endif\n\n}\n\n@end\n\n\n\n@export ecgl.dof.diskBlur\n\n#define POISSON_KERNEL_SIZE 16;\n\nuniform sampler2D texture;\nuniform sampler2D coc;\nvarying vec2 v_Texcoord;\n\nuniform float blurRadius : 10.0;\nuniform vec2 textureSize : [512.0, 512.0];\n\nuniform vec2 poissonKernel[POISSON_KERNEL_SIZE];\n\nuniform float percent;\n\nfloat nrand(const in vec2 n) {\n return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n@import clay.util.rgbm\n@import clay.util.float\n\n\nvoid main()\n{\n vec2 offset = blurRadius / textureSize;\n\n float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );\n float cosa = cos(rnd);\n float sina = sin(rnd);\n vec4 basis = vec4(cosa, -sina, sina, cosa);\n\n#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)\n offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);\n#endif\n\n#ifdef BLUR_COC\n float cocSum = 0.0;\n#else\n vec4 color = vec4(0.0);\n#endif\n\n\n float weightSum = 0.0;\n\n for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {\n vec2 ofs = poissonKernel[i];\n\n ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));\n\n vec2 uv = v_Texcoord + ofs * offset;\n vec4 texel = texture2D(texture, uv);\n\n float w = 1.0;\n#ifdef BLUR_COC\n float fCoc = decodeFloat(texel) * 2.0 - 1.0;\n cocSum += clamp(fCoc, -1.0, 0.0) * w;\n#else\n texel = texel;\n #if !defined(BLUR_NEARFIELD)\n float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;\n w *= abs(fCoc);\n #endif\n texel.rgb *= texel.a;\n color += texel * w;\n#endif\n\n weightSum += w;\n }\n\n#ifdef BLUR_COC\n gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);\n#else\n color /= weightSum;\n color.rgb /= (color.a + 0.0001);\n gl_FragColor = color;\n#endif\n}\n\n@end"),jt.import("@export ecgl.edge\n\nuniform sampler2D texture;\n\nuniform sampler2D normalTexture;\nuniform sampler2D depthTexture;\n\nuniform mat4 projectionInv;\n\nuniform vec2 textureSize;\n\nuniform vec4 edgeColor: [0,0,0,0.8];\n\nvarying vec2 v_Texcoord;\n\nvec3 packColor(vec2 coord) {\n float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;\n vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);\n vec4 p4 = projectionInv * p;\n\n return vec3(\n texture2D(normalTexture, coord).rg,\n -p4.z / p4.w / 5.0\n );\n}\n\nvoid main() {\n vec2 cc = v_Texcoord;\n vec3 center = packColor(cc);\n\n float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;\n float dx = size / textureSize.x;\n float dy = size / textureSize.y;\n\n vec2 coord;\n vec3 topLeft = packColor(cc+vec2(-dx, -dy));\n vec3 top = packColor(cc+vec2(0.0, -dy));\n vec3 topRight = packColor(cc+vec2(dx, -dy));\n vec3 left = packColor(cc+vec2(-dx, 0.0));\n vec3 right = packColor(cc+vec2(dx, 0.0));\n vec3 bottomLeft = packColor(cc+vec2(-dx, dy));\n vec3 bottom = packColor(cc+vec2(0.0, dy));\n vec3 bottomRight = packColor(cc+vec2(dx, dy));\n\n vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;\n vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;\n\n float edge = sqrt(dot(h, h) + dot(v, v));\n\n edge = smoothstep(0.8, 1.0, edge);\n\n gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);\n}\n@end");var Al=["composite","FXAA"];function Il(){this._width,this._height,this._dpr,this._sourceTexture=new Ln({type:Sn.HALF_FLOAT}),this._depthTexture=new Ln({format:Sn.DEPTH_COMPONENT,type:Sn.UNSIGNED_INT}),this._framebuffer=new Zi,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,Zi.DEPTH_ATTACHMENT),this._normalPass=new wl,this._compositor=function(t,e){var n=new Us;e=e||{};var i={textures:{},parameters:{}};for(var r in t.parameters){var o=t.parameters[r];i.parameters[r]=sl(o)}return function(t,e,n,i){if(t.textures){var r={},o=0,a=!1,s=n.textureRootPath;p.each(t.textures,(function(t,e){var n,l=t.path,u=sl(t.parameters);if(Array.isArray(l)&&6===l.length)s&&(l=l.map((function(t){return p.relative2absolute(t,s)}))),n=new Ai(u);else{if("string"!=typeof l)return;s&&(l=p.relative2absolute(l,s)),n=new Ln(u)}n.load(l),o++,n.once("success",(function(){r[e]=n,0==--o&&(i(r),a=!0)}))})),0!==o||a||i(r)}else i({})}(t,0,e,(function(r){i.textures=r,function(r,o){for(var a=0;a=this._haltonSequence.length},render:function(t,e,n){var i=this._blendPass;0===this._frame?(i.setUniform("weight1",0),i.setUniform("weight2",1)):(i.setUniform("weight1",.9),i.setUniform("weight2",.1)),i.setUniform("texture1",this._prevFrameTex),i.setUniform("texture2",e||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(t),i.render(t),this._blendFb.unbind(t),n||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(t));var r=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=r,this._frame++},dispose:function(t){this._sourceFb.dispose(t),this._blendFb.dispose(t),this._prevFrameTex.dispose(t),this._outputTex.dispose(t),this._sourceTex.dispose(t),this._outputPass.dispose(t),this._blendPass.dispose(t)}};const Pl=Ll;function Ol(t){t=t||"perspective",this.layer=null,this.scene=new _i,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(t),this._compositor=new Dl,this._temporalSS=new Pl,this._shadowMapPass=new Vs;for(var e=[],n=0,i=0;i<30;i++){for(var r=[],o=0;o<6;o++)r.push(4*hl(n,2)-2),r.push(4*hl(n,3)-2),n++;e.push(r)}this._pcfKernels=e,this.scene.on("beforerender",(function(t,e,n){this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,n)}),this)}Ol.prototype.setProjection=function(t){var e=this.camera;e&&e.update(),"perspective"===t?this.camera instanceof Ii||(this.camera=new Ii,e&&this.camera.setLocalTransform(e.localTransform)):this.camera instanceof hr||(this.camera=new hr,e&&this.camera.setLocalTransform(e.localTransform)),this.camera.near=.1,this.camera.far=2e3},Ol.prototype.setViewport=function(t,e,n,i,r){this.camera instanceof Ii&&(this.camera.aspect=n/i),r=r||1,this.viewport.x=t,this.viewport.y=e,this.viewport.width=n,this.viewport.height=i,this.viewport.devicePixelRatio=r,this._compositor.resize(n*r,i*r),this._temporalSS.resize(n*r,i*r)},Ol.prototype.containPoint=function(t,e){var n=this.viewport;return e=this.layer.renderer.getHeight()-e,t>=n.x&&e>=n.y&&t<=n.x+n.width&&e<=n.y+n.height};var El=new vt;Ol.prototype.castRay=function(t,e,n){var i=this.layer.renderer,r=i.viewport;return i.viewport=this.viewport,i.screenToNDC(t,e,El),this.camera.castRay(El,n),i.viewport=r,n},Ol.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this.scene.updateLights();var t=this.scene.updateRenderList(this.camera);this._needsSortProgressively=!1;for(var e=0;e30},Ol.prototype._doRender=function(t,e,n){var i=this.scene,r=this.camera;n=n||0,this._updateTransparent(t,i,r,n),e||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(t,i,r,!0)),this._updateShadowPCFKernel(n);var o,a=t.clearColor;t.gl.clearColor(a[0],a[1],a[2],a[3]),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(t,r),this._compositor.updateNormal(t,i,r,this._temporalSS.getFrame())),this._updateSSAO(t,i,r,this._temporalSS.getFrame()),this._enablePostEffect?((o=this._compositor.getSourceFrameBuffer()).bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),t.render(i,r,!0,!0),o.unbind(t),this.needsTemporalSS()&&e?(this._compositor.composite(t,i,r,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),this._compositor.composite(t,i,r,null,0))):this.needsTemporalSS()&&e?((o=this._temporalSS.getSourceFrameBuffer()).bind(t),t.saveClear(),t.clearBit=t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT,t.render(i,r,!0,!0),t.restoreClear(),o.unbind(t),t.setViewport(this.viewport),this._temporalSS.render(t)):(t.setViewport(this.viewport),t.render(i,r,!0,!0))},Ol.prototype._updateTransparent=function(t,e,n,i){for(var r=new ye,o=new He,a=n.getWorldPosition(),s=e.getRenderList(n).transparent,l=0;lthis.camera.far||t80*n){i=o=t[0],r=a=t[1];for(var f=n;fo&&(o=s),l>a&&(a=l);u=Math.max(o-i,a-r)}return ru(d,p,n,i,r,u),p}function nu(t,e,n,i,r){var o,a;if(r===Su(t,e,n,i)>0)for(o=e;o=e;o-=i)a=xu(o,t[o],t[o+1],a);return a&&mu(a,a.next)&&(bu(a),a=a.next),a}function iu(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!mu(i,i.next)&&0!==gu(i.prev,i,i.next))i=i.next;else{if(bu(i),(i=e=i.prev)===i.next)return null;n=!0}}while(n||i!==e);return e}function ru(t,e,n,i,r,o,a){if(t){!a&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=cu(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,i,r,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?au(t,i,r,o):ou(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),bu(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?ru(t=su(t,e,n),e,n,i,r,o,2):2===a&&lu(t,e,n,i,r,o):ru(iu(t),e,n,i,r,o,1);break}}}function ou(t){var e=t.prev,n=t,i=t.next;if(gu(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(pu(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&gu(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function au(t,e,n,i){var r=t.prev,o=t,a=t.next;if(gu(r,o,a)>=0)return!1;for(var s=r.xo.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,h=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=cu(s,l,e,n,i),d=cu(u,h,e,n,i),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&pu(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&gu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function su(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!mu(r,o)&&vu(r,i,i.next,o)&&yu(r,o)&&yu(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),bu(i),bu(i.next),i=t=o),i=i.next}while(i!==t);return i}function lu(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&fu(a,s)){var l=_u(a,s);return a=iu(a,a.next),l=iu(l,l.next),ru(a,e,n,i,r,o),void ru(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}function uu(t,e){return t.x-e.x}function hu(t,e){if(e=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=h&&r!==i.x&&pu(on.x)&&yu(i,t)&&(n=i,d=l),i=i.next;return n}(t,e)){var n=_u(e,t);iu(n,n.next)}}function cu(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)/r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function du(t){var e=t,n=t;do{e.x=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function fu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&vu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&yu(t,e)&&yu(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)}function gu(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function mu(t,e){return t.x===e.x&&t.y===e.y}function vu(t,e,n,i){return!!(mu(t,e)&&mu(n,i)||mu(t,i)&&mu(n,e))||gu(t,e,n)>0!=gu(t,e,i)>0&&gu(n,i,t)>0!=gu(n,i,e)>0}function yu(t,e){return gu(t.prev,t,t.next)<0?gu(t,e,t.next)>=0&&gu(t,t.prev,e)>=0:gu(t,e,t.prev)<0||gu(t,t.next,e)<0}function _u(t,e){var n=new wu(t.i,t.x,t.y),i=new wu(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function xu(t,e,n,i){var r=new wu(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function bu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function wu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Su(t,e,n,i){for(var r=0,o=e,a=n-i;ou&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l}),u=o[a].pivot+1,(l=o[a].right)>u&&s.push({pivot:Math.floor((l+u)/2),left:u,right:l})}o=this._parts=s}else for(a=0;a=2e4},doSortTriangles:function(t,e){var n=this.indices;if(0===e){var i=this.attributes.position;t=t.array,this._triangleZList&&this._triangleZList.length===this.triangleCount||(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new n.constructor(n.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var r,o=0,a=0;a0,n={},r=0;r65535?new Uint32Array(3*a):new Uint16Array(3*a),d.material.shader!==e&&d.material.attachShader(e,!0),Jo.setMaterialFromModel(e.__shading,d.material,t,n),s>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(s),this._linesMesh.geometry.setTriangleCount(l)),this._dataIndexOfVertex=new Uint32Array(o),this._vertexRangeOfDataIndex=new Uint32Array(2*(r-i))},_updateRegionMesh:function(t,e,n,i){for(var r=t.getData(),o=0,a=0,s=!1,l=this._polygonMesh,u=this._linesMesh,h=n;h0;w&&(b*=e.getDevicePixelRatio(),this._updateLinesGeometry(u.geometry,t,h,y,b,t.coordinateSystem.transform)),u.invisible=!w,u.material.set({color:m})}(l=this._polygonMesh).material.transparent=s,l.material.depthMask=!s,l.geometry.updateBoundingBox(),l.frontFace=this.extrudeY?Jo.Mesh.CCW:Jo.Mesh.CW,l.material.get("normalMap")&&l.geometry.generateTangents(),l.seriesIndex=t.seriesIndex,l.on("mousemove",this._onmousemove,this),l.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(t){var e=t.getModel("debug.wireframe");if(e.get("show")){var n=Jo.parseColor(e.get("lineStyle.color")||"rgba(0,0,0,0.5)"),i=Mr(e.get("lineStyle.width"),1),r=this._polygonMesh;r.geometry.generateBarycentric(),r.material.define("both","WIREFRAME_TRIANGLE"),r.material.set("wireframeLineColor",n),r.material.set("wireframeLineWidth",i)}},_onmousemove:function(t){var e=this._dataIndexOfVertex[t.triangle[0]];null==e&&(e=-1),e!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(e),this._labelsBuilder.updateLabels([e])),this._lastHoverDataIndex=e,this._polygonMesh.dataIndex=e},_onmouseout:function(t){t.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1),this._labelsBuilder.updateLabels([])},_updateGroundPlane:function(t,e,n){var i=t.getModel("groundPlane",t);if(this._groundMesh.invisible=!i.get("show",!0),!this._groundMesh.invisible){var r=t.get("shading"),o=this._groundMaterials[r];o||(o=this._groundMaterials.lambert),Jo.setMaterialFromModel(r,o,i,n),o.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=o,this._groundMesh.material.set("color",Jo.parseColor(i.get("color"))),this._groundMesh.scale.set(e.size[0],e.size[2],1)}},_triangulation:function(t,e,n){this._triangulationResults=[];for(var i=[1/0,1/0,1/0],r=[-1/0,-1/0,-1/0],o=t.coordinateSystem,a=e;a1?i:0,L[F][m]=C.points[G+2],l.set(r+F,L[F]),s?(N[0]=(C.points[G]*v[0]-y[0])/x,N[1]=(C.points[G+2]*v[m]-y[m])/x):(N[0]=(V?k:k+Z)/x,N[1]=(L[F][g]*v[g]-y[g])/x),h.set(r+F,N)}for(Bu.sub(P,L[1],L[0]),Bu.sub(O,L[3],L[0]),Bu.cross(E,P,O),Bu.normalize(E,E),F=0;F<4;F++)u.set(r+F,E),p&&c.set(r+F,a);for(F=0;F<6;F++)f[3*o+F]=D[F]+r;r+=4,o+=2,k+=Z}}return e.dirty(),{vertexOffset:r,triangleOffset:o}},_getRegionLinesInfo:function(t,e,n){var i=0,r=0;return e.getRegionModel(t).getModel("itemStyle").get("borderWidth")>0&&e.getRegionPolygonCoords(t).forEach((function(t){var e=t.exterior,o=t.interiors;i+=n.getPolylineVertexCount(e),r+=n.getPolylineTriangleCount(e);for(var a=0;athis._endIndex)){e-=this._startIndex;for(var i=this._vertexRangeOfDataIndex[2*e];i0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var t=this.getDisplacementTexture(),e=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==t||this._displacementScale!==e,this._displacementTexture=t,this._displacementScale=e},isDisplacementChanged:function(){return this._displacementChanged}});i.util.merge(nh.prototype,ca),i.util.merge(nh.prototype,da),i.util.merge(nh.prototype,pa),i.util.merge(nh.prototype,Kl);const ih=nh;var rh=Math.PI,oh=Math.sin,ah=Math.cos,sh=Math.tan,lh=Math.asin,uh=Math.atan2,hh=rh/180,ch=23.4397*hh;function dh(t,e){return uh(oh(t)*ah(ch)-sh(e)*oh(ch),ah(t))}function ph(t,e,n){return uh(oh(t),ah(t)*oh(e)-sh(n)*ah(e))}function fh(t,e,n){return lh(oh(e)*oh(n)+ah(e)*ah(n)*ah(t))}var gh={getPosition:function(t,e,n){var i=hh*-n,r=hh*e,o=function(t){return function(t){return t.valueOf()/864e5-.5+2440588}(t)-2451545}(t),a=function(t){var e,n,i=(n=function(t){return hh*(357.5291+.98560028*t)}(t))+hh*(1.9148*oh(n)+.02*oh(2*n)+3e-4*oh(3*n))+102.9372*hh+rh;return{dec:(e=i,lh(oh(0)*ah(ch)+ah(0)*oh(ch)*oh(e))),ra:dh(i,0)}}(o),s=function(t,e){return hh*(280.16+360.9856235*t)-e}(o,i)-a.ra;return{azimuth:ph(s,r,a.dec),altitude:fh(s,r,a.dec)}}};const mh=gh;Jo.Shader.import(Ho),Jo.Shader.import("@export ecgl.atmosphere.vertex\nattribute vec3 position: POSITION;\nattribute vec3 normal : NORMAL;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform mat4 normalMatrix : WORLDINVERSETRANSPOSE;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n v_Normal = normalize((normalMatrix * vec4(normal, 0.0)).xyz);\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n@end\n\n\n@export ecgl.atmosphere.fragment\nuniform mat4 viewTranspose: VIEWTRANSPOSE;\nuniform float glowPower;\nuniform vec3 glowColor;\n\nvarying vec3 v_Normal;\n\nvoid main() {\n float intensity = pow(1.0 - dot(v_Normal, (viewTranspose * vec4(0.0, 0.0, 1.0, 0.0)).xyz), glowPower);\n gl_FragColor = vec4(glowColor, intensity * intensity);\n}\n@end");const vh=i.ComponentView.extend({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(t,e){this.groupGL=new Jo.Node,this._sphereGeometry=new Jo.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new Jo.PlaneGeometry,this._earthMesh=new Jo.Mesh({renderNormal:!0}),this._atmosphereMesh=new Jo.Mesh,this._atmosphereGeometry=new Jo.SphereGeometry({widthSegments:80,heightSegments:40}),this._atmosphereMaterial=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.atmosphere.vertex"),Jo.Shader.source("ecgl.atmosphere.fragment")),transparent:!0}),this._atmosphereMesh.geometry=this._atmosphereGeometry,this._atmosphereMesh.material=this._atmosphereMaterial,this._atmosphereMesh.frontFace=Jo.Mesh.CW,this._lightRoot=new Jo.Node,this._sceneHelper=new Fa,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._atmosphereMesh),this.groupGL.add(this._earthMesh),this._control=new Da({zr:e.getZr()}),this._control.init(),this._layerMeshes={}},render:function(t,e,n){var i=t.coordinateSystem,r=t.get("shading");i.viewGL.add(this._lightRoot),t.get("show")?i.viewGL.add(this.groupGL):i.viewGL.remove(this.groupGL),this._sceneHelper.setScene(i.viewGL.scene),i.viewGL.setPostEffect(t.getModel("postEffect"),n),i.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling"));var o=this._earthMesh;o.geometry=this._sphereGeometry;var a="ecgl."+r;o.material&&o.material.shader.name===a||(o.material=Jo.createMaterial(a)),Jo.setMaterialFromModel(r,o.material,t,n),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach((function(t){var e=o.material.get(t);e&&(e.flipY=!1)})),o.material.set("color",Jo.parseColor(t.get("baseColor")));var s=.99*i.radius;if(o.scale.set(s,s,s),t.get("atmosphere.show")){o.material.define("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!1,this._atmosphereMaterial.setUniforms({glowPower:t.get("atmosphere.glowPower")||6,glowColor:t.get("atmosphere.color")||"#ffffff"}),o.material.setUniforms({glowPower:t.get("atmosphere.innerGlowPower")||2,glowColor:t.get("atmosphere.color")||"#ffffff"});var l=t.get("atmosphere.offset")||5;this._atmosphereMesh.scale.set(s+l,s+l,s+l)}else o.material.undefine("both","ATMOSPHERE_ENABLED"),this._atmosphereMesh.invisible=!0;var u=o.material.setTextureImage("diffuseMap",t.get("baseTexture"),n,{flipY:!1,anisotropic:8});u&&u.surface&&u.surface.attachToMesh(o);var h=o.material.setTextureImage("bumpMap",t.get("heightTexture"),n,{flipY:!1,anisotropic:8});h&&h.surface&&h.surface.attachToMesh(o),o.material[t.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(t,n),this._displaceVertices(t,n),this._updateViewControl(t,n),this._updateLayers(t,n)},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n)},_updateLayers:function(t,e){var n=t.coordinateSystem,r=t.get("layers"),o=n.radius,a=[],s=[],l=[],u=[];i.util.each(r,(function(t){var r=new i.Model(t),h=r.get("type"),c=Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8});if(c.surface&&c.surface.attachToMesh(this._earthMesh),"blend"===h){var d=r.get("blendTo"),p=Mr(r.get("intensity"),1);"emission"===d?(l.push(c),u.push(p)):(a.push(c),s.push(p))}else{var f=r.get("id"),g=this._layerMeshes[f];g||(g=this._layerMeshes[f]=new Jo.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0})),"lambert"===r.get("shading")?(g.material=g.__lambertMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),g.__lambertMaterial=g.material):(g.material=g.__colorMaterial||new Jo.Material({autoUpdateTextureStatus:!1,shader:Jo.createShader("ecgl.color"),transparent:!0,depthMask:!1}),g.__colorMaterial=g.material),g.material.enableTexture("diffuseMap");var m=r.get("distance"),v=o+(null==m?n.radius/100:m);g.scale.set(v,v,v),o=v;var y=this._blankTexture||(this._blankTexture=Jo.createBlankTexture("rgba(255, 255, 255, 0)"));g.material.set("diffuseMap",y),Jo.loadTexture(r.get("texture"),e,{flipY:!1,anisotropic:8},(function(t){t.surface&&t.surface.attachToMesh(g),g.material.set("diffuseMap",t),e.getZr().refresh()})),r.get("show")?this.groupGL.add(g):this.groupGL.remove(g)}}),this);var h=this._earthMesh.material;h.define("fragment","LAYER_DIFFUSEMAP_COUNT",a.length),h.define("fragment","LAYER_EMISSIVEMAP_COUNT",l.length),h.set("layerDiffuseMap",a),h.set("layerDiffuseIntensity",s),h.set("layerEmissiveMap",l),h.set("layerEmissionIntensity",u);var c=t.getModel("debug.wireframe");if(c.get("show")){h.define("both","WIREFRAME_TRIANGLE");var d=Jo.parseColor(c.get("lineStyle.color")||"rgba(0,0,0,0.5)"),p=Mr(c.get("lineStyle.width"),1);h.set("wireframeLineWidth",p),h.set("wireframeLineColor",d)}else h.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(t,e){var n=t.coordinateSystem,i=t.getModel("viewControl"),r=(n.viewGL.camera,this),o=this._control;o.setViewGL(n.viewGL);var a,s,l=i.get("targetCoord");null!=l&&(s=l[0]+90,a=l[1]),o.setFromViewControlModel(i,{baseDistance:n.radius,alpha:a,beta:s}),o.off("update"),o.on("update",(function(){e.dispatchAction({type:"globeChangeCamera",alpha:o.getAlpha(),beta:o.getBeta(),distance:o.getDistance()-n.radius,center:o.getCenter(),from:r.uid,globeId:t.id})}))},_displaceVertices:function(t,e){var n=t.get("displacementQuality"),i=t.get("debug.wireframe.show"),r=t.coordinateSystem;if(t.isDisplacementChanged()||n!==this._displacementQuality||i!==this._showDebugWireframe){this._displacementQuality=n,this._showDebugWireframe=i;var o=this._sphereGeometry,a={low:100,medium:200,high:400,ultra:800}[n]||200,s=a/2;(o.widthSegments!==a||i)&&(o.widthSegments=a,o.heightSegments=s,o.build()),this._doDisplaceVertices(o,r),i&&o.generateBarycentric()}},_doDisplaceVertices:function(t,e){var n=t.attributes.position.value,i=t.attributes.texcoord0.value,r=t.__originalPosition;r&&r.length===n.length||((r=new Float32Array(n.length)).set(n),t.__originalPosition=r);for(var o=e.displacementWidth,a=e.displacementHeight,s=e.displacementData,l=0;l50&&(o=1e3);var a=[];Oh.perspective(a,Nh,this.width/this.height,1,o),this.viewGL.camera.projectionMatrix.setArray(a),this.viewGL.camera.decomposeProjectionMatrix(),a=Oh.identity([]);var s=this.dataToPoint(this.center);Oh.scale(a,a,[1,-1,1]),Oh.translate(a,a,[0,0,-t]),Oh.rotateX(a,a,e),Oh.rotateZ(a,a,-this.bearing/180*Math.PI),Oh.translate(a,a,[-s[0]*this.getScale()*Rh,-s[1]*this.getScale()*Rh,0]),this.viewGL.camera.viewMatrix.array=a;var l=[];Oh.invert(l,a),this.viewGL.camera.worldTransform.array=l,this.viewGL.camera.decomposeWorldTransform();var u,h=Eh*this.getScale();if(this.altitudeExtent&&!isNaN(this.boxHeight)){var c=this.altitudeExtent[1]-this.altitudeExtent[0];u=this.boxHeight/c*this.getScale()/Math.pow(2,this._initialZoom-this.zoomOffset)}else u=h/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*Rh;this.viewGL.rootNode.scale.set(this.getScale()*Rh,this.getScale()*Rh,u)}},getScale:function(){return Math.pow(2,this.zoom-this.zoomOffset)},projectOnTile:function(t,e){return this.projectOnTileWithScale(t,this.getScale()*Eh,e)},projectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1]*kh/180,o=e*(i*kh/180+kh)/(2*kh),a=e*(kh-Math.log(Math.tan(kh/4+.5*r)))/(2*kh);return(n=n||[])[0]=o,n[1]=a,n},unprojectFromTile:function(t,e){return this.unprojectOnTileWithScale(t,this.getScale()*Eh,e)},unprojectOnTileWithScale:function(t,e,n){var i=t[0],r=t[1],o=i/e*(2*kh)-kh,a=2*(Math.atan(Math.exp(kh-r/e*(2*kh)))-kh/4);return(n=n||[])[0]=180*o/kh,n[1]=180*a/kh,n},dataToPoint:function(t,e){return(e=this.projectOnTileWithScale(t,Eh,e))[0]-=this._origin[0],e[1]-=this._origin[1],e[2]=isNaN(t[2])?0:t[2],isNaN(t[2])||(e[2]=t[2],this.altitudeExtent&&(e[2]-=this.altitudeExtent[0])),e}};const Bh=zh;function Zh(){Bh.apply(this,arguments)}function Fh(t,e,n){function i(t,e){var n=e.getWidth(),i=e.getHeight(),r=e.getDevicePixelRatio();this.viewGL.setViewport(0,0,n,i,r),this.width=n,this.height=i,this.altitudeScale=t.get("altitudeScale"),this.boxHeight=t.get("boxHeight")}function r(t,e){if("auto"!==this.model.get("boxHeight")){var n=[1/0,-1/0];t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=t.coordDimToDataDim("alt")[0];if(i){var r=e.getDataExtent(i,!0);n[0]=Math.min(n[0],r[0]),n[1]=Math.max(n[1],r[1])}}}),this),n&&isFinite(n[1]-n[0])&&(this.altitudeExtent=n)}}return{dimensions:e.prototype.dimensions,create:function(o,a){var s=[];return o.eachComponent(t,(function(t){var n=t.__viewGL;n||(n=t.__viewGL=new Nl).setRootNode(new Jo.Node);var o=new e;o.viewGL=t.__viewGL,o.resize=i,o.resize(t,a),s.push(o),t.coordinateSystem=o,o.model=t,o.update=r})),o.eachSeries((function(e){if(e.get("coordinateSystem")===t){var n=e.getReferringComponents(t).models[0];if(n||(n=o.getComponent(t)),!n)throw new Error(t+' "'+Mr(e.get(t+"Index"),e.get(t+"Id"),0)+'" not found');e.coordinateSystem=n.coordinateSystem}})),n&&n(s,o,a),s}}}Zh.prototype=new Bh,Zh.prototype.constructor=Zh,Zh.prototype.type="mapbox3D";const Vh=Fh("mapbox3D",Zh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMapboxCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Ch),t.registerComponentView(Ph),t.registerCoordinateSystem("mapbox3D",Vh),t.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"mapbox3D",query:t},(function(e){e.setMapboxCameraOption(t)}))}))}));var Gh=["zoom","center","pitch","bearing"],Hh=i.ComponentModel.extend({type:"maptalks3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,urlTemplate:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:'© OpenStreetMap contributors, © CARTO',center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMaptalksCameraOption:function(){var t=this;return Gh.reduce((function(e,n){return e[n]=t.get(n),e}),{})},setMaptalksCameraOption:function(t){null!=t&&Gh.forEach((function(e){null!=t[e]&&(this.option[e]=t[e])}),this)},getMaptalks:function(){return this._maptalks},setMaptalks:function(t){this._maptalks=t}});i.util.merge(Hh.prototype,da),i.util.merge(Hh.prototype,pa);const Uh=Hh;function Wh(t,e,n,i){if(this.id=t,this.zr=e,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!maptalks)throw new Error("Maptalks library must be included. See https://maptalks.org");this._maptalks=new maptalks.Map(this.dom,{center:n,zoom:i,doubleClickZoom:!1,fog:!1}),this._initEvents()}Wh.prototype.setUnpainted=function(){},Wh.prototype.resize=function(){this._maptalks.checkSize()},Wh.prototype.getMaptalks=function(){return this._maptalks},Wh.prototype.clear=function(){},Wh.prototype.refresh=function(){this._maptalks.checkSize()};var jh=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","touchcancel"];Wh.prototype._initEvents=function(){var t=this.dom;this._handlers=this._handlers||{contextmenu:function(t){return t.preventDefault(),!1}},jh.forEach((function(e){this._handlers[e]=function(n){var i={};for(var r in n)i[r]=n[r];i.bubbles=!1;var o=new n.constructor(n.type,i);"mousewheel"===e||"DOMMouseScroll"===e?t.dispatchEvent(o):t.firstElementChild.dispatchEvent(o)},this.zr.dom.addEventListener(e,this._handlers[e])}),this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},Wh.prototype.dispose=function(){jh.forEach((function(t){this.zr.dom.removeEventListener(t,this._handlers[t])}),this),this._maptalks.remove()};const Xh=Wh;Jo.Shader.import(Lh);const Yh=i.ComponentView.extend({type:"maptalks3D",__ecgl__:!0,init:function(t,e){this._groundMesh=new Jo.Mesh({geometry:new Jo.PlaneGeometry,material:new Jo.Material({shader:new Jo.Shader({vertex:Jo.Shader.source("ecgl.displayShadow.vertex"),fragment:Jo.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},_initMaptalksLayer:function(t,e){var n=e.getZr();this._zrLayer=new Xh("maptalks3D",n,t.get("center"),t.get("zoom")),n.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new Jo.Node,this._sceneHelper=new Fa(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var i=this._zrLayer.getMaptalks(),r=this._dispatchInteractAction.bind(this,e,i);["zoomend","zooming","zoomstart","dragrotating","pitch","pitchend","movestart","moving","moveend","resize","touchstart","touchmove","touchend","animating"].forEach((function(t){i.on(t,r)}))},render:function(t,e,n){this._zrLayer||this._initMaptalksLayer(t,n);var i=this._zrLayer.getMaptalks(),r=t.get("urlTemplate"),o=i.getBaseLayer();r!==this._oldUrlTemplate&&(o?o.setOptions({urlTemplate:r,attribution:t.get("attribution")}):(o=new maptalks.TileLayer("maptalks-echarts-gl-baselayer",{urlTemplate:r,subdomains:["a","b","c"],attribution:t.get("attribution")}),i.setBaseLayer(o))),this._oldUrlTemplate=r,i.setCenter(t.get("center")),i.setZoom(t.get("zoom"),{animation:!1}),i.setPitch(t.get("pitch")),i.setBearing(t.get("bearing")),t.setMaptalks(i);var a=t.coordinateSystem;a.viewGL.scene.add(this._lightRoot),a.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(a.viewGL.scene),this._sceneHelper.updateLight(t),a.viewGL.setPostEffect(t.getModel("postEffect"),n),a.viewGL.setTemporalSuperSampling(t.getModel("temporalSuperSampling")),this._maptalks3DModel=t},afterRender:function(t,e,n,i){var r=i.renderer;this._sceneHelper.updateAmbientCubemap(r,t,n),this._sceneHelper.updateSkybox(r,t,n),t.coordinateSystem.viewGL.scene.traverse((function(t){t.material&&(t.material.define("fragment","NORMAL_UP_AXIS",2),t.material.define("fragment","NORMAL_FRONT_AXIS",1))}))},updateCamera:function(t,e,n,i){t.coordinateSystem.setCameraOption(i),this._updateGroundMesh(),n.getZr().refresh()},_dispatchInteractAction:function(t,e,n){var i;t.dispatchAction({type:"maptalks3DChangeCamera",pitch:e.getPitch(),zoom:(i=e.getResolution(),19-Math.log(i/qh)/Math.LN2+1),center:e.getCenter().toArray(),bearing:e.getBearing(),maptalks3DId:this._maptalks3DModel&&this._maptalks3DModel.id})},_updateGroundMesh:function(){if(this._maptalks3DModel){var t=this._maptalks3DModel.coordinateSystem,e=t.dataToPoint(t.center);this._groundMesh.position.set(e[0],e[1],-.001);var n=new Jo.Plane(new Jo.Vector3(0,0,1),0),i=t.viewGL.camera.castRay(new Jo.Vector2(-1,-1)),r=t.viewGL.camera.castRay(new Jo.Vector2(1,1)),o=i.intersectPlane(n),a=r.intersectPlane(n),s=o.dist(a)/t.viewGL.rootNode.scale.x;this._groundMesh.scale.set(s,s,1)}},dispose:function(t,e){this._zrLayer&&this._zrLayer.dispose(),e.getZr().painter.delLayer(-1e3)}}),qh=12756274*Math.PI/(256*Math.pow(2,20));function Kh(){Bh.apply(this,arguments),this.maxPitch=85,this.zoomOffset=1}Kh.prototype=new Bh,Kh.prototype.constructor=Kh,Kh.prototype.type="maptalks3D";const Jh=Fh("maptalks3D",Kh,(function(t){t.forEach((function(t){t.setCameraOption(t.model.getMaptalksCameraOption())}))}));(0,i.use)((function(t){t.registerComponentModel(Uh),t.registerComponentView(Yh),t.registerCoordinateSystem("maptalks3D",Jh),t.registerAction({type:"maptalks3DChangeCamera",event:"maptalks3dcamerachanged",update:"maptalks3D:updateCamera"},(function(t,e){e.eachComponent({mainType:"maptalks3D",query:t},(function(e){e.setMaptalksCameraOption(t)}))}))}));var Qh=Pa.vec3,$h=i.helper.dataStack.isDimensionStacked;function tc(t,e,n){for(var i=t.getDataExtent(e),r=t.getDataExtent(n),o=i[1]-i[0]||i[0],a=r[1]-r[0]||r[0],s=new Uint8Array(2500),l=0;l0&&d>0||c<0&&d<0)),g=["x","y","z"].map((function(e){return t.coordDimToDataDim(e)[0]})),m=$h(n,g[2]),v=m?n.getCalculationInfo("stackResultDimension"):g[2];n.each(g,(function(t,i,o,a){var s=n.get(v,a),l=m?s-o:f?0:p[0],u=e.dataToPoint([t,i,l]),h=e.dataToPoint([t,i,s]),c=Qh.dist(u,h),d=[0,h[1]"+o.join("
")}(o):i.format.encodeHTML(i.format.addCommas(o)),s=r.getName(e),l=Nu(r,e);i.util.isObject(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var u=i.format.getTooltipMarker(l),h=t.name;return"\0-"===h&&(h=""),h=h?i.format.encodeHTML(h)+(n?": ":"
"):"",n?u+h+a:h+u+(s?i.format.encodeHTML(s)+": "+a:a)}function sc(t,e,n){n=n||t.getSource();var r=e||i.getCoordinateSystemDimensions(t.get("coordinateSystem"))||["x","y","z"],o=i.helper.createDimensions(n,{dimensionsDefine:n.dimensionsDefine||t.get("dimensions"),encodeDefine:n.encodeDefine||t.get("encode"),coordDimensions:r.map((function(e){var n=t.getReferringComponents(e+"Axis3D").models[0];return{type:n&&"category"===n.get("type")?"ordinal":"float",name:e}}))});"cartesian3D"===t.get("coordinateSystem")&&o.forEach((function(e){if(r.indexOf(e.coordDim)>=0){var n=t.getReferringComponents(e.coordDim+"Axis3D").models[0];n&&"category"===n.get("type")&&(e.ordinalMeta=n.getOrdinalMeta())}}));var a=i.helper.dataStack.enableDataStack(t,o,{byIndex:!0,stackedCoordDimension:"z"}),s=new i.List(o,t);return s.setCalculationInfo(a),s.initData(n),s}var lc=i.SeriesModel.extend({type:"series.bar3D",dependencies:["globe"],visualStyleAccessPathvisu:"itemStyle",getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);return null==r&&(r=this.getData().get("z",t)),r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});i.util.merge(lc.prototype,Kl);const uc=lc;var hc,cc,dc,pc,fc,gc,mc,vc,yc=Pa.vec3,_c=Pa.mat3,xc=Hn.extend((function(){return{attributes:{position:new Hn.Attribute("position","float",3,"POSITION"),normal:new Hn.Attribute("normal","float",3,"NORMAL"),color:new Hn.Attribute("color","float",4,"COLOR"),prevPosition:new Hn.Attribute("prevPosition","float",3),prevNormal:new Hn.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}}),{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(t){var e=this.enableNormal,n=this.getBarVertexCount()*t,i=this.getBarTriangleCount()*t;this.vertexCount!==n&&(this.attributes.position.init(n),e?this.attributes.normal.init(n):this.attributes.normal.value=null,this.attributes.color.init(n)),this.triangleCount!==i&&(this.indices=n>65535?new Uint32Array(3*i):new Uint16Array(3*i),this._dataIndices=new Uint32Array(n))},getBarVertexCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarVertexCount(t):this.enableNormal?24:8},getBarTriangleCount:function(){var t=this.bevelSize>0?this.bevelSegments:0;return t>0?this._getBevelBarTriangleCount(t):12},_getBevelBarVertexCount:function(t){return 4*(t+1)*(t+1)*2},_getBevelBarTriangleCount:function(t){return(4*t+3+1)*(2*t+1)*2+4},setColor:function(t,e){for(var n=this.getBarVertexCount(),i=n*(t+1),r=n*t;r0&&this.bevelSegments>0)this._addBevelBar(t,c,g,m,this.bevelSize,this.bevelSegments,v);else{yc.copy(r,c),yc.normalize(r,r),yc.cross(o,g,r),yc.normalize(o,o),yc.cross(i,r,o),yc.normalize(o,o),yc.negate(a,i),yc.negate(s,r),yc.negate(l,o),e(u[0],t,i,m[0]/2),e(u[0],u[0],o,m[2]/2),e(u[1],t,i,m[0]/2),e(u[1],u[1],l,m[2]/2),e(u[2],t,a,m[0]/2),e(u[2],u[2],l,m[2]/2),e(u[3],t,a,m[0]/2),e(u[3],u[3],o,m[2]/2),e(n,t,r,m[1]),e(u[4],n,i,m[0]/2),e(u[4],u[4],o,m[2]/2),e(u[5],n,i,m[0]/2),e(u[5],u[5],l,m[2]/2),e(u[6],n,a,m[0]/2),e(u[6],u[6],l,m[2]/2),e(u[7],n,a,m[0]/2),e(u[7],u[7],o,m[2]/2);var x=this.attributes;if(this.enableNormal){h[0]=i,h[1]=a,h[2]=r,h[3]=s,h[4]=o,h[5]=l;for(var b=this._vertexOffset,w=0;w0&&(p++,h[3]<.99&&(f=!0))}})),a.geometry.setBarCount(p);var g=n.getLayout("orient"),m=this._barIndexOfData=new Int32Array(n.count());p=0,n.each((function(t){if(n.hasValue(t)){var e=n.getItemLayout(t),i=e[0],r=e[1],a=e[2],s=4*t;h[0]=c[s++],h[1]=c[s++],h[2]=c[s++],h[3]=c[s++],h[3]>0&&(o._barMesh.geometry.addBar(i,r,g,a,h,t),m[t]=p++)}else m[t]=-1})),a.geometry.dirty(),a.geometry.updateBoundingBox();var v=a.material;v.transparent=f,v.depthMask=!f,a.geometry.sortTriangles=f,this._initHandler(t,e)},_initHandler:function(t,e){var n=t.getData(),i=this._barMesh,r="cartesian3D"===t.coordinateSystem.type;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=i.geometry.getDataIndexOfVertex(t.triangle[0]);a!==o&&(this._downplay(o),this._highlight(a),this._labelsBuilder.updateLabels([a]),r&&e.dispatchAction({type:"grid3DShowAxisPointer",value:[n.get("x",a),n.get("y",a),n.get("z",a,!0)]})),o=a,i.dataIndex=a}),this),i.on("mouseout",(function(t){this._downplay(o),this._labelsBuilder.updateLabels(),o=-1,i.dataIndex=-1,r&&e.dispatchAction({type:"grid3DHideAxisPointer"})}),this)},_highlight:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var r=e.getItemModel(t).getModel("emphasis.itemStyle"),o=r.get("color"),a=r.get("opacity");if(null==o){var s=Nu(e,t);o=i.color.lift(s,-.4)}null==a&&(a=ku(e,t));var l=Jo.parseColor(o);l[3]*=a,this._barMesh.geometry.setColor(n,l),this._api.getZr().refresh()}}},_downplay:function(t){var e=this._data;if(e){var n=this._barIndexOfData[t];if(!(n<0)){var i=Nu(e,t),r=ku(e,t),o=Jo.parseColor(i);o[3]*=r,this._barMesh.geometry.setColor(n,o),this._api.getZr().refresh()}}},highlight:function(t,e,n,i){this._toggleStatus("highlight",t,e,n,i)},downplay:function(t,e,n,i){this._toggleStatus("downplay",t,e,n,i)},_toggleStatus:function(t,e,n,r,o){var a=e.getData(),s=Cr(a,o),l=this;null!=s?i.util.each(oc.normalizeToArray(s),(function(e){"highlight"===t?this._highlight(e):this._downplay(e)}),this):a.each((function(e){"highlight"===t?l._highlight(e):l._downplay(e)}))},remove:function(){this.groupGL.removeAll()},dispose:function(){this._labelsBuilder.dispose(),this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Sc),t.registerSeriesModel(uc),rc(t),t.registerProcessor((function(t,e){t.eachSeriesByType("bar3d",(function(t){var e=t.getData();e.filterSelf((function(t){return e.hasValue(t)}))}))}))}));const Tc=i.SeriesModel.extend({type:"series.line3D",dependencies:["grid3D"],visualStyleAccessPath:"lineStyle",visualDrawType:"stroke",getInitialData:function(t,e){return sc(this)},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}});function Mc(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||o=0){var m=3*l,v=new ye(this._points[m],this._points[m+1],this._points[m+2]);o.push({dataIndex:l,point:v,pointWorld:v.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(v)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});(0,i.use)((function(t){t.registerChartView(Ac),t.registerSeriesModel(Tc),t.registerLayout((function(t,e){t.eachSeriesByType("line3D",(function(t){var e=t.getData(),n=t.coordinateSystem;if(n){if("cartesian3D"!==n.type)return;var i=new Float32Array(3*e.count()),r=[],o=[],a=n.dimensions.map((function(e){return t.coordDimToDataDim(e)[0]}));n&&e.each(a,(function(t,e,a,s){r[0]=t,r[1]=e,r[2]=a,n.dataToPoint(r,o),i[3*s]=o[0],i[3*s+1]=o[1],i[3*s+2]=o[2]})),e.setLayout("points",i)}}))}))}));const Ic=i.SeriesModel.extend({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,getInitialData:function(t,e){return sc(this)},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},formatTooltip:function(t){return ac(this,t)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}});function Dc(t,e,n){(e=e||document.createElement("canvas")).width=t,e.height=t;var i=e.getContext("2d");return n&&n(i),e}var Lc={getMarginByStyle:function(t){var e=t.minMargin||0,n=0;t.stroke&&"none"!==t.stroke&&(n=null==t.lineWidth?1:t.lineWidth);var i=t.shadowBlur||0,r=t.shadowOffsetX||0,o=t.shadowOffsetY||0,a={};return a.left=Math.max(n/2,-r+i,e),a.right=Math.max(n/2,r+i,e),a.top=Math.max(n/2,-o+i,e),a.bottom=Math.max(n/2,o+i,e),a},createSymbolSprite:function(t,e,n,r){var o=function(t,e,n,r){i.util.isArray(e)||(e=[e,e]);var o=Lc.getMarginByStyle(n,void 0),a=e[0]+o.left+o.right,s=e[1]+o.top+o.bottom,l=i.helper.createSymbol(t,0,0,e[0],e[1]),u=Math.max(a,s);l.x=o.left,l.y=o.top,a>s?l.y+=(u-s)/2:l.x+=(u-a)/2;var h=l.getBoundingRect();return l.x-=h.x,l.y-=h.y,l.setStyle(n),l.update(),l.__size=u,l}(t,e,n),a=Lc.getMarginByStyle(n);return{image:Dc(o.__size,r,(function(t){i.innerDrawElementOnCanvas(t,o)})),margin:a}},createSDFFromCanvas:function(t,e,n,i){return Dc(e,i,(function(e){var i=t.getContext("2d").getImageData(0,0,t.width,t.height);e.putImageData(function(t,e,n){var i=e.width,r=e.height,o=t.canvas.width,a=t.canvas.height,s=i/o,l=r/a;function u(t){return t<128?1:-1}function h(t,o){var a=1/0;t=Math.floor(t*s);for(var h=(o=Math.floor(o*l))*i+t,c=u(e.data[4*h]),d=Math.max(o-n,0);d=2e4},doSortVertices:function(t,e){var n=this.indices,i=Oc.create();if(!n){n=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var r=0;r.05);else for(r=0;r<3;r++)this._progressiveQuickSort(3*e+r);this.dirtyIndices()},_simpleSort:function(t){var e=this._zList,n=this.indices;function i(t,n){return e[n]-e[t]}t?Array.prototype.sort.call(n,i):Iu.sort(n,i,0,n.length-1)},_progressiveQuickSort:function(t){var e=this._zList,n=this.indices;this._quickSort=this._quickSort||new Iu,this._quickSort.step(n,(function(t,n){return e[n]-e[t]}),t)}};var Nc=Pa.vec4;Jo.Shader.import("@export ecgl.sdfSprite.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform float elapsedTime : 0;\n\nattribute vec3 position : POSITION;\n\n#ifdef VERTEX_SIZE\nattribute float size;\n#else\nuniform float u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\nattribute vec4 a_FillColor: COLOR;\nvarying vec4 v_Color;\n#endif\n\n#ifdef VERTEX_ANIMATION\nattribute vec3 prevPosition;\nattribute float prevSize;\nuniform float percent : 1.0;\n#endif\n\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvarying float v_Size;\n\nvoid main()\n{\n\n#ifdef POSITIONTEXTURE_ENABLED\n gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);\n#else\n\n #ifdef VERTEX_ANIMATION\n vec3 pos = mix(prevPosition, position, percent);\n #else\n vec3 pos = position;\n #endif\n gl_Position = worldViewProjection * vec4(pos, 1.0);\n#endif\n\n#ifdef VERTEX_SIZE\n#ifdef VERTEX_ANIMATION\n v_Size = mix(prevSize, size, percent);\n#else\n v_Size = size;\n#endif\n#else\n v_Size = u_Size;\n#endif\n\n#ifdef VERTEX_COLOR\n v_Color = a_FillColor;\n #endif\n\n gl_PointSize = v_Size;\n}\n\n@end\n\n@export ecgl.sdfSprite.fragment\n\nuniform vec4 color: [1, 1, 1, 1];\nuniform vec4 strokeColor: [1, 1, 1, 1];\nuniform float smoothing: 0.07;\n\nuniform float lineWidth: 0.0;\n\n#ifdef VERTEX_COLOR\nvarying vec4 v_Color;\n#endif\n\nvarying float v_Size;\n\nuniform sampler2D sprite;\n\n@import clay.util.srgb\n\nvoid main()\n{\n gl_FragColor = color;\n\n vec4 _strokeColor = strokeColor;\n\n#ifdef VERTEX_COLOR\n gl_FragColor *= v_Color;\n #endif\n\n#ifdef SPRITE_ENABLED\n float d = texture2D(sprite, gl_PointCoord).r;\n gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);\n\n if (lineWidth > 0.0) {\n float sLineWidth = lineWidth / 2.0;\n\n float outlineMaxValue0 = 0.5 + sLineWidth;\n float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;\n float outlineMinValue0 = 0.5 - sLineWidth - smoothing;\n float outlineMinValue1 = 0.5 - sLineWidth;\n\n if (d <= outlineMaxValue1 && d >= outlineMinValue0) {\n float a = _strokeColor.a;\n if (d <= outlineMinValue1) {\n a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);\n }\n else {\n a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);\n }\n gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);\n gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;\n }\n }\n#endif\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(gl_FragColor);\n#endif\n}\n@end");const kc=Jo.Mesh.extend((function(){var t=new Jo.Geometry({dynamic:!0,attributes:{color:new Jo.Geometry.Attribute("color","float",4,"COLOR"),position:new Jo.Geometry.Attribute("position","float",3,"POSITION"),size:new Jo.Geometry.Attribute("size","float",1),prevPosition:new Jo.Geometry.Attribute("prevPosition","float",3),prevSize:new Jo.Geometry.Attribute("prevSize","float",1)}});Object.assign(t,Ec);var e=new Jo.Material({shader:Jo.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});e.enableTexture("sprite"),e.define("both","VERTEX_COLOR"),e.define("both","VERTEX_SIZE");var n=new Jo.Texture2D({image:document.createElement("canvas"),flipY:!1});return e.set("sprite",n),t.pick=this._pick.bind(this),{geometry:t,material:e,mode:Jo.Mesh.POINTS,sizeScale:1}}),{_pick:function(t,e,n,i,r,o){var a=this._positionNDC;if(a)for(var s=n.viewport,l=2/s.width,u=2/s.height,h=this.geometry.vertexCount-1;h>=0;h--){var c,d=a[2*(c=this.geometry.indices?this.geometry.indices[h]:h)],p=a[2*c+1],f=this.geometry.attributes.size.get(c)/this.sizeScale/2;if(t>d-f*l&&tp-f*u&&e2?(f=this._updateSymbolSprite(t,d,h,c),s.enableTexture("sprite")):s.disableTexture("sprite"),u.position.init(r-i);var g=[];if(p){s.undefine("VERTEX_SIZE"),s.undefine("VERTEX_COLOR");var m=function(t){const e=t.getVisual("style");if(e)return e[t.getVisual("drawType")]}(a),v=function(t){return t.getVisual("style").opacity}(a);Jo.parseColor(m,g),g[3]*=v,s.set({color:g,u_Size:h.maxSize*this._sizeScale})}else s.set({color:[1,1,1,1]}),s.define("VERTEX_SIZE"),s.define("VERTEX_COLOR"),u.size.init(r-i),u.color.init(r-i),this._originalOpacity=new Float32Array(r-i);for(var y=a.getLayout("points"),_=u.position.value,x=0;x1?(a[0]=n.maxSize,a[1]=n.maxSize/n.aspect):(a[1]=n.maxSize,a[0]=n.maxSize*n.aspect),a[0]=a[0]||1,a[1]=a[1]||1,this._symbolType===n.type&&(o=a,(r=this._symbolSize)&&o&&r[0]===o[0]&&r[1]===o[1])&&this._lineWidth===e.lineWidth||(Pc.createSymbolSprite(n.type,a,{fill:"#fff",lineWidth:e.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(a[0]/2,10)},this._spriteImageCanvas),Pc.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),20,this._mesh.material.get("sprite").image),this._symbolType=n.type,this._symbolSize=a,this._lineWidth=e.lineWidth),this._spriteImageCanvas.width/n.maxSize*i},_updateMaterial:function(t,e){var n="lighter"===t.get("blendMode")?Jo.additiveBlend:null,i=this._mesh.material;i.blend=n,i.set("lineWidth",e.lineWidth/20);var r=Jo.parseColor(e.stroke);i.set("strokeColor",r),i.transparent=!0,i.depthMask=!1,i.depthTest=!this.is2D,i.sortVertices=!this.is2D},_updateLabelBuilder:function(t,e,n){var i=t.getData(),r=this._mesh.geometry,o=r.attributes.position.value,a=(e=this._startDataIndex,this._mesh.sizeScale);this._labelsBuilder.updateData(i,e,n),this._labelsBuilder.getLabelPosition=function(t,n,i){var r=3*(t-e);return[o[r],o[r+1],o[r+2]]},this._labelsBuilder.getLabelDistance=function(t,n,i){return r.attributes.size.get(t-e)/a/2+i},this._labelsBuilder.updateLabels()},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,t)},_updateHandler:function(t,e,n){var i,r=t.getData(),o=this._mesh,a=this,s=-1,l=t.coordinateSystem&&"cartesian3D"===t.coordinateSystem.type;l&&(i=t.coordinateSystem.model),o.seriesIndex=t.seriesIndex,o.off("mousemove"),o.off("mouseout"),o.on("mousemove",(function(e){var u=e.vertexIndex+a._startDataIndex;u!==s&&(this.highlightOnMouseover&&(this.downplay(r,s),this.highlight(r,u),this._labelsBuilder.updateLabels([u])),l&&n.dispatchAction({type:"grid3DShowAxisPointer",value:[r.get(t.coordDimToDataDim("x")[0],u),r.get(t.coordDimToDataDim("y")[0],u),r.get(t.coordDimToDataDim("z")[0],u)],grid3DIndex:i.componentIndex})),o.dataIndex=u,s=u}),this),o.on("mouseout",(function(t){var e=t.vertexIndex+a._startDataIndex;this.highlightOnMouseover&&(this.downplay(r,e),this._labelsBuilder.updateLabels()),s=-1,o.dataIndex=-1,l&&n.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:i.componentIndex})}),this)},updateLayout:function(t,e,n){var i=t.getData();if(this._mesh){var r=this._mesh.geometry.attributes.position.value,o=i.getLayout("points");if(this.is2D)for(var a=0;athis._endDataIndex||ethis._endDataIndex||e 1.0 || v_Percent < 0.0) {\n discard;\n }\n\n float fade = v_Percent;\n\n#ifdef SRGB_DECODE\n gl_FragColor = sRGBToLinear(color * v_Color);\n#else\n gl_FragColor = color * v_Color;\n#endif\n\n @import ecgl.common.wireframe.fragmentMain\n\n if (v_Percent > (1.0 - v_SpotPercent)) {\n gl_FragColor.rgb *= spotIntensity;\n }\n\n gl_FragColor.a *= fade;\n}\n\n@end");const od=Jo.Mesh.extend((function(){var t=new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.trail2.vertex"),Jo.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),e=new ka({dynamic:!0});return e.createAttribute("dist","float",1),e.createAttribute("distAll","float",1),e.createAttribute("start","float",1),{geometry:e,material:t,culling:!1,$ignorePicking:!0}}),{updateData:function(t,e,n){var i=t.hostModel,r=this.geometry,o=i.getModel("effect"),a=o.get("trailWidth")*e.getDevicePixelRatio(),s=o.get("trailLength"),l=i.get("effect.constantSpeed"),u=1e3*i.get("effect.period"),h=null!=l;h?this.material.set("speed",l/1e3):this.material.set("period",u),this.material[h?"define":"undefine"]("vertex","CONSTANT_SPEED");var c=i.get("polyline");r.trailLength=s,this.material.set("trailLength",s),r.resetOffset(),["position","positionPrev","positionNext"].forEach((function(t){r.attributes[t].value=n.attributes[t].value})),["dist","distAll","start","offset","color"].forEach((function(t){r.attributes[t].init(r.vertexCount)})),r.indices=n.indices;var d=[],p=o.get("trailColor"),f=o.get("trailOpacity"),g=null!=p,m=null!=f;this.updateWorldTransform();var v=this.worldTransform.x.len(),y=this.worldTransform.y.len(),_=this.worldTransform.z.len(),x=0,b=0;t.each((function(e){var i=t.getItemLayout(e),o=m?f:ku(t,e),s=Nu(t,e);null==o&&(o=1),(d=Jo.parseColor(g?p:s,d))[3]*=o;for(var l=c?n.getPolylineVertexCount(i):n.getCubicCurveVertexCount(i[0],i[1],i[2],i[3]),w=0,S=[],T=[],M=x;Mx&&(w+=rd.dist(S,T)),r.attributes.dist.set(M,w),rd.copy(T,S);b=Math.max(b,w);var C=Math.random()*(h?w:u);for(M=x;M0?1:-1)*a/2),r.attributes.color.set(M,d);x+=l})),this.material.set("spotSize",.1*b*s),this.material.set("spotIntensity",o.get("spotIntensity")),r.dirty()},setAnimationTime:function(t){this.material.set("time",t)}});Jo.Shader.import(is);const ad=i.ChartView.extend({type:"lines3D",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this._meshLinesMaterial=new Jo.Material({shader:Jo.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new Jo.Mesh({geometry:new ka,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new od},render:function(t,e,n){this.groupGL.add(this._linesMesh);var i=t.coordinateSystem,r=t.getData();if(i&&i.viewGL){i.viewGL.add(this.groupGL),this._updateLines(t,e,n);var o=i.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[o]("fragment","SRGB_DECODE"),this._trailMesh.material[o]("fragment","SRGB_DECODE")}var a=this._trailMesh;if(a.stopAnimation(),t.get("effect.show")){this.groupGL.add(a),a.updateData(r,n,this._linesMesh.geometry),a.__time=a.__time||0;var s=36e5;this._curveEffectsAnimator=a.animate("",{loop:!0}).when(s,{__time:s}).during((function(){a.setAnimationTime(a.__time)})).start()}else this.groupGL.remove(a),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend="lighter"===t.get("blendMode")?Jo.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var t=this._curveEffectsAnimator;t&&(t.isPaused()?t.resume():t.pause())},_updateLines:function(t,e,n){var i=t.getData(),r=t.coordinateSystem,o=this._linesMesh.geometry,a=t.get("polyline");o.expandLine=!0;var s=function(t){return null!=t.radius?t.radius:null!=t.size?Math.max(t.size[0],t.size[1],t.size[2]):100}(r);o.segmentScale=s/20;var l="lineStyle.width".split("."),u=n.getDevicePixelRatio(),h=0;i.each((function(t){var e=i.getItemModel(t).get(l);null==e&&(e=1),i.setItemVisual(t,"lineWidth",e),h=Math.max(e,h)})),o.useNativeLine=!1;var c=0,d=0;i.each((function(t){var e=i.getItemLayout(t);a?(c+=o.getPolylineVertexCount(e),d+=o.getPolylineTriangleCount(e)):(c+=o.getCubicCurveVertexCount(e[0],e[1],e[2],e[3]),d+=o.getCubicCurveTriangleCount(e[0],e[1],e[2],e[3]))})),o.setVertexCount(c),o.setTriangleCount(d),o.resetOffset();var p=[];i.each((function(t){var e=i.getItemLayout(t),n=Nu(i,t),r=ku(i,t),s=i.getItemVisual(t,"lineWidth")*u;null==r&&(r=1),(p=Jo.parseColor(n,p))[3]*=r,a?o.addPolyline(e,p,s):o.addCubicCurve(e[0],e[1],e[2],e[3],p,s)})),o.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}});function sd(t,e){for(var n=[],i=0;i0;this._updateSurfaceMesh(this._surfaceMesh,t,h,p);var f=this._surfaceMesh.material;p?(f.define("WIREFRAME_QUAD"),f.set("wireframeLineWidth",d),f.set("wireframeLineColor",Jo.parseColor(c.get("lineStyle.color")))):f.undefine("WIREFRAME_QUAD"),this._initHandler(t,n),this._updateAnimation(t)},_updateAnimation:function(t){Jo.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,t)},_createSurfaceMesh:function(){var t=new Jo.Mesh({geometry:new Jo.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new Jo.Material({shader:new Jo.Shader(Jo.Shader.source("ecgl.sm.depth.vertex"),Jo.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return t.geometry.createAttribute("barycentric","float",4),t.geometry.createAttribute("prevPosition","float",3),t.geometry.createAttribute("prevNormal","float",3),Object.assign(t.geometry,Eu),t},_initHandler:function(t,e){var n=t.getData(),i=this._surfaceMesh,r=t.coordinateSystem;i.seriesIndex=t.seriesIndex;var o=-1;i.off("mousemove"),i.off("mouseout"),i.on("mousemove",(function(t){var a=function(t,e){for(var n=1/0,r=-1,o=[],a=0;a=0){var s=[];i.geometry.attributes.position.get(a,s);for(var l=r.pointToData(s),u=1/0,h=-1,c=[],d=0;d65535?Uint32Array:Uint16Array)((f-1)*(g-1)*6),w=function(t,e,n){n[1]=t*g+e,n[0]=t*g+e+1,n[3]=(t+1)*g+e+1,n[2]=(t+1)*g+e},S=!1;if(l){var T=[],M=[],C=0;m?h.init(r.vertexCount):h.value=null;for(var A=[[],[],[]],I=[],D=[],L=pd.create(),P=function(t,e,n){var i=3*e;return n[0]=t[i],n[1]=t[i+1],n[2]=t[i+2],n},O=new Float32Array(a.length),E=new Float32Array(a.length/3*4),N=0;N0;){if(Math.floor(s/h)===s/h)return[h,s/h];h--}return[h=Math.floor(Math.sqrt(s)),h]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}});function gd(t,e){for(var n=[],i=0;i=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof Cd||(e=this._nodesMap[Td(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0})),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}yo(Cd,Id("hostGraph","data")),yo(Ad,Id("hostGraph","edgeData"));const Dd=Md;var Ld=va();function Pd(t,e){if(Ld(this).mainData===this){var n=vo({},Ld(this).datas);n[this.dataType]=e,Rd(e,n,t)}else zd(e,this.dataType,Ld(this).mainData,t);return e}function Od(t,e){return t.struct&&t.struct.update(),e}function Ed(t,e){return xo(Ld(e).datas,(function(n,i){n!==e&&zd(n.cloneShallow(),i,e,t)})),e}function Nd(t){var e=Ld(this).mainData;return null==t||null==e?e:Ld(e).datas[t]}function kd(){var t=Ld(this).mainData;return null==t?[{data:t}]:bo(wo(Ld(t).datas),(function(e){return{type:e,data:Ld(t).datas[e]}}))}function Rd(t,e,n){Ld(t).datas={},xo(e,(function(e,i){zd(e,i,t,n)}))}function zd(t,e,n,i){Ld(n).datas[e]=t,Ld(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Nd,t.getLinkedDataAll=kd}var Bd=i.SeriesModel.extend({type:"series.graphGL",visualStyleAccessPath:"itemStyle",hasSymbolVisual:!0,init:function(t){Bd.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(t){Bd.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(t,e,n,i){var r=oc.getFormattedLabel(this,t,e,n,i);if(null==r){var o=this.getData(),a=o.dimensions[o.dimensions.length-1];r=o.get(a,t)}return r},getInitialData:function(t,e){var n=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&n)return function(t,e,n,r,o){for(var a=new Dd(!0),s=0;s "+f)),c++)}var g=i.helper.createDimensions(t,{coordDimensions:["value"]});(l=new i.List(g,n)).initData(t);var m,v,y,_=new i.List(["value"],n);return _.initData(h,u),o&&o(l,_),v=(m={mainData:l,struct:a,structAttr:"graph",datas:{node:l,edge:_},datasAttr:{node:"data",edge:"edgeData"}}).mainData,(y=m.datas)||(y={main:v},m.datasAttr={main:"data"}),m.datas=m.mainData=null,Rd(v,y,m),xo(y,(function(t){xo(v.TRANSFERABLE_METHODS,(function(e){t.wrapMethod(e,So(Pd,m))}))})),v.wrapMethod("cloneShallow",So(Ed,m)),xo(v.CHANGABLE_METHODS,(function(t){v.wrapMethod(t,So(Od,m))})),function(t,e){if(!t)throw new Error(void 0)}(y[v.dataType]===v),a.update(),a}(r,n,this,0,(function(t,n){t.wrapMethod("getItemModel",(function(t){const e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));const i=e.getModel([]).getModel;function r(t,e){const n=i.call(this,t,e);return n.resolveParentPath=a,n}function a(t){if(t&&("label"===t[0]||"label"===t[1])){const e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}n.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=a,t.getModel=r,t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(t,n),a=r.graph.getEdgeByIndex(t),s=r.getName(a.node1.dataIndex),l=r.getName(a.node2.dataIndex),u=[];return null!=s&&u.push(s),null!=l&&u.push(l),u=i.format.encodeHTML(u.join(" > ")),o.value&&(u+=" : "+i.format.encodeHTML(o.value)),u}return Bd.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=(this.option.categories||[]).map((function(t){return null!=t.value?t:Object.assign({value:0},t)})),e=new i.List(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setView:function(t){null!=t.zoom&&(this.option.zoom=t.zoom),null!=t.offset&&(this.option.offset=t.offset)},setNodePosition:function(t){for(var e=0;e65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(t){this.triangleCount!==t&&(this.indices=0===t?null:this.vertexCount>65535?new Uint32Array(3*t):new Uint16Array(3*t))},_getCubicCurveApproxStep:function(t,e,n,i){return 1/(Fd.dist(t,e)+Fd.dist(n,e)+Fd.dist(i,n)+1)*this.segmentScale},getCubicCurveVertexCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?2*o:2*o+2},getCubicCurveTriangleCount:function(t,e,n,i){var r=this._getCubicCurveApproxStep(t,e,n,i),o=Math.ceil(1/r);return this.useNativeLine?0:2*o},getLineVertexCount:function(){return this.getPolylineVertexCount(Vd)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(Vd)},getPolylineVertexCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?2*(e-1):2*(e-1)+2},getPolylineTriangleCount:function(t){var e;return e="number"==typeof t?t:"number"!=typeof t[0]?t.length:t.length/2,this.useNativeLine?0:2*(e-1)},addCubicCurve:function(t,e,n,i,r,o){null==o&&(o=1);var a=t[0],s=t[1],l=e[0],u=e[1],h=n[0],c=n[1],d=i[0],p=i[1],f=this._getCubicCurveApproxStep(t,e,n,i),g=f*f,m=g*f,v=3*f,y=3*g,_=6*g,x=6*m,b=a-2*l+h,w=s-2*u+c,S=3*(l-h)-a+d,T=3*(u-c)-s+p,M=a,C=s,A=(l-a)*v+b*y+S*m,I=(u-s)*v+w*y+T*m,D=b*_+S*x,L=w*_+T*x,P=S*x,O=T*x,E=0,N=0,k=Math.ceil(1/f),R=new Float32Array(3*(k+1)),z=(R=[],0);for(N=0;N1&&(M=A>0?Math.min(M,d):Math.max(M,d),C=I>0?Math.min(C,p):Math.max(C,p));this.addPolyline(R,r,o)},addLine:function(t,e,n,i){this.addPolyline([t,e],n,i)},addPolyline:function(){var t=Fd.create(),e=Fd.create(),n=Fd.create(),i=Fd.create(),r=[],o=[],a=[];return function(s,l,u,h,c){if(s.length){var d="number"!=typeof s[0];if(null==c&&(c=d?s.length:s.length/2),!(c<2)){null==h&&(h=0),null==u&&(u=1),this._itemVertexOffsets.push(this._vertexOffset);for(var p,f=d?"number"!=typeof l[0]:l.length/4===c,g=this.attributes.position,m=this.attributes.color,v=this.attributes.offset,y=this.attributes.normal,_=this.indices,x=this._vertexOffset,b=0;b1&&(g.copy(x,x-1),m.copy(x,x-1),x++);else{var T;if(b0){Fd.sub(t,r,a),Fd.sub(e,o,r),Fd.normalize(t,t),Fd.normalize(e,e),Fd.add(i,t,e),Fd.normalize(i,i);var M=u/2*Math.min(1/Fd.dot(t,i),2);n[0]=-i[1],n[1]=i[0],T=M}else Fd.sub(t,o,r),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;else Fd.sub(t,r,a),Fd.normalize(t,t),n[0]=-t[1],n[1]=t[0],T=u/2;y.set(x,n),y.set(x+1,n),v.set(x,T),v.set(x+1,-T),Fd.copy(a,r),g.set(x,r),g.set(x+1,r),m.set(x,p),m.set(x+1,p),x+=2}if(this.useNativeLine)m.set(x,p),g.set(x,r),x++;else if(b>0){var C=3*this._faceOffset;(_=this.indices)[C]=x-4,_[C+1]=x-3,_[C+2]=x-2,_[C+3]=x-3,_[C+4]=x-1,_[C+5]=x-2,this._faceOffset+=2}}this._vertexOffset=x}}}}(),setItemColor:function(t,e){for(var n=this._itemVertexOffsets[t],i=t 0.0) {\n float factor = 0.0;\n if (preventOverlap) {\n float d = sqrt(d2);\n d = d - n0.w - n1.w;\n if (d > 0.0) {\n factor = scaling * n0.z * n1.z / (d * d);\n }\n else if (d < 0.0) {\n factor = scaling * 100.0 * n0.z * n1.z;\n }\n }\n else {\n factor = scaling * n0.z * n1.z / d2;\n }\n force += dir * factor;\n }\n }\n\n vec2 dir = gravityCenter - n0.xy;\n float d = 1.0;\n if (!strongGravityMode) {\n d = length(dir);\n }\n\n force += dir * n0.z * gravity / (d + 1.0);\n\n gl_FragColor = vec4(force, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.vertex\n\nattribute vec2 node1;\nattribute vec2 node2;\nattribute float weight;\n\nuniform sampler2D positionTex;\nuniform float edgeWeightInfluence;\nuniform bool preventOverlap;\nuniform bool linLogMode;\n\nuniform vec2 windowSize: WINDOW_SIZE;\n\nvarying vec2 v_Force;\n\nvoid main() {\n\n vec4 n0 = texture2D(positionTex, node1);\n vec4 n1 = texture2D(positionTex, node2);\n\n vec2 dir = n1.xy - n0.xy;\n float d = length(dir);\n float w;\n if (edgeWeightInfluence == 0.0) {\n w = 1.0;\n }\n else if (edgeWeightInfluence == 1.0) {\n w = weight;\n }\n else {\n w = pow(weight, edgeWeightInfluence);\n }\n vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);\n vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);\n vec2 pos = node1 * scale * 2.0 - 1.0;\n gl_Position = vec4(pos + offset, 0.0, 1.0);\n gl_PointSize = 1.0;\n\n float factor;\n if (preventOverlap) {\n d = d - n1.w - n0.w;\n }\n if (d <= 0.0) {\n v_Force = vec2(0.0);\n return;\n }\n\n if (linLogMode) {\n factor = w * log(d) / d;\n }\n else {\n factor = w;\n }\n v_Force = dir * factor;\n}\n@end\n\n@export ecgl.forceAtlas2.updateEdgeAttraction.fragment\n\nvarying vec2 v_Force;\n\nvoid main() {\n gl_FragColor = vec4(v_Force, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.vertex\n\nattribute vec2 node;\n\nvarying vec2 v_NodeUv;\n\nvoid main() {\n\n v_NodeUv = node;\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n@end\n\n@export ecgl.forceAtlas2.calcWeightedSum.fragment\n\nvarying vec2 v_NodeUv;\n\nuniform sampler2D positionTex;\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_NodeUv).rg;\n vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;\n\n float mass = texture2D(positionTex, v_NodeUv).z;\n float swing = length(force - forcePrev) * mass;\n float traction = length(force + forcePrev) * 0.5 * mass;\n\n gl_FragColor = vec4(swing, traction, 0.0, 0.0);\n}\n@end\n\n@export ecgl.forceAtlas2.calcGlobalSpeed\n\nuniform sampler2D globalSpeedPrevTex;\nuniform sampler2D weightedSumTex;\nuniform float jitterTolerence;\n\nvoid main() {\n vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;\n float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;\n float globalSpeed = jitterTolerence * jitterTolerence\n * weightedSum.y / weightedSum.x;\n if (prevGlobalSpeed > 0.0) {\n globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;\n }\n gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);\n}\n@end\n\n@export ecgl.forceAtlas2.updatePosition\n\nuniform sampler2D forceTex;\nuniform sampler2D forcePrevTex;\nuniform sampler2D positionTex;\nuniform sampler2D globalSpeedTex;\n\nvarying vec2 v_Texcoord;\n\nvoid main() {\n vec2 force = texture2D(forceTex, v_Texcoord).xy;\n vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;\n vec4 node = texture2D(positionTex, v_Texcoord);\n\n float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;\n float swing = length(force - forcePrev);\n float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));\n\n float df = length(force);\n if (df > 0.0) {\n speed = min(df * speed, 10.0) / df;\n\n gl_FragColor = vec4(node.xy + speed * force, node.zw);\n }\n else {\n gl_FragColor = node;\n }\n}\n@end\n\n@export ecgl.forceAtlas2.edges.vertex\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 node;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\nuniform sampler2D positionTex;\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(\n texture2D(positionTex, node).xy, -10.0, 1.0\n );\n v_Color = a_Color;\n}\n@end\n\n@export ecgl.forceAtlas2.edges.fragment\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nvarying vec4 v_Color;\nvoid main() {\n gl_FragColor = color * v_Color;\n}\n@end");var Ud={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function Wd(t){var e={type:Jo.Texture.FLOAT,minFilter:Jo.Texture.NEAREST,magFilter:Jo.Texture.NEAREST};this._positionSourceTex=new Jo.Texture2D(e),this._positionSourceTex.flipY=!1,this._positionTex=new Jo.Texture2D(e),this._positionPrevTex=new Jo.Texture2D(e),this._forceTex=new Jo.Texture2D(e),this._forcePrevTex=new Jo.Texture2D(e),this._weightedSumTex=new Jo.Texture2D(e),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new Jo.Texture2D(e),this._globalSpeedPrevTex=new Jo.Texture2D(e),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new fr({fragment:Jo.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new fr({fragment:Jo.Shader.source("clay.compositor.output")});var n=function(t){t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE)};this._edgeForceMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node1:new Jo.Geometry.Attribute("node1","float",2),node2:new Jo.Geometry.Attribute("node2","float",2),weight:new Jo.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._weightedSumMesh=new Jo.Mesh({geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new Jo.Material({transparent:!0,shader:Jo.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:n,depthMask:!1,depthText:!1}),mode:Jo.Mesh.POINTS}),this._framebuffer=new Zi({depthBuffer:!1}),this._dummyCamera=new Jo.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}Wd.prototype.updateOption=function(t){for(var e in Ud)this[e]=Ud[e];var n=this._nodes.length;if(this.jitterTolerence=n>5e4?10:n>5e3?1:.1,this.scaling=n>100?2:10,t)for(var e in Ud)null!=t[e]&&(this[e]=t[e]);if(this.repulsionByDegree)for(var i=this._positionSourceTex.pixels,r=0;rt},Wd.prototype._swapTexture=function(){var t=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=t,t=this._forcePrevTex,this._forcePrevTex=this._forceTex,this._forceTex=t,t=this._globalSpeedPrevTex,this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=t},Wd.prototype._initFromSource=function(t){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(t),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(t),t.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),t.gl.clear(t.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(t)},Wd.prototype._resize=function(t,e){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach((function(n){this[n].width=t,this[n].height=e,this[n].dirty()}),this)},Wd.prototype.dispose=function(t){this._framebuffer.dispose(t),this._copyPass.dispose(t),this._nodeRepulsionPass.dispose(t),this._positionPass.dispose(t),this._globalSpeedPass.dispose(t),this._edgeForceMesh.geometry.dispose(t),this._weightedSumMesh.geometry.dispose(t),this._positionSourceTex.dispose(t),this._positionTex.dispose(t),this._positionPrevTex.dispose(t),this._forceTex.dispose(t),this._forcePrevTex.dispose(t),this._weightedSumTex.dispose(t),this._globalSpeedTex.dispose(t),this._globalSpeedPrevTex.dispose(t)};const jd=Wd;var Xd=function(){var t=function(){return new Float32Array(2)},e=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},n=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},i=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},r=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},o=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a=function(t,e,n){return t[0]=e,t[1]=n,t};function s(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var l=s.prototype;function u(){this.position=new Float32Array(2),this.force=t(),this.forcePrev=t(),this.mass=1,this.inDegree=0,this.outDegree=0}function h(t,e){this.source=t,this.target=e,this.weight=1}function c(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new s,this.rootRegion.centerOfMass=t(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}l.beforeUpdate=function(){for(var t=0;t=t&&this.bbox[1]<=e&&this.bbox[3]>=e},l.setBBox=function(t,e,n,i){this.bbox[0]=t,this.bbox[1]=e,this.bbox[2]=n,this.bbox[3]=i,this.size=(n-t+i-e)/2},l._newSubRegion=function(){var t=this.subRegions[this.nSubRegions];return t||(t=new s,this.subRegions[this.nSubRegions]=t),this.nSubRegions++,t},l._addNodeToSubRegion=function(t){var e=this.findSubRegion(t.position[0],t.position[1]),n=this.bbox;if(!e){var i=(n[0]+n[2])/2,r=(n[1]+n[3])/2,o=(n[2]-n[0])/2,a=(n[3]-n[1])/2,s=t.position[0]>=i?1:0,l=t.position[1]>=r?1:0;(e=this._newSubRegion()).setBBox(s*o+n[0],l*a+n[1],(s+1)*o+n[0],(l+1)*a+n[1])}e.addNode(t)},l._updateCenterOfMass=function(t){null==this.centerOfMass&&(this.centerOfMass=new Float32Array(2));var e=this.centerOfMass[0]*this.mass,n=this.centerOfMass[1]*this.mass;e+=t.position[0]*t.mass,n+=t.position[1]*t.mass,this.mass+=t.mass,this.centerOfMass[0]=e/this.mass,this.centerOfMass[1]=n/this.mass};var d=c.prototype;d.initNodes=function(t,e,n){var i=e.length;this.nodes.length=0;for(var r=void 0!==n,o=0;o0&&(this.strongGravityMode?this.applyNodeStrongGravity(c):this.applyNodeGravity(c))}for(u=0;u0&&(v=Math.min(v/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=v,u=0;u0&&(_=Math.min(x*_,10)/x,i(h.position,h.position,h.force,_))}},d.applyRegionToNodeRepulsion=function(){var e=t();return function(t,n){if(t.node)this.applyNodeToNodeRepulsion(t.node,n,!0);else{o(e,n.position,t.centerOfMass);var r=e[0]*e[0]+e[1]*e[1];if(r>this.barnesHutTheta*t.size*t.size){var a=this.scaling*n.mass*t.mass/r;i(n.force,n.force,e,a)}else for(var s=0;s0)s=this.scaling*t.mass*n.mass/(l*l);else{if(!(l<0))return;s=100*this.scaling*t.mass*n.mass}}else s=this.scaling*t.mass*n.mass/a;i(t.force,t.force,e,s),i(n.force,n.force,e,-s)}}}}(),d.applyEdgeAttraction=function(){var e=t();return function(t){var r=t.source,a=t.target;o(e,r.position,a.position);var s,l,u=n(e);s=0===this.edgeWeightInfluence?1:1===this.edgeWeightInfluence?t.weight:Math.pow(t.weight,this.edgeWeightInfluence),this.preventOverlap&&(u=u-r.size-a.size)<=0||(l=this.linLogMode?-s*Math.log(u+1)/(u+1):-s,i(r.force,r.force,e,l),i(a.force,a.force,e,-l))}}(),d.applyNodeGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position);var r=n(e);i(t.force,t.force,e,this.gravity*t.mass/(r+1))}}(),d.applyNodeStrongGravity=function(){var e=t();return function(t){o(e,this.gravityCenter,t.position),i(t.force,t.force,e,this.gravity*t.mass)}}(),d.updateBBox=function(){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,r=0;r5e4?10:o>5e3?1:.1,e.scaling=o>100?2:10,e.barnesHutOptimize=o>1e3,t)for(var n in Yd)null!=t[n]&&(e[n]=t[n]);if(!e.gravityCenter){for(var a=[1/0,1/0],s=[-1/0,-1/0],l=0;lt},qd.prototype.getNodePosition=function(t,e){if(e||(e=new Float32Array(2*this._nodes.length)),this._positionArr)for(var n=0;n0?1.1:.9,o=Math.max(Math.min(this._zoom*r,this.maxZoom),this.minZoom);r=o/this._zoom;var a=this._convertPos(n,i),s=(a.x-this._dx)*(r-1),l=(a.y-this._dy)*(r-1);this._dx-=s,this._dy-=l,this._zoom=o,this._needsUpdate=!0}}},dispose:function(){var t=this.zr;t.off("mousedown",this._mouseDownHandler),t.off("mousemove",this._mouseMoveHandler),t.off("mouseup",this._mouseUpHandler),t.off("mousewheel",this._mouseWheelHandler),t.off("globalout",this._mouseUpHandler),t.animation.off("frame",this._update)}});var Qd=Pa.vec2;Jo.Shader.import("@export ecgl.lines2D.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec2 position: POSITION;\nattribute vec4 a_Color : COLOR;\nvarying vec4 v_Color;\n\n#ifdef POSITIONTEXTURE_ENABLED\nuniform sampler2D positionTexture;\n#endif\n\nvoid main()\n{\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n v_Color = a_Color;\n}\n\n@end\n\n@export ecgl.lines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.vertex\n\nattribute vec2 position: POSITION;\nattribute vec2 normal;\nattribute float offset;\nattribute vec4 a_Color : COLOR;\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\nuniform vec4 viewport : VIEWPORT;\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);\n gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);\n\n p2.xy /= p2.w;\n gl_Position.xy /= gl_Position.w;\n\n vec2 N = normalize(p2.xy - gl_Position.xy);\n gl_Position.xy += N * offset / viewport.zw * 2.0;\n\n gl_Position.xy *= gl_Position.w;\n\n v_Color = a_Color;\n}\n@end\n\n\n@export ecgl.meshLines2D.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\n\nvarying vec4 v_Color;\nvarying float v_Miter;\n\nvoid main()\n{\n gl_FragColor = color * v_Color;\n}\n\n@end");var $d=1;const tp=i.ChartView.extend({type:"graphGL",__ecgl__:!0,init:function(t,e){this.groupGL=new Jo.Node,this.viewGL=new Nl("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new zc(!0,e),this._forceEdgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Jo.Geometry({attributes:{node:new Jo.Geometry.Attribute("node","float",2),color:new Jo.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:Jo.Mesh.LINES}),this._edgesMesh=new Jo.Mesh({material:new Jo.Material({shader:Jo.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new Hd({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new Jd({zr:e.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(t,e,n){this.groupGL.add(this._pointsBuilder.rootNode),this._model=t,this._api=n,this._initLayout(t,e,n),this._pointsBuilder.update(t,e,n),this._forceLayoutInstance instanceof jd||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(t,n),this._control.off("update"),this._control.on("update",(function(){n.dispatchAction({type:"graphGLRoam",seriesId:t.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)}),this),this._control.setZoom(Mr(t.get("zoom"),1)),this._control.setOffset(t.get("offset")||[0,0]);var i=this._pointsBuilder.getPointsMesh();if(i.off("mousemove",this._mousemoveHandler),i.off("mouseout",this._mouseOutHandler,this),n.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,t.get("focusNodeAdjacency")){var r=t.get("focusNodeAdjacencyOn");"click"===r?n.getZr().on("click",this._clickHandler):"mouseover"===r&&(i.on("mousemove",this._mousemoveHandler,this),i.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1)}this._lastMouseOverDataIndex=-1},_clickHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(t){if(!this._layouting){var e=this._pointsBuilder.getPointsMesh().dataIndex;e>=0?e!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:e}):this._mouseOutHandler(t),this._lastMouseOverDataIndex=e}},_mouseOutHandler:function(t){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(t,e){var n=this._forceEdgesMesh.geometry,i=e.getEdgeData(),r=0,o=this._forceLayoutInstance,a=2*i.count();n.attributes.node.init(a),n.attributes.color.init(a),i.each((function(e){var a=t[e];n.attributes.node.set(r,o.getNodeUV(a.node1)),n.attributes.node.set(r+1,o.getNodeUV(a.node2));var s=Nu(i,a.dataIndex),l=Jo.parseColor(s);l[3]*=Mr(ku(i,a.dataIndex),1),n.attributes.color.set(r,l),n.attributes.color.set(r+1,l),r+=2})),n.dirty()},_updateMeshLinesGeometry:function(){var t=this._model.getEdgeData(),e=this._edgesMesh.geometry,n=(t=this._model.getEdgeData(),this._model.getData().getLayout("points"));e.resetOffset(),e.setVertexCount(t.count()*e.getLineVertexCount()),e.setTriangleCount(t.count()*e.getLineTriangleCount());var i=[],r=[],o=["lineStyle","width"];this._originalEdgeColors=new Float32Array(4*t.count()),this._edgeIndicesMap=new Float32Array(t.count()),t.each((function(a){var s=t.graph.getEdgeByIndex(a),l=2*s.node1.dataIndex,u=2*s.node2.dataIndex;i[0]=n[l],i[1]=n[l+1],r[0]=n[u],r[1]=n[u+1];var h=Nu(t,s.dataIndex),c=Jo.parseColor(h);c[3]*=Mr(ku(t,s.dataIndex),1);var d=t.getItemModel(s.dataIndex),p=Mr(d.get(o),1)*this._api.getDevicePixelRatio();e.addLine(i,r,c,p);for(var f=0;f<4;f++)this._originalEdgeColors[4*s.dataIndex+f]=c[f];this._edgeIndicesMap[s.dataIndex]=a}),this),e.dirty()},_updateForceNodesGeometry:function(t){for(var e=this._pointsBuilder.getPointsMesh(),n=[],i=0;i=p&&(l._syncNodePosition(t),d=0),n.getZr().refresh(),Qo((function(){f(e)}))}))};Qo((function(){l._forceLayoutInstanceToDispose&&(l._forceLayoutInstanceToDispose.dispose(r.layer.renderer),l._forceLayoutInstanceToDispose=null),f(u)})),this._layouting=!0}}},stopLayout:function(t,e,n,i){i&&null!=i.from&&i.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(i&&i.beforeLayout||(this._syncNodePosition(t),this._updateAfterLayout(t,e,n)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(t){var e=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);t.getData().setLayout("points",e),t.setNodePosition(e)},_updateAfterLayout:function(t,e,n){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(t,e,n),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(t,e,n,i){var r=this._model.getData();this._downplayAll();var o=i.dataIndex,a=r.graph,s=[],l=a.getNodeByIndex(o);s.push(l),l.edges.forEach((function(t){t.dataIndex<0||(t.node1!==l&&s.push(t.node1),t.node2!==l&&s.push(t.node2))}),this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),s.forEach((function(t){this._pointsBuilder.highlight(r,t.dataIndex)}),this),this._pointsBuilder.updateLabels(s.map((function(t){return t.dataIndex})));var u=[];l.edges.forEach((function(t){t.dataIndex>=0&&(this._highlightEdge(t.dataIndex),u.push(t))}),this),this._focusNodes=s,this._focusEdges=u},unfocusNodeAdjacency:function(t,e,n,i){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(t){var e=this._model.getEdgeData().getItemModel(t),n=Jo.parseColor(e.get("emphasis.lineStyle.color")||e.get("lineStyle.color")),i=Mr(e.get("emphasis.lineStyle.opacity"),e.get("lineStyle.opacity"),1);n[3]*=i,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],n)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach((function(t){this._pointsBuilder.downplay(this._model.getData(),t.dataIndex)}),this),this._focusEdges&&this._focusEdges.forEach((function(t){this._downplayEdge(t.dataIndex)}),this)},_downplayEdge:function(t){var e=this._getColor(t,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],e)},_setEdgeFade:(ep=[],function(t,e){this._getColor(t,ep),ep[3]*=e,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[t],ep)}),_getColor:function(t,e){for(var n=0;n<4;n++)e[n]=this._originalEdgeColors[4*t+n];return e},_fadeOutEdgesAll:function(t){this._model.getData().graph.eachEdge((function(e){this._setEdgeFade(e.dataIndex,t)}),this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(t,e){this.viewGL.setViewport(0,0,e.getWidth(),e.getHeight(),e.getDevicePixelRatio());for(var n=this.viewGL.camera,i=t.getData().getLayout("points"),r=Qd.create(1/0,1/0),o=Qd.create(-1/0,-1/0),a=[],s=0;sn.left&&un.top)){var h=Math.max(o[0]-r[0],10),c=h/e.getWidth()*e.getHeight();h*=1.4,c*=1.4,r[0]-=.2*h,n.left=r[0],n.top=l-c/2,n.bottom=l+c/2,n.right=h+r[0],n.near=0,n.far=100}},dispose:function(){var t=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(t),this.groupGL.removeAll(),this._layoutId=-1,this._pointsBuilder.dispose()},remove:function(){this.groupGL.removeAll(),this._control.dispose()}});var ep;function np(t){return t instanceof Array||(t=[t,t]),t}(0,i.use)((function(t){function e(){}t.registerChartView(tp),t.registerSeriesModel(Zd),t.registerVisual((function(t){const e={};t.eachSeriesByType("graphGL",(function(t){var n=t.getCategoriesData(),r=t.getData(),o={};n.each((function(i){var r=n.getName(i);o["ec-"+r]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=t.getColorFromPalette(r,e)),n.setItemVisual(i,"style",s);var l=["symbol","symbolSize","symbolKeepAspect"];for(let t=0;t65535?new Uint32Array(3*i):new Uint16Array(3*i))},addLine:function(t){var e=this._vertexOffset;this.attributes.position.set(e,[t[0],t[1],1]),this.attributes.position.set(e+1,[t[0],t[1],-1]),this.attributes.position.set(e+2,[t[0],t[1],2]),this.attributes.position.set(e+3,[t[0],t[1],-2]),this.setTriangleIndices(this._faceOffset++,[e,e+1,e+2]),this.setTriangleIndices(this._faceOffset++,[e+1,e+2,e+3]),this._vertexOffset+=4}});jt.import("@export ecgl.vfParticle.particle.fragment\n\nuniform sampler2D particleTexture;\nuniform sampler2D spawnTexture;\nuniform sampler2D velocityTexture;\n\nuniform float deltaTime;\nuniform float elapsedTime;\n\nuniform float speedScaling : 1.0;\n\nuniform vec2 textureSize;\nuniform vec4 region : [0, 0, 1, 1];\nuniform float firstFrameTime;\n\nvarying vec2 v_Texcoord;\n\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, v_Texcoord);\n bool spawn = false;\n if (p.w <= 0.0) {\n p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));\n p.w -= firstFrameTime;\n spawn = true;\n }\n vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;\n v = (v - 0.5) * 2.0;\n p.z = length(v);\n p.xy += v * deltaTime / 10.0 * speedScaling;\n p.w -= deltaTime;\n\n if (spawn || p.xy != fract(p.xy)) {\n p.z = 0.0;\n }\n p.xy = fract(p.xy);\n\n gl_FragColor = p;\n}\n@end\n\n@export ecgl.vfParticle.renderPoints.vertex\n\n#define PI 3.1415926\n\nattribute vec2 texcoord : TEXCOORD_0;\n\nuniform sampler2D particleTexture;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nuniform float size : 1.0;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, texcoord);\n\n if (p.w > 0.0 && p.z > 1e-5) {\n gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n\n v_Mag = p.z;\n v_Uv = p.xy;\n\n gl_PointSize = size;\n}\n\n@end\n\n@export ecgl.vfParticle.renderPoints.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\nuniform sampler2D spriteTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n#ifdef SPRITETEXTURE_ENABLED\n gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);\n if (color.a == 0.0) {\n discard;\n }\n#endif\n#ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.vertex\n\n#define PI 3.1415926\n\nattribute vec3 position : POSITION;\n\nuniform sampler2D particleTexture;\nuniform sampler2D prevParticleTexture;\n\nuniform float size : 1.0;\nuniform vec4 vp: VIEWPORT;\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\n@import clay.util.rand\n\nvoid main()\n{\n vec4 p = texture2D(particleTexture, position.xy);\n vec4 p2 = texture2D(prevParticleTexture, position.xy);\n\n p.xy = p.xy * 2.0 - 1.0;\n p2.xy = p2.xy * 2.0 - 1.0;\n\n if (p.w > 0.0 && p.z > 1e-5) {\n vec2 dir = normalize(p.xy - p2.xy);\n vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;\n if (abs(position.z) == 2.0) {\n gl_Position = vec4(p.xy + norm, 0.0, 1.0);\n v_Uv = p.xy;\n v_Mag = p.z;\n }\n else {\n gl_Position = vec4(p2.xy + norm, 0.0, 1.0);\n v_Mag = p2.z;\n v_Uv = p2.xy;\n }\n gl_Position = worldViewProjection * gl_Position;\n }\n else {\n gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);\n }\n}\n\n@end\n\n@export ecgl.vfParticle.renderLines.fragment\n\nuniform vec4 color : [1.0, 1.0, 1.0, 1.0];\nuniform sampler2D gradientTexture;\nuniform sampler2D colorTexture;\n\nvarying float v_Mag;\nvarying vec2 v_Uv;\n\nvoid main()\n{\n gl_FragColor = color;\n #ifdef GRADIENTTEXTURE_ENABLED\n gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));\n#endif\n#ifdef COLORTEXTURE_ENABLED\n gl_FragColor *= texture2D(colorTexture, v_Uv);\n#endif\n}\n\n@end\n");var op=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new Ln({type:Sn.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};op.prototype={constructor:op,init:function(){var t={type:Sn.FLOAT,minFilter:Sn.NEAREST,magFilter:Sn.NEAREST,useMipmap:!1};this._spawnTexture=new Ln(t),this._particleTexture0=new Ln(t),this._particleTexture1=new Ln(t),this._frameBuffer=new Zi({depthBuffer:!1}),this._particlePass=new fr({fragment:jt.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new fr({fragment:jt.source("clay.compositor.downsample")});var e=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderPoints.vertex"),jt.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:Mn.POINTS,geometry:new Hn({dynamic:!0,mainAttribute:"texcoord0"})}),n=new Mn({renderOrder:10,material:new lt({shader:new jt(jt.source("ecgl.vfParticle.renderLines.vertex"),jt.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new rp,culling:!1}),i=new Mn({material:new lt({shader:new jt(jt.source("ecgl.color.vertex"),jt.source("ecgl.color.fragment"))}),geometry:new Gi});i.material.enableTexture("diffuseMap"),this._particlePointsMesh=e,this._particleLinesMesh=n,this._lastFrameFullQuadMesh=i,this._camera=new hr,this._thisFrameTexture=new Ln,this._lastFrameTexture=new Ln},setParticleDensity:function(t,e){for(var n=new Float32Array(t*e*4),i=0,r=this.particleLife,o=0;o0?t[t.length-1]:this._lastFrameTexture},setRegion:function(t){this._particlePass.setUniform("region",t)},resize:function(t,e){this._lastFrameTexture.width=t*this._supersampling,this._lastFrameTexture.height=e*this._supersampling,this._thisFrameTexture.width=t*this._supersampling,this._thisFrameTexture.height=e*this._supersampling,this._width=t,this._height=e},setParticleSize:function(t){var e=this._getParticleMesh();if(t<=2)return e.material.disableTexture("spriteTexture"),void(e.material.transparent=!1);this._spriteTexture||(this._spriteTexture=new Ln),this._spriteTexture.image&&this._spriteTexture.image.width===t||(this._spriteTexture.image=function(t){var e=document.createElement("canvas");e.width=e.height=t;var n=e.getContext("2d");return n.fillStyle="#fff",n.arc(t/2,t/2,t/2,0,2*Math.PI),n.fill(),e}(t),this._spriteTexture.dirty()),e.material.transparent=!0,e.material.enableTexture("spriteTexture"),e.material.set("spriteTexture",this._spriteTexture),this._particleSize=t},setGradientTexture:function(t){var e=this._getParticleMesh().material;e[t?"enableTexture":"disableTexture"]("gradientTexture"),e.setUniform("gradientTexture",t)},setColorTextureImage:function(t,e){this._getParticleMesh().material.setTextureImage("colorTexture",t,e,{flipY:!0})},setParticleType:function(t){this._particleType=t},clearFrame:function(t){var e=this._frameBuffer;e.attach(this._lastFrameTexture),e.bind(t),t.gl.clear(t.gl.DEPTH_BUFFER_BIT|t.gl.COLOR_BUFFER_BIT),e.unbind(t)},setSupersampling:function(t){this._supersampling=t,this.resize(this._width,this._height)},_updateDownsampleTextures:function(t,e){for(var n=this._downsampleTextures,i=Math.max(Math.floor(Math.log(this._supersampling/e.getDevicePixelRatio())/Math.log(2)),0),r=2,o=this._width*this._supersampling,a=this._height*this._supersampling,s=0;s=359&&(r[0]>0&&(r[0]=0),o[0]1?(e.material.shader!==this._meshLinesShader&&e.material.attachShader(this._meshLinesShader),e.mode=Jo.Mesh.TRIANGLES):(e.material.shader!==this._nativeLinesShader&&e.material.attachShader(this._nativeLinesShader),e.mode=Jo.Mesh.LINES),n=n||0,i=i||r.count(),s.resetOffset();var h=0,c=0,d=[],p=[],f=[],g=[],m=[],v=.3,y=.7;function _(){p[0]=d[0]*y+g[0]*v-(d[1]-g[1])*o,p[1]=d[1]*y+g[1]*v-(g[0]-d[0])*o,f[0]=d[0]*v+g[0]*y-(d[1]-g[1])*o,f[1]=d[1]*v+g[1]*y-(g[0]-d[0])*o}if(a||0!==o)for(var x=n;x{t.exports=i}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(468)})())},125:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Axis:()=>r.RD,ChartView:()=>r.TA,ComponentModel:()=>r.tF,ComponentView:()=>r.Ir,List:()=>r.aV,Model:()=>r.Hn,PRIORITY:()=>r.Hr,SeriesModel:()=>r.wJ,color:()=>r.$_,connect:()=>r.$j,dataTool:()=>r.Ok,dependencies:()=>r.HO,disConnect:()=>r.eU,disconnect:()=>r.zP,dispose:()=>r.B9,env:()=>r.OB,extendChartView:()=>r.Zy,extendComponentModel:()=>r.tv,extendComponentView:()=>r.Sp,extendSeriesModel:()=>r.Zr,format:()=>r.WU,getCoordinateSystemDimensions:()=>r.wL,getInstanceByDom:()=>r.JE,getInstanceById:()=>r.rp,getMap:()=>r.FU,graphic:()=>r.Q,helper:()=>r._y,init:()=>r.S1,innerDrawElementOnCanvas:()=>r.z$,matrix:()=>r.pI,number:()=>r.Rx,parseGeoJSON:()=>r.Nu,parseGeoJson:()=>r.pQ,registerAction:()=>r.zl,registerCoordinateSystem:()=>r.RS,registerLayout:()=>r.qR,registerLoading:()=>r.yn,registerLocale:()=>r.I2,registerMap:()=>r.je,registerPostInit:()=>r.sq,registerPostUpdate:()=>r.Br,registerPreprocessor:()=>r.ds,registerProcessor:()=>r.Pu,registerTheme:()=>r.aW,registerTransform:()=>r.rV,registerUpdateLifecycle:()=>r.YK,registerVisual:()=>r.Og,setCanvasCreator:()=>r.jQ,setPlatformAPI:()=>r.g2,throttle:()=>r.P2,time:()=>r.XV,use:()=>r.D$,util:()=>r.D5,vector:()=>r.xr,version:()=>r.i8,zrUtil:()=>r.gf,zrender:()=>r.x_});var i=n(8023),r=n(9060),o=n(6076);var a=n(12),s=n(655),l=n(8455),u=n(3321),h=n(1525),c=n(8154);const d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new c.Z,n=(0,h.th)("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*t.itemHeight,s=(0,h.th)(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);e.add(s),s.setStyle(t.itemStyle);var l="inherit"===t.iconRotate?r:t.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(u.Z);var p=n(3051),f=n(8162),g=n(6351),m=n(9936);function v(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:(0,p.isNumber)(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=(0,p.map)(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,f=e.getCalculationInfo("stackResultDimension");return(0,m.M)(e,c[0])&&(d=!0,c[0]=f),(0,m.M)(e,c[1])&&(d=!0,c[1]=f),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function y(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var _=n(887);var x=n(4438),b=n(9266),w=n(6498),S=n(2234),T=n(327),M=n(4014),C=n(8554),A=Math.min,I=Math.max;function D(t,e){return isNaN(t)||isNaN(e)}function L(t,e,n,i,r,o,a,s,l){for(var u,h,c,d,p,f,g=n,m=0;m=r||g<0)break;if(D(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),c=v,d=y;else{var _=v-u,x=y-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===y&&m=i||D(w,S))p=v,f=y;else{C=w-u,L=S-h;var E=v-u,N=w-v,k=y-h,R=S-y,z=void 0,B=void 0;if("x"===s){var Z=C>0?1:-1;p=v-Z*(z=Math.abs(E))*a,f=y,P=v+Z*(B=Math.abs(N))*a,O=y}else if("y"===s){var F=L>0?1:-1;p=v,f=y-F*(z=Math.abs(k))*a,P=v,O=y+F*(B=Math.abs(R))*a}else z=Math.sqrt(E*E+k*k),p=v-C*a*(1-(M=(B=Math.sqrt(N*N+R*R))/(B+z))),f=y-L*a*(1-M),O=y+L*a*M,P=A(P=v+C*a*M,I(w,v)),O=A(O,I(S,y)),P=I(P,A(w,v)),f=y-(L=(O=I(O,A(S,y)))-y)*z/B,p=A(p=v-(C=P-v)*z/B,I(u,v)),f=A(f,I(h,y)),P=v+(C=v-(p=I(p,A(u,v))))*B/z,O=y+(L=y-(f=I(f,A(h,y))))*B/z}t.bezierCurveTo(c,d,p,f,v,y),c=P,d=O}else t.lineTo(v,y)}u=v,h=y,g+=o}return m}var P=function(){this.smooth=0,this.smoothConstraint=!0},O=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new P},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&D(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(h-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],d=r[l++],p=r[l++],f=r[l++];var v=a?(0,C.kD)(n,u,c,p,t,s):(0,C.kD)(i,h,d,f,t,s);if(v>0)for(var y=0;y=0){m=a?(0,C.af)(i,h,d,f,_):(0,C.af)(n,u,c,p,_);return a?[t,m]:[m,t]}}n=p,i=f}}},e}(T.ZP),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e}(P),N=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new E},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&D(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=p.map(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var d=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord,r=(n-i)/(e.coord-i);return{coord:n,color:(0,H.lerp)(r,[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),f=d.length;if(!f&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var g=d[0].coord-10,m=d[f-1].coord+10,v=m-g;if(v<.001)return"transparent";p.each(d,(function(t){t.offset=(t.coord-g)/v})),d.push({offset:f?d[f-1].offset:.5,color:c[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:c[0]||"transparent"});var y=new x.Z(0,0,0,0,d,!0);return y[r]=g,y[r+"2"]=m,y}}}function K(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return p.each(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function J(t,e){return[t[2*e],t[2*e+1]]}function Q(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1);(0,V.A)(f).seriesIndex=t.seriesIndex,(0,B.k5)(f,R,z,Z);var F=X(t.get("smooth")),H=t.get("smoothMonotone");if(f.setShape({smooth:F,smoothMonotone:H,connectNulls:A}),g){var W=a.getCalculationInfo("stackedOnSeries"),j=0;g.useStyle(p.defaults(l.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),W&&(j=X(W.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:j,smoothMonotone:H,connectNulls:A}),(0,B.WO)(g,t,"areaStyle"),(0,V.A)(g).seriesIndex=t.seriesIndex,(0,B.k5)(g,R,z,Z)}var J=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=J)})),this._polyline.onHoverStateChange=J,this._data=a,this._coordSys=r,this._stackedOnPoints=M,this._points=u,this._step=P,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,f),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,e){(0,V.A)(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel"),c=t.get("z");(s=new g.Z(r,o)).x=l,s.y=u,s.setZ(h,c);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else k.Z.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=S.gO(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else k.Z.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;(0,B.Gl)(this._polyline,t),e&&(0,B.Gl)(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new O({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new N({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");p.isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=p.isFunction(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],d=void 0,f=void 0,g=void 0;if(n)if(r){var m=n,v=e.pointToCoord(c);i?(d=m.startAngle,f=m.endAngle,g=-v[1]/180*Math.PI):(d=m.r0,f=m.r,g=v[0])}else{var y=n;i?(d=y.x,f=y.x+y.width,g=t.x):(d=y.y+y.height,f=y.y,g=t.y)}var _=f===d?0:(g-d)/(f-d);a&&(_=1-_);var x=p.isFunction(u)?u(o):l*_+h,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(Q(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new w.ZP({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&((0,Z.ni)(o,(0,Z.k3)(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?(0,F.O)(r,n):(0,F.H)(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(m?-1:1),x=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,b),T=w.range,M=T[1]-T[0],C=void 0;if(M>=1){if(M>1&&!c){var A=J(u,T[0]);s.attr({x:A[0]+_,y:A[1]+x}),r&&(C=h.getRawValue(T[0]))}else{(A=l.getPointOn(y,b))&&s.attr({x:A[0]+_,y:A[1]+x});var I=h.getRawValue(T[0]),D=h.getRawValue(T[1]);r&&(C=S.pk(n,d,I,D,w.t))}i.lastFrameIndex=T[0]}else{var L=1===t||i.lastFrameIndex>0?T[0]:0;A=J(u,L);r&&(C=h.getRawValue(L)),s.attr({x:A[0]+_,y:A[1]+x})}r&&(0,Z.qA)(s).setLabelText(C)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],d=[],p=[],f=[],g=[],m=v(r,e,a),x=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w3e3||l&&j(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:p}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),b.D(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:d}),l.stopAnimation(),b.D(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],x=h.status,w=0;we&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),d=Math.round(a/c);if(isFinite(d)&&d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;(0,p.isString)(r)?f=it[r]:(0,p.isFunction)(r)&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,rt))}}}}}var at=n(9093),st=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(u.Z);u.Z.registerClass(st);const lt=st;var ut=n(2151);const ht=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(){return(0,l.Z)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(lt);var ct=n(1177),dt=n(5151),pt=n(7214),ft=n(270),gt=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},mt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new gt},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,d=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){(0,b.XD)(e,t,(0,V.A)(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(k.Z),Tt={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=bt(e.x,t.x),s=wt(e.x+e.width,r),l=bt(e.y,t.y),u=wt(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=wt(e.r,t.r),o=bt(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},Mt={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new dt.Z({shape:(0,p.extend)({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?vt:pt.C,h=new u({shape:i,z2:1});h.name="item";var c,d,p=Ot(r);if(h.calculateTextPosition=(c=p,d=({isRoundCap:u===vt}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return(0,yt.wI)(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,p=(u+h)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=d?Math.abs(u-h)/2:0,y=Math.cos,_=Math.sin,x=s+u*y(f),b=l+u*_(f),w="left",S="top";switch(r){case"startArc":x=s+(h-o)*y(m),b=l+(h-o)*_(m),w="center",S="top";break;case"insideStartArc":x=s+(h+o)*y(m),b=l+(h+o)*_(m),w="center",S="bottom";break;case"startAngle":x=s+p*y(f)+_t(f,o+v,!1),b=l+p*_(f)+xt(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*y(f)+_t(f,-o+v,!1),b=l+p*_(f)+xt(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*y(m),b=l+p*_(m),w="center",S="middle";break;case"endArc":x=s+(u+o)*y(m),b=l+(u+o)*_(m),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*y(m),b=l+(u-o)*_(m),w="center",S="top";break;case"endAngle":x=s+p*y(g)+_t(g,o+v,!0),b=l+p*_(g)+xt(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*y(g)+_t(g,-o+v,!0),b=l+p*_(g)+xt(g,-o+v,!0),w="right",S="middle";break;default:return(0,yt.wI)(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?0:i.startAngle,g[f]=i[f],(s?b.D:b.KZ)(h,{shape:g},o)}return h}};function Ct(t,e,n,i,r,o,a,s){var l,u;o?(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||(a?b.D:b.KZ)(n,{shape:l},e,r,null);var h=e?t.baseAxis.model:null;(a?b.D:b.KZ)(n,{shape:u},h,r)}function At(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Ot(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function Et(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",c=(0,Z.k3)(i);(0,Z.ni)(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:(0,F.H)(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=t.getTextContent();if(s&&d){var f=i.get(["label","position"]);t.textConfig.inside="middle"===f||null,function(t,e,n,i){if((0,p.isNumber)(i))t.setTextConfig({rotation:i});else if((0,p.isArray)(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===f?h:f,Ot(a),i.get(["label","rotate"]))}(0,Z.pe)(d,c,o.getRawValue(n),(function(t){return(0,F.O)(e,t)}));var g=i.getModel(["emphasis"]);(0,B.k5)(t,g.get("focus"),g.get("blurScope"),g.get("disabled")),(0,B.WO)(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",(0,p.each)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var Nt=function(){},kt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Nt},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);(0,V.A)(this).dataIndex=e>=0?e:null}),30,!1);function Bt(t,e,n){if(z(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}const Zt=St;var Ft=n(1891),Vt=n(5669),Gt=n(6172),Ht=2*Math.PI,Ut=Math.PI/180;function Wt(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jt(t,e){var n=Wt(t,e),i=t.get("center"),r=t.get("radius");p.isArray(r)||(r=[0,r]),p.isArray(i)||(i=[i,i]);var o=(0,Vt.GM)(n.width,e.getWidth()),a=(0,Vt.GM)(n.height,e.getHeight()),s=Math.min(o,a);return{cx:(0,Vt.GM)(i[0],o)+n.x,cy:(0,Vt.GM)(i[1],a)+n.y,r0:(0,Vt.GM)(r[0],s/2),r:(0,Vt.GM)(r[1],s/2)}}function Xt(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=Wt(t,n),o=jt(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*Ut,c=t.get("minAngle")*Ut,d=0;e.each(i,(function(t){!isNaN(t)&&d++}));var p=e.getSum(i),f=Math.PI/(p||d)*2,g=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),y=e.getDataExtent(i);y[0]=0;var _=Ht,x=0,b=h,w=g?1:-1;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===p&&v?f:t*f:Ht/d)n?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,d=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-c)/2}}}function ne(t){return"center"===t.position}function ie(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*$t,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,d=s.height;function f(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),m=i.getItemModel(t),v=m.getModel("label"),y=v.get("position")||m.get(["emphasis","label","position"]),_=v.get("distanceToLabelLine"),x=v.get("alignTo"),b=(0,Vt.GM)(v.get("edgeDistance"),u),w=v.get("bleedMargin"),S=m.getModel("labelLine"),T=S.get("length");T=(0,Vt.GM)(T,u);var M=S.get("length2");if(M=(0,Vt.GM)(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":P>0?"left":"right"}var Z=Math.PI,F=0,V=v.get("rotate");if((0,p.isNumber)(V))F=V*(Z/180);else if("center"===y)F=0;else if("radial"===V||!0===V){F=P<0?-L+Z:-L}else if("tangential"===V&&"outside"!==y&&"outer"!==y){var G=Math.atan2(P,O);G<0&&(G=2*Z+G),O>0&&(G=Z+G),F=G-Z}if(o=!!F,d.x=C,d.y=A,d.rotation=F,d.setStyle({verticalAlign:"middle"}),E){d.setStyle({align:D});var H=d.states.select;H&&(H.x+=d.x,H.y+=d.y)}else{var U=d.getBoundingRect().clone();U.applyTransform(d.getComputedTransform());var W=(d.style.margin||0)+2.1;U.y-=W/2,U.height+=W,r.push({label:d,labelLine:g,position:y,len:T,len2:M,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Kt.Z(P,O),linePoints:I,textAlign:D,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:U,unconstrainedWidth:U.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:E})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(k.Z);var se=n(5623),le=n(5101);function ue(t,e,n){e=(0,p.isArray)(e)&&{coordDimensions:e}||(0,p.extend)({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=(0,se.Z)(i,e).dimensions,o=new le.Z(r,t);return o.initData(i,n),o}var he=n(1772),ce=n(2019);const de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=(0,Vt.eJ)(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){S.Cc(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(u.Z);const pe=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(u.Z);var fe=n(479),ge=function(){},me=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new ge},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const ye=ve;const _e=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=(0,nt.Z)("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new ye:new f.Z,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(k.Z);var xe=n(3166),be=n(8071);const we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(be.Z);var Se=n(6650),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",S.C6).models[0]},e.type="cartesian2dAxis",e}(be.Z);p.mixin(Te,Se.W);var Me={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Ce=p.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Me),Ae=p.merge({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}}},Me);const Ie={category:Ce,value:Ae,time:p.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ae),log:p.defaults({logBase:10},Ae)};var De=n(1401),Le={value:1,category:1,time:1,log:1};function Pe(t,e,n,i){(0,p.each)(Le,(function(r,o){var a=(0,p.merge)((0,p.merge)({},Ie[o],!0),i,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return(0,s.ZT)(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,Gt.YD)(this),i=n?(0,Gt.tE)(t):{},r=e.getTheme();(0,p.merge)(t,r.get(o+"Axis")),(0,p.merge)(t,this.getDefaultOption()),t.type=Oe(t),n&&(0,Gt.dt)(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=De.Z.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=a,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",Oe)}function Oe(t){return t.type||(t.data?"category":"value")}var Ee=n(7947);const Ne=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return p.map(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),p.filter(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}();var ke=n(2892),Re=n(5280),ze=["x","y"];function Be(t){return"interval"===t.type||"time"===t.type}const Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ze,e}return(0,s.ZT)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(Be(t)&&Be(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,d=this._transform=[l,0,0,u,h,c];this._invTransform=(0,ke.invert)([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,Re.applyTransform)(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return(0,Re.applyTransform)(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-n,o=Math.max(e[0],e[1])-i;return new fe.Z(n,i,r,o)},e}(Ne);var Fe=n(2950),Ve=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Fe.Z);const Ge=Ve;var He=n(9069),Ue=n(5021),We=n(103),je=Math.log;function Xe(t,e,n){var i=We.Z.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=(0,Ee.Xv)(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var d=je(t.base);u=[je(u[0])/d,je(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var p=i.getExtent.call(t);h&&(u[0]=p[0]),c&&(u[1]=p[1]);var f=i.getInterval.call(t),g=u[0],m=u[1];if(h&&c)f=(m-g)/a;else if(h)for(m=u[0]+f*a;mu[0]&&isFinite(g)&&isFinite(u[0]);)f=(0,Ue.r1)(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=(0,Ue.r1)(f));var v=f*a;m=Math.ceil(u[1]/f)*f,(g=(0,Vt.NM)(m-v))<0&&u[0]>=0?(g=0,m=(0,Vt.NM)(v)):m>0&&u[1]<=0&&(m=0,g=-(0,Vt.NM)(v))}var y=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*y,m+f*_),i.setInterval.call(t,f),(y||_)&&i.setNiceExtent.call(t,g+f,m-f)}var Ye=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ze,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=(0,p.keys)(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;(0,Ue.lM)(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):((0,Ee.Jk)(l,s),(0,Ue.lM)(l)&&(e=a))}r.length&&(e||(e=r.pop(),(0,Ee.Jk)(e.scale,e.model)),(0,p.each)(r,(function(t){Xe(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};(0,p.each)(n.x,(function(t){Ke(n,"y",t,r)})),(0,p.each)(n.y,(function(t){Ke(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=(0,Gt.ME)(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){(0,p.each)(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&((0,p.each)(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=(0,Ee.Do)(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);o[n]-=e[n]+i,"top"===t.position?o.y+=e.height+i:"left"===t.position&&(o.x+=e.width+i)}}})),s()),(0,p.each)(this._coordsList,(function(t){t.calcAffineTransform()}))},t.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n)return n[e||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}(0,p.isObject)(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=a;null!=c.color&&(d=p.defaults({color:c.color},a));var f=p.merge(p.clone(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:h},!1);if(p.isString(l)){var g=f.name;f.name=l.replace("{value}",null!=g?g:"")}else p.isFunction(l)&&(f.name=l(f.name,f));var m=new Cn.Z(f,null,this.ecModel);return p.mixin(m,Se.W.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:p.merge({lineStyle:{color:"#bbb"}},An.axisLine),axisLabel:In(An.axisLabel,!1),axisTick:In(An.axisTick,!1),splitLine:In(An.splitLine,!0),splitArea:In(An.splitArea,!0),indicator:[]},e}(be.Z);const Ln=Dn;var Pn=n(9538),On=n(5795),En=["axisLine","axisTickLabel","axisName"],Nn=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),i=p.map(n,(function(t){var n=t.model.get("showName")?t.name:"";return new tn.Z(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));p.each(i,(function(t){p.each(En,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),d=p.isArray(h)?h:[h],f=p.isArray(c)?c:[c],g=[],m=[];if("circle"===i)for(var v=n[0].getTicksCoords(),y=e.cx,_=e.cy,x=0;x=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=gi(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new c.Z).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new dt.Z({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=Fn[s];if(u&&(0,p.hasOwn)(Fn,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=ei[s];if(d&&(0,p.hasOwn)(ei,s)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(a&&a.isGroup)for(var m=t.firstChild;m;)1===m.nodeType?this._parseNode(m,a,n,l,r,o):3===m.nodeType&&o&&this._parseText(m,a),m=m.nextSibling},t.prototype._parseText=function(t,e){var n=new Yn.Z({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ri(e,n),ai(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(Fn={g:function(t,e){var n=new c.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new dt.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},circle:function(t,e){var n=new Pn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new $e.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},ellipse:function(t,e){var n=new Wn.Z;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new _n.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=oi(i));var r=new qt.Z({shape:{points:n||[]},silent:!0});return ri(e,r),ai(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new xn.ZP;return ri(e,n),ai(t,n,this._defsUsePending,!1,!1),n.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")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new c.Z;return ri(e,a),ai(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=t.getAttribute("d")||"",i=(0,jn.iR)(n);return ri(e,i),ai(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),t}(),ei={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new x.Z(e,n,i,r);return ni(t,o),ii(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new Xn.Z(e,n,i);return ni(t,r),ii(t,r),r}};function ni(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function ii(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};fi(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function ri(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),(0,p.defaults)(e.__inheritedStyle,t.__inheritedStyle))}function oi(t){for(var e=hi(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=hi(a);switch(r=r||ke.create(),s){case"translate":ke.translate(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ke.scale(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ke.rotate(r,r,-parseFloat(l[0])*di);break;case"skewX":var u=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,0,u,1,0,0],r);break;case"skewY":var h=Math.tan(parseFloat(l[0])*di);ke.mul(r,[1,h,0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),fi(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=p.createHashMap(),n=p.createHashMap(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;(0,Z.ni)(e,(0,Z.k3)(i),{labelFetcher:d,labelDataIndex:c,defaultText:n},p);var f=e.getTextContent();if(f&&(Fi(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ji(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):(0,V.A)(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function Xi(t,e,n,i,r){t.data||ct.setTooltipConfig({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function Yi(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return(0,B.k5)(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&(0,B.th)(e,r,n),a}function qi(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),p.each(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(u.Z);const tr=$i;function er(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),p.each(e,(function(t,e){for(var n,i,r,o=(n=p.map(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},p.each(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=c[1]-p.height/2,p.x=c[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Gt.ME(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var hr=function(){function t(){this.dimensions=or}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new lr(o+r,o,p.extend({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=ur,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),p.each(r,(function(t,r){var o=p.map(t,(function(t){return t.get("nameMap")})),a=new lr(r,r,p.extend({nameMap:p.mergeAll(o)},i(t[0])));a.zoomLimit=p.retrieve.apply(null,p.map(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=ur,a.resize(t[0],e),p.each(t,(function(t){t.coordinateSystem=a,function(t,e){p.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=p.createHashMap(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=Mr(s),o=Cr(o),s&&o;){r=Mr(r),a=Cr(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);d>0&&(Ir(Ar(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!Mr(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!Cr(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function br(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function wr(t){return arguments.length?t:Dr}function Sr(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Tr(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Mr(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Cr(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Ar(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function Ir(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function Dr(t,e){return t.parentNode===e.parentNode?1:2}var Lr=n(3726),Pr=function(){this.parentPoint=[],this.childPoints=[]},Or=function(t){function e(e){return t.call(this,e)||this}return(0,s.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Pr},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=(0,Vt.GM)(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var d=1;dx.x)||(S-=Math.PI);var C=T?"left":"right",A=s.getModel("label"),I=A.get("rotate"),D=I*(Math.PI/180),L=y.getTextContent();L&&(y.setTextConfig({position:A.get("position")||C,rotation:null==I?-S:D,origin:"center"}),L.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),O="relative"===P?p.concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():null;O&&((0,V.A)(n).focus=O),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),m=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(m||(m=i.__edge=new _r.Z({shape:Zr(h,c,d,r,r)})),b.D(m,{shape:Zr(h,c,d,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var v=e.children,y=[],_=0;_e&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(p.isString(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function jr(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xr(t,e){var n=jr(t);return p.indexOf(n,e)>=0}function Yr(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Cn.Z(n,this,this.ecModel),r=Ur.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(u.Z);const Kr=qr;function Jr(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function Qr(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=Tr(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=wr((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=wr());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var d=u===h?1:a(u,h)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=Sr(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}));else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+p),f=r/(c.depth-1||1),Jr(l,(function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Jr(l,(function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}}(t,e)}))}function $r(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle(),i=e.ensureUniqueItemVisual(t.dataIndex,"style");(0,p.extend)(i,n)}))}))}var to=["treemapZoomToNode","treemapRender","treemapMove"];var eo=n(5494);function no(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=(0,eo.i)(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var io=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ro(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Cn.Z({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=(0,S.kF)(e.get("color")),o=(0,S.kF)(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],p.each(t,(function(t){var e=new Cn.Z(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=p.map(i||[],(function(t){return new Cn.Z(t,o,e)}),this),s=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t),o=i.getName(t);return(0,Sn.TX)("nameValue",{name:o,value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=Yr(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},p.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=p.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(u.Z);function ro(t){var e=0;p.each(t.children,(function(t){ro(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const oo=io;var ao=n(4130),so=function(){function t(t){this.group=new c.Z,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Gt.p$(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=(0,S.U5)(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o=0,a=e.emptyItemWidth,s=t.get(["breadcrumb","height"]),l=Gt.lq(e.pos,e.box),u=e.totalWidth,h=e.renderList,c=h.length-1;c>=0;c--){var d=h[c],f=d.node,g=d.width,m=d.text;u>l.width&&(u-=g-a,g=a,m=null);var v=new _n.Z({shape:{points:lo(o,0,g,s,c===h.length-1,0===c)},style:(0,p.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new w.ZP({style:{text:m,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e4*B.zr,onclick:(0,p.curry)(r,f)});v.disableLabelAnimation=!0,this.group.add(v),uo(v,t,f),o+=g+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function lo(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function uo(t,e,n){(0,V.A)(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&Yr(n,e)}}const ho=so;var co=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new fe.Z(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=ke.create();ke.translate(s,s,[-e,-n]),ke.scale(s,s,[t.scale,t.scale]),ke.translate(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&(0,G.MI)(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new ho(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(Xr(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(k.Z);const Mo=To;var Co=p.each,Ao=p.isObject,Io=-1,Do=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=p.clone(e);this.type=i,this.mappingMethod=n,this._normalizeData=Zo[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Lo(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,p.each(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(Co(e,(function(t,e){n[t]=e})),!p.isArray(i)){var r=[];p.isObject(i)?Co(i,(function(t,e){var i=n[e];r[null!=i?i:Io]=t})):r[-1]=i,i=Bo(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):Lo(r,!0):(p.assert("linear"!==n||r.dataExtent),Lo(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return p.bind(this._normalizeData,this)},t.listVisualTypes=function(){return p.keys(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){p.isObject(t)?p.each(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=p.isArray(e)?[]:p.isObject(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&Co(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(p.isArray(t))t=t.slice();else{if(!Ao(t))return[];var e=[];Co(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new Vo(c);return Go(d).drColorMappingBy=h,d}(0,r,o,0,u,f);(0,p.each)(f,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=(0,p.extend)({},e);if(r){var s=r.type,l="color"===s&&Go(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,g,i);Uo(t,o,n,i)}}))}else s=Wo(u),h.fill=s}}function Wo(t){var e=jo(t,"color");if(e){var n=jo(t,"colorAlpha"),i=jo(t,"colorSaturation");return i&&(e=(0,H.modifyHSL)(e,null,null,i)),n&&(e=(0,H.modifyAlpha)(e,n)),e}}function jo(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function Xo(t,e){var n=t.get(e);return(0,p.isArray)(n)&&n.length?{name:e,range:n}:null}var Yo=Math.max,qo=Math.min,Ko=p.retrieve,Jo=p.each,Qo=["itemStyle","borderWidth"],$o=["itemStyle","gapWidth"],ta=["upperLabel","show"],ea=["upperLabel","height"];const na={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Gt.ME(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=(0,Vt.GM)(Ko(s.width,l[0]),r),h=(0,Vt.GM)(Ko(s.height,l[1]),o),c=i&&i.type,d=Wr(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?i.rootRect:null,g=t.getViewRoot(),m=jr(g);if("treemapMove"!==c){var v="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,d=0,p=c.length;dVt.YM&&(u=Vt.YM),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?Yo(u*i/l,l/(u*r)):1/0}function oa(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,d=t.length;c=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(T.ZP);function ha(t,e){var n=null==t?"":t+"";return e&&((0,p.isString)(e)?n=e.replace("{value}",n):(0,p.isFunction)(e)&&(n=e(t))),n}var ca=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:(0,Vt.GM)(n[0],e.getWidth()),cy:(0,Vt.GM)(n[1],e.getHeight()),r:(0,Vt.GM)(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?vt:pt.C,c=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];(0,M.L)(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=0;c&&v=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:k}),silent:!0}))}if(y.get("show")&&P!==x){O=(O=y.get("distance"))?O+l:l;for(var R=0;R<=b;R++){u=Math.cos(M),h=Math.sin(M);var z=new $e.Z({shape:{x1:u*(f-O)+d,y1:h*(f-O)+p,x2:u*(f-T-O)+d,y2:h*(f-T-O)+p},silent:!0,style:D});"auto"===D.stroke&&z.setStyle({stroke:i((P+R/b)/x)}),c.add(z),M+=A}M-=A}else M+=C}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,f=[],g=t.get(["pointer","show"]),m=t.getModel("progress"),v=m.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),w=+t.get("max"),S=[x,w],T=[o,a];function M(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=(0,Vt.GM)(o.get("width"),r.r),s=(0,Vt.GM)(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=(0,Vt.GM)(u[0],r.r),d=(0,Vt.GM)(u[1],r.r),p=o.get("keepAspect");return(i=l?(0,h.th)(l,c-a/2,d-s,a,s,null,p):new ua({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function C(t,e){var n=m.get("roundCap")?vt:pt.C,i=m.get("overlap"),a=i?m.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=w-y.get(_,t)%w),c}(v||g)&&(y.diff(c).add((function(e){var n=y.get(_,e);if(g){var i=M(e,o);b.KZ(i,{rotation:-((isNaN(+n)?T[0]:(0,Vt.NU)(n,S,T,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(v){var r=C(e,o),a=m.get("clip");b.KZ(r,{shape:{endAngle:(0,Vt.NU)(n,S,T,a)}},t),u.add(r),(0,V.Q)(t.seriesIndex,y.dataType,e,r),f[e]=r}})).update((function(e,n){var i=y.get(_,e);if(g){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=M(e,a);s.rotation=a,b.D(s,{rotation:-((isNaN(+i)?T[0]:(0,Vt.NU)(i,S,T,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(v){var l=d[n],h=C(e,l?l.shape.endAngle:o),p=m.get("clip");b.D(h,{shape:{endAngle:(0,Vt.NU)(i,S,T,p)}},t),u.add(h),(0,V.Q)(t.seriesIndex,y.dataType,e,h),f[e]=h}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(g){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof xn.ZP){var h=s.style;s.useStyle((0,p.extend)({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i((0,Vt.NU)(y.get(_,t),S,[0,1],!0))),s.z2EmphasisLift=0,(0,B.WO)(s,e),(0,B.k5)(s,r,o,a)}if(v){var c=f[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,(0,B.WO)(c,e),(0,B.k5)(c,r,o,a)}})),this._progressEls=f)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=(0,h.th)(r,e.cx-i/2+(0,Vt.GM)(o[0],e.r),e.cy-i/2+(0,Vt.GM)(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new c.Z,d=[],p=[],f=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){d[t]=new w.ZP({silent:!0}),p[t]=new w.ZP({silent:!0})})).update((function(t,e){d[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),m=new c.Z,v=i((0,Vt.NU)(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var _=y.get("offsetCenter"),x=r.cx+(0,Vt.GM)(_[0],r.r),b=r.cy+(0,Vt.GM)(_[1],r.r);(D=d[e]).attr({z2:g?0:2,style:(0,Z.Lr)(y,{x,y:b,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:v})}),m.add(D)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),T=r.cx+(0,Vt.GM)(S[0],r.r),M=r.cy+(0,Vt.GM)(S[1],r.r),C=(0,Vt.GM)(w.get("width"),r.r),A=(0,Vt.GM)(w.get("height"),r.r),I=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:v,D=p[e],L=w.get("formatter");D.attr({z2:g?0:2,style:(0,Z.Lr)(w,{x:T,y:M,text:ha(o,L),width:isNaN(C)?null:C,height:isNaN(A)?null:A,align:"center",verticalAlign:"middle"},{inheritColor:I})}),(0,Z.pe)(D,{normal:w},o,(function(t){return ha(t,L)})),f&&(0,Z.tD)(D,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return ha(a?a.interpolatedValue:o,L)}}),m.add(D)}h.add(m)})),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(k.Z);const da=ca;const pa=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){return ue(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(u.Z);var fa=["itemStyle","opacity"],ga=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new qt.Z,a=new w.ZP;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return(0,s.ZT)(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(fa);l=null==l?1:l,n||(0,b.Zi)(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,b.KZ(i,{style:{opacity:l}},r,e)):b.D(i,{style:{opacity:l},shape:{points:a.points}},r,e),(0,B.WO)(i,o),this._updateLabel(t,e),(0,B.k5)(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;(0,Z.ni)(r,(0,Z.k3)(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new Kt.Z(h[0][0],h[0][1]):null},b.D(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),(0,Jt.Iu)(n,(0,Jt.$x)(a),{stroke:u})},e}(_n.Z);const ma=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new ga(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){var n=r.getItemGraphicEl(e);b.XD(n,t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(k.Z);var va=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new ce.Z(p.bind(this.getData,this),p.bind(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return ue(this,{coordDimensions:["value"],encodeDefaulter:p.curry(he.Ss,this)})},e.prototype._defaultLabelLine=function(t){(0,S.Cc)(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(u.Z);const ya=va;function _a(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ea(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Ea(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}const Na=Pa;var ka=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&p.merge(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){p.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=p.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);p.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(be.Z);const Ra=ka;const za=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return(0,s.ZT)(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(Fe.Z);var Ba=n(9233),Za=p.each,Fa=Math.min,Va=Math.max,Ga=Math.floor,Ha=Math.ceil,Ua=Vt.NM,Wa=Math.PI,ja=function(){function t(t,e,n){this.type="parallel",this._axesMap=p.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Za(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new za(t,Ee.aG(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Za(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),Ee.Jk(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=Xa(e.get("axisExpandWidth"),l),c=Xa(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,p=e.get("axisExpandWindow");p?(t=Xa(p[1]-p[0],l),p[1]=p[0]+t):(t=Xa(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||Ga(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Ga(Ua(p[0]/h,1))+1,Ha(Ua(p[1]/h,1))-1],m=f/h*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Za(n,(function(e,n){var o=(i.axisExpandable?qa:Ya)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Wa/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=ke.create();ke.rotate(h,h,u),ke.translate(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];p.each(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?(0,Ba.Z)(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[Va(0,o[1]*s/d-d/2)])[1]=Fa(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}();function Xa(t,e){return Fa(Va(t,e[0]),e[1])}function Ya(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function qa(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Vt.dt(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i=0&&(o[r[a].depth]=new Cn.Z(r[a],this,e));if(i&&n){var s=(0,cs.Z)(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value,s=o.source+" -- "+o.target;return(0,Sn.TX)("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,n).data.name;return(0,Sn.TX)("nameValue",{name:null!=u?u+"":null,value:l,noValue:i(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(u.Z);const ps=ds;function fs(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){p.each(t,(function(t){var e=Ts(t.outEdges,Ss),n=Ts(t.inEdges,Ss),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,d=0;d=0;y&&v.depth>f&&(f=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_c-1?f:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)vs(s,l*=.99,a),ms(s,r,n,i,a),Ms(s,l,a),ms(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";p.each(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),p.each(t,(function(t){var e=0,n=0;p.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),p.each(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==p.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function gs(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ms(t,e,n,i,r){var o="vertical"===r?"x":"y";p.each(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=h-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function vs(t,e,n){p.each(t.slice().reverse(),(function(t){p.each(t,(function(t){if(t.outEdges.length){var i=Ts(t.outEdges,ys,n)/Ts(t.outEdges,Ss);if(isNaN(i)){var r=t.outEdges.length;i=r?Ts(t.outEdges,_s,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-ws(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-ws(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function ys(t,e){return ws(t.node2,e)*t.getValue()}function _s(t,e){return ws(t.node2,e)}function xs(t,e){return ws(t.node1,e)*t.getValue()}function bs(t,e){return ws(t.node1,e)}function ws(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Ss(t){return t.getValue()}function Ts(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),p.each(e,(function(e){var r=new Vo({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var As=n(381),Is=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[r,o],f=d[u].get("type"),g=d[1-u].get("type"),m=t.data;if(m&&i){var v=[];p.each(m,(function(t,e){var n;p.isArray(t)?(n=t.slice(),t.unshift(e)):p.isArray(t.value)?((n=p.extend({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,v.push(n)})),t.data=v}var y=this.defaultValueDimensions,_=[{name:h,type:(0,As.T)(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:(0,As.T)(g),dimsDef:y.slice()}];return ue(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:p.curry(he.pY,_,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),Ds=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return(0,s.ZT)(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(u.Z);(0,p.mixin)(Ds,Is,!0);const Ls=Ds;var Ps=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=Ns(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?((0,b.Zi)(n),ks(s,n,i,t)):n=Ns(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(k.Z),Os=function(){},Es=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new Os},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();im){var b=[y,x];i.push(b)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var Us=["color","borderColor"],Ws=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&qs(s,a))return;var l=Ys(a,n,!0);b.KZ(l,{shape:{points:a.ends}},t,n),Ks(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&qs(s,h)?i.remove(u):(u?(b.D(u,{shape:{points:h.ends}},t,a),(0,b.Zi)(u)):u=Ys(h,a),Ks(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),tl(t,this.group);var e=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=Ys(i.getItemLayout(n),n);Ks(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){tl(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(k.Z),js=function(){},Xs=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return(0,s.ZT)(e,t),e.prototype.getDefaultShape=function(){return new js},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(T.ZP);function Ys(t,e,n){var i=t.ends;return new Xs({shape:{points:n?Js(i,t):i},z2:100})}function qs(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(Us);e.useStyle(o),e.style.fill=null,e.style.stroke=r}const nl=Ws;var il=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return(0,s.ZT)(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(u.Z);(0,p.mixin)(il,Is,!0);const rl=il;function ol(t){t&&p.isArray(t.series)&&p.each(t.series,(function(t){p.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}var al=n(5682),sl=["itemStyle","borderColor"],ll=["itemStyle","borderColor0"],ul=["itemStyle","color"],hl=["itemStyle","color0"],cl={seriesType:"candlestick",plan:(0,al.Z)(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?ul:hl)}function i(t,e){return e.get(t>0?sl:ll)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill;var l=e.ensureUniqueItemVisual(r,"style");(0,p.extend)(l,s)}}}}};const dl=cl;var pl={seriesType:"candlestick",plan:(0,al.Z)(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=(0,Vt.GM)((0,p.retrieve2)(t.get("barMaxWidth"),r),r),a=(0,Vt.GM)((0,p.retrieve2)(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?(0,Vt.GM)(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=(0,p.map)(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=(0,_.o)(4*t.count),c=0,d=[],p=[],f=n.getStore();for(;null!=(r=t.next());){var g=f.get(o,r),m=f.get(s,r),v=f.get(l,r),y=f.get(u,r),x=f.get(h,r);isNaN(g)||isNaN(y)||isNaN(x)?(a[c++]=NaN,c+=3):(a[c++]=fl(f,r,m,v,l),d[0]=g,d[1]=y,i=e.dataToPoint(d,null,p),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,d[1]=x,i=e.dataToPoint(d,null,p),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),d=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(h,r),m=Math.min(d,p),v=Math.max(d,p),y=S(m,c),_=S(v,c),x=S(f,c),b=S(g,c),w=[];T(w,_,0),T(w,y,1),w.push(C(b),C(_),C(x),C(y)),n.setItemLayout(r,{sign:fl(a,r,d,p,l),initBaseline:d>p?_[1]:y[1],ends:w,brushRect:M(f,g,c)})}function S(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function T(t,e,n){var r=e.slice(),o=e.slice();r[0]=(0,ct.subPixelOptimize)(r[0]+i/2,1,!1),o[0]=(0,ct.subPixelOptimize)(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=S(t,n),o=S(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=(0,ct.subPixelOptimize)(t[0],1),t}}}}};function fl(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}const gl=pl;var ml=n(3132),vl=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=ml.qW.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p0){var M=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=M[T],_[x++]=M[T+1],_[x++]=M[T+2],_[x++]=M[T+3]*v*256}else x+=4}return c.putImageData(y,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=ml.qW.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();const yl=vl;function _l(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var xl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):_l(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(_l(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ct.traverseElements(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=z(u,"cartesian2d");if(h){var c=u.getAxis("x"),d=u.getAxis("y");0,o=c.getBandWidth()+.5,a=d.getBandWidth()+.5,s=c.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),y=t.get(["itemStyle","borderRadius"]),_=(0,Z.k3)(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),T=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;Ms[1]||Dl[1])continue;var L=u.dataToPoint([I,D]);C=new dt.Z({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:A})}else{if(isNaN(f.get(T[1],M)))continue;C=new dt.Z({z2:1,shape:u.dataToRect([f.get(T[0],M)]).contentShape,style:A})}if(f.hasItemOption){var P=f.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),m=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),y=P.get(["itemStyle","borderRadius"]),b=O.get("focus"),w=O.get("blurScope"),S=O.get("disabled"),_=(0,Z.k3)(P)}C.shape.r=y;var E=t.getRawValue(M),N="-";E&&null!=E[2]&&(N=E[2]+""),(0,Z.ni)(C,_,{labelFetcher:t,labelDataIndex:M,defaultOpacity:A.opacity,defaultText:N}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=m,C.ensureState("select").style=v,(0,B.k5)(C,b,w,S),C.incremental=r,r&&(C.states.emphasis.hoverLayer=!0),p.add(C),f.setItemGraphicEl(M,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new yl;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),g=d-h,m=f-c,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],y=a.mapArray(v,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),_=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(_,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=p.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,d),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),g=t.getItemVisual(e,"symbolSize");h=p.isArray(g)?g.slice():null==g?["100%","100%"]:[g,g];h[d.index]=(0,Vt.GM)(h[d.index],f),h[c.index]=(0,Vt.GM)(h[c.index],i?f:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,d.boundingLength,d.pxSign,u,i,d),function(t,e,n,i,r){var o=t.get(Tl)||0;o&&(Cl.attr({scaleX:e[0],scaleY:e[1],rotation:n}),Cl.updateTransform(),o/=Cl.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var f=d.symbolSize,g=(0,h.Cq)(n.get("symbolOffset"),f);return function(t,e,n,i,r,o,a,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,g=c.pxSign,m=Math.max(e[f.index]+s,0),v=m;if(i){var y=Math.abs(l),_=p.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;_.lastIndexOf("!")===_.length-1&&(x=!0,_=_.slice(0,_.length-1));var b=(0,Vt.GM)(_,e[f.index]),w=Math.max(m+2*b,0),S=x?0:2*b,T=(0,Vt.kE)(i),M=T?i:Hl((y+S)/w);w=m+2*(b=(y-M*m)/2/(x?M:Math.max(M-1,1))),S=x?0:2*b,T||"fixed"===i||(M=u?Hl((Math.abs(u)+S)/w):0),v=M*w-S,c.repeatTimes=M,c.symbolMargin=b}var C=g*(v/2),A=c.pathPosition=[];A[d.index]=n[d.wh]/2,A[f.index]="start"===a?C:"end"===a?l-C:l/2,o&&(A[0]+=o[0],A[1]+=o[1]);var I=c.bundlePosition=[];I[d.index]=n[d.xy],I[f.index]=n[f.xy];var D=c.barRectShape=p.extend({},n);D[f.wh]=g*Math.max(Math.abs(n[f.wh]),Math.abs(A[f.index]+C)),D[d.wh]=n[d.wh];var L=c.clipShape={};L[d.xy]=-n[d.xy],L[d.wh]=h.ecSize[d.wh],L[f.xy]=0,L[f.wh]=n[f.wh]}(n,f,r,o,0,g,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function Il(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Dl(t){var e=t.symbolPatternSize,n=(0,h.th)(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Ll(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(Fl(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Pl(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?Vl(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=Dl(n),r.add(o),Vl(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function Ol(t,e,n){var i=p.extend({},e.barRectShape),r=t.__pictorialBarRect;r?Vl(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new dt.Z({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function El(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=p.extend({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)b.D(r,{shape:o},s,l);else{o[a.wh]=0,r=new dt.Z({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],ct[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Nl(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=kl,n.isAnimationEnabled=Rl,n}function kl(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Rl(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zl(t,e,n,i){var r=new c.Z,o=new c.Z;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?Ll(r,e,n):Pl(r,0,n),Ol(r,n,i),El(r,e,n,i),r.__pictorialShapeStr=Zl(t,n),r.__pictorialSymbolMeta=n,r}function Bl(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Fl(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),p.each(o,(function(t){b.bX(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function Zl(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Fl(t,e,n){p.each(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function Vl(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&ct[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function Gl(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),d=o.get("scale");Fl(t,(function(t){if(t instanceof xn.ZP){var e=t.style;t.useStyle(p.extend({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var f=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;(0,Z.ni)(g,(0,Z.k3)(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:(0,F.H)(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),(0,B.k5)(t,h,c,o.get("disabled"))}function Hl(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Ul=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:Ml[+s],categoryDim:Ml[1-+s]};return r.diff(o).add((function(t){if(r.hasValue(t)){var e=Nl(r,t),n=Al(r,t,e,u),o=zl(r,u,n);r.setItemGraphicEl(t,o),i.add(o),Gl(o,u,n)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=Nl(r,t),s=Al(r,t,a,u),l=Zl(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){var i=n.animationModel,r=n.dataIndex,o=t.__pictorialBundle;b.D(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?Ll(t,e,n,!0):Pl(t,e,n,!0);Ol(t,n,!0),El(t,e,n,!0)}(n,u,s):n=zl(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),Gl(n,u,s)}else i.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&Bl(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl((function(e){Bl(i,(0,V.A)(e).dataIndex,t,e)})):n.removeAll()},e.type="pictorialBar",e}(k.Z);const Wl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=(0,ut.ZL)(lt.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(lt);var jl=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var d=new ao.Z(this._layersSeries||[],a,h,h),f=[];function g(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,d=[],p=[],g=a[n].indices,m=0;mo&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,d=o.length,f=o[0].indices.length,g=0;gMath.PI/2?"right":"left"):T&&"center"!==T?"left"===T?(_=r.r0+S,a>Math.PI/2&&(T="right")):"right"===T&&(_=r.r-S,a>Math.PI/2&&(T="left")):(_=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,T="center"),m.style.align=T,m.style.verticalAlign=g(d,"verticalAlign")||"middle",m.x=_*s+r.cx,m.y=_*l+r.cy;var M=g(d,"rotate"),C=0;"radial"===M?(C=-a)<-Math.PI/2&&(C+=Math.PI):"tangential"===M?(C=Math.PI/2-a)>Math.PI/2?C-=Math.PI:C<-Math.PI/2&&(C+=Math.PI):p.isNumber(M)&&(C=M*Math.PI/180),m.rotation=C})),h.dirtyStyle()},e}(pt.C);const $l=Ql;var tu="sunburstRootToNode",eu="sunburstHighlight";var nu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new $l(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new ao.Z(r,i,s,s).add(h).update(h).remove(p.curry(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new $l(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";(0,G.MI)(a,s)}}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:tu,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(k.Z);const iu=nu;var ru=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return(0,s.ZT)(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};ou(n);var i=this._levelModels=p.map(t.levels||[],(function(t){return new Cn.Z(t,this,e)}),this),r=Ur.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=Yr(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){no(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(u.Z);function ou(t){var e=0;p.each(t.children,(function(t){ou(t);var n=t.value;p.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;p.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),p.isArray(t.value)?t.value[0]=n:t.value=n}const au=ru;var su=Math.PI/180;function lu(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");p.isArray(i)||(i=[0,i]),p.isArray(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=(0,Vt.GM)(e[0],r),l=(0,Vt.GM)(e[1],o),u=(0,Vt.GM)(i[0],a/2),h=(0,Vt.GM)(i[1],a/2),c=-t.get("startAngle")*su,d=t.get("minAngle")*su,f=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&uu(g,v);var y=0;p.each(g.children,(function(t){!isNaN(t.getValue())&&y++}));var _=g.getValue(),x=Math.PI/(_||y)*2,b=g.depth>0,w=g.height-(b?-1:1),S=(h-u)/(w||1),T=t.get("clockwise"),M=t.get("stillShowZeroSum"),C=T?1:-1,A=function(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===_&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&(0,p.isString)(o)&&(o=(0,H.lift)(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height));var a=n.ensureUniqueItemVisual(r.dataIndex,"style");(0,p.extend)(a,o)}))}))}var cu={color:"fill",borderColor:"stroke"},du={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},pu=(0,S.Yf)();const fu=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return(0,l.Z)(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=pu(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(u.Z);function gu(t,e){return e=e||[0,0],p.map(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function mu(t,e){return e=e||[0,0],p.map([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function vu(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function yu(t,e){return e=e||[0,0],p.map(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function _u(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||(0,p.hasOwn)(t,"text")))}function xu(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},(0,p.hasOwn)(a,"text")&&(o.text=a.text),(0,p.hasOwn)(a,"rich")&&(o.rich=a.rich),(0,p.hasOwn)(a,"textFill")&&(o.fill=a.textFill),(0,p.hasOwn)(a,"textStroke")&&(o.stroke=a.textStroke),(0,p.hasOwn)(a,"fontFamily")&&(o.fontFamily=a.fontFamily),(0,p.hasOwn)(a,"fontSize")&&(o.fontSize=a.fontSize),(0,p.hasOwn)(a,"fontStyle")&&(o.fontStyle=a.fontStyle),(0,p.hasOwn)(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=(0,p.hasOwn)(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textPosition")&&(i.position=a.textPosition),(0,p.hasOwn)(a,"textOffset")&&(i.offset=a.textOffset),(0,p.hasOwn)(a,"textRotation")&&(i.rotation=a.textRotation),(0,p.hasOwn)(a,"textDistance")&&(i.distance=a.textDistance)}return bu(o,t),(0,p.each)(o.rich,(function(t){bu(t,t)})),{textConfig:i,textContent:r}}function bu(t,e){e&&(e.font=e.textFont||e.font,(0,p.hasOwn)(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),(0,p.hasOwn)(e,"textAlign")&&(t.align=e.textAlign),(0,p.hasOwn)(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),(0,p.hasOwn)(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),(0,p.hasOwn)(e,"textWidth")&&(t.width=e.textWidth),(0,p.hasOwn)(e,"textHeight")&&(t.height=e.textHeight),(0,p.hasOwn)(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),(0,p.hasOwn)(e,"textPadding")&&(t.padding=e.textPadding),(0,p.hasOwn)(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),(0,p.hasOwn)(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),(0,p.hasOwn)(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),(0,p.hasOwn)(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),(0,p.hasOwn)(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),(0,p.hasOwn)(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),(0,p.hasOwn)(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function wu(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";Su(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,(0,p.each)(e.rich,(function(t){Su(t,t)})),i}function Su(t,e){e&&((0,p.hasOwn)(e,"fill")&&(t.textFill=e.fill),(0,p.hasOwn)(e,"stroke")&&(t.textStroke=e.fill),(0,p.hasOwn)(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),(0,p.hasOwn)(e,"font")&&(t.font=e.font),(0,p.hasOwn)(e,"fontStyle")&&(t.fontStyle=e.fontStyle),(0,p.hasOwn)(e,"fontWeight")&&(t.fontWeight=e.fontWeight),(0,p.hasOwn)(e,"fontSize")&&(t.fontSize=e.fontSize),(0,p.hasOwn)(e,"fontFamily")&&(t.fontFamily=e.fontFamily),(0,p.hasOwn)(e,"align")&&(t.textAlign=e.align),(0,p.hasOwn)(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),(0,p.hasOwn)(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),(0,p.hasOwn)(e,"width")&&(t.textWidth=e.width),(0,p.hasOwn)(e,"height")&&(t.textHeight=e.height),(0,p.hasOwn)(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),(0,p.hasOwn)(e,"padding")&&(t.textPadding=e.padding),(0,p.hasOwn)(e,"borderColor")&&(t.textBorderColor=e.borderColor),(0,p.hasOwn)(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),(0,p.hasOwn)(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),(0,p.hasOwn)(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),(0,p.hasOwn)(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),(0,p.hasOwn)(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),(0,p.hasOwn)(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),(0,p.hasOwn)(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),(0,p.hasOwn)(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),(0,p.hasOwn)(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),(0,p.hasOwn)(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var Tu=n(5622),Mu=n(7411),Cu={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Au=(0,p.keys)(Cu),Iu=((0,p.reduce)(Mu.dN,(function(t,e){return t[e]=1,t}),{}),Mu.dN.join(", "),["","style","shape","extra"]),Du=(0,S.Yf)();function Lu(t,e,n,i,r){var o=t+"Animation",a=(0,b.ke)(t,i,r)||{},s=Du(e).userDuring;return a.duration>0&&(a.during=s?(0,p.bind)(zu,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),(0,p.extend)(a,n[o]),a}function Pu(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=Du(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),d=c?c.style:null;if(d){!r&&(r=i.style={});var f=(0,p.keys)(n);for(u=0;u0&&t.animateFrom(d,f)}else!function(t,e,n,i,r){if(r){var o=Lu("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);Ou(t,e),u?t.dirty():t.markRedraw()}function Ou(t,e){for(var n=Du(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var d=(0,p.keys)(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:p.bind(yu,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function eh(t){return t instanceof T.ZP}function nh(t){return t instanceof ki.ZP}const ih=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=lh(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){hh(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);Eu(n,pu(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);hh(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?(0,R.lQ)(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=lh(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=_(i,Wu).getItemStyle(),o=x(i,Wu),a=Z.Lr(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,p.retrieve3)(t.getFormattedLabel(i,Wu),t.getFormattedLabel(i,ju),(0,F.H)(e,i)):null;var l=Z.nC(o,null,!0);return w(n,r),r=wu(r,a,l),n&&b(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),(0,p.hasOwn)(cu,t)){var i=e.getItemVisual(n,"style");return i?i[cu[t]]:null}if((0,p.hasOwn)(du,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){var e=o.getBaseAxis();return(0,at.Gk)((0,p.defaults)({axis:e},t))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return Z.qT(t,n)}},a.api||{}),h={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:uh(t.getData())},c={},d={},f={},g={},m=0;m=c;d--){Eu(e.childAt(d),pu(e).option,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function dh(t,e,n){var i,r=pu(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&((0,p.hasOwn)(i,"pathData")||(0,p.hasOwn)(i,"d")))&&_h(a)!==r.customPathData||"image"===o&&(0,p.hasOwn)(s,"image")&&s.image!==r.customImagePath}function ph(t,e,n){var i=e?fh(t,e):t,r=e?gh(t,i,Wu):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?fh(s,e):s:null;if(r&&(n.isLegacy||_u(r,o,!!a,!!l))){n.isLegacy=!0;var u=xu(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function fh(t,e){return e?t?t[e]:null:t}function gh(t,e,n){var i=e&&e.style;return null==i&&n===Wu&&t&&(i=t.styleEmphasis),i}function mh(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function vh(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ch(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function yh(t){var e=this.context,n=e.oldChildren[t];Eu(n,pu(n).option,e.seriesModel)}function _h(t){return t&&(t.pathData||t.d)}var xh=n(6026),bh=n(9517),wh=n(241),Sh=n(7037);var Th=n(7329),Mh=n(5539),Ch=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ah[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=ke.create();ke.rotate(d,d,s),ke.translate(d,d,[i.cx,i.cy]),l=ct.applyTransform([a,-r],d);var p=e.getModel("axisLabel").get("rotate")||0,f=tn.Z.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));Mh.$_(t,n,i,r,d)},e}(Th.Z);var Ah={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:Mh.BL(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Mh.Rj(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:Mh.Rj(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}};const Ih=Ch;const Dh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(be.Z);var Lh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",S.C6).models[0]},e.type="polarAxis",e}(be.Z);p.mixin(Lh,Se.W);var Ph=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="angleAxis",e}(Lh),Oh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="radiusAxis",e}(Lh),Eh=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(Fe.Z);Eh.prototype.dataToRadius=Fe.Z.prototype.dataToCoord,Eh.prototype.radiusToData=Fe.Z.prototype.coordToData;const Nh=Eh;var kh=(0,S.Yf)(),Rh=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return(0,s.ZT)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=yt.lP(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=kh(t.model),d=c.lastAutoInterval,p=c.lastTickCount;return null!=d&&null!=p&&Math.abs(d-h)<=1&&Math.abs(p-r)<=1&&d>h?h=d:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(Fe.Z);Rh.prototype.dataToAngle=Fe.Z.prototype.dataToCoord,Rh.prototype.angleToData=Fe.Z.prototype.coordToData;const zh=Rh;var Bh=["radius","angle"],Zh=function(){function t(t){this.dimensions=Bh,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Nh,this._angleAxis=new zh,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return Fh(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return Fh(e)===this?this.pointToData(n):null},t}();function Fh(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}const Vh=Zh;function Gh(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();p.each((0,Ee.PY)(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),p.each((0,Ee.PY)(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),(0,Ee.Jk)(i.scale,i.model),(0,Ee.Jk)(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function Hh(t,e){if(t.type=e.get("type"),t.scale=(0,Ee.aG)(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var Uh={dimensions:Bh,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new Vh(i+"");r.update=Gh;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Hh(o,s),Hh(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=(0,Vt.GM)(i[0],r),t.cy=(0,Vt.GM)(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:p.isArray(l)||(l=[0,l]);var u=[(0,Vt.GM)(l[0],s),(0,Vt.GM)(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",S.C6).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}};const Wh=Uh;var jh=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Xh(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function Yh(t){return t.getRadiusAxis().inverse?0:1}function qh(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var Kh=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=p.map(n.getViewLabels(),(function(t){t=p.clone(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));qh(s),qh(o),p.each(jh,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||Jh[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(en.Z),Jh={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=Yh(n),u=l?0:1;(a=0===o[u]?new Pn.Z({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new On.Z({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[Yh(n)],u=p.map(i,(function(t){return new $e.Z({shape:Xh(n,[l,l+s],t.coord)})}));t.add(ct.mergePath(u,{style:p.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[Yh(n)],h=[],c=0;cg?"left":"right",y=Math.abs(f[1]-m)/d<.3?"middle":f[1]>m?"top":"bottom";if(s&&s[c]){var _=s[c];p.isObject(_)&&_.textStyle&&(a=new Cn.Z(_.textStyle,l,l.ecModel))}var x=new w.ZP({silent:tn.Z.isLabelSilent(e),style:(0,Z.Lr)(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:v,verticalAlign:y})});if(t.add(x),h){var b=tn.Z.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,(0,V.A)(x).eventData=b}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",A=b;_&&(i[s][M]||(i[s][M]={p:b,n:b}),A=i[s][M][C]);var I=void 0,D=void 0,L=void 0,P=void 0;if("radius"===c.dim){var O=c.dataToCoord(T)-b,E=o.dataToCoord(M);Math.abs(O)=P})}}}))};var sc={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},lc={splitNumber:5},uc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="polar",e}(xe.Z);function hc(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.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]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),p.retrieve(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var cc=["axisLine","axisTickLabel","axisName"],dc=["splitArea","splitLine"],pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new c.Z;var s=hc(e),l=new tn.Z(e,s);p.each(cc,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),p.each(dc,(function(t){e.get([t,"show"])&&fc[t](this,this.group,this._axisGroup,e)}),this),ct.groupTransition(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){on(this)},e.type="singleAxis",e}(en.Z),fc={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),h=[],c=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return bc(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return bc(e)===this?this.pointToData(n):null},t}();const Sc={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new wc(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",S.C6).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:xc};var Tc=["x","y"],Mc=["width","height"],Cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=Dc(a,1-Ic(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=Mh.fk(i),c=Ac[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=hc(n);Mh.gf(e,t,d,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=hc(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=Mh.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=Ic(r),s=Dc(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Dc(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Th.Z),Ac={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:Mh.BL([e,n[0]],[e,n[1]],Ic(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:Mh.uE([e-i/2,n[0]],[i,r],Ic(t))}}};function Ic(t){return t.isHorizontal()?0:1}function Dc(t,e){var n=t.getRect();return[n[Tc[e]],n[Tc[e]]+n[Mc[e]]]}const Lc=Cc;var Pc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="single",e}(xe.Z);function Oc(t,e){var n,i=t.cellSize;1===(n=p.isArray(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=p.map([0,1],(function(t){return(0,Gt.QM)(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));(0,Gt.dt)(t,e,{type:"box",ignoreSize:r})}const Ec=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(e,n,i){var r=(0,Gt.tE)(e);t.prototype.init.apply(this,arguments),Oc(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Oc(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(be.Z);var Nc=n(3917),kc=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new dt.Z({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){d(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new qt.Z({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return(0,p.isString)(t)&&t?(0,G.wx)(t,e):(0,p.isFunction)(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new w.ZP({z2:30,style:(0,Z.Lr)(r,{text:g})});m.attr(this._yearTextPositionControl(m,c[a],n,a,o)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!(0,p.isString)(o)||(o&&(e=(0,Nc.G8)(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,f=0;f=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/zc)-Math.floor(n[0].time/zc)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function Fc(t,e){var n;return p.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var Vc=["transition","enterFrom","leaveTo"],Gc=Vc.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Hc(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?Vc:Gc,r=0;r=0;l--){var f,g;u=n[l];if(g=null!=(f=S.U5(u.id,null))?r.get(f):null){var m=g.parent,v=(d=jc(m),m===i?{width:o,height:a}:{width:d.width,height:d.height}),y={},_=Gt.p$(g,u,v,null,{hv:u.hv,boundingMode:u.bounding},y);if(!jc(g).isNew&&_){for(var x=u.transition,w={},T=0;T=0)?w[M]=C:g[M]=C}(0,b.D)(g,w,t,0)}else g.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Kc(n,jc(n).option,e,t._lastGraphicModel)})),this._elMap=p.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(xe.Z);function Yc(t){var e=new(p.hasOwn(Wc,t)?Wc[t]:ct.getShapeClass(t))({});return jc(e).type=t,e}function qc(t,e,n,i){var r=Yc(n);return e.add(r),i.set(t,r),jc(r).id=t,jc(r).isNew=!0,r}function Kc(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Kc(t,e,n,i)})),Eu(t,e,i),n.removeKey(jc(t).id))}function Jc(t,e,n,i){t.isGroup||p.each([["cursor",ki.ZP.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];p.hasOwn(e,i)?t[i]=p.retrieve2(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),p.each(p.keys(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=p.isFunction(i)?i:null}})),p.hasOwn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Qc=["rect","polygon","keep","clear"];function $c(t,e){var n=(0,S.kF)(t?t.brush:[]);if(n.length){var i=[];p.each(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;p.isArray(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),o=u,a={},p.each(o,(function(t){a[t]=1})),o.length=0,p.each(a,(function(t,e){o.push(e)})),e&&!u.length&&u.push.apply(u,Qc)}}var td=n(6211),ed=p.each;function nd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function id(t,e,n){var i={};return ed(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);ed(t[e],(function(t,i){if(Vo.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new Vo(r),"opacity"===i&&((r=p.clone(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Vo(r))}}))})),i}function rd(t,e,n){var i;p.each(n,(function(t){e.hasOwnProperty(t)&&nd(e[t])&&(i=!0)})),i&&p.each(n,(function(n){e.hasOwnProperty(n)&&nd(e[n])?t[n]=p.clone(e[n]):delete t[n]}))}var od=n(765);var ad={lineX:sd(0),lineY:sd(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&od.X(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(od.X(i,r,o)||od.X(i,r+a,o)||od.X(i,r,o+s)||od.X(i,r+a,o+s)||fe.Z.create(t).contain(l[0],l[1])||(0,ct.linePolygonIntersect)(r,o,r+a,o,i)||(0,ct.linePolygonIntersect)(r,o,r,o+s,i)||(0,ct.linePolygonIntersect)(r+a,o,r+a,o+s,i)||(0,ct.linePolygonIntersect)(r,o+s,r+a,o+s,i))||void 0}}};function sd(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return ld(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&yd(e)}};function yd(t){return new fe.Z(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}const _d=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ts.Z(e.getZr())).on("brush",p.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){pd(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:p.clone(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:p.clone(n),$from:e})},e.type="brush",e}(xe.Z);function xd(t,e){return p.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cn.Z(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const bd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=p.map(t,(function(t){return xd(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=xd(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(be.Z);var wd=n(1806),Sd=["rect","polygon","lineX","lineY","keep","clear"],Td=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,s.ZT)(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,p.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return p.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:Sd.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wd.f1);const Md=Td;const Cd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],(0,p.each)(n,(function(e,n){var i,o=(0,S.U5)((0,S.C4)(e),"");(0,p.isObject)(e)?(i=(0,p.clone)(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new le.Z([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(be.Z);var Ad=n(1219),Id=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline.slider",e.defaultOption=(0,ut.ZL)(Cd.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Cd);(0,p.mixin)(Id,Ad.X.prototype);const Dd=Id;const Ld=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="timeline",e}(xe.Z);const Pd=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return(0,s.ZT)(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(Fe.Z);var Od=n(5043),Ed=n(1618),Nd=Math.PI,kd=(0,S.Yf)(),Rd=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return(0,Sn.TX)("nameValue",{noName:!0,value:e})},(0,p.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Gt.ME(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Nd/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),g=f.get("show",!0),m=g?f.get("itemSize"):0,v=g?f.get("itemGap"):0,y=m+v,_=t.get(["label","rotate"])||0;_=_*Nd/180;var x=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),w=g&&f.get("showPrevBtn",!0),S=g&&f.get("showNextBtn",!0),T=0,M=d;"left"===x||"bottom"===x?(b&&(i=[0,0],T+=y),w&&(r=[T,0],T+=y),S&&(o=[M-m,0],M-=y)):(b&&(i=[M-m,0],M-=y),w&&(r=[0,0],T+=y),S&&(o=[M-m,0],M-=y));var C=[T,M];return t.get("inverse")&&C.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:c[s],labelRotation:_,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:C,controlSize:m,controlGap:v}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=ke.create(),a=r.x,s=r.y+r.height;ke.translate(o,o,[-a,-s]),ke.rotate(o,o,-Nd/2),ke.translate(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=v(r),u=v(n.getBoundingRect()),h=v(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=l[0][0];var f,g=t.labelPosOpt;null==g||(0,p.isString)(g)?(y(c,u,l,1,f="+"===g?0:1),y(d,h,l,1,1-f)):(y(c,u,l,1,f=g>=0?0:1),d[1]=c[1]+g);function m(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function v(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function y(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=t.rotation,m(n),m(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Od.Z({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Ed.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new We.Z}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new Pd("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new c.Z;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new $e.Z({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:(0,p.extend)({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new $e.Z({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:(0,p.defaults)({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],(0,p.each)(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:(0,p.bind)(r._changeTimeline,r,t.value)},d=zd(s,l,e,c);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=h.getItemStyle(),(0,B.vF)(d);var f=(0,V.A)(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],(0,p.each)(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),d=new w.ZP({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:(0,p.bind)(r._changeTimeline,r,a),silent:!1,style:(0,Z.Lr)(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=(0,Z.Lr)(u),d.ensureState("progress").style=(0,Z.Lr)(h),e.add(d),(0,B.vF)(d),kd(d).dataIndex=a,r._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=(0,yt.GM)((0,p.retrieve2)(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=ct.createIcon(t.get(["controlStyle",e]),i||{},new fe.Z(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),(0,B.vF)(c)}}h(t.nextBtnPosition,"next",(0,p.bind)(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",(0,p.bind)(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",(0,p.bind)(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=(0,p.bind)(s._handlePointerDrag,s),t.ondragend=(0,p.bind)(s._handlePointerDragend,s),Bd(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){Bd(t,s._progressLine,o,n,i)}};this._currentPointer=zd(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=this._axis,r=Vt.dt(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var $d={min:(0,p.curry)(Qd,"min"),max:(0,p.curry)(Qd,"max"),average:(0,p.curry)(Qd,"average"),median:(0,p.curry)(Qd,"median")};function tp(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!(0,p.isArray)(e.coord)&&i){var r=i.dimensions,o=ep(e,n,i,t);if((e=(0,p.clone)(e)).type&&$d[e.type]&&o.baseAxis&&o.valueAxis){var a=(0,p.indexOf)(r,o.baseAxis.dim),s=(0,p.indexOf)(r,o.valueAxis.dim),l=$d[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$d[u[h]]&&(u[h]=rp(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function ep(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function np(t,e){return!(t&&t.containData&&e.coord&&!Jd(e))||t.containData(e.coord)}function ip(t,e){return t?function(t,n,i,r){var o=r<2?t.coord&&t.coord[r]:t.value;return(0,Kd.yQ)(o,e[r])}:function(t,n,i,r){return(0,Kd.yQ)(t.value,e[r])}}function rp(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var op=(0,S.Yf)();const ap=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.init=function(){this.markerGroupMap=(0,p.createHashMap)()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){op(t).keep=!1})),e.eachSeries((function(t){var r=Yd.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!op(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){op(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;(0,p.each)(t,(function(t){var i=Yd.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?(0,B.SX)(t):(0,B.VP)(t))}))}))},e.type="marker",e}(xe.Z);function sp(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=Vt.GM(a.get("x"),n.getWidth()),l=Vt.GM(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}const lp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markPoint");e&&(sp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new f.Z),u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=(0,p.map)(n.get("data"),(0,p.curry)(tp,e));t&&(o=(0,p.filter)(o,(0,p.curry)(np,t)));var a=ip(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),sp(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if((0,p.isFunction)(i)||(0,p.isFunction)(r)||(0,p.isFunction)(o)||(0,p.isFunction)(s)){var h=e.getRawValue(t),c=e.getDataParams(t);(0,p.isFunction)(i)&&(i=i(h,c)),(0,p.isFunction)(r)&&(r=r(h,c)),(0,p.isFunction)(o)&&(o=o(h,c)),(0,p.isFunction)(s)&&(s=s(h,c))}var d=n.getModel("itemStyle").getItemStyle(),f=(0,td.UL)(a,"color");d.fill||(d.fill=f),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ap);const up=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Yd);var hp=n(7145),cp=(0,S.Yf)(),dp=function(t,e,n,i){var r,o=t.getData();if((0,p.isArray)(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=(0,p.retrieve)(i.yAxis,i.xAxis);else{var u=ep(i,o,e,t);s=u.valueAxis,l=rp(o,(0,m.IR)(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,d=(0,p.clone)(i),f={coord:[]};d.type=null,d.coord=[],d.coord[c]=-1/0,f.coord[c]=1/0;var g=n.get("precision");g>=0&&(0,p.isNumber)(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=f.coord[h]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var v=[tp(t,r[0]),tp(t,r[1]),(0,p.extend)({},r[2])];return v[2].type=v[2].type||null,(0,p.merge)(v[2],v[0]),(0,p.merge)(v[2],v[1]),v};function pp(t){return!isNaN(t)&&!isFinite(t)}function fp(t,e,n,i){var r=1-t,o=i.dimensions[t];return pp(e[r])&&pp(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function gp(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(fp(1,n,i,t)||fp(0,n,i,t)))return!0}return np(t,e[0])&&np(t,e[1])}function mp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get("x"),r.getWidth()),u=Vt.GM(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if(z(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;pp(t.get(h[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):pp(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}const vp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=cp(e).from,o=cp(e).to;r.each((function(e){mp(r,e,!0,t,n),mp(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new hp.Z);this.group.add(l.group);var u=function(t,e,n){var i;i=t?(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new le.Z(i,n),o=new le.Z(i,n),a=new le.Z([],n),s=(0,p.map)(n.get("data"),(0,p.curry)(dp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(gp,t)));var l=ip(!!t,i);return r.initData((0,p.map)(s,(function(t){return t[0]})),null,l),o.initData((0,p.map)(s,(function(t){return t[1]})),null,l),a.initData((0,p.map)(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,d=u.line;cp(e).from=h,cp(e).to=c,e.setData(d);var f=e.get("symbol"),g=e.get("symbolSize"),m=e.get("symbolRotate"),v=e.get("symbolOffset");function y(e,n,r){var o=e.getItemModel(n);mp(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=(0,td.UL)(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,p.retrieve2)(o.get("symbolOffset",!0),v[r?0:1]),symbolRotate:(0,p.retrieve2)(o.get("symbolRotate",!0),m[r?0:1]),symbolSize:(0,p.retrieve2)(o.get("symbolSize"),g[r?0:1]),symbol:(0,p.retrieve2)(o.get("symbol",!0),f[r?0:1]),style:s})}(0,p.isArray)(f)||(f=[f,f]),(0,p.isArray)(g)||(g=[g,g]),(0,p.isArray)(m)||(m=[m,m]),(0,p.isArray)(v)||(v=[v,v]),u.from.each((function(t){y(h,t,!0),y(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){(0,V.A)(t).dataModel=e,t.traverse((function(t){(0,V.A)(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ap);const yp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Yd);var _p=(0,S.Yf)(),xp=function(t,e,n,i){var r=tp(t,i[0]),o=tp(t,i[1]),a=r.coord,s=o.coord;a[0]=(0,p.retrieve)(a[0],-1/0),a[1]=(0,p.retrieve)(a[1],-1/0),s[0]=(0,p.retrieve)(s[0],1/0),s[1]=(0,p.retrieve)(s[1],1/0);var l=(0,p.mergeAll)([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function bp(t){return!isNaN(t)&&!isFinite(t)}function wp(t,e,n,i){var r=1-t;return bp(e[r])&&bp(n[r])}function Sp(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return z(t,"cartesian2d")?!(!n||!i||!wp(1,n,i)&&!wp(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!Jd(e)&&!Jd(n))||t.containZone(e.coord,n.coord)}(t,r,o):np(t,r)||np(t,o)}function Tp(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Vt.GM(s.get(n[0]),r.getWidth()),u=Vt.GM(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[p=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(z(a,"cartesian2d")){var c=a.getAxis("x"),d=a.getAxis("y"),p=t.get(n[0],e),f=t.get(n[1],e);bp(p)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):bp(f)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Mp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Cp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=Yd.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=(0,p.map)(Mp,(function(r){return Tp(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new c.Z});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=(0,p.map)(t&&t.dimensions,(function(t){var n=e.getData(),i=n.getDimensionInfo(n.mapDimension(t))||{};return(0,p.extend)((0,p.extend)({},i),{name:t,ordinalMeta:null})}));r=(0,p.map)(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new le.Z(r,n)}else r=[{name:"value",type:"float"}],i=new le.Z(r,n);var s=(0,p.map)(n.get("data"),(0,p.curry)(xp,e,t,n));t&&(s=(0,p.filter)(s,(0,p.curry)(Sp,t)));var l=t?function(t,e,n,i){var o=t.coord[Math.floor(i/2)][i%2];return(0,Kd.yQ)(o,r[i])}:function(t,e,n,i){return(0,Kd.yQ)(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=(0,p.map)(Mp,(function(n){return Tp(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Vt.dt(c),Vt.dt(d);var f=!!(l[0]>c[1]||l[1]d[1]||h[1]i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),ft.T9(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Np(i,t)}))}))}var Bp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return(0,s.ZT)(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Ep(i,e,{pan:(0,p.bind)(Zp.pan,this),zoom:(0,p.bind)(Zp.zoom,this),scrollMove:(0,p.bind)(Zp.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Op(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return(0,Ba.Z)(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Fp((function(t,e,n,i,r,o){var a=Vp[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:Fp((function(t,e,n,i,r,o){return Vp[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function Fp(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,n,i,r);return(0,Ba.Z)(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var Vp={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};const Gp=Bp;var Hp=n(7543);function Up(t){(0,Hp.Z)(t),t.registerComponentModel(Dp),t.registerComponentView(Gp),zp(t)}const Wp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=(0,ut.ZL)(Ip.Z.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Ip.Z);var jp=n(1158),Xp=dt.Z,Yp="horizontal",qp="vertical",Kp=["line","bar","candlestick","scatter"],Jp={easing:"cubicOut",duration:100,delay:0},Qp=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=(0,p.bind)(this._onBrush,this),this._onBrushEnd=(0,p.bind)(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),ft.T9(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ft.ZH(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new c.Z;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===Yp?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Gt.tE(t.option);(0,p.each)(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Gt.ME(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===qp&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==Yp||r?n===Yp&&r?{scaleY:a?1:-1,scaleX:-1}:n!==qp||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Xp({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Xp({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:(0,p.bind)(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=this._shadowPolygonPts,s=this._shadowPolylinePts;if(r!==this._shadowData||o!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var l=r.getDataExtent(o),u=.3*(l[1]-l[0]);l=[l[0]-u,l[1]+u];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/e[0]);r.each([o],(function(t,e){if(y>0&&e%y)v+=m;else{var n=null==t||isNaN(t)||""===t,i=n?0:(0,Vt.NU)(t,l,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,h=n}})),a=this._shadowPolygonPts=f,s=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=o,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var b=w(1===x);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new c.Z,i=new _n.Z({shape:{points:a},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new qt.Z({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){var a=t.getAxisProxy(r,o).getTargetSeriesModels();(0,p.each)(a,(function(t){if(!(n||!0!==e&&(0,p.indexOf)(Kp,t.get("type"))<0)){var a,s=i.getComponent((0,Pp.jQ)(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Xp({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Xp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),(0,p.each)([0,1],(function(e){var o=a.get("handleIcon");!h.Pw[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=(0,h.th)(o,-1,0,2,2,null,!0);s.attr({cursor:$p(this._orient),draggable:!0,drift:(0,p.bind)(this._onDragMove,this,e),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=(0,Vt.GM)(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,B.vF)(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var d=a.getModel("textStyle");t.add(i[e]=new w.ZP({silent:!0,invisible:!0,style:(0,Z.Lr)(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var f=(0,Vt.GM)(a.get("moveHandleSize"),o[1]),g=e.moveHandle=new dt.Z({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:f}}),m=.8*f,v=e.moveHandleIcon=(0,h.th)(a.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);v.silent=!0,v.y=o[1]+f/2-.5,g.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(f,10));(d=e.moveZone=new dt.Z({invisible:!0,shape:{y:o[1]-y,height:f+y}})).on("mouseover",(function(){s.enterEmphasis(g)})).on("mouseout",(function(){s.leaveEmphasis(g)})),r.add(g),r.add(v),r.add(d)}d.attr({draggable:!0,cursor:$p(this._orient),drift:(0,p.bind)(this._onDragMove,this,"all"),ondragstart:(0,p.bind)(this._showDataInfo,this,!0),ondragend:(0,p.bind)(this._onDragEnd,this),onmouseover:(0,p.bind)(this._showDataInfo,this,!0),onmouseout:(0,p.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[(0,Vt.NU)(t[0],[0,100],e,!0),(0,Vt.NU)(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];(0,Ba.Z)(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?(0,Vt.NU)(o.minSpan,a,r,!0):null,null!=o.maxSpan?(0,Vt.NU)(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=(0,Vt.dt)([(0,Vt.NU)(i[0],r,a,!0),(0,Vt.NU)(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=(0,Vt.dt)(n.slice()),r=this._size;(0,p.each)([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new Kt.Z(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=(0,Vt.dt)([(0,Vt.NU)(n.x,i,r,!0),(0,Vt.NU)(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(jp.sT(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new Xp({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Jp:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=(0,Pp.rg)(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(Lp.Z);function $p(t){return"vertical"===t?"ns-resize":"ew-resize"}const tf=Qp;function ef(t){t.registerComponentModel(Wp),t.registerComponentView(tf),(0,Hp.Z)(t)}var nf={get:function(t,e,n){var i=p.clone((rf[t]||{})[e]);return n&&p.isArray(i)?i[i.length-1]:i}},rf={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const of=nf;var af=Vo.mapVisual,sf=Vo.eachVisual,lf=p.isArray,uf=p.each,hf=Vt.dt,cf=Vt.NU,df=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,s.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&rd(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=p.bind(t,this),this.controllerVisuals=id(this.option.controller,e,t),this.targetVisuals=id(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=S.kF(t),e},e.prototype.eachTargetSeries=function(t,e){p.each(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],p.isArray(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return p.isString(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):p.isFunction(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=hf([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});p.merge(i,n),p.merge(r,n);var o=this.isCategory();function a(n){lf(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},uf(i,(function(t,e){if(Vo.isValidType(e)){var n=of.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";uf(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&p.clone(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&p.clone(n)||(o?s[0]:[s[0],s[0]])),l.symbol=af(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;sf(u,(function(t){t>h&&(h=t)})),l.symbolSize=af(u,(function(t){return cf(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(be.Z);const pf=df;var ff=[20,140],gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=ff[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=ff[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):p.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),p.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Vt.dt((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=mf(this,"outOfRange",this.getExtent()),n=mf(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new c.Z("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();Tf([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=Sf(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var d=ct.applyTransform(n.handleLabelPoints[l],ct.getTransform(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),d=Sf(t,o,s,!0),p=a[0]-c/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=ct.applyTransform(l.indicatorLabelPoint,ct.getTransform(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:p,y:d,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),m.animateTo(x,b)}else u.attr(_),m.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||Df(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=S.XI(h,c);this._dispatchHighDown("downplay",wf(d[0],n)),this._dispatchHighDown("highlight",wf(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=(0,V.A)(e).dataIndex){var i=(0,V.A)(e),r=this.ecModel.getSeriesByIndex(i.seriesIndex);if(n.isTargetSeries(r)){var o=r.getData(i.dataType),a=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function kf(t,e,n,i){for(var r=e.targetVisuals[i],o=Vo.prepareVisualTypes(r),a={color:(0,td.UL)(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(Of,Ef),(0,p.each)(Nf,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(zf))}function Vf(t){t.registerComponentModel(vf),t.registerComponentView(Pf),Ff(t)}var Gf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return(0,s.ZT)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Hf[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=p.clone(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p.map(this._pieceList,(function(t){return t=p.clone(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=Vo.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}p.each(e.pieces,(function(t){p.each(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),p.each(n,(function(t,n){var i=!1;p.each(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&p.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=of.get(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;p.each(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=p.clone(t)},e.prototype.getValueState=function(t){var e=Vo.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){Vo.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return p.each(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=(0,ut.ZL)(pf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(pf),Hf={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function Uf(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}const Wf=Gf;const jf=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,s.ZT)(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=p.retrieve(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),p.each(l.viewPieceList,(function(i){var l=i.piece,u=new c.Z;u.onclick=p.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),h){var f=this.visualMapModel.getValueState(d);u.add(new w.ZP({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===f?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Gt.BZ(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:wf(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return bf(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new c.Z,a=this.visualMapModel.textStyleModel;o.add(new w.ZP({style:(0,Z.Lr)(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=p.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add((0,h.th)(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=p.clone(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,p.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(_f);function Xf(t){t.registerComponentModel(Wf),t.registerComponentView(jf),Ff(t)}var Yf={label:{enabled:!0},decal:{show:!1}},qf=(0,S.Yf)(),Kf={};function Jf(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=p.clone(Yf);p.merge(i.label,t.getLocaleModel().get("aria"),!1),p.merge(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=p.createHashMap();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),qf(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(p.isFunction(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=(0,eo.i)(e.ecModel,e.name,Kf,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=qf(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=(0,eo.i)(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?p.extend(p.extend({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=p.defaults(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(d){var f=o.get(["general","withTitle"]);s=r(f,{title:d})}else s=o.get(["general","withoutTitle"]);var g=[],m=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(m,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=o.get(["data","separator","middle"]),d=o.get(["data","separator","end"]),p=[],f=0;f":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},tg=function(){function t(t){if(null==(this._condVal=(0,p.isString)(t)?new RegExp(t):(0,p.isRegExp)(t)?t:null)){0,(0,Vs._y)("")}}return t.prototype.evaluate=function(t){var e=typeof t;return(0,p.isString)(e)?this._condVal.test(t):!!(0,p.isNumber)(e)&&this._condVal.test(t+"")},t}(),eg=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),ng=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){yg(t,i)&&yg(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nT:A2&&l.push(e),l}function xg(t,e,n,i,r,o,a,s,l,u){if(yg(t,n)&&yg(e,i)&&yg(r,a)&&yg(o,s))l.push(a,s);else{var h=2/u,c=h*h,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,m=i-e,v=r-a,y=o-s,_=g*g+m*m,x=v*v+y*y;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],T=[];(0,C.Vz)(t,n,r,a,.5,S),(0,C.Vz)(e,i,o,s,.5,T),xg(S[0],T[0],S[1],T[1],S[2],T[2],S[3],T[3],l,u),xg(S[4],T[4],S[5],T[5],S[6],T[6],S[7],T[7],l,u)}}}}function bg(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=bg([l,u],h?0:1,e),d=(h?s:u)/c.length,p=0;p1?null:new Kt.Z(p*l+t,p*u+e)}function Mg(t,e,n){var i=new Kt.Z;Kt.Z.sub(i,n,e),i.normalize();var r=new Kt.Z;return Kt.Z.sub(r,t,e),r.dot(i)}function Cg(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function Ag(t){var e=t.points,n=[],i=[];(0,Lr.zk)(e,n,i);var r=new fe.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new Kt.Z,h=new Kt.Z;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=bg([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,d=0;d0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),T=Math.cos(w),M=0;for(_=0;_0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function Hg(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=(0,p.map)(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return(0,p.map)(o,(function(o,a){return{cp:o,z:Gg(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function Ug(t){return Dg(t.path,t.count)}function Wg(t){return(0,p.isArray)(t[0])}function jg(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var Xg={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);Wg(t)&&(s=t,l=e),Wg(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,d=s?jg(l,s):jg(c?e:t,[c?t:e]),f=0,g=0;g1e4))for(var i=n.getIndices(),r=function(t){for(var e=t.dimensions,n=0;n0&&i.group.traverse((function(t){t instanceof T.ZP&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function nm(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function im(t){return(0,p.isArray)(t)?t.sort().join(","):t}function rm(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function om(t,e){for(var n=0;n=0&&r.push({data:e.oldData[n],divide:rm(e.oldData[n]),dim:t.dimension})})),(0,p.each)((0,S.kF)(t.to),(function(t){var e=om(n.updatedSeries,t);if(e>=0){var i=n.updatedSeries[e].getData();o.push({data:i,divide:rm(i),dim:t.dimension})}})),r.length>0&&o.length>0&&em(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=(0,p.createHashMap)(),i=(0,p.createHashMap)(),r=(0,p.createHashMap)();return(0,p.each)(t.oldSeries,(function(e,n){var o=t.oldData[n],a=nm(e),s=im(a);i.set(s,o),(0,p.isArray)(a)&&(0,p.each)(a,(function(t){r.set(t,{data:o,key:s})}))})),(0,p.each)(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.getData(),o=nm(t),a=im(o),s=i.get(a);if(s)n.set(a,{oldSeries:[{divide:rm(s),data:s}],newSeries:[{divide:rm(e),data:e}]});else if((0,p.isArray)(o)){var l=[];(0,p.each)(o,(function(t){var e=i.get(t);e&&l.push({divide:rm(e),data:e})})),l.length&&n.set(a,{oldSeries:l,newSeries:[{data:e,divide:rm(e)}]})}else{var u=r.get(o);if(u){var h=n.get(u.key);h||(h={oldSeries:[{data:u.data,divide:rm(u.data)}],newSeries:[]},n.set(u.key,h)),h.newSeries.push({data:e,divide:rm(e)})}}}})),n}(i,n);(0,p.each)(o.keys(),(function(t){var n=o.get(t);em(n.oldSeries,n.newSeries,e)}))}(0,p.each)(n.updatedSeries,(function(t){t[u.V]&&(t[u.V]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldData=[],h=0;h{"use strict";function i(t,e){return t.pointToProjected?t.pointToProjected(e):t.pointToData(e)}function r(t,e,n,r){var o=t.getZoom(),a=t.getCenter(),s=e.zoom,l=t.projectedToPoint?t.projectedToPoint(a):t.dataToPoint(a);if(null!=e.dx&&null!=e.dy&&(l[0]-=e.dx,l[1]-=e.dy,t.setCenter(i(t,l),r)),null!=s){if(n){var u=n.min||0,h=n.max||1/0;s=Math.max(Math.min(o*s,h),u)/o}t.scaleX*=s,t.scaleY*=s;var c=(e.originX-t.x)*(s-1),d=(e.originY-t.y)*(s-1);t.x-=c,t.y-=d,t.updateTransform(),t.setCenter(i(t,l),r),t.setZoom(s*o)}return{center:t.getCenter(),zoom:t.getZoom()}}n.d(e,{A:()=>r})},9266:(t,e,n)=>{"use strict";n.d(e,{D:()=>s,KZ:()=>l,XD:()=>d,Zi:()=>p,_W:()=>f,bX:()=>h,eq:()=>u,ke:()=>o});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e,n,r,o){var a;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();a=s&&s.animation}var l="update"===t;if(e&&e.isAnimationEnabled()){var u=void 0,h=void 0,c=void 0;return r?(u=(0,i.retrieve2)(r.duration,200),h=(0,i.retrieve2)(r.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(null!=a.duration&&(u=a.duration),null!=a.easing&&(h=a.easing),null!=a.delay&&(c=a.delay)),(0,i.isFunction)(c)&&(c=c(n,o)),(0,i.isFunction)(u)&&(u=u(n)),{duration:u||0,delay:c,easing:h}}return null}function a(t,e,n,r,a,s,l){var u,h=!1;(0,i.isFunction)(a)?(l=s,s=a,a=null):(0,i.isObject)(a)&&(s=a.cb,l=a.during,h=a.isFrom,u=a.removeOpt,a=a.dataIndex);var c="leave"===t;c||e.stopAnimation("leave");var d=o(t,r,a,c?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(e,a):null);if(d&&d.duration>0){var p={duration:d.duration,delay:d.delay||0,easing:d.easing,done:s,force:!!s||!!l,setToFinal:!c,scope:t,during:l};h?e.animateFrom(n,p):e.animateTo(n,p)}else e.stopAnimation(),!h&&e.attr(n),l&&l(1),s&&s()}function s(t,e,n,i,r,o){a("update",t,e,n,i,r,o)}function l(t,e,n,i,r,o){a("enter",t,e,n,i,r,o)}function u(t){if(!t.__zr)return!0;for(var e=0;e{"use strict";n.d(e,{N:()=>v});var i=n(655),r=n(8162),o=n(1525),a=n(8154),s=n(6357),l=n(6351);function u(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var h=function(t){function e(e,n){var i=t.call(this)||this,r=new l.Z(e,n),o=new a.Z;return i.add(r),i.add(o),i.updateData(e,n),i}return(0,i.ZT)(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),a=0;a{"use strict";n.d(e,{N:()=>dt});var i=n(3051);function r(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var n=t.getCategoriesData(),r=t.getGraph().data,o=n.mapArray(n.getName);r.filterSelf((function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){(0,i.isNumber)(n)&&(n=o[n]);for(var a=0;ar&&(r=e);var a=r%2?r+2:r+3;o=[];for(var s=0;s=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function Y(t,e){var n=[],i=F.Lx,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var u=t.getLayout(),h=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");u.__original||(u.__original=[l.clone(u[0]),l.clone(u[1])],u[2]&&u.__original.push(l.clone(u[2])));var d=u.__original;if(null!=u[2]){if(l.copy(r[0],d[0]),l.copy(r[1],d[2]),l.copy(r[2],d[1]),h&&"none"!==h){var p=x(t.node1),f=X(r,d[0],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){p=x(t.node2),f=X(r,d[1],p*e);i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]}l.copy(u[0],r[0]),l.copy(u[1],r[2]),l.copy(u[2],r[1])}else{if(l.copy(o[0],d[0]),l.copy(o[1],d[1]),l.sub(a,o[1],o[0]),l.normalize(a,a),h&&"none"!==h){p=x(t.node1);l.scaleAndAdd(o[0],o[0],a,p*e)}if(c&&"none"!==c){p=x(t.node2);l.scaleAndAdd(o[1],o[1],a,-p*e)}l.copy(u[0],o[0]),l.copy(u[1],o[1])}}))}var q=n(5797),K=n(106);function J(t){return"view"===t.type}var Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,E.ZT)(e,t),e.prototype.init=function(t,e){var n=new N.Z,i=new k.Z,r=this.group;this._controller=new R.Z(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,s=this._lineDraw,l=this.group;if(J(o)){var u={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?l.attr(u):Z.D(l,u,t)}Y(t.getGraph(),_(t));var h=t.getData();a.updateData(h);var c=t.getEdgeData();s.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p),h.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();if(n){n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){d&&(d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,p),d.setFixed(e),h.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){d&&d.setUnfixed(e)})),n.setDraggable(o&&!!d,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&((0,K.A)(n).focus=t.getAdjacentDataIndices())}})),h.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&((0,K.A)(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),m=h.getLayout("cy");h.eachItemGraphicEl((function(t,e){var n=h.getItemModel(e).get(["label","rotate"])||0,r=t.getSymbolPath();if(f){var o=h.getItemLayout(e),a=Math.atan2(o[1]-m,o[0]-g);a<0&&(a=2*Math.PI+a);var s=o[0] "),value:r.value,noValue:null==r.value})}return(0,st.w)({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=i.map(this.option.categories||[],(function(t){return null!=t.value?t:i.extend({value:0},t)})),e=new tt.Z(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(ot.Z);const ut=lt;var ht=n(553),ct={type:"graphRoam",event:"graphRoam",update:"none"};function dt(t){t.registerChartView($),t.registerSeriesModel(ut),t.registerProcessor(r),t.registerVisual(o),t.registerVisual(s),t.registerLayout(y),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,M),t.registerLayout(I),t.registerCoordinateSystem("graphView",{dimensions:D.Z.dimensions,create:O}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},i.noop),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},i.noop),t.registerAction(ct,(function(t,e,n){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,r=(0,ht.A)(i,t,void 0,n);e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom)}))}))}},9971:(t,e,n)=>{"use strict";n.d(e,{Z:()=>M});var i=n(655),r=n(3051),o=n(5280),a=n(1525),s=n(2095),l=n(4174),u=n(327),h=s.Z.prototype,c=l.Z.prototype,d=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}(0,i.ZT)(e,t)}(d);function p(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}const f=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-line",n}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new d},e.prototype.buildPath=function(t,e){p(e)?h.buildPath.call(this,t,e):c.buildPath.call(this,t,e)},e.prototype.pointAt=function(t){return p(this.shape)?h.pointAt.call(this,t):c.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var e=this.shape,n=p(e)?[e.x2-e.x1,e.y2-e.y1]:c.tangentAt.call(this,t);return o.normalize(n,n)},e}(u.ZP);var g=n(9266),m=n(8154),v=n(6357),y=n(6006),_=n(5669),x=["fromSymbol","toSymbol"];function b(t){return"_"+t+"Type"}function w(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var r=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),s=e.getItemVisual(n,t+"Offset"),l=e.getItemVisual(n,t+"KeepAspect"),u=a.zp(r),h=a.Cq(s||0,u),c=a.th(i,-u[0]/2+h[0],-u[1]/2+h[1],u[0],u[1],null,l);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=t,c}}function S(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}var T=function(t){function e(e,n,i){var r=t.call(this)||this;return r._createLine(e,n,i),r}return(0,i.ZT)(e,t),e.prototype._createLine=function(t,e,n){var i=t.hostModel,o=function(t){var e=new f({name:"line",subPixelOptimize:!0});return S(e.shape,t),e}(t.getItemLayout(e));o.shape.percent=0,g.KZ(o,{shape:{percent:1}},i,e),this.add(o),(0,r.each)(x,(function(n){var i=w(n,t,e);this.add(i),this[b(n)]=t.getItemVisual(e,n)}),this),this._updateCommonStl(t,e,n)},e.prototype.updateData=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),s={shape:{}};S(s.shape,a),g.D(o,s,i,e),(0,r.each)(x,(function(n){var i=t.getItemVisual(e,n),r=b(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=w(n,t,e);this.add(o)}this[r]=i}),this),this._updateCommonStl(t,e,n)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,e,n){var i=t.hostModel,o=this.childOfName("line"),a=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,l=n&&n.selectLineStyle,u=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||t.hasItemOption){var p=t.getItemModel(e),f=p.getModel("emphasis");a=f.getModel("lineStyle").getLineStyle(),s=p.getModel(["blur","lineStyle"]).getLineStyle(),l=p.getModel(["select","lineStyle"]).getLineStyle(),h=f.get("disabled"),c=f.get("focus"),d=f.get("blurScope"),u=(0,y.k3)(p)}var g=t.getItemVisual(e,"style"),m=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=a,o.ensureState("blur").style=s,o.ensureState("select").style=l,(0,r.each)(x,(function(t){var e=this.childOfName(t);if(e){e.setColor(m),e.style.opacity=g.opacity;for(var n=0;n0&&(_[0]=-_[0],_[1]=-_[1]);var b=y[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(y[1],y[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*g+u[0],i.y=-c[1]*m+u[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=g*b+u[0],i.y=u[1]+S,d=y[0]<0?"right":"left",i.originX=-g*b,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,d="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-g*b+h[0],i.y=h[1]+S,d=y[0]>=0?"right":"left",i.originX=g*b,i.originY=-S}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}}}function T(t,e){var n=t.__specifiedRotation;if(null==n){var i=s.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(m.Z);const M=T},7145:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(8154),r=n(1177),o=n(9971),a=n(6006);function s(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:(0,a.k3)(e)}}function l(t){return isNaN(t[0])||isNaN(t[1])}function u(t){return t&&!l(t[0])&&!l(t[1])}const h=function(){function t(t){this.group=new i.Z,this._LineCtor=t||o.Z}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=s(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=s(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i{"use strict";n.d(e,{Z:()=>f});var i=n(655),r=n(1525),o=n(9266),a=n(8154),s=n(106),l=n(6357),u=n(3140),h=n(3051),c=n(6006),d=n(4535);function p(t,e){this.parent.drift(t,e)}const f=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return(0,i.ZT)(e,t),e.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();var a=(0,r.th)(t,-1,-1,2,2,null,o);a.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),a.drift=p,this._symbolType=t,this.add(a)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){(0,l.fD)(this.childAt(0))},e.prototype.downplay=function(){(0,l.Mh)(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var a=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=a!==this._symbolType,h=r&&r.disableAnimation;if(u){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(a,t,n,l,c)}else{(p=this.childAt(0)).silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?p.attr(d):o.D(p,d,s,n),(0,o.Zi)(p)}if(this._updateCommon(t,n,l,i,r),u){var p=this.childAt(0);if(!h){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,o.KZ(p,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,o){var a,s,p,f,g,m,v,y,_,x=this.childAt(0),b=t.hostModel;if(i&&(a=i.emphasisItemStyle,s=i.blurItemStyle,p=i.selectItemStyle,f=i.focus,g=i.blurScope,v=i.labelStatesModels,y=i.hoverScale,_=i.cursorStyle,m=i.emphasisDisabled),!i||t.hasItemOption){var w=i&&i.itemModel?i.itemModel:t.getItemModel(e),S=w.getModel("emphasis");a=S.getModel("itemStyle").getItemStyle(),p=w.getModel(["select","itemStyle"]).getItemStyle(),s=w.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),g=S.get("blurScope"),m=S.get("disabled"),v=(0,c.k3)(w),y=S.getShallow("scale"),_=w.getShallow("cursor")}var T=t.getItemVisual(e,"symbolRotate");x.attr("rotation",(T||0)*Math.PI/180||0);var M=(0,r.Cq)(t.getItemVisual(e,"symbolOffset"),n);M&&(x.x=M[0],x.y=M[1]),_&&x.attr("cursor",_);var C=t.getItemVisual(e,"style"),A=C.fill;if(x instanceof d.ZP){var I=x.style;x.useStyle((0,h.extend)({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},C))}else x.__isEmptyBrush?x.useStyle((0,h.extend)({},C)):x.useStyle(C),x.style.decal=null,x.setColor(A,o&&o.symbolInnerColor),x.style.strokeNoScale=!0;var D=t.getItemVisual(e,"liftZ"),L=this._z2;null!=D?null==L&&(this._z2=x.z2,x.z2+=D):null!=L&&(x.z2=L,this._z2=null);var P=o&&o.useNameLabel;(0,c.ni)(x,v,{labelFetcher:b,labelDataIndex:e,defaultText:function(e){return P?t.getName(e):(0,u.H)(t,e)},inheritColor:A,defaultOpacity:C.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var O=x.ensureState("emphasis");if(O.style=a,x.ensureState("select").style=p,x.ensureState("blur").style=s,y){var E=Math.max((0,h.isNumber)(y)?y:1.1,3/this._sizeY);O.scaleX=this._sizeX*E,O.scaleY=this._sizeY*E}this.setSymbolScale(1),(0,l.k5)(this,f,g,m)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=(0,s.A)(this).dataIndex,a=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&o.bX(l,{style:{opacity:0}},e,{dataIndex:r,removeOpt:a,cb:function(){i.removeTextContent()}})}else i.removeTextContent();o.bX(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:a})},e.getSymbolSize=function(t,e){return(0,r.zp)(t.getItemVisual(e,"symbolSize"))},e}(a.Z)},8162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(8154),r=n(9266),o=n(1177),a=n(6351),s=n(3051),l=n(6006);function u(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function h(t){return null==t||(0,s.isObject)(t)||(t={isIgnore:t}),t||{}}function c(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:(0,l.k3)(e),cursorStyle:e.get("cursor")}}const d=function(){function t(t){this.group=new i.Z,this._SymbolCtor=t||a.Z}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=h(e);var n=this.group,i=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=c(t),d={disableAnimation:s},p=e.getSymbolPoint||function(e){return t.getItemLayout(e)};o||n.removeAll(),t.diff(o).add((function(i){var r=p(i);if(u(t,r,i,e)){var o=new a(t,i,l,d);o.setPosition(r),t.setItemGraphicEl(i,o),n.add(o)}})).update((function(h,c){var f=o.getItemGraphicEl(c),g=p(h);if(u(t,g,h,e)){var m=t.getItemVisual(h,"symbol")||"circle",v=f&&f.getSymbolType&&f.getSymbolType();if(!f||v&&v!==m)n.remove(f),(f=new a(t,h,l,d)).setPosition(g);else{f.updateData(t,h,l,d);var y={x:g[0],y:g[1]};s?f.attr(y):r.D(f,y,i)}n.add(f),t.setItemGraphicEl(h,f)}else n.remove(f)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=p,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=c(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=h(n);for(var r=t.start;r{"use strict";n.d(e,{ID:()=>l,X0:()=>u,lQ:()=>h});var i=n(5151),r=n(9266),o=n(7214),a=n(5669),s=n(3051);function l(t,e,n,o,a){var l=t.getArea(),u=l.x,h=l.y,c=l.width,d=l.height,p=n.get(["lineStyle","width"])||2;u-=p/2,h-=p/2,c+=p,d+=p,u=Math.floor(u),c=Math.round(c);var f=new i.Z({shape:{x:u,y:h,width:c,height:d}});if(e){var g=t.getBaseAxis(),m=g.isHorizontal(),v=g.inverse;m?(v&&(f.shape.x+=c),f.shape.width=0):(v||(f.shape.y+=d),f.shape.height=0);var y=(0,s.isFunction)(a)?function(t){a(t,f)}:null;r.KZ(f,{shape:{width:c,height:d,x:u,y:h}},n,null,o,y)}return f}function u(t,e,n){var i=t.getArea(),s=(0,a.NM)(i.r0,1),l=(0,a.NM)(i.r,1),u=new o.C({shape:{cx:(0,a.NM)(t.cx,1),cy:(0,a.NM)(t.cy,1),r0:s,r:l,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});e&&("angle"===t.getBaseAxis().dim?u.shape.endAngle=i.startAngle:u.shape.r=s,r.KZ(u,{shape:{endAngle:i.endAngle,r:l}},n));return u}function h(t,e,n,i,r){return t?"polar"===t.type?u(t,e,n):"cartesian2d"===t.type?l(t,e,n,i,r):null:null}},1764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101);function o(t){return"_EC_"+t}var a=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[o(t)]){var i=new s(t,e);return i.hostGraph=this,this.nodes.push(i),n[o(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[o(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,a=this._edgesMap;if(i.isNumber(t)&&(t=this.nodes[t]),i.isNumber(e)&&(e=this.nodes[e]),t instanceof s||(t=r[o(t)]),e instanceof s||(e=r[o(e)]),t&&e){var u=t.id+"-"+e.id,h=new l(t,e,n);return h.hostGraph=this,this._directed&&(t.outEdges.push(h),e.inEdges.push(h)),t.edges.push(h),t!==e&&e.edges.push(h),this.edges.push(h),a[u]=h,h}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof s&&(t=t.id),e instanceof s&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof s||(e=this._nodesMap[o(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}i.mixin(s,u("hostGraph","data")),i.mixin(l,u("hostGraph","edgeData"));const h=a;var c=n(9344),d=n(5623),p=n(4267),f=n(8455),g=n(2234);function m(t,e,n,o,a){for(var s=new h(o),l=0;l "+x)),v++)}var b,w=n.get("coordinateSystem");if("cartesian2d"===w||"polar"===w)b=(0,f.Z)(t,n);else{var S=p.Z.get(w),T=S&&S.dimensions||[];i.indexOf(T,"value")<0&&T.concat(["value"]);var M=(0,d.Z)(t,{coordDimensions:T,encodeDefine:n.getEncode()}).dimensions;(b=new r.Z(M,n)).initData(t)}var C=new r.Z(["value"],n);return C.initData(m,u),a&&a(b,C),(0,c.Z)({mainData:b,struct:s,structAttr:"graph",datas:{node:b,edge:C},datasAttr:{node:"data",edge:"edgeData"}}),s.update(),s}},5682:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(2234);function r(){var t=(0,i.Yf)();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}},8455:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=n(3051),r=n(5101),o=n(5623),a=n(381),s=n(2234),l=n(4267),u=function(t){this.coordSysDims=[],this.axisMap=(0,i.createHashMap)(),this.categoryAxisMap=(0,i.createHashMap)(),this.coordSysName=t};var h={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",s.C6).models[0],o=t.getReferringComponents("yAxis",s.C6).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),c(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),c(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",s.C6).models[0];e.coordSysDims=["single"],n.set("single",r),c(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",s.C6).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),c(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),c(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=a.dimensions.slice();(0,i.each)(a.parallelAxisIndex,(function(t,i){var a=o.getComponent("parallelAxis",t),l=s[i];n.set(l,a),c(a)&&(r.set(l,a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=i))}))}};function c(t){return"category"===t.get("type")}var d=n(9574),p=n(9936),f=n(1772),g=n(4279);const m=function(t,e,n){n=n||{};var c,m=e.getSourceManager(),v=!1;t?(v=!0,c=(0,d.nx)(t)):v=(c=m.getSource()).sourceFormat===g.cy;var y=function(t){var e=t.get("coordinateSystem"),n=new u(e),i=h[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),_=function(t,e){var n,r=t.get("coordinateSystem"),o=l.Z.get(r);return e&&e.coordSysDims&&(n=i.map(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=(0,a.T)(r)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(e,y),x=n.useEncodeDefaulter,b=i.isFunction(x)?x:x?i.curry(f.pY,_,e):null,w={coordDimensions:_,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:b,canOmitUnusedDimensions:!v},S=(0,o.Z)(c,w),T=function(t,e,n){var r,o;return n&&i.each(t,(function(t,i){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==r||(t[r].otherDims.itemName=0),r}(S.dimensions,n.createInvertedIndices,y),M=v?null:m.getSharedDataStore(S),C=(0,p.BM)(e,{schema:S,store:M}),A=new r.Z(S,e);A.setCalculationInfo(C);var I=null!=T&&function(t){if(t.sourceFormat===g.cy){var e=function(t){var e=0;for(;e{"use strict";n.d(e,{H:()=>o,O:()=>a});var i=n(8540),r=n(3051);function o(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=(0,i.hk)(t,e,n[0]);return null!=o?o+"":null}if(r){for(var a=[],s=0;s=0&&i.push(e[a])}return i.join(" ")}},241:(t,e,n)=>{"use strict";n.d(e,{N:()=>B});var i=n(655),r=n(7145),o=n(8154),a=n(9971),s=n(3051),l=n(1525),u=n(5280),h=n(8554);const c=function(t){function e(e,n,i){var r=t.call(this)||this;return r.add(r.createLine(e,n,i)),r._updateEffectSymbol(e,n),r}return(0,i.ZT)(e,t),e.prototype.createLine=function(t,e,n){return new a.Z(t,e,n)},e.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");s.isArray(i)||(i=[i,i]);var o=t.getItemVisual(e,"style"),a=n.get("color")||o&&o.stroke,u=this.childAt(1);this._symbolType!==r&&(this.remove(u),(u=(0,l.th)(r,-.5,-.5,1,1,a)).z2=100,u.culling=!0,this.add(u)),u&&(u.setStyle("shadowColor",a),u.setStyle(n.getItemStyle(["color"])),u.scaleX=i[0],u.scaleY=i[1],u.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},e.prototype._updateEffectAnimation=function(t,e,n){var i=this.childAt(1);if(i){var r=t.getItemLayout(n),o=1e3*e.get("period"),a=e.get("loop"),l=e.get("constantSpeed"),u=s.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3}));if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop){i.stopAnimation();var h=void 0;h=s.isFunction(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a)}this._period=o,this._loop=a}},e.prototype._animateSymbol=function(t,e,n,i){if(e>0){t.__t=0;var r=this,o=t.animate("",i).when(e,{__t:1}).delay(n).during((function(){r._updateSymbolPosition(t)}));i||o.done((function(){r.remove(t)})),o.start()}},e.prototype._getLineLength=function(t){return u.dist(t.__p1,t.__cp1)+u.dist(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=h.Zm,l=h.AZ;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var c=l(e[0],i[0],n[0],r),d=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(d,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(c);var y=n(479),_=n(327),x=n(3640),b=n(5674),w=n(106),S=function(){this.polyline=!1,this.curveness=0,this.segs=[]},T=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,i.ZT)(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new S},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,d=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){var f=(u+d)/2-(h-p)*r,g=(h+p)/2-(d-u)*r;if(b.m(u,h,f,g,d,p,o,t,e))return a}else if(x.m(u,h,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const C={seriesType:"lines",plan:(0,n(5682).Z)(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&(0,A.lQ)(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=C.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),s=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&s===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=s?new M:new r.Z(o?i?v:m:i?c:a.Z),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(n(5797).Z);var D=n(3321),L=n(5101),P=n(5685),O="undefined"==typeof Uint32Array?Array:Uint32Array,E="undefined"==typeof Float64Array?Array:Float64Array;function N(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=(0,s.map)(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),(0,s.mergeAll)([e,t[0],t[1]])})))}const k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return(0,i.ZT)(e,t),e.prototype.init=function(e){e.data=e.data||[],N(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(N(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=(0,s.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=(0,s.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(D.Z);function R(t){return t instanceof Array||(t=[t,t]),t}const z={seriesType:"lines",reset:function(t){var e=R(t.get("symbol")),n=R(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=R(n.getShallow("symbol",!0)),r=R(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};function B(t){t.registerChartView(I),t.registerSeriesModel(k),t.registerLayout(C),t.registerVisual(z)}},8608:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});var i=n(3051),r=n(8154),o=n(2095),a=n(6498),s=n(1177),l=n(106),u=n(6006),h=n(1497),c=n(5669),d=n(1525),p=n(2892),f=n(5280),g=n(7947),m=n(4162),v=Math.PI,y=function(){function t(t,e){this.group=new r.Z,this.opt=e,this.axisModel=t,(0,i.defaults)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new r.Z({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!_[t]},t.prototype.add=function(t){_[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=(0,c.wW)(e-t);return(0,c.mW)(o)?(r=n>0?"top":"bottom",i="center"):(0,c.mW)(o-v)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),_={axisLine:function(t,e,n,r){var a=e.get(["axisLine","show"]);if("auto"===a&&t.handleAutoShown&&(a=t.handleAutoShown("axisLine")),a){var s=e.axis.getExtent(),l=r.transform,u=[s[0],0],h=[s[1],0];l&&((0,f.applyTransform)(u,u,l),(0,f.applyTransform)(h,h,l));var c=(0,i.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new o.Z({subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});p.anid="line",n.add(p);var g=e.get(["axisLine","symbol"]);if(null!=g){var m=e.get(["axisLine","symbolSize"]);(0,i.isString)(g)&&(g=[g,g]),((0,i.isString)(m)||(0,i.isNumber)(m))&&(m=[m,m]);var v=(0,d.Cq)(e.get(["axisLine","symbolOffset"])||0,m),y=m[0],_=m[1];(0,i.each)([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-h[0])*(u[0]-h[0])+(u[1]-h[1])*(u[1]-h[1]))}],(function(e,i){if("none"!==g[i]&&null!=g[i]){var r=(0,d.th)(g[i],-y/2,-_/2,y,_,c.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:u[0]+o*Math.cos(t.rotation),y:u[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,r){var o=function(t,e,n,r){var o=n.axis,a=n.getModel("axisTick"),s=a.get("show");"auto"===s&&r.handleAutoShown&&(s=r.handleAutoShown("axisTick"));if(!s||o.scale.isBlank())return;for(var l=a.getModel("lineStyle"),u=r.tickDirection*a.get("length"),h=S(o.getTicksCoords(),e.transform,u,(0,i.defaults)(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c_[1]?-1:1,b=["start"===p?_[0]-x*m:"end"===p?_[1]+x*m:(_[0]+_[1])/2,w(p)?t.labelOffset+f*m:0],S=e.get("nameRotate");null!=S&&(S=S*v/180),w(p)?h=y.innerTextLayout(t.rotation,null!=S?S:t.rotation,f):(h=function(t,e,n,i){var r,o,a=(0,c.wW)(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;(0,c.mW)(a-v/2)?(o=l?"bottom":"top",r="center"):(0,c.mW)(a-1.5*v)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*v&&a>v/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,p,S||0,_),null!=(d=t.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var T=g.getFont(),M=e.get("nameTruncate",!0)||{},C=M.ellipsis,A=(0,i.retrieve)(t.nameTruncateMaxWidth,M.maxWidth,d),I=new a.ZP({x:b[0],y:b[1],rotation:h.rotation,silent:y.isLabelSilent(e),style:(0,u.Lr)(g,{text:o,font:T,overflow:"truncate",width:A,ellipsis:C,fill:g.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:g.get("align")||h.textAlign,verticalAlign:g.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(s.setTooltipConfig({el:I,componentModel:e,itemName:o}),I.__fullText=o,I.anid="name",e.get("triggerEvent")){var D=y.makeAxisEventDataBase(e);D.targetType="axisName",D.name=o,(0,l.A)(I).eventData=D}r.add(I),I.updateTransform(),n.add(I),I.decomposeTransform()}}};function x(t){t&&(t.ignore=!0)}function b(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=p.identity([]);return p.rotate(r,r,-t.rotation),n.applyTransform(p.mul([],r,t.getLocalTransform())),i.applyTransform(p.mul([],r,e.getLocalTransform())),n.intersect(i)}}function w(t){return"middle"===t||"center"===t}function S(t,e,n,i,r){for(var a=[],s=[],l=[],u=0;u{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(8490),o=n(3166),a={};const s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(e,n,i,o){this.axisPointerClass&&r.iG(e),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},e.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},e.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},e.prototype.dispose=function(e,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var a=r.np(t);a?(this._axisPointer||(this._axisPointer=new o)).render(t,a,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,e){a[t]=e},e.getAxisPointerClass=function(t){return t&&a[t]},e.type="axis",e}(o.Z)},7329:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(1177),a=n(6498),s=n(9266),l=n(8490),u=n(1158),h=n(270),c=(0,n(2234).Yf)(),d=i.clone,p=i.bind,f=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,o){var a=e.get("value"),s=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,o||this._lastValue!==a||this._lastStatus!==s){this._lastValue=a,this._lastStatus=s;var l=this._group,u=this._handle;if(!s||"hide"===s)return l&&l.hide(),void(u&&u.hide());l&&l.show(),u&&u.show();var h={};this.makeElOption(h,a,t,e,n);var c=h.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var p=i.curry(g,e,d);this.updatePointerEl(l,h,p),this.updateLabelEl(l,h,p,e)}else l=this._group=new r.Z,this.createPointerEl(l,h,t,e),this.createLabelEl(l,h,t,e),n.getZr().add(l);_(l,e,!0),this._renderHandle(a)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=l.r(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var a=c(t).pointerEl=new o[r.type](d(e.pointer));t.add(a)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=c(t).labelEl=new a.ZP(d(e.label));t.add(r),v(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=c(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=c(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),v(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),a=this._handle,s=n.getModel("handle"),l=n.get("status");if(!s.get("show")||!l||"hide"===l)return a&&r.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=o.createIcon(s.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){u.sT(t.event)},onmousedown:p(this._onHandleDragMove,this,0,0),drift:p(this._onHandleDragMove,this),ondragend:p(this._onHandleDragEnd,this)}),r.add(a)),_(a,n,!1),a.setStyle(s.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var c=s.get("size");i.isArray(c)||(c=[c,c]),a.scaleX=c[0]/2,a.scaleY=c[1]/2,h.T9(this,"_doDispatchAxisPointer",s.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){g(this._axisPointerModel,!e&&this._moveAnimation,this._handle,y(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(y(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(y(i)),c(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),h.ZH(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function g(t,e,n,i){m(c(n).lastProp,i)||(c(n).lastProp=i,e?s.D(n,i,t):(n.stopAnimation(),n.attr(i)))}function m(t,e){if(i.isObject(t)&&i.isObject(e)){var n=!0;return i.each(e,(function(e,i){n=n&&m(t[i],e)})),!!n}return t===e}function v(t,e){t[e.get(["label","show"])?"show":"hide"]()}function y(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function _(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}const x=f},2448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r=n(2234);function o(t,e){var n,o=[],a=t.seriesIndex;if(null==a||!(n=e.getSeriesByIndex(a)))return{point:[]};var s=n.getData(),l=r.gO(s,t);if(null==l||l<0||i.isArray(l))return{point:[]};var u=s.getItemGraphicEl(l),h=n.coordinateSystem;if(n.getTooltipPosition)o=n.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)if(t.isStacked){var c=h.getBaseAxis(),d=h.getOtherAxis(c).dim,p=c.dim,f="x"===d||"radius"===d?1:0,g=s.mapDimension(p),m=[];m[f]=s.get(g,l),m[1-f]=s.get(s.getCalculationInfo("stackResultDimension"),l),o=h.dataToPoint(m)||[]}else o=h.dataToPoint(s.getValues(i.map(h.dimensions,(function(t){return s.mapDimension(t)})),l))||[];else if(u){var v=u.getBoundingRect().clone();v.applyTransform(u.transform),o=[v.x+v.width/2,v.y+v.height/2]}return{point:o,el:u}}},6996:(t,e,n)=>{"use strict";n.d(e,{E:()=>h,z:()=>s});var i=n(3051),r=n(6387),o=(0,n(2234).Yf)(),a=i.each;function s(t,e,n){if(!r.default.node){var s=e.getZr();o(s).records||(o(s).records={}),function(t,e){if(o(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);a(o(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}o(t).initialized=!0,n("click",i.curry(u,"click")),n("mousemove",i.curry(u,"mousemove")),n("globalout",l)}(s,e),(o(s).records[t]||(o(s).records[t]={})).handler=n}}function l(t,e,n){t.handler("leave",null,n)}function u(t,e,n,i){e.handler(t,n,i)}function h(t,e){if(!r.default.node){var n=e.getZr();(o(n).records||{})[t]&&(o(n).records[t]=null)}}},7037:(t,e,n)=>{"use strict";n.d(e,{N:()=>A});var i=n(1726),r=n(655),o=n(7329),a=n(5539),s=n(9069),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,l=o.grid,c=i.get("type"),d=u(l,o).getOtherAxis(o).getGlobalExtent(),p=o.toGlobalCoord(o.dataToCoord(e,!0));if(c&&"none"!==c){var f=a.fk(i),g=h[c](o,p,d);g.style=f,t.graphicKey=g.type,t.pointer=g}var m=s.bK(l.model,n);a.gf(e,t,m,n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=s.bK(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=a.Zh(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=u(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=[t.x,t.y];h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=h[l];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(o.Z);function u(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var h={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:a.BL([e,n[0]],[e,n[1]],c(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:a.uE([e-i/2,n[0]],[i,r],c(t))}}};function c(t){return"x"===t.dim?0:1}const d=l;const p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(n(8071).Z);var f=n(6996);const g=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";f.z("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){f.E("axisPointer",e)},e.prototype.dispose=function(t,e){f.E("axisPointer",e)},e.type="axisPointer",e}(n(3166).Z);var m=n(3051),v=n(8490),y=n(2234),_=n(2448),x=(0,y.Yf)();function b(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||(0,m.bind)(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){C(r)&&(r=(0,_.Z)({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=C(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||C(r),d={},p={},f={list:[],map:{}},g={showPointer:(0,m.curry)(S,p),showTooltip:(0,m.curry)(T,f)};(0,m.each)(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);(0,m.each)(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&w(t,a,g,!1,d)}}))}));var v={};return(0,m.each)(h,(function(t,e){var n=t.linkGroup;n&&!p[e]&&(0,m.each)(n.axesInfo,(function(e,i){var r=p[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,M(e),M(t)))),v[t.key]=o}}))})),(0,m.each)(v,(function(t,e){w(h[e],t,g,!0,d)})),function(t,e,n){var i=n.axesInfo=[];(0,m.each)(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(p,h,d),function(t,e,n,i){if(C(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=x(i)[r]||{},a=x(i)[r]={};(0,m.each)(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&(0,m.each)(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];(0,m.each)(o,(function(t,e){!a[e]&&l.push(t)})),(0,m.each)(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),d}}function w(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return(0,m.each)(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,n);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,r=u,o.length=0),(0,m.each)(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&(0,m.extend)(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function S(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function T(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=v.zm(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function M(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function C(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function A(t){i.Z.registerAxisPointerClass("CartesianAxisPointer",d),t.registerComponentModel(p),t.registerComponentView(g),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!(0,m.isArray)(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=(0,v.KM)(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},b)}},8490:(t,e,n)=>{"use strict";n.d(e,{KM:()=>o,iG:()=>s,np:()=>u,r:()=>l,zm:()=>c});var i=n(1497),r=n(3051);function o(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var o=e.getComponent("tooltip"),s=e.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];(0,r.each)(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var d=c(n.model),p=t.coordSysAxesInfo[d]={};t.coordSysMap[d]=n;var f=n.model.getModel("tooltip",o);if((0,r.each)(n.getAxes(),(0,r.curry)(y,!1,null)),n.getTooltipAxes&&o&&f.get("show")){var g="axis"===f.get("trigger"),m="cross"===f.get(["axisPointer","type"]),v=n.getTooltipAxes(f.get(["axisPointer","axis"]));(g||m)&&(0,r.each)(v.baseAxes,(0,r.curry)(y,!m||"cross",g)),m&&(0,r.each)(v.otherAxes,(0,r.curry)(y,"cross",!1))}}function y(o,d,g){var m=g.model.getModel("axisPointer",s),v=m.get("show");if(v&&("auto"!==v||o||h(m))){null==d&&(d=m.get("triggerTooltip")),m=o?function(t,e,n,o,a,s){var l=e.getModel("axisPointer"),u=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],h={};(0,r.each)(u,(function(t){h[t]=(0,r.clone)(l.get(t))})),h.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(h.type="line");var c=h.label||(h.label={});if(null==c.show&&(c.show=!1),"cross"===a){var d=l.get(["label","show"]);if(c.show=null==d||d,!s){var p=h.lineStyle=l.get("crossStyle");p&&(0,r.defaults)(c,p.textStyle)}}return t.model.getModel("axisPointer",new i.Z(h,n,o))}(g,f,s,e,o,d):m;var y=m.get("snap"),_=c(g.model),x=d||y||"category"===g.type,b=t.axesInfo[_]={key:_,axis:g,coordSys:n,axisPointerModel:m,triggerTooltip:d,involveSeries:x,snap:y,useHandle:h(m),seriesModels:[],linkGroup:null};p[_]=b,t.seriesInvolved=t.seriesInvolved||x;var w=function(t,e){for(var n=e.model,i=e.dim,r=0;r=0||t===e}function s(t){var e=l(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=h(n);null==o&&(r.status=s?"show":"hide");var u=i.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a{"use strict";n.d(e,{$_:()=>d,BL:()=>m,Rj:()=>y,Zh:()=>f,fk:()=>c,gf:()=>g,gk:()=>p,uE:()=>v});var i=n(3051),r=n(1177),o=n(423),a=n(8988),s=n(2892),l=n(7947),u=n(8608),h=n(6006);function c(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function d(t,e,n,i,r){var s=p(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),u=a.MY(l.get("padding")||0),c=l.getFont(),d=o.lP(s,c),f=r.position,g=d.width+u[1]+u[3],m=d.height+u[0]+u[2],v=r.align;"right"===v&&(f[0]-=g),"center"===v&&(f[0]-=g/2);var y=r.verticalAlign;"bottom"===y&&(f[1]-=m),"middle"===y&&(f[1]-=m/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,g,m,i);var _=l.get("backgroundColor");_&&"auto"!==_||(_=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:(0,h.Lr)(l,{text:s,font:c,fill:l.getTextColor(),padding:u,backgroundColor:_}),z2:10}}function p(t,e,n,r,o){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:o.precision}),s=o.formatter;if(s){var u={value:l.DX(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};i.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&u.seriesData.push(r)})),i.isString(s)?a=s.replace("{value}",a):i.isFunction(s)&&(a=s(u))}return a}function f(t,e,n){var i=s.create();return s.rotate(i,i,n.rotation),s.translate(i,i,n.position),r.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function g(t,e,n,i,r,o){var a=u.Z.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),d(e,i,r,o,{position:f(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function m(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function v(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function y(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}},2719:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(3051),o=n(8071),a=n(6398),s=n(2234),l=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function u(t){var e={};return(0,r.each)(["start","end","startValue","endValue","throttle"],(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}const h=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){var i=u(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=u(t);(0,r.merge)(this.option,t,!0),(0,r.merge)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=(0,r.createHashMap)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return(0,r.each)(a.I,(function(n){var i=this.getReferringComponents((0,a.jQ)(n),s.iP);if(i.specified){e=!0;var o=new l;(0,r.each)(i.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var o="vertical"===e?"y":"x";u(n.findComponents({mainType:o+"Axis"}),o)}i&&u(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function u(e,n){var o=e[0];if(o){var a=new l;if(a.add(o.componentIndex),t.set(n,a),i=!1,"x"===n||"y"===n){var u=o.getReferringComponents("grid",s.C6).models[0];u&&(0,r.each)(e,(function(t){o.componentIndex!==t.componentIndex&&u===t.getReferringComponents("grid",s.C6).models[0]&&a.add(t.componentIndex)}))}}}i&&(0,r.each)(a.I,(function(e){if(i){var r=n.findComponents({mainType:(0,a.jQ)(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new l;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");(0,r.each)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent((0,a.jQ)(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){(0,r.each)(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent((0,a.jQ)(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;(0,r.each)([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;(0,r.each)(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},e.type="dataZoom",e}(n(3166).Z)},6398:(t,e,n)=>{"use strict";n.d(e,{BL:()=>l,I:()=>r,jQ:()=>s,kc:()=>a,rg:()=>u});var i=n(3051),r=["x","y","radius","angle","single"],o=["cartesian2d","polar","singleAxis"];function a(t){var e=t.get("coordinateSystem");return(0,i.indexOf)(o,e)>=0}function s(t){return t+"Axis"}function l(t,e){var n,r=(0,i.createHashMap)(),o=[],a=(0,i.createHashMap)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){a.get(t.uid)||l(t)}));do{n=!1,t.eachComponent("dataZoom",s)}while(n);function s(t){!a.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var i=r.get(t);i&&i[n]&&(e=!0)})),e}(t)&&(l(t),n=!0)}function l(t){a.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return o}function u(t){var e=t.ecModel,n={infoList:[],infoMap:(0,i.createHashMap)()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(s(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,l=n.infoMap.get(a);l||(l={model:o,axisModels:[]},n.infoList.push(l),n.infoMap.set(a,l)),l.axisModels.push(r)}}})),n}},7543:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(3051),r=n(6398),o=n(5669),a=n(9233),s=n(7947),l=n(8986),u=n(2234),h=i.each,c=o.dt;const d=function(){function t(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return t.prototype.hostedBy=function(t){return this._dataZoomModel===t},t.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},t.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},t.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries((function(e){if((0,r.kc)(e)){var n=(0,r.jQ)(this._dimName),i=e.getReferringComponents(n,u.C6).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return i.clone(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];h(["start","end"],(function(a,h){var c=t[a],d=t[a+"Value"];"percent"===r[h]?(null==c&&(c=s[h]),d=i.parse(o.NU(c,s,n))):(e=!0,d=null==d?n[h]:i.parse(d),c=o.NU(d,n,s)),u[h]=d,l[h]=c})),c(u),c(l);var d=this._minMaxSpan;function p(t,e,n,r,s){var l=s?"Span":"ValueSpan";(0,a.Z)(0,t,n,"all",d["min"+l],d["max"+l]);for(var u=0;u<2;u++)e[u]=o.NU(t[u],n,r,!0),s&&(e[u]=i.parse(e[u]))}return e?p(u,l,n,s,!1):p(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];h(n,(function(t){(0,s.AH)(i,t.getData(),e)}));var r=t.getAxisModel(),o=(0,l.Qw)(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&h(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var s=e.getStore(),l=i.map(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,o=0;oa[1];if(h&&!c&&!d)return!0;h&&(i=!0),c&&(e=!0),d&&(n=!0)}return i&&e&&n}))}else h(r,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN})));else{var i={};i[n]=a,e.selectRange(i)}}));h(r,(function(t){e.setApproximateExtent(a,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;h(["min","max"],(function(i){var r=e.get(i+"Span"),a=e.get(i+"ValueSpan");null!=a&&(a=this.getAxisModel().axis.scale.parse(a)),null!=a?r=o.NU(n[0]+a,n,[0,100],!0):null!=r&&(a=o.NU(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=a}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=o.M9(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();const p={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,o){var a=t.getComponent((0,r.jQ)(i),o);e(i,o,a,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new d(e,i,o,t),n.push(r.__dzAxisProxy))}));var o=(0,i.createHashMap)();return(0,i.each)(n,(function(t){(0,i.each)(t.getTargetSeriesModels(),(function(t){o.set(t.uid,t)}))})),o},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var f=!1;function g(t){f||(f=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,p),function(t){t.registerAction("dataZoom",(function(t,e){var n=(0,r.BL)(e,t);(0,i.each)(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}},7240:(t,e,n)=>{"use strict";n.d(e,{N:()=>h});var i=n(655),r=n(8071),o=n(3166),a=n(4279),s=n(6437),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.prototype.init=function(e,n,i){t.prototype.init.call(this,e,n,i),this._sourceManager=new s.U(this),(0,s.t)(this)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),(0,s.t)(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:a.fY},e}(r.Z),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataset",e}return(0,i.ZT)(e,t),e.type="dataset",e}(o.Z);function h(t){t.registerComponentModel(l),t.registerComponentView(u)}},3448:(t,e,n)=>{"use strict";n.d(e,{Z:()=>$});var i=n(655),r=n(3051),o=n(3510),a=n(8154),s=n(5151),l=n(1177),u=n(2514),h=n(5094),c=n(582),d=n(4130),p=!0,f=Math.min,g=Math.max,m=Math.pow,v="globalPan",y={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},x={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},b=0,w=function(t){function e(e){var n=t.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new a.Z,n._uid="brushController_"+b++,(0,r.each)(q,(function(t,e){this._handlers[e]=(0,r.bind)(t,this)}),n),n}return(0,i.ZT)(e,t),e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var e=this._zr;this._enableGlobalPan||c.qn(e,v,this._uid),(0,r.each)(this._handlers,(function(t,n){e.on(n,t)})),this._brushType=t.brushType,this._brushOption=(0,r.merge)((0,r.clone)(x),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;c.Ar(t,v,this._uid),(0,r.each)(this._handlers,(function(e,n){t.off(n,e)})),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var e=this._panels={};(0,r.each)(t,(function(t){e[t.panelId]=(0,r.clone)(t)}))}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=(0,r.map)(t,(function(t){return(0,r.merge)((0,r.clone)(x),t,!0)}));var e=this._covers,n=this._covers=[],i=this,o=this._creatingCover;return new d.Z(e,t,(function(t,e){return a(t.__brushOption,e)}),a).add(s).update(s).remove((function(t){e[t]!==o&&i.group.remove(e[t])})).execute(),this;function a(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function s(r,a){var s=t[r];if(null!=a&&e[a]===o)n[r]=e[a];else{var l=n[r]=null!=a?(e[a].__brushOption=s,e[a]):T(i,S(i,s));A(i,l)}}},e.prototype.unmount=function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(o.Z);function S(t,e){var n=J[e.brushType].createCover(t,e);return n.__brushOption=e,C(n,e),t.group.add(n),n}function T(t,e){var n=I(e);return n.endCreating&&(n.endCreating(t,e),C(e,e.__brushOption)),e}function M(t,e){var n=e.__brushOption;I(e).updateCoverShape(t,e,n.range,n)}function C(t,e){var n=e.z;null==n&&(n=1e4),t.traverse((function(t){t.z=n,t.z2=n}))}function A(t,e){I(e).updateCommon(t,e),M(t,e)}function I(t){return J[t.__brushOption.brushType]}function D(t,e,n){var i,o=t._panels;if(!o)return p;var a=t._transform;return(0,r.each)(o,(function(t){t.isTargetByCursor(e,n,a)&&(i=t)})),i}function L(t,e){var n=t._panels;if(!n)return p;var i=e.__brushOption.panelId;return null!=i?n[i]:p}function P(t){var e=t._covers,n=e.length;return(0,r.each)(e,(function(e){t.group.remove(e)}),t),e.length=0,!!n}function O(t,e){var n=(0,r.map)(t._covers,(function(t){var e=t.__brushOption,n=(0,r.clone)(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}}));t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function E(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function N(t,e,n,i){var o=new a.Z;return o.add(new s.Z({name:"main",style:B(n),silent:!0,draggable:!0,cursor:"move",drift:(0,r.curry)(V,t,e,o,["n","s","w","e"]),ondragend:(0,r.curry)(O,e,{isEnd:!0})})),(0,r.each)(i,(function(n){o.add(new s.Z({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,r.curry)(V,t,e,o,n),ondragend:(0,r.curry)(O,e,{isEnd:!0})}))})),o}function k(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=g(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,h=n[0][1],c=n[1][1],d=h-o+r/2,p=c-o+r/2,f=h-a,m=c-s,v=f+r,y=m+r;z(t,e,"main",a,s,f,m),i.transformable&&(z(t,e,"w",l,u,o,y),z(t,e,"e",d,u,o,y),z(t,e,"n",l,u,v,o),z(t,e,"s",l,p,v,o),z(t,e,"nw",l,u,o,o),z(t,e,"ne",d,u,o,o),z(t,e,"sw",l,p,o,o),z(t,e,"se",d,p,o,o))}function R(t,e){var n=e.__brushOption,i=n.transformable,o=e.childAt(0);o.useStyle(B(n)),o.attr({silent:!i,cursor:i?"move":"default"}),(0,r.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=e.childOfName(n.join("")),o=1===n.length?F(t,n[0]):function(t,e){var n=[F(t,e[0]),F(t,e[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?_[o]+"-resize":null})}))}function z(t,e,n,i,r,o,a){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=U(t,e,[[i,r],[i+o,r+a]]),l=f(s[0][0],s[1][0]),u=f(s[0][1],s[1][1]),h=g(s[0][0],s[1][0]),c=g(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function B(t){return(0,r.defaults)({strokeNoScale:!0},t.brushStyle)}function Z(t,e,n,i){var r=[f(t,n),f(e,i)],o=[g(t,n),g(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function F(t,e){var n=l.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return l.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function V(t,e,n,i,o,a){var s=n.__brushOption,l=t.toRectRange(s.range),u=H(e,o,a);(0,r.each)(i,(function(t){var e=y[t];l[e[0]][e[1]]+=u[e[0]]})),s.range=t.fromRectRange(Z(l[0][0],l[1][0],l[0][1],l[1][1])),A(e,n),O(e,{isEnd:!1})}function G(t,e,n,i){var o=e.__brushOption.range,a=H(t,n,i);(0,r.each)(o,(function(t){t[0]+=a[0],t[1]+=a[1]})),A(t,e),O(t,{isEnd:!1})}function H(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function U(t,e,n){var i=L(t,e);return i&&i!==p?i.clipPath(n,t._transform):(0,r.clone)(n)}function W(t){var e=t.event;e.preventDefault&&e.preventDefault()}function j(t,e,n){return t.childOfName("main").contain(e,n)}function X(t,e,n,i){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],i=e[0],r=n[0]-i[0],o=n[1]-i[1];return m(r*r+o*o,.5)>6}(t)||a){if(s&&!a){"single"===l.brushMode&&P(t);var u=(0,r.clone)(l);u.brushType=Y(u.brushType,s),u.panelId=s===p?null:s.panelId,a=t._creatingCover=S(t,u),t._covers.push(a)}if(a){var h=J[Y(t._brushType,s)];a.__brushOption.range=h.getCreatingRange(U(t,a,t._track)),i&&(T(t,a),h.updateCommon(t,a)),M(t,a),o={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&D(t,e,n)&&P(t)&&(o={isEnd:i,removeOnClick:!0});return o}function Y(t,e){return"auto"===t?e.defaultBrushType:t}var q={mousedown:function(t){if(this._dragging)K(this,t);else if(!t.target||!t.target.draggable){W(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=D(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=D(t,e,n);if(!t._dragging)for(var a=0;a{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(1177),o=n(1463),a=n(2234),s=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],l=function(){function t(t,e,n){var r=this;this._targetInfoList=[];var o=h(e,t);(0,i.each)(c,(function(t,e){(!n||!n.include||(0,i.indexOf)(n.include,e)>=0)&&t(o,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=f[t.brushType](0,n,e);t.__rangeOffset={offset:m[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){(0,i.each)(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&(0,i.each)(r.coordSyses,(function(i){var r=f[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){(0,i.each)(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=f[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?m[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=y(n),o=y(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return(0,i.map)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:o.x0(i),isTargetByCursor:o.G(i,t,n.coordSysModel),getLinearBrushOtherExtent:o.VM(i)}}))},t.prototype.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&(0,i.indexOf)(r.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=h(e,t),r=0;rt[1]&&t.reverse(),t}function h(t,e){return(0,a.pm)(t,e,{includeMainTypes:s})}var c={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,o=t.gridModels,a=(0,i.createHashMap)(),s={},l={};(n||r||o)&&((0,i.each)(n,(function(t){var e=t.axis.grid.model;a.set(e.id,e),s[e.id]=!0})),(0,i.each)(r,(function(t){var e=t.axis.grid.model;a.set(e.id,e),l[e.id]=!0})),(0,i.each)(o,(function(t){a.set(t.id,t),s[t.id]=!0,l[t.id]=!0})),a.each((function(t){var o=t.coordinateSystem,a=[];(0,i.each)(o.getCartesians(),(function(t,e){((0,i.indexOf)(n,t.getAxis("x").model)>=0||(0,i.indexOf)(r,t.getAxis("y").model)>=0)&&a.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:p.grid,xAxisDeclared:s[t.id],yAxisDeclared:l[t.id]})})))},geo:function(t,e){(0,i.each)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:p.geo})}))}},d=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],p={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(r.getTransform(t)),e}},f={lineX:(0,i.curry)(g,0),lineY:(0,i.curry)(g,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[u([r[0],o[0]]),u([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:(0,i.map)(n,(function(n){var i=t?e.pointToData(n,r):e.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function g(t,e,n,r){var o=n.getAxis(["x","y"][t]),a=u((0,i.map)([0,1],(function(t){return e?o.coordToData(o.toLocalCoord(r[t]),!0):o.toGlobalCoord(o.dataToCoord(r[t]))}))),s=[];return s[t]=a,s[1-t]=[NaN,NaN],{values:a,xyMinMax:s}}var m={lineX:(0,i.curry)(v,0),lineY:(0,i.curry)(v,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return(0,i.map)(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function v(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function y(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const _=l},9176:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(3510),o=n(1158),a=n(582),s=n(3051);function l(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(o.sT(i.event),u(t,e,n,i,r))}function u(t,e,n,i,r){r.isAvailableBehavior=(0,s.bind)(h,null,n,i),t.trigger(e,r)}function h(t,e,n){var i=n[t];return!t||i&&(!(0,s.isString)(i)||e.event[i+"Key"])}const c=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=(0,s.bind)(n._mousedownHandler,n),r=(0,s.bind)(n._mousemoveHandler,n),o=(0,s.bind)(n._mouseupHandler,n),a=(0,s.bind)(n._mousewheelHandler,n),l=(0,s.bind)(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=(0,s.defaults)((0,s.clone)(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",l)},n}return(0,i.ZT)(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(o.x1(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&h("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!a.Tf(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,s=e-i,l=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&o.sT(t.event),u(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){o.x1(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=h("zoomOnMouseWheel",t,this._opt),n=h("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;l(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i);l(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){a.Tf(this._zr,"globalPan")||l(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(r.Z)},1463:(t,e,n)=>{"use strict";n.d(e,{G:()=>l,VM:()=>s,x0:()=>a});var i=n(479),r=n(1485),o=n(1177);function a(t){return t=u(t),function(e){return o.clipPointsByRect(e,t)}}function s(t,e){return t=u(t),function(n){var i=null!=e?e:n,r=i?t.width:t.height,o=i?t.x:t.y;return[o,o+(r||0)]}}function l(t,e,n){var i=u(t);return function(t,o){return i.contain(o[0],o[1])&&!(0,r.l)(t,e,n)}}function u(t){return i.Z.create(t)}},1485:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});var i={axisPointer:1,tooltip:1,brush:1};function r(t,e,n){var r=e.getComponentByElement(t.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!i.hasOwnProperty(r.mainType)&&o&&o.model!==n}},582:(t,e,n)=>{"use strict";n.d(e,{Ar:()=>s,Tf:()=>l,qn:()=>a});var i=n(1615),r=n(3051),o="\0_ec_interaction_mutex";function a(t,e,n){u(t)[e]=n}function s(t,e,n){var i=u(t);i[e]===n&&(i[e]=null)}function l(t,e){return!!u(t)[e]}function u(t){return t[o]||(t[o]={})}i.zl({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},r.noop)},9337:(t,e,n)=>{"use strict";n.d(e,{b:()=>a,l:()=>s});var i=n(6172),r=n(8988),o=n(5151);function a(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},s=(0,i.ME)(r,a,o);(0,i.BZ)(e.get("orient"),t,e.get("itemGap"),s.width,s.height),(0,i.p$)(t,r,a,o)}function s(t,e){var n=r.MY(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new o.Z({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}},1194:(t,e,n)=>{"use strict";function i(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function r(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}n.d(e,{H:()=>r,e:()=>i})},9233:(t,e,n)=>{"use strict";function i(t,e,n,i,a,s){t=t||0;var l=n[1]-n[0];if(null!=a&&(a=o(a,[0,l])),null!=s&&(s=Math.max(s,null!=a?a:0)),"all"===i){var u=Math.abs(e[1]-e[0]);u=o(u,[0,l]),a=s=o(u,[a,s]),i=0}e[0]=o(e[0],n),e[1]=o(e[1],n);var h=r(e,i);e[i]+=t;var c,d=a||0,p=n.slice();return h.sign<0?p[0]+=d:p[1]-=d,e[i]=o(e[i],p),c=r(e,i),null!=a&&(c.sign!==h.sign||c.spans&&(e[1-i]=e[i]+c.sign*s),e}function r(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function o(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}n.d(e,{Z:()=>i})},3450:(t,e,n)=>{"use strict";n.d(e,{N:()=>G});var i=n(8023),r=n(655),o=n(3051),a=n(1497),s=n(2234),l=n(8071);const u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,r.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),o.isArray(e)&&o.each(e,(function(t,i){o.isString(t)&&(t={type:t}),e[i]=o.merge(t,function(t,e){return"all"===e?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(l.Z);var h=n(1092),c=n(1177),d=n(8154),p=n(6498),f=n(5151),g=n(6357),m=n(6006),v=n(9337),y=n(6172),_=n(3166),x=n(1525),b=n(8625),w=o.curry,S=o.each,T=d.Z;function M(t,e,n,i){I(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),A(t,e,n,i)}function C(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0),S(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?(0,b.I)(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(u=A||u||"roundRect",i,s,l,v,w,d),D=new T,L=i.getModel("textStyle");if(!o.isFunction(t.getLegendIcon)||A&&"inherit"!==A){var P="inherit"===A&&t.getData().getVisual("symbol")?"inherit"===M?t.getData().getVisual("symbolRotate"):M:0;D.add(function(t){var e=t.icon||"roundRect",n=(0,x.th)(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:y,itemHeight:_,icon:u,iconRotate:P,itemStyle:I.itemStyle,lineStyle:I.lineStyle,symbolKeepAspect:C}))}else D.add(t.getLegendIcon({itemWidth:y,itemHeight:_,icon:u,iconRotate:M,itemStyle:I.itemStyle,lineStyle:I.lineStyle,symbolKeepAspect:C}));var O="left"===a?y+5:-5,E=a,N=r.get("formatter"),k=e;o.isString(N)&&N?k=N.replace("{name}",null!=e?e:""):o.isFunction(N)&&(k=N(e));var R=i.get("inactiveColor");D.add(new p.ZP({style:(0,m.Lr)(L,{text:k,x:O,y:_/2,fill:w?L.getTextColor():R,align:E,verticalAlign:"middle"})}));var z=new f.Z({shape:D.getBoundingRect(),invisible:!0}),B=i.getModel("tooltip");return B.get("show")&&c.setTooltipConfig({el:z,componentModel:r,itemName:e,itemTooltipOption:B.option}),D.add(z),D.eachChild((function(t){t.silent=!0})),z.silent=!h,this.getContentGroup().add(D),(0,g.vF)(D),D.__legendDataIndex=n,D},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();y.BZ(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){y.BZ("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?c[p]+=l[f]+d:u[p]+=h[f]+d,c[1-p]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+h[f],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(_.Z);function L(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var n=0;nn[r],m=[-d.x,-d.y];e||(m[i]=u[l]);var v=[0,0],_=[-p.x,-p.y],x=o.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));g&&("end"===t.get("pageButtonPosition",!0)?_[i]+=n[r]-p[r]:v[i]+=p[r]+x);_[1-i]+=d[a]/2-p[a]/2,u.setPosition(m),h.setPosition(v),c.setPosition(_);var b={x:0,y:0};if(b[r]=g?n[r]:d[r],b[a]=Math.max(d[a],p[a]),b[s]=Math.min(0,p[s]+_[1-i]),h.__rectSize=n[r],g){var w={x:0,y:0};w[r]=Math.max(n[r]-p[r]-x,0),w[a]=b[a],h.setClipPath(new f.Z({shape:w})),h.__rectSize=w[r]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(t);return null!=S.pageIndex&&R.D(u,{x:S.contentPosition[0],y:S.contentPosition[1]},g?t:null),this._updatePageInfoView(t,S),b},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;o.each(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,s=null!=a?a+1:0,l=e.pageCount;i&&r&&i.setStyle("text",o.isString(r)?r.replace("{current}",null==s?"":s+"").replace("{total}",null==l?"":l+""):r({current:s,total:l}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=B[r],a=Z[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=h;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(D);function V(t){(0,i.D)(O),t.registerComponentModel(k),t.registerComponentView(F),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}function G(t){(0,i.D)(O),(0,i.D)(V)}},8690:(t,e,n)=>{"use strict";n.d(e,{N:()=>g});var i=n(655),r=n(3051),o=n(6498),a=n(5151),s=n(106),l=n(6006),u=n(6172),h=n(8071),c=n(3166),d=n(8988),p=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,i.ZT)(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(h.Z),f=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,i.ZT)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,h=t.getModel("textStyle"),c=t.getModel("subtextStyle"),p=t.get("textAlign"),f=r.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),g=new o.ZP({style:(0,l.Lr)(h,{text:t.get("text"),fill:h.getTextColor()},{disableBox:!0}),z2:10}),m=g.getBoundingRect(),v=t.get("subtext"),y=new o.ZP({style:(0,l.Lr)(c,{text:v,fill:c.getTextColor(),y:m.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),_=t.get("link"),x=t.get("sublink"),b=t.get("triggerEvent",!0);g.silent=!_&&!b,y.silent=!x&&!b,_&&g.on("click",(function(){(0,d.MI)(_,"_"+t.get("target"))})),x&&y.on("click",(function(){(0,d.MI)(x,"_"+t.get("subtarget"))})),(0,s.A)(g).eventData=(0,s.A)(y).eventData=b?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(g),v&&i.add(y);var w=i.getBoundingRect(),S=t.getBoxLayoutParams();S.width=w.width,S.height=w.height;var T=(0,u.ME)(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));p||("middle"===(p=t.get("left")||t.get("right"))&&(p="center"),"right"===p?T.x+=T.width:"center"===p&&(T.x+=T.width/2)),f||("center"===(f=t.get("top")||t.get("bottom"))&&(f="middle"),"bottom"===f?T.y+=T.height:"middle"===f&&(T.y+=T.height/2),f=f||"top"),i.x=T.x,i.y=T.y,i.markRedraw();var M={align:p,verticalAlign:f};g.setStyle(M),y.setStyle(M),w=i.getBoundingRect();var C=T.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var I=new a.Z({shape:{x:w.x-C[3],y:w.y-C[0],width:w.width+C[1]+C[3],height:w.height+C[0]+C[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});i.add(I)}},e.type="title",e}(c.Z);function g(t){t.registerComponentModel(p),t.registerComponentView(f)}},1806:(t,e,n)=>{"use strict";n.d(e,{Bm:()=>a,f1:()=>i,ls:()=>o});var i=function(){},r={};function o(t,e){r[t]=e}function a(t){return r[t]}},5045:(t,e,n)=>{"use strict";n.d(e,{N:()=>et});var i=n(8023),r=n(655);const o=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2719).Z);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.type="dataZoom.select",e}(n(2159).Z);var s=n(7543);function l(t){t.registerComponentModel(o),t.registerComponentView(a),(0,s.Z)(t)}var u=n(3051),h=n(1806);const c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,r.ZT)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;u.each(this.option.feature,(function(t,n){var i=h.Bm(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),u.merge(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(n(8071).Z);var d=n(423),p=n(1177),f=n(6357),g=n(1497),m=n(4130),v=n(9337),y=n(3166),_=n(2151),x=n(6498);const b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),c=[];u.each(s,(function(t,e){c.push(e)})),new m.Z(this._featureNames||[],c).add(y).update(y).remove(u.curry(y,null)).execute(),this._featureNames=c,v.b(r,t,n),r.add(v.l(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!u.isFunction(l)&&e){var h=l.style||(l.style={}),c=d.lP(e,x.ZP.makeFont(h)),p=t.x+r.x,f=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",f=!0);var g=f?-5-c.height:o+10;p+c.width/2>n.getWidth()?(a.position=["100%",g],h.align="right"):p-c.width/2<0&&(a.position=[0,g],h.align="left")}}))}function y(d,m){var v,y=c[d],b=c[m],w=s[y],S=new g.Z(w,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===y&&(w.title=i.newTitle),y&&!b){if(function(t){return 0===t.indexOf("my")}(y))v={onclick:S.option.onclick,featureName:y};else{var T=(0,h.Bm)(y);if(!T)return;v=new T}l[y]=v}else if(!(v=l[b]))return;v.uid=(0,_.Kr)("toolbox-feature"),v.model=S,v.ecModel=e,v.api=n;var M=v instanceof h.f1;y||!b?!S.get("show")||M&&v.unusable?M&&v.remove&&v.remove(e,n):(!function(i,s,l){var c,d,g=i.getModel("iconStyle"),m=i.getModel(["emphasis","iconStyle"]),v=s instanceof h.f1&&s.getIcons?s.getIcons():i.get("icon"),y=i.get("title")||{};u.isString(v)?(c={})[l]=v:c=v;u.isString(y)?(d={})[l]=y:d=y;var _=i.iconPaths={};u.each(c,(function(l,h){var c=p.createIcon(l,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(g.getItemStyle()),c.ensureState("emphasis").style=m.getItemStyle();var v=new x.ZP({style:{text:d[h],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});c.setTextContent(v),p.setTooltipConfig({el:c,componentModel:t,itemName:h,formatterParamsExtra:{title:d[h]}}),c.__title=d[h],c.on("mouseover",(function(){var e=m.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";v.setStyle({fill:m.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),c.setTextConfig({position:m.get("textPosition")||i}),v.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",h])&&n.leaveEmphasis(this),v.hide()})),("emphasis"===i.get(["iconStatus",h])?f.fD:f.Mh)(c),r.add(c),c.on("click",u.bind(s.onclick,s,e,n,h)),_[h]=c}))}(S,v,y),S.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?f.fD:f.Mh)(i[t])},v instanceof h.f1&&v.render&&v.render(S,e,n,i)):M&&v.dispose&&v.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){u.each(this._features,(function(t){t instanceof h.f1&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){u.each(this._features,(function(n){n instanceof h.f1&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(y.Z);var w=n(6387);const S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=w.default.browser;if((0,u.isFunction)(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),d=c[0].indexOf("base64")>-1,p=r?decodeURIComponent(c[1]):c[1];d&&(p=window.atob(p));var f=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,m=new Uint8Array(g);g--;)m[g]=p.charCodeAt(g);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,f)}else{var y=document.createElement("iframe");document.body.appendChild(y);var _=y.contentWindow,x=_.document;x.open("image/svg+xml","replace"),x.write(p),x.close(),_.focus(),x.execCommand("SaveAs",!0,f),document.body.removeChild(y)}}else{var b=n.get("lang"),S='',T=window.open();T.document.write(S),T.document.title=i}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(h.f1);var T=n(1615),M=n(2234),C="__ec_magicType_stack__",A=[["line","bar"],["stack"]],I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return u.each(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(D[n]){var o,a={series:[]};u.each(A,(function(t){u.indexOf(t,n)>=0&&u.each(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=D[n](e,r,t,i);o&&(u.defaults(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var h=l.dim+"Axis",c=t.getReferringComponents(h,M.C6).models[0].componentIndex;a[h]=a[h]||[];for(var d=0;d<=c;d++)a[h][c]=a[h][c]||{};a[h][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=u.merge({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(h.f1),D={line:function(t,e,n,i){if("bar"===t)return u.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return u.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===C;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),u.merge({id:e,stack:r?"":C},i.get(["option","stack"])||{},!0)}};T.zl({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));const L=I;var P=n(1158),O=new Array(60).join("-"),E="\t";function N(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var k=new RegExp("[\t]+","g");function R(t,e){var n=t.split(new RegExp("\n*"+O+"\n*","g")),i={series:[]};return u.each(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(E)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=N(e.shift()).split(k),i=[],r=u.map(n,(function(t){return{name:t,data:[]}})),o=0;o1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){Q[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new j.Z($(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=G(t);F(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=(0,X.Z)(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];q(t,(function(t,n){e.push(u.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(h.f1),Q={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=G(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return F(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function $(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}(0,Y.f)("dataZoom",(function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=$(i),a=(0,M.pm)(t,o);return q(a.xAxisModels,(function(t){return s(t,"xAxis","xAxisIndex")})),q(a.yAxisModels,(function(t){return s(t,"yAxis","yAxisIndex")})),r}function s(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:K+e+o};a[n]=o,r.push(a)}}));const tt=J;function et(t){t.registerComponentModel(c),t.registerComponentView(b),(0,h.ls)("saveAsImage",S),(0,h.ls)("magicType",L),(0,h.ls)("dataView",Z),(0,h.ls)("dataZoom",tt),(0,h.ls)("restore",U),(0,i.D)(l)}},7813:(t,e,n)=>{"use strict";n.d(e,{N:()=>$});var i=n(7037),r=n(8023),o=n(655);const a=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(n(8071).Z);var s=n(3051),l=n(6387),u=n(1158),h=n(4058),c=n(8988);function d(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function p(t){if(l.default.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(h+="top:50%",d+="translateY(-50%) rotate("+(a="left"===l?-225:-45)+"deg)"):(h+="left:50%",d+="translateX(-50%) rotate("+(a="top"===l?225:45)+"deg)");var p=a*Math.PI/180,f=u+r,g=f*Math.abs(Math.cos(p))+f*Math.abs(Math.sin(p)),m=e+" solid "+r+"px;";return'
'}(n,i,r)),(0,s.isString)(t))o.innerHTML=t+a;else if(t){o.innerHTML="",(0,s.isArray)(t)||(t=[t]);for(var l=0;l=0;o--){var a=t[o];a&&(a instanceof z.Z&&(a=a.get("tooltip",!0)),(0,s.isString)(a)&&(a={formatter:a}),a&&(i=new z.Z(a,i,r)))}return i}function K(t,e){return t.dispatchAction||(0,s.bind)(e.dispatchAction,e)}function J(t){return"center"===t||"middle"===t}const Q=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return(0,o.ZT)(e,t),e.prototype.init=function(t,e){if(!l.default.node&&e.getDom()){var n=t.getComponent("tooltip"),i=this._renderMode=(0,V.U9)(n.get("renderMode"));this._tooltipContent="richText"===i?new O(e):new M(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!l.default.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?(0,X.T9)(this,"_updatePosition",50,"fixRate"):(0,X.ZH)(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");B.z("itemTooltip",this._api,(0,s.bind)((function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!l.default.node&&n.getDom()){var r=K(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=(0,V.zH)(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o,a=(0,V.HZ)(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(e){var n=(0,U.A)(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0})),o)return{componentMainType:r,componentIndex:a.componentIndex,el:o}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=Y;u.x=i.x,u.y=i.y,u.update(),(0,U.A)(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=(0,k.Z)(i,e),c=h.point[0],d=h.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:h.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(K(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===q([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,(0,j.o)(n,(function(t){return null!=(0,U.A)(t).dataIndex?(r=t,!0):null!=(0,U.A)(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=(0,s.bind)(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=q([e.tooltipOption],i),a=this._renderMode,l=[],u=(0,v.TX)("section",{blocks:[],noHeader:!0}),h=[],d=new v.iv;(0,s.each)(t,(function(t){(0,s.each)(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=F.gk(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),p=(0,v.TX)("section",{header:o,noHeader:!(0,s.trim)(o),sortBlocks:!0,blocks:[]});u.blocks.push(p),(0,s.each)(t.seriesDataIndices,(function(u){var f=n.getSeriesByIndex(u.seriesIndex),g=u.dataIndexInside,m=f.getDataParams(g);if(!(m.dataIndex<0)){m.axisDim=t.axisDim,m.axisIndex=t.axisIndex,m.axisType=t.axisType,m.axisId=t.axisId,m.axisValue=Z.DX(e.axis,{value:r}),m.axisValueLabel=o,m.marker=d.makeTooltipMarker("item",(0,c.Lz)(m.color),a);var v=(0,W.f)(f.formatTooltip(g,!0,null)),y=v.frag;if(y){var _=q([f],i).get("valueFormatter");p.blocks.push(_?(0,s.extend)({valueFormatter:_},y):y)}v.text&&h.push(v.text),l.push(m)}}))}}))})),u.blocks.reverse(),h.reverse();var p=e.position,f=o.get("order"),g=(0,v.BY)(u,d,a,f,n.get("useUTC"),o.get("textStyle"));g&&h.unshift(g);var m="richText"===a?"\n\n":"
",y=h.join(m);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,l)?this._updatePosition(o,p,r[0],r[1],this._tooltipContent,l):this._showTooltipContent(o,y,l,Math.random()+"",r[0],r[1],p,null,d)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=(0,U.A)(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),l=r.dataModel||a,u=r.dataIndex,h=r.dataType,d=l.getData(h),p=this._renderMode,f=t.positionDefault,g=q([d.getItemModel(u),l,a&&(a.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=g.get("trigger");if(null==m||"item"===m){var y=l.getDataParams(u,h),_=new v.iv;y.marker=_.makeTooltipMarker("item",(0,c.Lz)(y.color),p);var x=(0,W.f)(l.formatTooltip(u,!1,h)),b=g.get("order"),w=g.get("valueFormatter"),S=x.frag,T=S?(0,v.BY)(w?(0,s.extend)({valueFormatter:w},S):S,_,p,b,i.get("useUTC"),g.get("textStyle")):x.text,M="item_"+l.name+"_"+u;this._showOrMove(g,(function(){this._showTooltipContent(g,T,y,M,t.offsetX,t.offsetY,t.position,t.target,_)})),n({type:"showTip",dataIndexInside:u,dataIndex:d.getRawIndex(u),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=(0,U.A)(e),r=i.tooltipConfig.option||{};if((0,s.isString)(r)){r={content:r,formatter:r}}var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a),o.push({formatter:r.content});var l=t.positionDefault,u=q(o,this._tooltipModel,l?{position:l}:null),h=u.get("content"),c=Math.random()+"",d=new v.iv;this._showOrMove(u,(function(){var n=(0,s.clone)(u.get("formatterParams")||{});this._showTooltipContent(u,h,n,c,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,l,u){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var d=t.get("formatter");a=a||t.get("position");var p=e,f=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(d)if((0,s.isString)(d)){var g=t.ecModel.get("useUTC"),m=(0,s.isArray)(n)?n[0]:n;p=d,m&&m.axisType&&m.axisType.indexOf("time")>=0&&(p=(0,H.WU)(m.axisValue,p,g)),p=(0,c.kF)(p,n,!0)}else if((0,s.isFunction)(d)){var v=(0,s.bind)((function(e,i){e===this._ticket&&(h.setContent(i,u,t,f,a),this._updatePosition(t,a,r,o,h,n,l))}),this);this._ticket=i,p=d(n,i,v)}else p=d;h.setContent(p,u,t,f,a),h.show(t,f),this._updatePosition(t,a,r,o,h,n,l)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||(0,s.isArray)(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:(0,s.isArray)(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var l=this._api.getWidth(),u=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),c=t.get("align"),p=t.get("verticalAlign"),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),(0,s.isFunction)(e)&&(e=e([n,i],o,r.el,f,{viewSize:[l,u],contentSize:h.slice()})),(0,s.isArray)(e))n=(0,E.GM)(e[0],l),i=(0,E.GM)(e[1],u);else if((0,s.isObject)(e)){var g=e;g.width=h[0],g.height=h[1];var m=(0,R.ME)(g,{width:l,height:u});n=m.x,i=m.y,c=null,p=null}else if((0,s.isString)(e)&&a){var v=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,f,h,t.get("borderWidth"));n=v[0],i=v[1]}else{v=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,l,u,c?null:20,p?null:20);n=v[0],i=v[1]}if(c&&(n-=J(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=J(p)?h[1]/2:"bottom"===p?h[1]:0),d(t)){v=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,l,u);n=v[0],i=v[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&(0,s.each)(n,(function(n,o){var a=n.dataByAxis||[],l=(t[o]||{}).dataByAxis||[];(r=r&&a.length===l.length)&&(0,s.each)(a,(function(t,n){var o=l[n]||{},a=t.seriesDataIndices||[],u=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===u.length)&&(0,s.each)(a,(function(t,e){var n=u[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&(0,s.each)(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!l.default.node&&e.getDom()&&((0,X.ZH)(this,"_updatePosition"),this._tooltipContent.dispose(),B.E("itemTooltip",e))},e.type="tooltip",e}(G.Z);function $(t){(0,r.D)(i.N),t.registerComponentModel(a),t.registerComponentView(Q),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},s.noop),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},s.noop)}},3993:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var i=n(3051),r=n(5685),o=n(8540),a=n(2234);function s(t){var e,n,s,l,u=t.series,h=t.dataIndex,c=t.multipleSeries,d=u.getData(),p=d.mapDimensionsAll("defaultedTooltip"),f=p.length,g=u.getRawValue(h),m=(0,i.isArray)(g),v=(0,r.jT)(u,h);if(f>1||m&&!f){var y=function(t,e,n,a,s){var l=e.getData(),u=(0,i.reduce)(t,(function(t,e,n){var i=l.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),h=[],c=[],d=[];function p(t,e){var n=l.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(u?d.push((0,r.TX)("nameValue",{markerType:"subItem",markerColor:s,name:n.displayName,value:t,valueType:n.type})):(h.push(t),c.push(n.type)))}return a.length?(0,i.each)(a,(function(t){p((0,o.hk)(l,n,t),t)})):(0,i.each)(t,p),{inlineValues:h,inlineValueTypes:c,blocks:d}}(g,u,h,p,v);e=y.inlineValues,n=y.inlineValueTypes,s=y.blocks,l=y.inlineValues[0]}else if(f){var _=d.getDimensionInfo(p[0]);l=e=(0,o.hk)(d,h,p[0]),n=_.type}else l=e=m?g[0]:g;var x=(0,a.yu)(u),b=x&&u.name||"",w=d.getName(h),S=c?b:w;return(0,r.TX)("section",{header:b,noHeader:c||!x,sortParam:l,blocks:[(0,r.TX)("nameValue",{markerType:"item",markerColor:v,name:S,noName:!(0,i.trim)(S),value:e,valueType:n})].concat(s||[])})}},5685:(t,e,n)=>{"use strict";n.d(e,{BY:()=>m,TX:()=>h,d_:()=>x,iv:()=>b,jT:()=>_});var i=n(8988),r=n(3051),o=n(8407),a=n(5669);function s(t,e){var n=t.color||"#6e7079",r=t.fontSize||12,o=t.fontWeight||"400",a=t.color||"#464646",s=t.fontSize||14,l=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+(0,i.F1)(r+"")+"px;color:"+(0,i.F1)(n)+";font-weight:"+(0,i.F1)(o+""),valueStyle:"font-size:"+(0,i.F1)(s+"")+"px;color:"+(0,i.F1)(a)+";font-weight:"+(0,i.F1)(l+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:s,fill:a,fontWeight:l}}}var l=[0,10,20,30],u=["","\n","\n\n","\n\n\n"];function h(t,e){return e.type=t,e}function c(t){return"section"===t.type}function d(t){return c(t)?f:g}function p(t){if(c(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return(0,r.each)(t.blocks,(function(t){var n=p(t);n>=e&&(e=n+ +(i&&(!n||c(t)&&!t.noHeader)))})),e}return 0}function f(t,e,n,a){var h,c=e.noHeader,f=(h=p(e),{html:l[h],richText:u[h]}),g=[],m=e.blocks||[];(0,r.assert)(!m||(0,r.isArray)(m)),m=m||[];var _=t.orderMode;if(e.sortBlocks&&_){m=m.slice();var x={valueAsc:"asc",valueDesc:"desc"};if((0,r.hasOwn)(x,_)){var b=new o.ID(x[_],null);m.sort((function(t,e){return b.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===_&&m.reverse()}(0,r.each)(m,(function(n,i){var o=e.valueFormatter,s=d(n)(o?(0,r.extend)((0,r.extend)({},t),{valueFormatter:o}):t,n,i>0?f.html:0,a);null!=s&&g.push(s)}));var w="richText"===t.renderMode?g.join(f.richText):v(g.join(""),c?n:f.html);if(c)return w;var S=(0,i.uX)(e.header,"ordinal",t.useUTC),T=s(a,t.renderMode).nameStyle;return"richText"===t.renderMode?y(t,S,T)+f.richText+w:v('
'+(0,i.F1)(S)+"
"+w,n)}function g(t,e,n,o){var a=t.renderMode,l=e.noName,u=e.noValue,h=!e.markerType,c=e.name,d=t.useUTC,p=e.valueFormatter||t.valueFormatter||function(t){return t=(0,r.isArray)(t)?t:[t],(0,r.map)(t,(function(t,e){return(0,i.uX)(t,(0,r.isArray)(m)?m[e]:m,d)}))};if(!l||!u){var f=h?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),g=l?"":(0,i.uX)(c,"ordinal",d),m=e.valueType,_=u?[]:p(e.value),x=!h||!l,b=!h&&l,w=s(o,a),S=w.nameStyle,T=w.valueStyle;return"richText"===a?(h?"":f)+(l?"":y(t,g,S))+(u?"":function(t,e,n,i,o){var a=[o],s=i?10:20;return n&&a.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle((0,r.isArray)(e)?e.join(" "):e,a)}(t,_,x,b,T)):v((h?"":f)+(l?"":function(t,e,n){return''+(0,i.F1)(t)+""}(g,!h,S))+(u?"":function(t,e,n,o){var a=n?"10px":"20px",s=e?"float:right;margin-left:"+a:"";return t=(0,r.isArray)(t)?t:[t],''+(0,r.map)(t,(function(t){return(0,i.F1)(t)})).join("  ")+""}(_,x,b,T)),n)}}function m(t,e,n,i,r,o){if(t)return d(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function v(t,e){return'
'+t+'
'}function y(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function _(t,e){var n=t.getData().getItemVisual(e,"style")[t.visualDrawType];return(0,i.Lz)(n)}function x(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var b=function(){function t(){this.richTextStyles={},this._nextStyleNameId=(0,a.jj)()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var o="richText"===n?this._generateStyleName():null,a=(0,i.A0)({color:e,type:t,renderMode:n,markerId:o});return(0,r.isString)(a)?a:(this.richTextStyles[o]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};(0,r.isArray)(e)?(0,r.each)(e,(function(t){return(0,r.extend)(n,t)})):(0,r.extend)(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}()},2950:(t,e,n)=>{"use strict";n.d(e,{Z:()=>_});var i=n(3051),r=n(5669),o=n(423),a=n(2234),s=n(7947),l=(0,a.Yf)();function u(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=c(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=(0,s.J9)(t);return{labels:i.map(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function h(t,e){return"category"===t.type?function(t,e){var n,r,o=d(t,"ticks"),a=(0,s.rk)(e),l=p(o,a);if(l)return l;e.get("show")&&!t.scale.isBlank()||(n=[]);if(i.isFunction(a))n=m(t,a,!0);else if("auto"===a){var u=c(t,t.getLabelModel());r=u.labelCategoryInterval,n=i.map(u.labels,(function(t){return t.tickValue}))}else n=g(t,r=a,!0);return f(o,a,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:i.map(t.scale.getTicks(),(function(t){return t.value}))}}function c(t,e){var n,r,o=d(t,"labels"),a=(0,s.rk)(e),u=p(o,a);return u||(i.isFunction(a)?n=m(t,a):(r="auto"===a?function(t){var e=l(t).autoInterval;return null!=e?e:l(t).autoInterval=t.calculateCategoryInterval()}(t):a,n=g(t,r)),f(o,a,{labels:n,labelCategoryInterval:r}))}function d(t,e){return l(t)[e]||(l(t)[e]=[])}function p(t,e){for(var n=0;n1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=(0,s.WY)(t),p=a.get("showMinLabel")||d,f=a.get("showMaxLabel")||d;p&&h!==o[0]&&m(o[0]);for(var g=h;g<=o[1];g+=u)m(g);function m(t){var e={value:t};l.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&g-u!==o[1]&&m(o[1]),l}function m(t,e,n){var r=t.scale,o=(0,s.J9)(t),a=[];return i.each(r.getTicks(),(function(t){var i=r.getLabel(t),s=t.value;e(t.value,i)&&a.push(n?s:{formattedLabel:o(t),rawLabel:i,tickValue:s})})),a}var v=[0,1];function y(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}const _=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return(0,r.M9)(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count()),(0,r.NU)(t,v,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&y(n=n.slice(),i.count());var o=(0,r.NU)(t,n,v,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=h(this,e).ticks,o=(0,i.map)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,o){var a=e.length;if(!t.onBand||n||!a)return;var s,l,u=t.getExtent();if(1===a)e[0].coord=u[0],s=e[1]={coord:u[0]};else{var h=e[a-1].tickValue-e[0].tickValue,c=(e[a-1].coord-e[0].coord)/h;(0,i.each)(e,(function(t){t.coord-=c/2})),l=1+t.scale.getExtent()[1]-e[a-1].tickValue,s={coord:e[a-1].coord+c*l},e.push(s)}var d=u[0]>u[1];p(e[0].coord,u[0])&&(o?e[0].coord=u[0]:e.shift());o&&p(u[0],e[0].coord)&&e.unshift({coord:u[0]});p(u[1],s.coord)&&(o?s.coord=u[1]:e.pop());o&&p(s.coord,u[1])&&e.push({coord:u[1]});function p(t,e){return t=(0,r.NM)(t),e=(0,r.NM)(e),d?t>e:t0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return(0,i.map)(e,(function(t){return(0,i.map)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return u(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=(0,s.J9)(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),u=r.count();if(a[1]-a[0]<1)return 0;var h=1;u>40&&(h=Math.max(1,Math.floor(u/40)));for(var c=a[0],d=t.dataToCoord(c+1)-t.dataToCoord(c),p=Math.abs(d*Math.cos(i)),f=Math.abs(d*Math.sin(i)),g=0,m=0;c<=a[1];c+=h){var v,y,_=o.lP(n({value:c}),e.font,"center","top");v=1.3*_.width,y=1.3*_.height,g=Math.max(g,v,7),m=Math.max(m,y,7)}var x=g/p,b=m/f;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=l(t.model),T=t.getExtent(),M=S.lastAutoInterval,C=S.lastTickCount;return null!=M&&null!=C&&Math.abs(M-w)<=1&&Math.abs(C-u)<=1&&M>w&&S.axisExtent0===T[0]&&S.axisExtent1===T[1]?w=M:(S.lastTickCount=u,S.lastAutoInterval=w,S.axisExtent0=T[0],S.axisExtent1=T[1]),w}(this)},t}()},3845:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(5280),o=n(2892),a=n(479),s=n(7411),l=n(5669),u=r.applyTransform;function h(t){var e=t.seriesModel;return e?e.coordinateSystem:null}const c=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new s.ZP,n._rawTransformable=new s.ZP,n.name=e,n}return(0,i.ZT)(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new a.Z(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new a.Z(t,e,n,i)},e.prototype._transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new a.Z(t,e,n,i));var s=o.parent;o.parent=null,o.decomposeTransform(),o.parent=s,this._updateTransform()},e.prototype.setCenter=function(t,e){t&&(this._center=[(0,l.GM)(t[0],e.getWidth()),(0,l.GM)(t[1],e.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom();i=r.applyTransform([],i,t),n=r.applyTransform([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),o.copy(this.transform||(this.transform=[]),e.transform||o.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],o.invert(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new s.ZP;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?u(n,t,i):r.copy(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?u([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=h(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=h(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(s.ZP)},7947:(t,e,n)=>{"use strict";n.d(e,{aG:()=>I,Do:()=>O,DX:()=>P,PY:()=>k,rk:()=>E,Xv:()=>C,Yb:()=>D,J9:()=>L,Jk:()=>A,WY:()=>N,AH:()=>R});var i=n(3051),r=n(5043),o=n(103),a=n(379),s=n(9093),l=n(479),u=n(1618),h=n(655),c=n(5669),d=n(5021),p=a.Z.prototype,f=o.Z.prototype,g=c.NM,m=Math.floor,v=Math.ceil,y=Math.pow,_=Math.log,x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new o.Z,e._interval=0,e}return(0,h.ZT)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=f.getTicks.call(this,t);return i.map(o,(function(t){var e=t.value,i=c.NM(y(this.base,e));return i=e===n[0]&&this._fixMin?w(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?w(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=_(t)/_(n),e=_(e)/_(n),f.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=p.getExtent.call(this);e[0]=y(t,e[0]),e[1]=y(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=w(e[0],n[0])),this._fixMax&&(e[1]=w(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=_(t[0])/_(e),t[1]=_(t[1])/_(e),p.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=c.Xd(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[c.NM(v(e[0]/i)*i),c.NM(m(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){f.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=_(t)/_(this.base),d.XS(t,this._extent)},e.prototype.normalize=function(t){return t=_(t)/_(this.base),d.Fv(t,this._extent)},e.prototype.scale=function(t){return t=d.bA(t,this._extent),y(this.base,t)},e.type="log",e}(a.Z),b=x.prototype;function w(t,e){return g(t,c.p8(e))}b.getMinorTicks=f.getMinorTicks,b.getLabel=f.getLabel,a.Z.registerClass(x);const S=x;var T=n(9936),M=n(8986);function C(t,e){var n=t.type,r=(0,M.Qw)(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,a=r.max,l=e.ecModel;if(l&&"time"===n){var u=(0,s.Ge)("bar",l),h=!1;if(i.each(u,(function(t){h=h||t.getBaseAxis()===e.axis})),h){var c=(0,s.My)(u),d=function(t,e,n,r){var o=n.axis.getExtent(),a=o[1]-o[0],l=(0,s.G_)(r,n.axis);if(void 0===l)return{min:t,max:e};var u=1/0;i.each(l,(function(t){u=Math.min(t.offset,u)}));var h=-1/0;i.each(l,(function(t){h=Math.max(t.offset+t.width,h)})),u=Math.abs(u),h=Math.abs(h);var c=u+h,d=e-t,p=d/(1-(u+h)/a)-d;return{min:t-=p*(u/c),max:e+=p*(h/c)}}(o,a,e,c);o=d.min,a=d.max}}return{extent:[o,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function A(t,e){var n=e,i=C(t,n),r=i.extent,o=n.get("splitNumber");t instanceof S&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function I(t,e){if(e=e||t.get("type"))switch(e){case"category":return new r.Z({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new u.Z({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(a.Z.getClass(e)||o.Z)}}function D(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function L(t){var e,n,r=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):i.isString(r)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(r):i.isFunction(r)?(e=r,function(n,i){return null!=o&&(i=n.value-o),e(P(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function P(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function O(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,a=n.getExtent();o=n instanceof r.Z?n.count():(i=n.getTicks()).length;var s,u,h,c,d,p,f,g,m=t.getLabelModel(),v=L(t),y=1;o>40&&(y=Math.ceil(o/40));for(var _=0;_t[1]&&(t[1]=i[1])}))}},6650:(t,e,n)=>{"use strict";n.d(e,{W:()=>i});var i=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}()},9069:(t,e,n)=>{"use strict";n.d(e,{Mk:()=>s,Yh:()=>a,bK:()=>o});var i=n(3051),r=n(2234);function o(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,a={},s=o.getAxesOnZeroOf()[0],l=o.position,u=s?"onZero":l,h=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,g="x"===h?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];if(s){var m=s.toGlobalCoord(s.dataToCoord(0));g[p.onZero]=Math.max(Math.min(m,g[1]),g[0])}a.position=["y"===h?g[p[u]]:d[0],"x"===h?g[p[u]]:d[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],a.labelOffset=s?g[p[l]]-g[p.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),i.retrieve(n.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate="top"===u?-v:v,a.z2=1,a}function a(t){return"cartesian2d"===t.get("coordinateSystem")}function s(t){var e={xAxisModel:null,yAxisModel:null};return i.each(e,(function(n,i){var o=i.replace(/Model$/,""),a=t.getReferringComponents(o,r.C6).models[0];e[i]=a})),e}},4215:(t,e,n)=>{"use strict";n.d(e,{Im:()=>m,Ni:()=>g,Qh:()=>p,jM:()=>f});var i=n(655),r=n(479),o=n(5280),a=n(765),s=n(2892),l=n(3051),u=[];function h(t,e){for(var n=0;nn&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s{"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(4215);function o(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function s(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var r=e.features;return i.each(r,(function(t){var e=t.geometry,r=e.encodeOffsets,s=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=a(s,r,n);break;case"Polygon":case"MultiLineString":o(s,r,n);break;case"MultiPolygon":i.each(s,(function(t,e){return o(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t),i.map(i.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,o=t.geometry,a=[];switch(o.type){case"Polygon":var s=o.coordinates;a.push(new r.Qh(s[0],s.slice(1)));break;case"MultiPolygon":i.each(o.coordinates,(function(t){t[0]&&a.push(new r.Qh(t[0],t.slice(1)))}));break;case"LineString":a.push(new r.jM([o.coordinates]));break;case"MultiLineString":a.push(new r.jM(o.coordinates))}var l=new r.Ni(n[e||"name"],a,n.cp);return l.properties=n,l}))}},8986:(t,e,n)=>{"use strict";n.d(e,{Qw:()=>l});var i=n(3051),r=n(423),o=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var d=this._determinedMin,p=this._determinedMax;return null!=d&&(s=d,u=!0),null!=p&&(l=p,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[s[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[a[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),a={min:"_determinedMin",max:"_determinedMax"},s={min:"_dataMin",max:"_dataMax"};function l(t,e,n){var i=t.rawExtentInfo;return i||(i=new o(t,e,n),t.rawExtentInfo=i,i)}function u(t,e){return null==e?null:(0,i.eqNaN)(e)?NaN:t.parse(e)}},4267:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(3051),r={};const o=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(t,e){var n=[];i.each(r,(function(i,r){var o=i.create(t,e);n=n.concat(o||[])})),this._coordinateSystems=n},t.prototype.update=function(t,e){i.each(this._coordinateSystems,(function(n){n.update&&n.update(t,e)}))},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(t,e){r[t]=e},t.get=function(t){return r[t]},t}()},1615:(t,e,n)=>{"use strict";n.d(e,{Hr:()=>xe,$j:()=>hn,Ok:()=>Nn,HO:()=>ve,eU:()=>cn,zP:()=>dn,B9:()=>pn,wL:()=>Tn,JE:()=>fn,rp:()=>gn,FU:()=>On,S1:()=>un,zl:()=>wn,RS:()=>Sn,qR:()=>Mn,yn:()=>Dn,I2:()=>ue.I2,je:()=>Pn,sq:()=>_n,Br:()=>xn,ds:()=>vn,Pu:()=>yn,aW:()=>mn,OB:()=>En,YK:()=>bn,Og:()=>Cn,jQ:()=>Ln,i8:()=>me});var i=n(655),r=n(9448),o=n(3051),a=n(6387),s=n(9455),l=n(3510),u=n(2234),h=n(1497),c=n(8071),d="";"undefined"!=typeof navigator&&(d=navigator.platform||"");var p="rgba(0, 0, 0, 0.2)";const f={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:p,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:p,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:p,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:p,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:p,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:p,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:d.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 g,m,v,y=n(1772),_=n(2468),x=n(5494);var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new h.Z(i),this._locale=new h.Z(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=T(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,T(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):v(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,e))}if(!t||"recreate"===t||"media"===t){var s=i.getMediaOption(this);s.length&&(0,o.each)(s,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,a=[],s=(0,o.createHashMap)(),l=e&&e.replaceMergeMainTypeMap;(0,y.md)(this),(0,o.each)(t,(function(t,e){null!=t&&(c.Z.hasClass(e)?e&&(a.push(e),s.set(e,!0)):n[e]=null==n[e]?(0,o.clone)(t):(0,o.merge)(n[e],t,!0))})),l&&l.each((function(t,e){c.Z.hasClass(e)&&!s.get(e)&&(a.push(e),s.set(e,!0))})),c.Z.topologicalTravel(a,c.Z.getAllClassMainTypes(),(function(e){var a=(0,_.R)(this,e,u.kF(t[e])),s=i.get(e),h=s?l&&l.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=u.ab(s,a,h);u.O0(d,e,c.Z),n[e]=null,i.set(e,null),r.set(e,0);var p,f=[],m=[],v=0;(0,o.each)(d,(function(t,n){var i=t.existing,r=t.newOption;if(r){var a="series"===e,s=c.Z.getClass(e,t.keyInfo.subType,!a);if(!s)return;if("tooltip"===e){if(p)return void 0;p=!0}if(i&&i.constructor===s)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var l=(0,o.extend)({componentIndex:n},t.keyInfo);i=new s(r,this,this,l),(0,o.extend)(i,l),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(f.push(i.option),m.push(i),v++):(f.push(void 0),m.push(void 0))}),this),n[e]=f,i.set(e,m),r.set(e,v),"series"===e&&g(this)}),this),this._seriesIndices||g(this)},e.prototype.getOption=function(){var t=(0,o.clone)(this.option);return(0,o.each)(t,(function(e,n){if(c.Z.hasClass(n)){for(var i=u.kF(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!u.lY(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}const O=L;var E=o.each,N=o.isObject,k=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function R(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=k.length;n=0;g--){var m=t[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,c)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=(0,$.S$)(p,v),f=v;break}}}return i[0]=p,i[1]=f,i}))}))}var et=n(3321),nt=n(3166),it=n(5797),rt=n(5151),ot=n(4535),at=n(9266),st=n(327),lt=n(106),ut=n(6357),ht=n(270),ct=n(9066),dt=n(9887),pt=n(7515),ft=(0,u.Yf)(),gt={itemStyle:(0,ct.Z)(dt.t,!0),lineStyle:(0,ct.Z)(pt.v,!0)},mt={lineStyle:"stroke",itemStyle:"fill"};function vt(t,e){var n=t.visualStyleMapper||gt[e];return n||(console.warn("Unkown style type '"+e+"'."),gt.itemStyle)}function yt(t,e){var n=t.visualDrawType||mt[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var _t={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),a=vt(t,i)(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=yt(t,i),u=a[l],h=(0,o.isFunction)(u)?u:null,c="auto"===a.fill||"auto"===a.stroke;if(!a[l]||h||c){var d=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=d,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||(0,o.isFunction)(a.fill)?d:a.fill,a.stroke="auto"===a.stroke||(0,o.isFunction)(a.stroke)?d:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=(0,o.extend)({},a);r[l]=h(i),e.setItemVisual(n,"style",r)}}}},xt=new h.Z,bt={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=vt(t,i),a=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){xt.option=n[i];var s=r(xt),l=t.ensureUniqueItemVisual(e,"style");(0,o.extend)(l,s),xt.option.decal&&(t.setItemVisual(e,"decal",xt.option.decal),xt.option.decal.dirty=!0),a in s&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},wt={performRawSeries:!0,overallReset:function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),ft(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=ft(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=yt(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},St=n(8154),Tt=n(6498),Mt=n(4826),Ct=Math.PI;var At=n(8674),It=n(2151),Dt=function(){function t(t,e,n,i){this._stageTaskMap=(0,o.createHashMap)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=(0,o.createHashMap)();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;(0,o.each)(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{});(0,o.assert)(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,a=this;function s(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}(0,o.each)(t,(function(t,o){if(!i.visualType||i.visualType===t.visualType){var l=a._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each((function(t){s(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),a.updatePayload(h,n);var p=a.getPerformArgs(h,i.block);d.each((function(t){t.perform(p)})),h.perform(p)&&(r=!0)}else u&&u.each((function(o,l){s(i,o)&&o.dirty();var u=a.getPerformArgs(o,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(o.context.model),a.updatePayload(o,n),o.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.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)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,a=e.seriesTaskMap,s=e.seriesTaskMap=(0,o.createHashMap)(),l=t.seriesType,u=t.getTargetSeries;function h(e){var o=e.uid,l=s.set(o,a&&a.get(o)||(0,At.v)({plan:Nt,reset:kt,count:Bt}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,a=e.overallTask=e.overallTask||(0,At.v)({reset:Lt});a.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var s=a.agentStubMap,l=a.agentStubMap=(0,o.createHashMap)(),u=t.seriesType,h=t.getTargetSeries,c=!0,d=!1;function p(t){var e=t.uid,n=l.set(e,s&&s.get(e)||(d=!0,(0,At.v)({reset:Pt,onDirty:Et})));n.context={model:t,overallProgress:c},n.agent=a,n.__block=c,r._pipe(t,n)}(0,o.assert)(!t.createOnAllSeries,""),u?n.eachRawSeriesByType(u,p):h?h(n,i).each(p):(c=!1,(0,o.each)(n.getSeries(),p)),d&&a.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return(0,o.isFunction)(t)&&(t={overallReset:t,seriesType:Zt(t)}),t.uid=(0,It.Kr)("stageHandler"),e&&(t.visualType=e),t},t}();function Lt(t){t.overallReset(t.ecModel,t.api,t.payload)}function Pt(t){return t.overallProgress&&Ot}function Ot(){this.agent.dirty(),this.getDownstream().dirty()}function Et(){this.agent&&this.agent.dirty()}function Nt(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function kt(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=(0,u.kF)(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?(0,o.map)(e,(function(t,e){return zt(e)})):Rt}var Rt=zt(0);function zt(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,o=!0)}}s.hasOwnProperty(r)&&(n[r]=t,o=!0),o||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),ee=["symbol","symbolSize","symbolRotate","symbolOffset"],ne=ee.concat(["symbolKeepAspect"]),ie={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},a=!1,s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{var i,r,a;if((0,o.isObject)(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,a=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var s=new O(this._api),l=this._theme,u=this._model=new M;u.scheduler=this._scheduler,u.ssr=this._ssr,u.init(null,null,null,l,this._locale,s)}this._model.setOption(t,{replaceMerge:r},$e);var h={seriesTransition:a,optionChanged:!0};if(n)this.__pendingUpdate={silent:i,updateParams:h},this.__flagInMainProcess=!1,this.getZr().wakeUp();else{try{Ce(this),De.update.call(this,null,h)}catch(t){throw this.__pendingUpdate=null,this.__flagInMainProcess=!1,t}this._ssr||this._zr.flush(),this.__pendingUpdate=null,this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.setTheme=function(){(0,ae.Sh)("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ge&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(a.default.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return(0,o.each)(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;(0,o.each)(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return(0,o.each)(i,(function(t){t.group.ignore=!1})),a}qe(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,a=Math.max,s=1/0;if(on[n]){var l=s,u=s,h=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();(0,o.each)(rn,(function(r,s){if(r.group===n){var p=e?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas((0,o.clone)(t)),f=r.getDom().getBoundingClientRect();l=i(f.left,l),u=i(f.top,u),h=a(f.right,h),c=a(f.bottom,c),d.push({dom:p,left:f.left,top:f.top})}}));var f=(h*=p)-(l*=p),g=(c*=p)-(u*=p),m=pe.qW.createCanvas(),v=r.init(m,{renderer:e?"svg":"canvas"});if(v.resize({width:f,height:g}),e){var y="";return(0,o.each)(d,(function(t){var e=t.left-l,n=t.top-u;y+=''+t.dom+""})),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new rt.Z({shape:{x:0,y:0,width:f,height:g},style:{fill:t.connectedBackgroundColor}})),(0,o.each)(d,(function(t){var e=new ot.ZP({style:{x:t.left*p-l,y:t.top*p-u,image:t.dom}});v.add(e)})),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}qe(this.id)},e.prototype.convertToPixel=function(t,e){return Le(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Le(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,i=this._model,r=u.pm(i,t);return(0,o.each)(r,(function(t,i){i.indexOf("Models")>=0&&(0,o.each)(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}qe(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,i=u.pm(n,t,{defaultMainType:"series"});var r=i.seriesModel.getData(),o=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=o?(0,oe.Or)(r,o,e):(0,oe.UL)(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;(0,o.each)(Ye,(function(e){var n=function(n){var i,r=t.getModel(),a=n.target;if("globalout"===e?i={}:a&&(0,he.o)(a,(function(t){var e=(0,lt.A)(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=(0,o.extend)({},e.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=e,t._$eventProcessor.eventInfo={targetEl:a,packedEvent:i,model:u,view:h},t.trigger(e,i)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),(0,o.each)(Je,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),(0,o.each)(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),(0,se.s)(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?qe(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)qe(this.id);else{this._disposed=!0,this.getDom()&&u.P$(this.getDom(),ln,"");var t=this,e=t._api,n=t._model;(0,o.each)(t._componentsViews,(function(t){t.dispose(n,e)})),(0,o.each)(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete rn[t.id]}},e.prototype.resize=function(t){if(!this.__flagInMainProcess)if(this._disposed)qe(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__pendingUpdate&&(null==i&&(i=this.__pendingUpdate.silent),n=!0,this.__pendingUpdate=null),this.__flagInMainProcess=!0;try{n&&Ce(this),De.update.call(this,{type:"resize",animation:(0,o.extend)({duration:0},t&&t.animation)})}catch(t){throw this.__flagInMainProcess=!1,t}this.__flagInMainProcess=!1,Ee.call(this,i),Ne.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nn[t]){var n=nn[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?qe(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=(0,o.extend)({},t);return e.type=Je[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)qe(this.id);else if((0,o.isObject)(e)||(e={silent:!!e}),Ke[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;Oe.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.default.browser.weChat&&this._throttledZrFlush(),Ee.call(this,n),Ne.call(this,n)}},e.prototype.updateLabelLayout=function(){de.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)qe(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(at.eq(t))return;if(t instanceof st.ZP&&(0,ut.e9)(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ce=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ae(t,!0),Ae(t,!1),e.plan()},Ae=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.default.node&&!a.default.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),de.trigger("series:afterupdate",e,i,s)},Ge=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},He=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){at.eq(t)||e(t)})),t.__needsUpdateStatus=!1)},Fe=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.ZT)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){(0,ut.fD)(e,n),Ge(t)},n.prototype.leaveEmphasis=function(e,n){(0,ut.Mh)(e,n),Ge(t)},n.prototype.enterBlur=function(e){(0,ut.SX)(e),Ge(t)},n.prototype.leaveBlur=function(e){(0,ut.VP)(e),Ge(t)},n.prototype.enterSelect=function(e){(0,ut.XX)(e),Ge(t)},n.prototype.leaveSelect=function(e){(0,ut.SJ)(e),Ge(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(A))(t)},Ve=function(t){function e(t,e){for(var n=0;n=0)){An.push(n);var a=Ut.wrapStageHandler(n,r);a.__prio=e,a.__raw=n,t.push(a)}}function Dn(t,e){nn[t]=e}function Ln(t){(0,pe.g2)({createCanvas:t})}function Pn(t,e,n){var i=(0,fe.C)("registerMap");i&&i(t,e,n)}function On(t){var e=(0,fe.C)("getMap");return e&&e(t)}var En=le.DA;Cn(ye,_t),Cn(_e,bt),Cn(_e,wt),Cn(ye,ie),Cn(_e,re),Cn(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=(0,ce.I)(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=(0,ce.I)(r,e)}}))})),vn(Q),yn(900,(function(t){var e=(0,o.createHashMap)();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(tt)})),Dn("default",(function(t,e){e=e||{},o.defaults(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new St.Z,i=new rt.Z({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,a=new Tt.ZP({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),s=new rt.Z({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(s),e.showSpinner&&((r=new Mt.Z({shape:{startAngle:-Ct/2,endAngle:-Ct/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Ct/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Ct/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=a.getBoundingRect().width,o=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*o-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:o),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),s.setShape({x:l-o,y:u-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),wn({type:ut.Ki,event:ut.Ki,update:ut.Ki},o.noop),wn({type:ut.yx,event:ut.yx,update:ut.yx},o.noop),wn({type:ut.Hg,event:ut.Hg,update:ut.Hg},o.noop),wn({type:ut.JQ,event:ut.JQ,update:ut.JQ},o.noop),wn({type:ut.iK,event:ut.iK,update:ut.iK},o.noop),mn("light",jt),mn("dark",Qt);var Nn={}},9428:(t,e,n)=>{"use strict";n.d(e,{C:()=>o,M:()=>r});var i={};function r(t,e){i[t]=e}function o(t){return i[t]}},3917:(t,e,n)=>{"use strict";n.d(e,{sO:()=>c,D0:()=>p,Li:()=>g,G8:()=>f,I2:()=>d});var i=n(1497),r=n(6387);var o=n(3051),a="ZH",s="EN",l=s,u={},h={},c=r.default.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(a)>-1?a:l;function d(t,e){t=t.toUpperCase(),h[t]=new i.Z(e),u[t]=e}function p(t){if((0,o.isString)(t)){var e=u[t.toUpperCase()]||{};return t===a||t===s?(0,o.clone)(e):(0,o.merge)((0,o.clone)(e),(0,o.clone)(u.EN),!1)}return(0,o.merge)((0,o.clone)(t),(0,o.clone)(u.EN),!1)}function f(t){return h[t]}function g(){return h.EN}d(s,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),d(a,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}})},8674:(t,e,n)=>{"use strict";n.d(e,{v:()=>r});var i=n(3051);function r(t){return new o(t)}var o=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=c(this._modBy),l=this._modDataCount||0,u=c(t&&t.modBy),h=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}s===u&&l===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=h;var d=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(a||p1&&i>0?s:a}};return o;function a(){return e=t?null:o{"use strict";function i(t){return null==t?0:t.length||1}function r(t){return t}n.d(e,{Z:()=>o});const o=function(){function t(t,e,n,i,o,a){this._old=t,this._new=e,this._oldKeyGetter=n||r,this._newKeyGetter=i||r,this.context=o,this._diffModeMultiple="multiple"===a}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var a=0;a1){var h=l.shift();1===l.length&&(n[s]=l[0]),this._update&&this._update(h,a)}else 1===u?(n[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],a=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s1&&1===d)this._updateManyToOne&&this._updateManyToOne(h,u),r[l]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(h,u),r[l]=null;else if(1===c&&1===d)this._update&&this._update(h,u),r[l]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(h,u),r[l]=null;else if(c>1)for(var p=0;p1)for(var s=0;s{"use strict";n.d(e,{ZP:()=>g,hG:()=>h});var i,r=n(3051),o=n(8407),a=n(9574),s="undefined",l=typeof Uint32Array===s?Array:Uint32Array,u=typeof Uint16Array===s?Array:Uint16Array,h=typeof Int32Array===s?Array:Int32Array,c=typeof Float64Array===s?Array:Float64Array,d={float:c,int:h,ordinal:Array,number:Array,time:c};function p(t){return t>65535?l:u}function f(t,e,n,i,r){var o=d[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;uv[1]&&(v[1]=m)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=(0,r.map)(a,(function(t){return t.property})),h=0;hy[1]&&(y[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=h&&b<=c||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){m=d[i[0]];var y=d[i[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=h&&b<=c||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=h&&b<=c||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[C][1])&&(T=!1)}T&&(s[l++]=e.getRawIndex(v))}return lm[1]&&(m[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(p(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var d=1;dn&&(n=i,r=C)}M>0&&Mu-f&&(s=u-f,a.length=s);for(var g=0;gh[1]&&(h[1]=v),c[d++]=y}return r._count=d,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return(0,o.yQ)(t[i],this._dimensions[i])}i={arrayRows:t,objectRows:function(t,e,n,i){return(0,o.yQ)(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return(0,o.yQ)(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}()},1401:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(3051),r=0;function o(t){return(0,i.isObject)(t)&&null!=t.value?t.value:t+""}const a=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++r}return t.createByAxisModel=function(e){var n=e.option,r=n.data,a=r&&(0,i.map)(r,o);return new t({categories:a,needCollect:!a,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!(0,i.isString)(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,i.createHashMap)(this.categories))},t}()},5101:(t,e,n)=>{"use strict";n.d(e,{Z:()=>A});var i,r,o,a,s,l,u,h=n(3051),c=n(1497),d=n(4130),p=n(8540),f=n(381),g=n(5440),m=n(4279),v=n(2234),y=n(106),_=n(9574),x=n(3834),b=n(1029),w=h.isObject,S=h.map,T="undefined"==typeof Int32Array?Array:Int32Array,M=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],C=["_approximateExtent"];const A=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;(0,b.bB)(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===m.cy&&!n.pure)for(var a=[],s=t;s0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(r=this.getVisual(e),h.isArray(r)?r=r.slice():w(r)&&(r=h.extend({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,w(e)?h.extend(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){w(t)?h.extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?h.extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;(0,y.Q)(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){h.each(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:S(this.dimensions,this._getDimInfo,this),this.hostModel)),s(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];h.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(h.slice(arguments)))})},t.internalField=(i=function(t){var e=t._invertedIndicesMap;h.each(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new T(o.categories.length);for(var s=0;s1&&(l+="__ec__"+h),i[e]=l}})),t}()},5440:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);const r=function(t){this.otherDims={},null!=t&&i.extend(this,t)}},9574:(t,e,n)=>{"use strict";n.d(e,{Kp:()=>d,Ld:()=>l,ML:()=>c,QY:()=>g,_P:()=>u,nx:()=>h});var i=n(3051),r=n(4279),o=n(2234),a=n(1772),s=function(t){this.data=t.data||(t.sourceFormat===r.hL?{}:[]),this.sourceFormat=t.sourceFormat||r.RA,this.seriesLayoutBy=t.seriesLayoutBy||r.fY,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n{"use strict";n.d(e,{Eo:()=>l,Jj:()=>c,Jl:()=>d,bB:()=>u,v5:()=>h});var i=n(3051),r=n(2234),o=n(9574),a=(0,r.Yf)(),s={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},l=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=c(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return(0,i.retrieve2)(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=(0,o.QY)(this.source),n=!d(t),i="",r=[],a=0,l=0;a30}},5623:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d,q:()=>c});var i=n(4279),r=n(5440),o=n(3051),a=n(9574),s=n(3834),l=n(2234),u=n(1772),h=n(1029);function c(t,e){return d(t,e).dimensions}function d(t,e){(0,a.Ld)(t)||(t=(0,a.nx)(t));var n=(e=e||{}).coordDimensions||[],c=e.dimensionsDefine||t.dimensionsDefine||[],d=(0,o.createHashMap)(),f=[],g=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return(0,o.each)(e,(function(t){var e;(0,o.isObject)(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,c,e.dimensionsCount),m=e.canOmitUnusedDimensions&&(0,h.Jl)(g),v=c===t.dimensionsDefine,y=v?(0,h.Jj)(t):(0,h.v5)(c),_=e.encodeDefine;!_&&e.encodeDefaulter&&(_=e.encodeDefaulter(t,g));for(var x=(0,o.createHashMap)(_),b=new s.hG(g),w=0;w0&&(i.name=r+(a-1)),a++,e.set(r,a)}}(f),new h.Eo({source:t,dimensions:f,fullDimensionCount:g,dimensionOmitted:m})}function p(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var r=0;i.hasOwnProperty(t+r);)r++;t+=r}return e.set(t,!0),t}},8540:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>d,_j:()=>g,a:()=>y,hk:()=>S,tB:()=>b});var i,r,o,a,s,l=n(3051),u=n(2234),h=n(9574),c=n(4279),d=function(){function t(t,e){var n=(0,h.Ld)(t)?t:(0,h.nx)(t);this._source=n;var i=this._data=n.data;n.sourceFormat===c.J5&&(this._offset=0,this._dimSize=e,this._data=i),s(this,i,n)}var e;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(t,e){},t.prototype.appendData=function(t){},t.prototype.clean=function(){},t.protoInitialize=((e=t.prototype).pure=!1,void(e.persistent=!0)),t.internalField=function(){var t;s=function(t,r,o){var s=o.sourceFormat,u=o.seriesLayoutBy,h=o.startIndex,d=o.dimensionsDefine,p=a[w(s,u)];if((0,l.extend)(t,p),s===c.J5)t.getItem=e,t.count=i,t.fillStorage=n;else{var f=g(s,u);t.getItem=(0,l.bind)(f,null,r,h,d);var m=y(s,u);t.count=(0,l.bind)(m,null,r,h,d)}};var e=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;ou&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e{"use strict";n.d(e,{BM:()=>o,IR:()=>s,M:()=>a});var i=n(3051),r=n(1029);function o(t,e,n){var o,a,s,l=(n=n||{}).byIndex,u=n.stackedCoordDimension;!function(t){return!(0,r.bB)(t.schema)}(e)?(a=e.schema,o=a.dimensions,s=e.store):o=e;var h,c,d,p,f=!(!t||!t.get("stack"));if((0,i.each)(o,(function(t,e){(0,i.isString)(t)&&(o[e]=t={name:t}),f&&!t.isExtraCoord&&(l||h||!t.ordinalMeta||(h=t),c||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(c=t))})),!c||l||h||(l=!0),c){d="__\0ecstackresult_"+t.id,p="__\0ecstackedover_"+t.id,h&&(h.createInvertedIndices=!0);var g=c.coordDim,m=c.type,v=0;(0,i.each)(o,(function(t){t.coordDim===g&&v++}));var y={name:d,coordDim:g,coordDimIndex:v,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},_={name:p,coordDim:p,coordDimIndex:v+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};a?(s&&(y.storeDimIndex=s.ensureCalculationDimension(p,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),a.appendCalculationDimension(y),a.appendCalculationDimension(_)):(o.push(y),o.push(_))}return{stackedDimension:c&&c.name,stackedByDimension:h&&h.name,isStackedByIndex:l,stackedOverDimension:p,stackResultDimension:d}}function a(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function s(t,e){return a(t,e)?t.getCalculationInfo("stackResultDimension"):e}},8407:(t,e,n)=>{"use strict";n.d(e,{ID:()=>c,o2:()=>l,tR:()=>p,yQ:()=>a});var i=n(5669),r=n(3051),o=n(175);function a(t,e){var n=e&&e.type;return"ordinal"===n?t:("time"!==n||(0,r.isNumber)(t)||null==t||"-"===t||(t=+(0,i.sG)(t)),null==t||""===t?NaN:+t)}var s=(0,r.createHashMap)({number:function(t){return parseFloat(t)},time:function(t){return+(0,i.sG)(t)},trim:function(t){return(0,r.isString)(t)?(0,r.trim)(t):t}});function l(t){return s.get(t)}var u={lt:function(t,e){return te},gte:function(t,e){return t>=e}},h=function(){function t(t,e){if(!(0,r.isNumber)(e)){0,(0,o._y)("")}this._opFn=u[t],this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){return(0,r.isNumber)(t)?this._opFn(t,this._rvalFloat):this._opFn((0,i.FK)(t),this._rvalFloat)},t}(),c=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=(0,r.isNumber)(t)?t:(0,i.FK)(t),o=(0,r.isNumber)(e)?e:(0,i.FK)(e),a=isNaN(n),s=isNaN(o);if(a&&(n=this._incomparable),s&&(o=this._incomparable),a&&s){var l=(0,r.isString)(t),u=(0,r.isString)(e);l&&(n=u?t:0),u&&(o=l?e:0)}return no?-this._resultLT:0},t}(),d=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=(0,i.FK)(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=(0,i.FK)(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function p(t,e){return"eq"===t||"ne"===t?new d("eq"===t,e):(0,r.hasOwn)(u,t)?new h(t,e):null}},381:(t,e,n)=>{"use strict";n.d(e,{T:()=>l,y:()=>a});var i=n(3051),r=n(4279),o=function(){function t(t,e){this._encode=t,this._schema=e}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function a(t,e){var n={},a=n.encode={},l=(0,i.createHashMap)(),u=[],h=[],c={};(0,i.each)(t.dimensions,(function(e){var n,i=t.getDimensionInfo(e),o=i.coordDim;if(o){0;var d=i.coordDimIndex;s(a,o)[d]=e,i.isExtraCoord||(l.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(u[0]=e),s(c,o)[d]=t.getDimensionIndex(i.name)),i.defaultTooltip&&h.push(e)}r.f7.each((function(t,e){var n=s(a,e),r=i.otherDims[e];null!=r&&!1!==r&&(n[r]=i.name)}))}));var d=[],p={};l.each((function(t,e){var n=a[e];p[e]=n[0],d=d.concat(n)})),n.dataDimsOnCoord=d,n.dataDimIndicesOnCoord=(0,i.map)(d,(function(e){return t.getDimensionInfo(e).storeDimIndex})),n.encodeFirstDimNotExtra=p;var f=a.label;f&&f.length&&(u=f.slice());var g=a.tooltip;return g&&g.length?h=g.slice():h.length||(h=u.slice()),a.defaultedLabel=u,a.defaultedTooltip=h,n.userOutput=new o(c,e),n}function s(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function l(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},9344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(3051),r=(0,n(2234).Yf)();function o(t,e){if(r(o=this).mainData===o){var n=(0,i.extend)({},r(this).datas);n[this.dataType]=e,h(e,n,t)}else c(e,this.dataType,r(this).mainData,t);var o;return e}function a(t,e){return t.struct&&t.struct.update(),e}function s(t,e){return(0,i.each)(r(e).datas,(function(n,i){n!==e&&c(n.cloneShallow(),i,e,t)})),e}function l(t){var e=r(this).mainData;return null==t||null==e?e:r(e).datas[t]}function u(){var t=r(this).mainData;return null==t?[{data:t}]:(0,i.map)((0,i.keys)(r(t).datas),(function(e){return{type:e,data:r(t).datas[e]}}))}function h(t,e,n){r(t).datas={},(0,i.each)(e,(function(e,i){c(e,i,t,n)}))}function c(t,e,n,i){r(n).datas[e]=t,r(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=l,t.getLinkedDataAll=u}const d=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,h(e,n,t),(0,i.each)(n,(function(n){(0,i.each)(e.TRANSFERABLE_METHODS,(function(e){n.wrapMethod(e,(0,i.curry)(o,t))}))})),e.wrapMethod("cloneShallow",(0,i.curry)(s,t)),(0,i.each)(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,(0,i.curry)(a,t))})),(0,i.assert)(n[e.dataType]===e)}},1772:(t,e,n)=>{"use strict";n.d(e,{Dq:()=>a,JT:()=>d,Ss:()=>h,Wd:()=>c,md:()=>l,pY:()=>u,u7:()=>p});var i=n(2234),r=n(3051),o=n(4279),a={Must:1,Might:2,Not:3},s=(0,i.Yf)();function l(t){s(t).datasetMap=(0,r.createHashMap)()}function u(t,e,n){var i={},o=c(e);if(!o||!t)return i;var a,l,u=[],h=[],d=e.ecModel,p=s(d).datasetMap,f=o.uid+"_"+n.seriesLayoutBy;t=t.slice(),(0,r.each)(t,(function(e,n){var o=(0,r.isObject)(e)?e:t[n]={name:e};"ordinal"===o.type&&null==a&&(a=n,l=v(o)),i[o.name]=[]}));var g=p.get(f)||p.set(f,{categoryWayDim:l,valueWayDim:0});function m(t,e,n){for(var i=0;i{"use strict";n.d(e,{U:()=>h,t:()=>c});var i=n(3051),r=n(9574),o=n(4279),a=n(1772),s=n(437),l=n(3834),u=n(8540),h=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;if(d(n)){var l=n,u=void 0,h=void 0,c=void 0;if(s){var p=a[0];p.prepareSource(),u=(c=p.getSource()).data,h=c.sourceFormat,e=[p._getVersionSign()]}else u=l.get("data",!0),h=(0,i.isTypedArray)(u)?o.J5:o.cy,e=[];var f=this._getSourceMetaRawOption()||{},g=c&&c.metaRawOption||{},m=(0,i.retrieve2)(f.seriesLayoutBy,g.seriesLayoutBy)||null,v=(0,i.retrieve2)(f.sourceHeader,g.sourceHeader),y=(0,i.retrieve2)(f.dimensions,g.dimensions);t=m!==g.seriesLayoutBy||!!v!=!!g.sourceHeader||y?[(0,r._P)(u,{seriesLayoutBy:m,sourceHeader:v,dimensions:y},h)]:[]}else{var _=n;if(s){var x=this._applyTransform(a);t=x.sourceList,e=x.upstreamSignList}else{var b=_.get("source",!0);t=[(0,r._P)(b,this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,o=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(null!=a){1!==t.length&&p("")}var l=[],u=[];return(0,i.each)(t,(function(t){t.prepareSource();var e=t.getSource(a||0);null==a||e||p(""),l.push(e),u.push(t._getVersionSign())})),o?e=(0,s.vK)(o,l,{datasetIndex:n.componentIndex}):null!=a&&(e=[(0,r.ML)(l[0])]),{sourceList:e,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e{"use strict";n.d(e,{DA:()=>m,vK:()=>v});var i=n(4279),r=n(2234),o=n(3051),a=n(8540),s=n(8407),l=n(175),u=n(9574),h=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return(0,s.yQ)(t,e)},t}();function c(t){if(!_(t.sourceFormat)){0,(0,l._y)("")}return t.data}function d(t){var e=t.sourceFormat,n=t.data;if(!_(e)){0,(0,l._y)("")}if(e===i.XD){for(var r=[],a=0,s=n.length;a{"use strict";n.d(e,{RD:()=>dt.Z,TA:()=>p.Z,tF:()=>h.Z,Ir:()=>c.Z,aV:()=>f.Z,Hn:()=>T.Z,Hr:()=>u.Hr,wJ:()=>d.Z,$_:()=>_,$j:()=>u.$j,Ok:()=>u.Ok,HO:()=>u.HO,eU:()=>u.eU,zP:()=>u.zP,B9:()=>u.B9,OB:()=>ct.default,Zy:()=>vt,tv:()=>ft,Sp:()=>gt,Zr:()=>mt,WU:()=>s,wL:()=>u.wL,JE:()=>u.JE,rp:()=>u.rp,FU:()=>u.FU,Q:()=>a,_y:()=>i,S1:()=>u.S1,z$:()=>pt.RV,pI:()=>m,Rx:()=>r,Nu:()=>Z.Z,pQ:()=>Z.Z,zl:()=>u.zl,RS:()=>u.RS,qR:()=>u.qR,yn:()=>u.yn,I2:()=>u.I2,je:()=>u.je,sq:()=>u.sq,Br:()=>u.Br,ds:()=>u.ds,Pu:()=>u.Pu,aW:()=>u.aW,rV:()=>u.OB,YK:()=>u.YK,Og:()=>u.Og,jQ:()=>u.jQ,g2:()=>B.g2,P2:()=>x.P2,XV:()=>o,D$:()=>z.D,D5:()=>l,xr:()=>v,i8:()=>u.i8,gf:()=>y,x_:()=>g});var i={};n.r(i),n.d(i,{createDimensions:()=>D.q,createList:()=>O,createScale:()=>N,createSymbol:()=>L.th,createTextStyle:()=>R,dataStack:()=>E,enableHoverEmphasis:()=>P.vF,getECData:()=>A.A,getLayoutRect:()=>M.ME,mixinAxisModelCommonMethods:()=>k});var r={};n.r(r),n.d(r,{MAX_SAFE_INTEGER:()=>F.YM,asc:()=>F.dt,getPercentWithPrecision:()=>F.eJ,getPixelPrecision:()=>F.M9,getPrecision:()=>F.p8,getPrecisionSafe:()=>F.ZB,isNumeric:()=>F.kE,isRadianAroundZero:()=>F.mW,linearMap:()=>F.NU,nice:()=>F.kx,numericToNumber:()=>F.FK,parseDate:()=>F.sG,quantile:()=>F.VR,quantity:()=>F.Xd,quantityExponent:()=>F.xW,reformIntervals:()=>F.nR,remRadian:()=>F.wW,round:()=>F.NM});var o={};n.r(o),n.d(o,{format:()=>V.WU,parse:()=>F.sG});var a={};n.r(a),n.d(a,{Arc:()=>nt.Z,BezierCurve:()=>et.Z,BoundingRect:()=>st.Z,Circle:()=>X.Z,CompoundPath:()=>rt.Z,Ellipse:()=>Y.Z,Group:()=>U.Z,Image:()=>W.ZP,IncrementalDisplayable:()=>it.Z,Line:()=>tt.Z,LinearGradient:()=>ot.Z,Polygon:()=>J.Z,Polyline:()=>Q.Z,RadialGradient:()=>at.Z,Rect:()=>$.Z,Ring:()=>K.Z,Sector:()=>q.C,Text:()=>j.ZP,clipPointsByRect:()=>G.clipPointsByRect,clipRectByRect:()=>G.clipRectByRect,createIcon:()=>G.createIcon,extendPath:()=>G.extendPath,extendShape:()=>G.extendShape,getShapeClass:()=>G.getShapeClass,getTransform:()=>G.getTransform,initProps:()=>H.KZ,makeImage:()=>G.makeImage,makePath:()=>G.makePath,mergePath:()=>G.mergePath,registerShape:()=>G.registerShape,resizePath:()=>G.resizePath,updateProps:()=>H.D});var s={};n.r(s),n.d(s,{addCommas:()=>lt.OD,capitalFirst:()=>lt.ew,encodeHTML:()=>lt.F1,formatTime:()=>lt.mr,formatTpl:()=>lt.kF,getTextRect:()=>ht,getTooltipMarker:()=>lt.A0,normalizeCssArray:()=>lt.MY,toCamelCase:()=>lt.zW,truncateText:()=>ut.aF});var l={};n.r(l),n.d(l,{bind:()=>y.bind,clone:()=>y.clone,curry:()=>y.curry,defaults:()=>y.defaults,each:()=>y.each,extend:()=>y.extend,filter:()=>y.filter,indexOf:()=>y.indexOf,inherits:()=>y.inherits,isArray:()=>y.isArray,isFunction:()=>y.isFunction,isObject:()=>y.isObject,isString:()=>y.isString,map:()=>y.map,merge:()=>y.merge,reduce:()=>y.reduce});var u=n(1615),h=n(8071),c=n(3166),d=n(3321),p=n(5797),f=n(5101),g=n(9448),m=n(2892),v=n(5280),y=n(3051),_=n(1092),x=n(270),b=n(8455),w=n(7947),S=n(6650),T=n(1497),M=n(6172),C=n(9936),A=n(106),I=n(6006),D=n(5623),L=n(1525),P=n(6357);function O(t){return(0,b.Z)(null,t)}var E={isDimensionStacked:C.M,enableDataStack:C.BM,getStackedDimension:C.IR};function N(t,e){var n=e;e instanceof T.Z||(n=new T.Z(e));var i=w.aG(n);return i.setExtent(t[0],t[1]),w.Jk(i,n),i}function k(t){y.mixin(t,S.W)}function R(t,e){return e=e||{},(0,I.Lr)(t,null,null,"normal"!==e.state)}var z=n(8023),B=n(3132),Z=n(6672),F=n(5669),V=n(5015),G=n(1177),H=n(9266),U=n(8154),W=n(4535),j=n(6498),X=n(9538),Y=n(2797),q=n(7214),K=n(5795),J=n(5094),Q=n(2514),$=n(5151),tt=n(2095),et=n(4174),nt=n(4826),it=n(1754),rt=n(2776),ot=n(4438),at=n(6369),st=n(479),lt=n(8988),ut=n(6918);function ht(t,e,n,i,r,o,a,s){return new j.ZP({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var ct=n(6387),dt=n(2950),pt=n(7772);function ft(t){var e=h.Z.extend(t);return h.Z.registerClass(e),e}function gt(t){var e=c.Z.extend(t);return c.Z.registerClass(e),e}function mt(t){var e=d.Z.extend(t);return d.Z.registerClass(e),e}function vt(t){var e=p.Z.extend(t);return p.Z.registerClass(e),e}var yt=n(7164);(0,z.D)(yt.T)},8023:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var i=n(1615),r=n(3166),o=n(5797),a=n(8071),s=n(3321),l=n(3051),u=n(9428),h=n(9448),c=[],d={registerPreprocessor:i.ds,registerProcessor:i.Pu,registerPostInit:i.sq,registerPostUpdate:i.Br,registerUpdateLifecycle:i.YK,registerAction:i.zl,registerCoordinateSystem:i.RS,registerLayout:i.qR,registerVisual:i.Og,registerTransform:i.OB,registerLoading:i.yn,registerMap:i.je,registerImpl:u.M,PRIORITY:i.Hr,ComponentModel:a.Z,ComponentView:r.Z,SeriesModel:s.Z,ChartView:o.Z,registerComponentModel:function(t){a.Z.registerClass(t)},registerComponentView:function(t){r.Z.registerClass(t)},registerSeriesModel:function(t){s.Z.registerClass(t)},registerChartView:function(t){o.Z.registerClass(t)},registerSubTypeDefaulter:function(t,e){a.Z.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){(0,h.registerPainter)(t,e)}};function p(t){(0,l.isArray)(t)?(0,l.each)(t,(function(t){p(t)})):(0,l.indexOf)(c,t)>=0||(c.push(t),(0,l.isFunction)(t)&&(t={install:t}),t.install(d))}},7164:(t,e,n)=>{"use strict";n.d(e,{T:()=>S});var i=n(2234),r=n(479),o=n(9266),a=n(106),s=n(5669),l=n(7411),u=n(7377),h=n(3051),c=n(4162),d=n(6006);function p(t){if(t){for(var e=[],n=0;n=0&&n.attr(b.oldLayoutSelect),(0,h.indexOf)(p,"emphasis")>=0&&n.attr(b.oldLayoutEmphasis)),(0,o.D)(n,u,e,l)}else if(n.attr(u),!(0,d.qA)(n).valueAnimation){var f=(0,h.retrieve2)(n.style.opacity,1);n.style.opacity=0,(0,o.KZ)(n,{style:{opacity:f}},e,l)}if(b.oldLayout=u,n.states.select){var g=b.oldLayoutSelect={};_(g,u,x),_(g,n.states.select,x)}if(n.states.emphasis){var m=b.oldLayoutEmphasis={};_(m,u,x),_(m,n.states.emphasis,x)}(0,d.tD)(n,l,c,e,e)}if(i&&!i.ignore&&!i.invisible){r=(b=y(i)).oldLayout;var b,w={points:i.shape.points};r?(i.attr({shape:r}),(0,o.D)(i,{shape:w},e)):(i.setShape(w),i.style.strokePercent=0,(0,o.KZ)(i,{style:{strokePercent:1}},e)),b.oldLayout=w}},t}();var w=(0,i.Yf)();function S(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var i=w(e).labelManager;i||(i=w(e).labelManager=new b),i.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var i=w(e).labelManager;n.updatedSeries.forEach((function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()}))}},7377:(t,e,n)=>{"use strict";n.d(e,{$x:()=>R,Iu:()=>k,_A:()=>O,d:()=>I,qK:()=>P});var i=n(1610),r=n(327),o=n(2514),a=n(4014),s=n(3266),l=n(8554),u=n(3051),h=n(2892),c=n(5280),d=n(6357),p=2*Math.PI,f=a.Z.CMD,g=["top","right","bottom","left"];function m(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function v(t,e,n,i,r,o,a,l,u){a-=t,l-=e;var h=Math.sqrt(a*a+l*l),c=(a/=h)*n+t,d=(l/=h)*n+e;if(Math.abs(i-r)%p<1e-4)return u[0]=c,u[1]=d,h-n;if(o){var f=i;i=(0,s.m)(r),r=(0,s.m)(f)}else i=(0,s.m)(i),r=(0,s.m)(r);i>r&&(r+=p);var g=Math.atan2(l,a);if(g<0&&(g+=p),g>=i&&g<=r||g+p>=i&&g+p<=r)return u[0]=c,u[1]=d,h-n;var m=n*Math.cos(i)+t,v=n*Math.sin(i)+e,y=n*Math.cos(r)+t,_=n*Math.sin(r)+e,x=(m-a)*(m-a)+(v-l)*(v-l),b=(y-a)*(y-a)+(_-l)*(_-l);return x0){e=e/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(C,S,T),i.Z.sub(A,M,T);var n=C.len(),r=A.len();if(!(n<.001||r<.001)){C.scale(1/n),A.scale(1/r);var o=C.dot(A);if(Math.cos(e)1&&i.Z.copy(L,M),L.toArray(t[1])}}}}function O(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,S.fromArray(t[0]),T.fromArray(t[1]),M.fromArray(t[2]),i.Z.sub(C,T,S),i.Z.sub(A,M,T);var r=C.len(),o=A.len();if(!(r<.001||o<.001))if(C.scale(1/r),A.scale(1/o),C.dot(e)=s)i.Z.copy(L,M);else{L.scaleAndAdd(A,a/Math.tan(Math.PI/2-l));var u=M.x!==T.x?(L.x-T.x)/(M.x-T.x):(L.y-T.y)/(M.y-T.y);if(isNaN(u))return;u<0?i.Z.copy(L,T):u>1&&i.Z.copy(L,M)}L.toArray(t[1])}}}function E(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function N(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=c.dist(i[0],i[1]),o=c.dist(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=c.lerp([],i[1],i[0],a/r),l=c.lerp([],i[1],i[2],a/o),u=c.lerp([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h{"use strict";n.d(e,{GI:()=>l,VT:()=>o,WE:()=>s,yl:()=>u});var i=n(1587),r=n(479);function o(t){for(var e=[],n=0;n0&&o&&w(-c/a,0,a);var m,v,y=t[0],_=t[a-1];return x(),m<0&&S(-m,.8),v<0&&S(v,.8),x(),b(m,v,1),b(v,m,-1),x(),m<0&&T(-m),v<0&&T(v),u}function x(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function b(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){w(i*n,0,a);var r=i+t;r<0&&S(-r*n,1)}else S(-t*n,1)}}function w(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){w(-(o[l-1]*c),l,a)}}}function T(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?w(n,0,i+1):w(-n,a-i-1,a),(t-=n)<=0)return}}function s(t,e,n,i){return a(t,"x","width",e,n,i)}function l(t,e,n,i){return a(t,"y","height",e,n,i)}function u(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new r.Z(0,0,0,0);function o(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var a=0;a{"use strict";n.d(e,{Lr:()=>p,k3:()=>d,nC:()=>f,ni:()=>c,pe:()=>b,qA:()=>x,qT:()=>_,tD:()=>w});var i=n(6498),r=n(3051),o=n(6357),a=n(2234),s=n(9266),l={};function u(t,e){for(var n=0;n{"use strict";n.d(e,{Bk:()=>v,G_:()=>g,Ge:()=>d,Gk:()=>c,My:()=>p,bK:()=>m});var i=n(3051),r=n(5669),o=n(9936),a=n(5682),s=n(887),l="__ec_stack_";function u(t){return t.get("stack")||l+t.seriesIndex}function h(t){return t.dim+t.index}function c(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),a=0;a0&&(a=null===a?l:Math.min(a,l))}n[r]=a}}return n}(t),n=[];return(0,i.each)(t,(function(t){var i,o=t.coordinateSystem.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],c=Math.abs(a[1]-a[0]),d=o.scale.getExtent(),p=Math.abs(d[1]-d[0]);i=l?c/p*l:c}else{var f=t.getData();i=Math.abs(a[1]-a[0])/f.count()}var g=(0,r.GM)(t.get("barWidth"),i),m=(0,r.GM)(t.get("barMaxWidth"),i),v=(0,r.GM)(t.get("barMinWidth")||(_(t)?.5:1),i),y=t.get("barGap"),x=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:g,barMaxWidth:m,barMinWidth:v,barGap:y,barCategoryGap:x,axisKey:h(o),stackId:u(t)})})),f(n)}function f(t){var e={};(0,i.each)(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return(0,i.each)(e,(function(t,e){n[e]={};var o=t.stacks,a=t.bandWidth,s=t.categoryGap;if(null==s){var l=(0,i.keys)(o).length;s=Math.max(35-4*l,15)+"%"}var u=(0,r.GM)(s,a),h=(0,r.GM)(t.gap,1),c=t.remainedWidth,d=t.autoWidthCount,p=(c-u)/(d+(d-1)*h);p=Math.max(p,0),(0,i.each)(o,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,c-=i+h*i,d--}else{var i=p;e&&ei&&(i=n),i!==p&&(t.width=i,c-=i+h*i,d--)}})),p=(c-u)/(d+(d-1)*h),p=Math.max(p,0);var f,g=0;(0,i.each)(o,(function(t,e){t.width||(t.width=p),f=t,g+=t.width*(1+h)})),f&&(g-=f.width*h);var m=-g/2;(0,i.each)(o,(function(t,i){n[e][i]=n[e][i]||{bandWidth:a,offset:m,width:t.width},m+=t.width*(1+h)}))})),n}function g(t,e,n){if(t&&e){var i=t[h(e)];return null!=i&&null!=n?i[u(n)]:i}}function m(t,e){var n=d(t,e),r=p(n);(0,i.each)(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=u(t),o=r[h(n)][i],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function v(t){return{seriesType:t,plan:(0,a.Z)(),reset:function(t){if(y(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.getDimensionIndex(e.mapDimension(r.dim)),l=e.getDimensionIndex(e.mapDimension(i.dim)),u=t.get("showBackground",!0),h=e.mapDimension(r.dim),c=e.getCalculationInfo("stackResultDimension"),d=(0,o.M)(e,h)&&!!e.getCalculationInfo("stackedOnSeries"),p=r.isHorizontal(),f=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),g=_(t),m=t.get("barMinHeight")||0,v=c&&e.getDimensionIndex(c),x=e.getLayout("size"),b=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,o=g&&(0,s.o)(3*r),h=g&&u&&(0,s.o)(3*r),c=g&&(0,s.o)(r),y=n.master.getRect(),_=p?y.width:y.height,w=e.getStore(),S=0;null!=(i=t.next());){var T=w.get(d?v:a,i),M=w.get(l,i),C=f,A=void 0;d&&(A=+T-w.get(a,i));var I=void 0,D=void 0,L=void 0,P=void 0;if(p){var O=n.dataToPoint([T,M]);if(d)C=n.dataToPoint([A,M])[0];I=C,D=O[1]+b,L=O[0]-C,P=x,Math.abs(L){"use strict";n.d(e,{Z:()=>s});var i=n(3051),r=n(5682),o=n(9936),a=n(887);function s(t,e){return{seriesType:t,plan:(0,r.Z)(),reset:function(t){var n=t.getData(),r=t.coordinateSystem,s=t.pipelineContext,l=e||s.large;if(r){var u=(0,i.map)(r.dimensions,(function(t){return n.mapDimension(t)})).slice(0,2),h=u.length,c=n.getCalculationInfo("stackResultDimension");(0,o.M)(n,u[0])&&(u[0]=c),(0,o.M)(n,u[1])&&(u[1]=c);var d=n.getStore(),p=n.getDimensionIndex(u[0]),f=n.getDimensionIndex(u[1]);return h&&{progress:function(t,e){for(var n=t.end-t.start,i=l&&(0,a.o)(n*h),o=[],s=[],u=t.start,c=0;u{"use strict";n.d(e,{s:()=>s,y:()=>o});var i=n(3051),r=n(2234);function o(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}(0,i.each)([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,r,o){e=(0,i.extend)({},e),o.dispatchAction((0,i.extend)(e,{type:t[1],seriesIndex:n(r,e)}))}))}))}function a(t,e,n,o,a){var s=t+e;n.isSilent(s)||o.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,o=t.option.selectedMap,l=a.selected,u=0;u{"use strict";n.d(e,{Z:()=>d});var i=n(655),r=n(3051),o=n(1497),a=n(2151),s=n(4251),l=n(2234),u=n(6172),h=(0,l.Yf)(),c=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.uid=a.Kr("ec_cpt_model"),r}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=u.YD(this),i=n?u.tE(t):{},o=e.getTheme();r.merge(t,o.get(this.mainType)),r.merge(t,this.getDefaultOption()),n&&u.dt(t,i,n)},e.prototype.mergeOption=function(t,e){r.merge(this.option,t,!0);var n=u.YD(this);n&&u.dt(this.option,t,n)},e.prototype.optionUpdated=function(t,e){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!(0,s.PT)(t))return t.defaultOption;var e=h(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var a={},l=n.length-1;l>=0;l--)a=r.merge(a,n[l],!0);e.defaultOption=a}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return(0,l.HZ)(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(o.Z);(0,s.pw)(c,o.Z),(0,s.au)(c),a.cj(c),a.jS(c,(function(t){var e=[];r.each(c.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=r.map(e,(function(t){return(0,s.u9)(t).main})),"dataset"!==t&&r.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e}));const d=c},1497:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(6387),r=n(4251),o=(0,n(9066).Z)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),a=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return o(this,t,e)},t}(),s=n(6006),l=n(6498),u=["textStyle","color"],h=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],c=new l.ZP;const d=function(){function t(){}return t.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(u):null)},t.prototype.getFont=function(){return(0,s.qT)({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n{"use strict";n.d(e,{V:()=>v,Z:()=>C});var i=n(655),r=n(3051),o=n(6387),a=n(2234),s=n(8071),l=n(5494),u=n(1219),h=n(6172),c=n(8674),d=n(4251),p=n(6437),f=n(3993),g=a.Yf();function m(t,e){return t.getName(e)||t.getId(e)}var v="__universalTransitionEnabled",y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return(0,i.ZT)(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=(0,c.v)({count:x,reset:b}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(g(this).sourceManager=new p.U(this)).prepareSource();var i=this.getInitialData(t,n);S(i,this),this.dataTask.context.data=i,g(this).dataBeforeProcessed=i,_(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=(0,h.YD)(this),i=n?(0,h.tE)(t):{},o=this.subType;s.Z.hasClass(o)&&(o+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),a.Cc(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&(0,h.dt)(t,i,n)},e.prototype.mergeOption=function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=(0,h.YD)(this);n&&(0,h.dt)(this.option,t,n);var i=g(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,e);S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,g(this).dataBeforeProcessed=o,_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=l._.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(o)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[m(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[v])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,o=this.option,a=o.selectedMode,s=e.length;if(a&&s)if("series"===a)o.selectedMap="all";else if("multiple"===a){r.isObject(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,u=0;u0&&this._innerSelect(t,e)}},e.registerClass=function(t){return s.Z.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(s.Z);function _(t){var e=t.name;a.yu(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return r.each(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function x(t){return t.model.getRawData().count()}function b(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),w}function w(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function S(t,e){r.each(r.concatArray(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,r.curry(T,e))}))}function T(t,e){var n=M(t);return n&&n.setOutputEnd((e||this).count()),e}function M(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}r.mixin(y,u.X),r.mixin(y,l._),(0,d.pw)(y,s.Z);const C=y},2468:(t,e,n)=>{"use strict";n.d(e,{R:()=>a,f:()=>o});var i=n(3051),r=(0,i.createHashMap)();function o(t,e){(0,i.assert)(null==r.get(t)&&e),r.set(t,e)}function a(t,e,n){var i=r.get(e);if(!i)return n;var o=i(t);return o?n.concat(o):n}},1219:(t,e,n)=>{"use strict";n.d(e,{X:()=>s,f:()=>l});var i=n(3051),r=n(8540),o=n(8988),a=/\{@(.+?)\}/g,s=function(){function t(){}return t.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,h=this.mainType,c="series"===h,d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,e,n,s,l,u){e=e||"normal";var h=this.getData(n),c=this.getDataParams(t,n);(u&&(c.value=u.interpolatedValue),null!=s&&i.isArray(c.value)&&(c.value=c.value[s]),l)||(l=h.getItemModel(t).get("normal"===e?["label","formatter"]:[e,"label","formatter"]));return i.isFunction(l)?(c.status=e,c.dimensionIndex=s,l(c)):i.isString(l)?(0,o.kF)(l,c).replace(a,(function(e,n){var o=n.length,a=n;"["===a.charAt(0)&&"]"===a.charAt(o-1)&&(a=+a.slice(1,o-1));var s=(0,r.hk)(h,t,a);if(u&&i.isArray(u.interpolatedValue)){var l=h.getDimensionIndex(a);l>=0&&(s=u.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return(0,r.hk)(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function l(t){var e,n;return i.isObject(t)?t.type&&(n=t):e=t,{text:e,frag:n}}},9887:(t,e,n)=>{"use strict";n.d(e,{D:()=>a,t:()=>r});var i=n(9066),r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getItemStyle=function(t,e){return o(this,t,e)},t}()},7515:(t,e,n)=>{"use strict";n.d(e,{K:()=>a,v:()=>r});var i=n(9066),r=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],o=(0,i.Z)(r),a=function(){function t(){}return t.prototype.getLineStyle=function(t){return o(this,t)},t}()},9066:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(3051);function r(t,e){for(var n=0;n=0||o&&i.indexOf(o,l)<0)){var u=n.getShallow(l,e);null!=u&&(a[t[s][0]]=u)}}return a}}},5494:(t,e,n)=>{"use strict";n.d(e,{_:()=>a,i:()=>s});var i=n(2234),r=(0,i.Yf)(),o=(0,i.Yf)(),a=function(){function t(){}return t.prototype.getColorFromPalette=function(t,e,n){var o=(0,i.kF)(this.get("color",!0)),a=this.get("colorLayer",!0);return l(this,r,o,a,t,e,n)},t.prototype.clearColorPalette=function(){var t,e;(e=r)(t=this).paletteIdx=0,e(t).paletteNameMap={}},t}();function s(t,e,n,r){var a=(0,i.kF)(t.get(["aria","decal","decals"]));return l(t,o,a,null,e,n,r)}function l(t,e,n,i,r,o,a){var s=e(o=o||t),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var h=null!=a&&i?function(t,e){for(var n=t.length,i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}},12:(t,e,n)=>{"use strict";n.d(e,{N:()=>b});var i=n(4990),r=n(3051),o=n(655),a=n(3510),s=n(5787),l=n(7772),u=n(479),h=n(4414),c=n(3132);function d(t,e,n){var i=c.qW.createCanvas(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}const p=function(t){function e(e,n,o){var a,s=t.call(this)||this;s.motionBlur=!1,s.lastFrameAlpha=.7,s.dpr=1,s.virtual=!1,s.config={},s.incremental=!1,s.zlevel=0,s.maxRepaintRectCount=5,s.__dirty=!0,s.__firstTimePaint=!0,s.__used=!1,s.__drawIndex=0,s.__startIndex=0,s.__endIndex=0,s.__prevStartIndex=null,s.__prevEndIndex=null,o=o||i.KL,"string"==typeof e?a=d(e,n,o):r.isObject(e)&&(e=(a=e).id),s.id=e,s.dom=a;var l=a.style;return l&&(r.disableUserSelect(a),a.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),s.painter=n,s.dpr=o,s}return(0,o.ZT)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=d("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new u.Z(0,0,0,0);function c(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new u.Z(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,h=0;h=a)}}for(var d=this.__startIndex;d15)break}n.prevElClipPaths&&u.restore()};if(d)if(0===d.length)s=l.__endIndex;else for(var x=p.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?y:0),this._needsManuallyCompositing),c.__builtin__||r.logError("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),l.__dirty&h.YV&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,r.each(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?r.merge(n[t],e,!0):n[t]=e;for(var i=0;i{"use strict";n.d(e,{Z:()=>h});var i=n(655),r=n(5669),o=n(8988),a=n(379),s=n(5021),l=r.NM,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return s.XS(t,this._extent)},e.prototype.normalize=function(t){return s.Fv(t,this._extent)},e.prototype.scale=function(t){return s.bA(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=s.lb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:l(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&c{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(379),o=n(1401),a=n(5021),s=n(3051),l=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new o.Z({})),(0,s.isArray)(i)&&(i=new o.Z({categories:(0,s.map)(i,(function(t){return(0,s.isObject)(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return(0,i.ZT)(e,t),e.prototype.parse=function(t){return null==t?NaN:(0,s.isString)(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),a.XS(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),a.Fv(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(a.bA(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(r.Z);r.Z.registerClass(l);const u=l},379:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(4251),r=function(){function t(t){this._setting=t||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(t){return this._setting[t]},t.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();i.au(r);const o=r},1618:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(655),r=n(5669),o=n(5015),a=n(5021),s=n(103),l=n(379),u=n(3051),h=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return(0,i.ZT)(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return(0,o.WU)(t.value,o.V8[(0,o.xC)((0,o.Tj)(this._minLevelUnit))]||o.V8.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),r=this.getSetting("locale");return(0,o.k7)(t,e,n,r,i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),a=function(t,e,n,i){var a=1e4,s=o.FW,l=0;function h(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===c&&s.unshift({value:s[0].value-x})}}for(c=0;c=i[0]&&C<=i[1]&&x++)}var A=(i[1]-i[0])/e;if(x>1.5*A&&b>A/1.5)break;if(y.push(T),x>A||t===s[w])break}_=[]}}0;var I=(0,u.filter)((0,u.map)(y,(function(t){return(0,u.filter)(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),D=[],L=I.length-1;for(w=0;wn&&(this._approxInterval=n);var o=c.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function p(t){return(t/=30*o.s2)>6?6:t>3?3:t>2?2:1}function f(t){return(t/=o.dV)>12?12:t>6?6:t>3.5?4:t>2?2:1}function g(t,e){return(t/=e?o.yR:o.WT)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function m(t){return r.kx(t,!0)}function v(t,e,n){var i=new Date(t);switch((0,o.Tj)(e)){case"year":case"month":i[(0,o.vh)(n)](0);case"day":i[(0,o.f5)(n)](1);case"hour":i[(0,o.En)(n)](0);case"minute":i[(0,o.eN)(n)](0);case"second":i[(0,o.rM)(n)](0),i[(0,o.cb)(n)](0)}return i.getTime()}l.Z.registerClass(h);const y=h},5021:(t,e,n)=>{"use strict";n.d(e,{Fv:()=>h,Qf:()=>o,XS:()=>u,bA:()=>c,lM:()=>r,lb:()=>s,r1:()=>a});var i=n(5669);function r(t){return"interval"===t.type||"log"===t.type}function o(t,e,n,r){var o={},a=t[1]-t[0],u=o.interval=(0,i.kx)(a/e,!0);null!=n&&ur&&(u=o.interval=r);var h=o.intervalPrecision=s(u);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),l(t,0,e),l(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[(0,i.NM)(Math.ceil(t[0]/u)*u,h),(0,i.NM)(Math.floor(t[1]/u)*u,h)],t),o}function a(t){var e=Math.pow(10,(0,i.xW)(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,(0,i.NM)(n*e)}function s(t){return(0,i.p8)(t)+2}function l(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function u(t,e){return t>=e[0]&&t<=e[1]}function h(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function c(t,e){return t*(e[1]-e[0])+e[0]}},4251:(t,e,n)=>{"use strict";n.d(e,{PT:()=>l,Qj:()=>d,au:()=>g,dm:()=>u,pw:()=>h,u9:()=>s});var i=n(655),r=n(3051),o="___EC__COMPONENT__CONTAINER___",a="___EC__EXTENDED_CLASS___";function s(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function l(t){return!(!t||!t[a])}function u(t,e){t.$constructor=t,t.extend=function(t){var e,n,o=this;return n=o,r.isFunction(n)&&/^class\s/.test(Function.prototype.toString.call(n))?e=function(t){function e(){return t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o):(e=function(){(t.$constructor||o).apply(this,arguments)},r.inherits(e,this)),r.extend(e.prototype,t),e[a]=!0,e.extend=this.extend,e.superCall=p,e.superApply=f,e.superClass=o,e}}function h(t,e){t.extend=e.extend}var c=Math.round(10*Math.random());function d(t){var e=["__\0is_clz",c++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function p(t,e){for(var n=[],i=2;i{"use strict";n.d(e,{Kr:()=>a,ZL:()=>u,cj:()=>s,jS:()=>l});var i=n(3051),r=n(4251),o=Math.round(10*Math.random());function a(t){return[t||"",o++].join("_")}function s(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=(0,r.u9)(t);e[i.main]=n},t.determineSubType=function(n,i){var o=i.type;if(!o){var a=(0,r.u9)(n).main;t.hasSubTypes(n)&&e[a]&&(o=e[a](i))}return o}}function l(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,a){if(t.length){var s=function(t){var r={},o=[];return i.each(t,(function(a){var s=n(r,a),l=function(t,e){var n=[];return i.each(t,(function(t){i.indexOf(e,t)>=0&&n.push(t)})),n}(s.originalDeps=e(a),t);s.entryCount=l.length,0===s.entryCount&&o.push(a),i.each(l,(function(t){i.indexOf(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(r,t);i.indexOf(e.successor,t)<0&&e.successor.push(a)}))})),{graph:r,noEntryList:o}}(r),l=s.graph,u=s.noEntryList,h={};for(i.each(t,(function(t){h[t]=!0}));u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(o.call(a,c,d.originalDeps.slice()),delete h[c]),i.each(d.successor,p?g:f)}i.each(h,(function(){throw new Error("")}))}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}}}function u(t,e){return i.merge(i.merge({},t,!0),e,!0)}},8625:(t,e,n)=>{"use strict";n.d(e,{I:()=>g});var i=Math.round(9*Math.random()),r="function"==typeof Object.defineProperty;const o=function(){function t(){this._id="__ec_inner_"+i++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,e){var n=this._guard(t);return r?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}();var a=n(2528),s=n(3051),l=n(5669),u=n(1525),h=n(7772),c=n(3132),d=new o,p=new a.ZP(100),f=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function g(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r="svg"===i.painter.type;t.dirty&&d.delete(t);var o=d.get(t);if(o)return o;var a=(0,s.defaults)(t,{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});"none"===a.backgroundColor&&(a.backgroundColor=null);var g={repeat:"repeat"};return function(t){for(var e,o=[n],d=!0,g=0;g{"use strict";function i(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}n.d(e,{o:()=>i})},8988:(t,e,n)=>{"use strict";n.d(e,{A0:()=>v,F1:()=>c,Lz:()=>x,MI:()=>b,MY:()=>l,OD:()=>a,ew:()=>_,kF:()=>g,mr:()=>y,uX:()=>d,wx:()=>m,zW:()=>s});var i=n(3051),r=n(5669),o=n(5015);function a(t){if(!(0,r.kE)(t))return i.isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function s(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var l=i.normalizeCssArray,u=/([&<>"'])/g,h={"&":"&","<":"<",">":">",'"':""","'":"'"};function c(t){return null==t?"":(t+"").replace(u,(function(t,e){return h[e]}))}function d(t,e,n){function s(t){return t&&i.trim(t)?t:"-"}function l(t){return!(null==t||isNaN(t)||!isFinite(t))}var u="time"===e,h=t instanceof Date;if(u||h){var c=u?(0,r.sG)(t):t;if(!isNaN(+c))return(0,o.WU)(c,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(h)return"-"}if("ordinal"===e)return i.isStringSafe(t)?s(t):i.isNumber(t)&&l(t)?t+"":"-";var d=(0,r.FK)(t);return l(d)?a(d):i.isStringSafe(t)?s(t):"boolean"==typeof t?t+"":"-"}var p=["a","b","c","d","e","f","g"],f=function(t,e){return"{"+t+(null==e?"":e)+"}"};function g(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:a,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function y(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(0,r.sG)(e),a=n?"getUTC":"get",s=i[a+"FullYear"](),l=i[a+"Month"]()+1,u=i[a+"Date"](),h=i[a+"Hours"](),c=i[a+"Minutes"](),d=i[a+"Seconds"](),p=i[a+"Milliseconds"]();return t=t.replace("MM",(0,o.vk)(l,2)).replace("M",l).replace("yyyy",s).replace("yy",(0,o.vk)(s%100+"",2)).replace("dd",(0,o.vk)(u,2)).replace("d",u).replace("hh",(0,o.vk)(h,2)).replace("h",h).replace("mm",(0,o.vk)(c,2)).replace("m",c).replace("ss",(0,o.vk)(d,2)).replace("s",d).replace("SSS",(0,o.vk)(p,3))}function _(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function x(t,e){return e=e||"transparent",i.isString(t)?t:i.isObject(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function b(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}},1177:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Arc:()=>x.Z,BezierCurve:()=>_.Z,BoundingRect:()=>T.Z,Circle:()=>c.Z,CompoundPath:()=>b.Z,Ellipse:()=>d.Z,Group:()=>u.Z,Image:()=>l.ZP,IncrementalDisplayable:()=>A.Z,Line:()=>y.Z,LinearGradient:()=>w.Z,OrientedBoundingRect:()=>M.Z,Path:()=>a.ZP,Point:()=>C.Z,Polygon:()=>g.Z,Polyline:()=>m.Z,RadialGradient:()=>S.Z,Rect:()=>v.Z,Ring:()=>f.Z,Sector:()=>p.C,Text:()=>h.ZP,applyTransform:()=>q,clipPointsByRect:()=>$,clipRectByRect:()=>tt,createIcon:()=>et,extendPath:()=>z,extendShape:()=>k,getShapeClass:()=>Z,getTransform:()=>Y,groupTransition:()=>Q,initProps:()=>P.KZ,isElementRemoved:()=>P.eq,lineLineIntersect:()=>it,linePolygonIntersect:()=>nt,makeImage:()=>V,makePath:()=>F,mergePath:()=>H,registerShape:()=>B,removeElement:()=>P.bX,removeElementWithFadeOut:()=>P.XD,resizePath:()=>U,setTooltipConfig:()=>ot,subPixelOptimize:()=>X,subPixelOptimizeLine:()=>W,subPixelOptimizeRect:()=>j,transformDirection:()=>K,traverseElements:()=>st,updateProps:()=>P.D});var i=n(7494),r=n(2892),o=n(5280),a=n(327),s=n(7411),l=n(4535),u=n(8154),h=n(6498),c=n(9538),d=n(2797),p=n(7214),f=n(5795),g=n(5094),m=n(2514),v=n(5151),y=n(2095),_=n(4174),x=n(4826),b=n(2776),w=n(4438),S=n(6369),T=n(479),M=n(1587),C=n(1610),A=n(1754),I=n(4111),D=n(3051),L=n(106),P=n(9266),O=Math.max,E=Math.min,N={};function k(t){return a.ZP.extend(t)}var R=i.Pc;function z(t,e){return R(t,e)}function B(t,e){N[t]=e}function Z(t){if(N.hasOwnProperty(t))return N[t]}function F(t,e,n,r){var o=i.iR(t,e);return n&&("center"===r&&(n=G(n,o.getBoundingRect())),U(o,n)),o}function V(t,e,n){var i=new l.ZP({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(G(e,r))}}});return i}function G(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var H=i.AA;function U(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function W(t){return I._3(t.shape,t.shape,t.style),t}function j(t){return I.Pw(t.shape,t.shape,t.style),t}var X=I.vu;function Y(t,e){for(var n=r.identity([]);t&&t!==e;)r.mul(n,t.getLocalTransform(),n),t=t.parent;return n}function q(t,e,n){return e&&!(0,D.isArrayLike)(e)&&(e=s.ZP.getLocalTransform(e)),n&&(e=r.invert([],e)),o.applyTransform([],t,e)}function K(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=q(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function J(t){return!t.isGroup}function Q(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){J(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(J(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),(0,P.D)(t,i,n,(0,L.A)(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=(0,D.extend)({},t.shape)),e}}function $(t,e){return(0,D.map)(t,(function(t){var n=t[0];n=O(n,e.x),n=E(n,e.x+e.width);var i=t[1];return i=O(i,e.y),[n,i=E(i,e.y+e.height)]}))}function tt(t,e){var n=O(t.x,e.x),i=E(t.x+t.width,e.x+e.width),r=O(t.y,e.y),o=E(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function et(t,e,n){var i=(0,D.extend)({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),(0,D.defaults)(r,n),new l.ZP(i)):F(t.replace("path://",""),i,n,"center")}function nt(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,m=rt(f,g,u,h)/p;if(m<0||m>1)return!1;var v=rt(f,g,c,d)/p;return!(v<0||v>1)}function rt(t,e,n,i){return t*i-n*e}function ot(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=(0,D.isString)(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&(0,D.each)((0,D.keys)(l),(function(t){(0,D.hasOwn)(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=(0,L.A)(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:(0,D.defaults)({content:i,formatterParams:s},r)}}function at(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function st(t,e){if(t)if((0,D.isArray)(t))for(var n=0;n{"use strict";n.d(e,{A:()=>i,Q:()=>r});var i=(0,n(2234).Yf)(),r=function(t,e,n,r){if(r){var o=i(r);o.dataIndex=n,o.dataType=e,o.seriesIndex=t,"group"===r.type&&r.traverse((function(r){var o=i(r);o.seriesIndex=t,o.dataIndex=n,o.dataType=e}))}}},6172:(t,e,n)=>{"use strict";n.d(e,{BZ:()=>c,ME:()=>p,QM:()=>g,QT:()=>_,YD:()=>m,dt:()=>v,gN:()=>l,lq:()=>d,p$:()=>f,tE:()=>y});var i=n(3051),r=n(479),o=n(5669),a=n(8988),s=i.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function h(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,d=l.getBoundingRect(),p=e.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===t){var g=d.width+(f?-f.x+d.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(c=a+m)>r||l.newline?(o+=s+n,a=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var c=h;i.curry(h,"vertical"),i.curry(h,"horizontal");function d(t,e,n){var i=e.width,r=e.height,s=(0,o.GM)(t.left,i),l=(0,o.GM)(t.top,r),u=(0,o.GM)(t.right,i),h=(0,o.GM)(t.bottom,r);return(isNaN(s)||isNaN(parseFloat(t.left)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.right)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.top)))&&(l=0),(isNaN(h)||isNaN(parseFloat(t.bottom)))&&(h=r),n=a.MY(n||0),{width:Math.max(u-s-n[1]-n[3],0),height:Math.max(h-l-n[0]-n[2],0)}}function p(t,e,n){n=a.MY(n||0);var i=e.width,s=e.height,l=(0,o.GM)(t.left,i),u=(0,o.GM)(t.top,s),h=(0,o.GM)(t.right,i),c=(0,o.GM)(t.bottom,s),d=(0,o.GM)(t.width,i),p=(0,o.GM)(t.height,s),f=n[2]+n[0],g=n[1]+n[3],m=t.aspect;switch(isNaN(d)&&(d=i-h-g-l),isNaN(p)&&(p=s-c-f-u),null!=m&&(isNaN(d)&&isNaN(p)&&(m>i/s?d=.8*i:p=.8*s),isNaN(d)&&(d=m*p),isNaN(p)&&(p=d/m)),isNaN(l)&&(l=i-h-d-g),isNaN(u)&&(u=s-c-p-f),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-p/2-n[0];break;case"bottom":u=s-p-f}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(h||0)),isNaN(p)&&(p=s-f-u-(c||0));var v=new r.Z(l+n[3],u+n[0],d,p);return v.margin=n,v}function f(t,e,n,o,a,s){var l,u=!a||!a.hv||a.hv[0],h=!a||!a.hv||a.hv[1],c=a&&a.boundingMode||"all";if((s=s||t).x=t.x,s.y=t.y,!u&&!h)return!1;if("raw"===c)l="group"===t.type?new r.Z(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var d=t.getLocalTransform();(l=l.clone()).applyTransform(d)}var f=p(i.defaults({width:l.width,height:l.height},e),n,o),g=u?f.x-l.x:0,m=h?f.y-l.y:0;return"raw"===c?(s.x=g,s.y=m):(s.x+=g,s.y+=m),s===t&&t.markRedraw(),!0}function g(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]}function m(t){var e=t.layoutMode||t.constructor.layoutMode;return i.isObject(e)?e:e?{type:e}:null}function v(t,e,n){var r=n&&n.ignoreSize;!i.isArray(r)&&(r=[r,r]);var o=l(u[0],0),a=l(u[1],1);function l(n,i){var o={},a=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){h(e,t)&&(o[t]=l[t]=e[t]),c(o,t)&&a++,c(l,t)&&u++})),r[i])return c(e,n[1])?l[n[2]]=null:c(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var d=0;d{"use strict";n.d(e,{Sh:()=>s,ZK:()=>a,_y:()=>l});var i={},r="undefined"!=typeof console&&console.warn&&console.log;function o(t,e,n){if(r){if(n){if(i[e])return;i[e]=!0}console[t]("[ECharts] "+e)}}function a(t,e){o("warn",t,e)}function s(t){0}function l(t){throw new Error(t)}},2234:(t,e,n)=>{"use strict";n.d(e,{C4:()=>d,C6:()=>I,Cc:()=>h,Co:()=>p,HZ:()=>L,IL:()=>O,O0:()=>b,P$:()=>P,Td:()=>c,U5:()=>v,U9:()=>E,XI:()=>w,Yf:()=>T,ab:()=>f,g0:()=>x,gO:()=>S,iP:()=>D,kF:()=>u,lY:()=>_,pk:()=>k,pm:()=>C,pv:()=>N,yu:()=>y,zH:()=>A});var i=n(3051),r=n(6387),o=n(5669);function a(t,e,n){return(e-t)*n+t}var s="series\0",l="\0_ec_\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function h(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i{"use strict";n.d(e,{FK:()=>T,GM:()=>a,M9:()=>c,NM:()=>s,NU:()=>o,S$:()=>p,VR:()=>w,Xd:()=>_,YM:()=>f,ZB:()=>h,dt:()=>l,eJ:()=>d,jj:()=>C,kE:()=>M,kx:()=>b,mW:()=>m,nR:()=>S,nl:()=>I,p8:()=>u,sG:()=>y,wW:()=>g,xW:()=>x});var i=n(3051),r=1e-4;function o(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function a(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return i.isString(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function s(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function l(t){return t.sort((function(t,e){return t-e})),t}function u(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return h(t)}function h(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function c(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function d(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var o=Math.pow(10,n),a=i.map(t,(function(t){return(isNaN(t)?0:t)/r*o*100})),s=100*o,l=i.map(a,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),h=i.map(a,(function(t,e){return t-l[e]}));uc&&(c=h[p],d=p);++l[d],h[d]=0,++u}return l[e]/o}function p(t,e){var n=Math.max(u(t),u(e)),i=t+e;return n>20?i:s(i,n)}var f=9007199254740991;function g(t){var e=2*Math.PI;return(t%e+e)%e}function m(t){return t>-1e-4&&t=10&&e++,e}function b(t,e){var n=x(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function w(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function S(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i{"use strict";n.d(e,{$l:()=>Q,Av:()=>ht,C5:()=>nt,CX:()=>p,Gl:()=>k,Hg:()=>x,Ib:()=>ot,JQ:()=>b,Ki:()=>y,L1:()=>g,MA:()=>z,Mh:()=>V,Nj:()=>ut,RW:()=>dt,SJ:()=>W,SX:()=>G,T5:()=>X,UL:()=>K,VP:()=>H,WO:()=>lt,XX:()=>U,aG:()=>pt,ci:()=>et,e9:()=>gt,fD:()=>F,iK:()=>w,k5:()=>rt,oJ:()=>J,og:()=>tt,qc:()=>m,th:()=>ct,vF:()=>it,wU:()=>f,xp:()=>ft,xr:()=>$,yx:()=>_,zI:()=>q,zr:()=>v});var i=n(2528),r=n(3051),o=n(106),a=n(1092),s=n(2234),l=n(327),u=1,h={},c=(0,s.Yf)(),d=(0,s.Yf)(),p=1,f=2,g=["emphasis","blur","select"],m=["normal","emphasis","blur","select"],v=10,y="highlight",_="downplay",x="select",b="unselect",w="toggleSelect";function S(t){return null!=t&&"none"!==t}var T=new i.ZP(100);function M(t){if((0,r.isString)(t)){var e=T.get(t);return e||(e=a.lift(t,-.1),T.put(t,e)),e}if((0,r.isGradientObject)(t)){var n=(0,r.extend)({},t);return n.colorStops=(0,r.map)(t.colorStops,(function(t){return{offset:t.offset,color:a.lift(t.color,-.1)}})),n}return t}function C(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function A(t){C(t,"emphasis",f)}function I(t){t.hoverState===f&&C(t,"normal",0)}function D(t){C(t,"blur",p)}function L(t){t.hoverState===p&&C(t,"normal",0)}function P(t){t.selected=!0}function O(t){t.selected=!1}function E(t,e,n){e(t,n)}function N(t,e,n){E(t,e,n),t.isGroup&&t.traverse((function(t){E(t,e,n)}))}function k(t,e){switch(e){case"emphasis":t.hoverState=f;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=p;break;case"select":t.selected=!0}}function R(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var o=n&&(0,r.indexOf)(n,"select")>=0,a=!1;if(t instanceof l.ZP){var s=c(t),u=o&&s.selectFill||s.normalFill,h=o&&s.selectStroke||s.normalStroke;if(S(u)||S(h)){var d=(i=i||{}).style||{};"inherit"===d.fill?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=u):!S(d.fill)&&S(u)?(a=!0,i=(0,r.extend)({},i),(d=(0,r.extend)({},d)).fill=M(u)):!S(d.stroke)&&S(h)&&(a||(i=(0,r.extend)({},i),d=(0,r.extend)({},d)),d.stroke=M(h)),i.style=d}}if(i&&null==i.z2){a||(i=(0,r.extend)({},i));var p=t.z2EmphasisLift;i.z2=t.z2+(null!=p?p:v)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=(0,r.indexOf)(t.currentStates,e)>=0,o=t.style.opacity,a=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function it(t,e,n){ut(t,!0),N(t,z),ot(t,e,n)}function rt(t,e,n,i){i?function(t){ut(t,!1)}(t):it(t,e,n)}function ot(t,e,n){var i=(0,o.A)(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var at=["emphasis","blur","select"],st={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function lt(t,e,n,i){n=n||"itemStyle";for(var r=0;r{"use strict";n.d(e,{Cq:()=>S,Pw:()=>y,th:()=>b,zp:()=>w});var i=n(3051),r=n(327),o=n(2095),a=n(5151),s=n(9538),l=n(1177),u=n(479),h=n(423),c=n(5669),d=r.ZP.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),p=r.ZP.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),f=r.ZP.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),p=.6*a,f=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-f,n,i),t.bezierCurveTo(n,i-f,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),g=r.ZP.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),m={line:o.Z,rect:a.Z,roundRect:a.Z,square:a.Z,circle:s.Z,diamond:p,pin:f,arrow:g,triangle:d},v={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},y={};(0,i.each)(m,(function(t,e){y[e]=new t}));var _=r.ZP.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=(0,h.wI)(t,e,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i=e.symbolType;if("none"!==i){var r=y[i];r||(r=y[i="rect"]),v[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function x(t,e){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw()}}function b(t,e,n,i,r,o,a){var s,h=0===t.indexOf("empty");return h&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?l.makeImage(t.slice(8),new u.Z(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?l.makePath(t.slice(7),{},new u.Z(e,n,i,r),a?"center":"cover"):new _({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=h,s.setColor=x,o&&s.setColor(o),s}function w(t){return(0,i.isArray)(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function S(t,e){if(null!=t)return(0,i.isArray)(t)||(t=[t,t]),[(0,c.GM)(t[0],e[0])||0,(0,c.GM)((0,i.retrieve2)(t[1],t[0]),e[1])||0]}},270:(t,e,n)=>{"use strict";n.d(e,{P2:()=>a,T9:()=>s,ZH:()=>l});var i="\0__throttleOriginMethod",r="\0__throttleRate",o="\0__throttleType";function a(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?c():h=setTimeout(c,-r),l=i};return d.clear=function(){h&&(clearTimeout(h),h=null)},d.debounceNextCall=function(t){s=t},d}function s(t,e,n,s){var l=t[e];if(l){var u=l[i]||l,h=l[o];if(l[r]!==n||h!==s){if(null==n||!s)return t[e]=u;(l=t[e]=a(u,n,"debounce"===s))[i]=u,l[o]=s,l[r]=n}return l}}function l(t,e){var n=t[e];n&&n[i]&&(n.clear&&n.clear(),t[e]=n[i])}},5015:(t,e,n)=>{"use strict";n.d(e,{$K:()=>_,CW:()=>C,En:()=>k,FW:()=>m,MV:()=>L,P5:()=>c,RZ:()=>P,Tj:()=>y,V8:()=>f,WT:()=>s,WU:()=>b,Wp:()=>I,cb:()=>B,dV:()=>u,eN:()=>R,f5:()=>N,fn:()=>D,k7:()=>w,q5:()=>T,rM:()=>z,s2:()=>h,sx:()=>M,vh:()=>E,vk:()=>v,xC:()=>x,xL:()=>O,xz:()=>A,yR:()=>l});var i=n(3051),r=n(5669),o=n(3917),a=n(1497),s=1e3,l=60*s,u=60*l,h=24*u,c=365*h,d={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}"},p="{yyyy}-{MM}-{dd}",f={year:"{yyyy}",month:"{yyyy}-{MM}",day:p,hour:"{yyyy}-{MM}-{dd} "+d.hour,minute:"{yyyy}-{MM}-{dd} "+d.minute,second:"{yyyy}-{MM}-{dd} "+d.second,millisecond:d.none},g=["year","month","day","hour","minute","second","millisecond"],m=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function v(t,e){return"0000".substr(0,e-(t+="").length)+t}function y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function _(t){return t===y(t)}function x(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function b(t,e,n,i){var s=r.sG(t),l=s[M(n)](),u=s[C(n)]()+1,h=Math.floor((u-1)/3)+1,c=s[A(n)](),d=s["get"+(n?"UTC":"")+"Day"](),p=s[I(n)](),f=(p-1)%12+1,g=s[D(n)](),m=s[L(n)](),y=s[P(n)](),_=(i instanceof a.Z?i:(0,o.G8)(i||o.sO)||(0,o.Li)()).getModel("time"),x=_.get("month"),b=_.get("monthAbbr"),w=_.get("dayOfWeek"),S=_.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,l%100+"").replace(/{Q}/g,h+"").replace(/{MMMM}/g,x[u-1]).replace(/{MMM}/g,b[u-1]).replace(/{MM}/g,v(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,v(c,2)).replace(/{d}/g,c+"").replace(/{eeee}/g,w[d]).replace(/{ee}/g,S[d]).replace(/{e}/g,d+"").replace(/{HH}/g,v(p,2)).replace(/{H}/g,p+"").replace(/{hh}/g,v(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,v(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,v(m,2)).replace(/{s}/g,m+"").replace(/{SSS}/g,v(y,3)).replace(/{S}/g,y+"")}function w(t,e,n,r,o){var a=null;if(i.isString(n))a=n;else if(i.isFunction(n))a=n(t.value,e,{level:t.level});else{var s=i.extend({},d);if(t.level>0)for(var l=0;l=0;--l)if(u[h]){a=u[h];break}a=a||s.none}if(i.isArray(a)){var c=null==t.level?0:t.level>=0?t.level:a.length+t.level;a=a[c=Math.min(c,a.length-1)]}}return b(new Date(t.value),a,o,r)}function S(t,e){var n=r.sG(t),i=n[C(e)]()+1,o=n[A(e)](),a=n[I(e)](),s=n[D(e)](),l=n[L(e)](),u=0===n[P(e)](),h=u&&0===l,c=h&&0===s,d=c&&0===a,p=d&&1===o;return p&&1===i?"year":p?"month":d?"day":c?"hour":h?"minute":u?"second":"millisecond"}function T(t,e,n){var o=i.isNumber(t)?r.sG(t):t;switch(e=e||S(t,n)){case"year":return o[M(n)]();case"half-year":return o[C(n)]()>=6?1:0;case"quarter":return Math.floor((o[C(n)]()+1)/4);case"month":return o[C(n)]();case"day":return o[A(n)]();case"half-day":return o[I(n)]()/24;case"hour":return o[I(n)]();case"minute":return o[D(n)]();case"second":return o[L(n)]();case"millisecond":return o[P(n)]()}}function M(t){return t?"getUTCFullYear":"getFullYear"}function C(t){return t?"getUTCMonth":"getMonth"}function A(t){return t?"getUTCDate":"getDate"}function I(t){return t?"getUTCHours":"getHours"}function D(t){return t?"getUTCMinutes":"getMinutes"}function L(t){return t?"getUTCSeconds":"getSeconds"}function P(t){return t?"getUTCMilliseconds":"getMilliseconds"}function O(t){return t?"setUTCFullYear":"setFullYear"}function E(t){return t?"setUTCMonth":"setMonth"}function N(t){return t?"setUTCDate":"setDate"}function k(t){return t?"setUTCHours":"setHours"}function R(t){return t?"setUTCMinutes":"setMinutes"}function z(t){return t?"setUTCSeconds":"setSeconds"}function B(t){return t?"setUTCMilliseconds":"setMilliseconds"}},4279:(t,e,n)=>{"use strict";n.d(e,{J5:()=>l,RA:()=>u,Wc:()=>c,XD:()=>o,cy:()=>r,f7:()=>i,fY:()=>h,hL:()=>s,qb:()=>a});var i=(0,n(3051).createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),r="original",o="arrayRows",a="objectRows",s="keyedColumns",l="typedArray",u="unknown",h="column",c="row"},887:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});var i=n(3051),r="undefined"!=typeof Float32Array,o=r?Float32Array:Array;function a(t){return(0,i.isArray)(t)?r?new Float32Array(t):t:new o(t)}},5797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(3051),r=n(8154),o=n(2151),a=n(4251),s=n(2234),l=n(6357),u=n(8674),h=n(5682),c=n(1177),d=s.Yf(),p=(0,h.Z)(),f=function(){function t(){this.group=new r.Z,this.uid=o.Kr("viewChart"),this.renderTask=(0,u.v)({plan:v,reset:y}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&m(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){(0,c.traverseElements)(this.group,t)},t.markUpdateMethod=function(t,e){d(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function g(t,e,n){t&&(0,l.Av)(t)&&("emphasis"===e?l.fD:l.Mh)(t,n)}function m(t,e,n){var r=s.gO(t,e),o=e&&null!=e.highlightKey?(0,l.RW)(e.highlightKey):null;null!=r?(0,i.each)(s.kF(r),(function(e){g(t.getItemGraphicEl(e),n,o)})):t.eachItemGraphicEl((function(t){g(t,n,o)}))}function v(t){return p(t.model)}function y(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&d(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),_[l]}a.dm(f,["dispose"]),a.au(f);var _={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const x=f},3166:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8154),r=n(2151),o=n(4251),a=function(){function t(){this.group=new i.Z,this.uid=r.Kr("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();o.dm(a),o.au(a);const s=a},2019:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}()},6211:(t,e,n)=>{"use strict";function i(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function r(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function o(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}n.d(e,{LZ:()=>o,Or:()=>i,UL:()=>r})},531:function(t,e){ /* @preserve * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t){"use strict";function e(t){for(var e,n,i=1,r=arguments.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>=e.x&&i.x<=n.x;return t=t.y>=e.y&&i.y<=n.y,r&&t},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>=e.lat&&i.lat<=n.lat;return t=t.lng>=e.lng&&i.lng<=n.lng,r&&t},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>e.lat&&i.late.lng&&i.lng","http://www.w3.org/2000/svg"===(At.firstChild&&At.firstChild.namespaceURI));function Ct(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Dt={ie:J,ielt9:Q,edge:$,webkit:tt,android:et,android23:nt,androidStock:it,opera:rt,chrome:ot,gecko:at,safari:st,phantom:lt,opera12:ut,win:ht,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:pt,mobile:jn,mobileWebkit:ft,mobileWebkit3d:gt,msPointer:mt,pointer:vt,touch:_t,touchNative:yt,mobileOpera:xt,mobileGecko:bt,retina:wt,passiveEvents:St,canvas:Tt,svg:Mt,vml:!Mt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:At},It=Dt.msPointer?"MSPointerDown":"pointerdown",Lt=Dt.msPointer?"MSPointerMove":"pointermove",Pt=Dt.msPointer?"MSPointerUp":"pointerup",Ot=Dt.msPointer?"MSPointerCancel":"pointercancel",Et={touchstart:It,touchmove:Lt,touchend:Pt,touchcancel:Ot},Nt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Oe(e),Vt(t,e)},touchmove:Vt,touchend:Vt,touchcancel:Vt},kt={},Rt=!1;function zt(t,e,n){return"touchstart"!==e||Rt||(document.addEventListener(It,Bt,!0),document.addEventListener(Lt,Zt,!0),document.addEventListener(Pt,Ft,!0),document.addEventListener(Ot,Ft,!0),Rt=!0),Nt[e]?(n=Nt[e].bind(this,n),t.addEventListener(Et[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Bt(t){kt[t.pointerId]=t}function Zt(t){kt[t.pointerId]&&(kt[t.pointerId]=t)}function Ft(t){delete kt[t.pointerId]}function Vt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],kt)e.touches.push(kt[n]);e.changedTouches=[e],t(e)}}var Gt=200;function Ht(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){var r;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((r=Date.now())-i<=Gt?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return(t=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r)}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}var Ut,Wt,jt,Xt,Yt,qt,Kt=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:n}function ee(t,e,n){return(t=document.createElement(t)).className=e||"",n&&n.appendChild(t),t}function ne(t){var e=t.parentNode;e&&e.removeChild(t)}function ie(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function oe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ae(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=he(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var n;if(void 0!==t.classList)for(var i=d(e),r=0,o=i.length;rthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter();return t=this._limitCenter(n,this._zoom,B(t)),n.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=N((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=N(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=(t=this.project(t),(n=R([(o=this.getPixelBounds()).min.add(n),o.max.subtract(i)])).getSize());return n.contains(t)||(this._enforcingBounds=!0,i=t.subtract(n.getCenter()),n=n.extend(t).getSize().subtract(o),r.x+=i.x<0?-n.x:n.x,r.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),o=n.divideBy(2).round(),a=i.divideBy(2).round();return(o=o.subtract(a)).x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,n,i=new Z(t.coords.latitude,t.coords.longitude),r=i.toBounds(2*t.coords.accuracy),o=this._locateOptions,a=(o.setView&&(e=this.getBoundsZoom(r),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e)),{latlng:i,bounds:r,timestamp:t.timestamp});for(n in t.coords)"number"==typeof t.coords[n]&&(a[n]=t.coords[n]);this.fire("locationfound",a)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ne(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ne(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=N(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=(t=t.getSouthEast(),n=this.getSize().subtract(n),t=R(this.project(t,i),this.project(a,i)).getSize(),a=Dt.any3d?this.options.zoomSnap:1,n.x/t.x);return n=n.y/t.y,t=e?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(t,i),a&&(i=Math.round(i/(a/100))*(a/100),i=e?Math.ceil(i/a)*a:Math.floor(i/a)*a),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new k(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,t=n.zoom(t*n.scale(e)),isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(N(t),e)},layerPointToLatLng:function(t){return t=N(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return N(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return N(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(N(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=$t(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&Dt.any3d,se(t,"leaflet-container"+(Dt.touch?" leaflet-touch":"")+(Dt.retina?" leaflet-retina":"")+(Dt.ielt9?" leaflet-oldie":"")+(Dt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),te(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fe(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){fe(this._mapPane,new O(0,0));var n=!this._loaded,i=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){fe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Te:we;e((this._targets[a(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Dt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!ze(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)?i:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,n=t.target||t.srcElement;!this._loaded||n._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(n)||("mousedown"===(e=t.type)&&ye(n),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){"click"===t.type&&((l=e({},t)).type="preclick",this._fireDOMEvent(l,l.type,i));var r=this._findEventTargets(t,n);if(i){for(var o=[],a=0;athis.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e);return i=this._getCenterOffset(t)._divideBy(1-1/i),!(!0!==n.animate&&!this.getSize().contains(i)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fe(t){return new Ge(t)}var Ve,Ge=D.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition();return t=t._controlCorners[n],se(e,"leaflet-control"),-1!==n.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ne(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer),r=((t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),we(e,"click",this._onInputClick,this),i=document.createElement("span")).innerHTML=" "+t.name,document.createElement("span"));return n.appendChild(r),r.appendChild(e),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ue=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ee("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){return(n=ee("a",n,i)).innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),Pe(n),we(n,"click",Ee),we(n,"click",r,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";le(this._zoomInButton,e),le(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),We=(Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ue,this.addControl(this.zoomControl))})),Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ee("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ee("div",e,n)),t.imperial&&(this._iScale=ee("div",e,n))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n;5280<(t*=3.2808399)?(n=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,n+" mi",n/e)):(n=this._getRoundNum(t),this._updateScale(this._iScale,n+" ft",n/t))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t/=e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),je=Ge.extend({options:{position:"bottomright",prefix:''+(Dt.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),Pe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' ')}}}),Xe=(Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook((function(){this.options.attributionControl&&(new je).addTo(this)})),Ge.Layers=He,Ge.Zoom=Ue,Ge.Scale=We,Ge.Attribution=je,Fe.layers=function(t,e,n){return new He(t,e,n)},Fe.zoom=function(t){return new Ue(t)},Fe.scale=function(t){return new We(t)},Fe.attribution=function(t){return new je(t)},$=D.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}),$.addTo=function(t,e){return t.addHandler(e,this),this},tt={Events:I},Dt.touch?"touchstart mousedown":"mousedown"),Ye=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(we(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ye._dragging===this&&this.finishDrag(!0),Te(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;this._enabled&&(this._moved=!1,ae(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Ye._dragging===this&&this.finishDrag():Ye._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Ye._dragging=this)._preventOutline&&ye(this._element),me(),jt(),this._moving||(this.fire("down"),n=t.touches?t.touches[0]:t,e=xe(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=ge(this._element),this._parentScale=be(e),n="mousedown"===t.type,we(document,n?"mousemove":"touchmove",this._onMove,this),we(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function tn(t,e,n,i){var r=e.x,o=(e=e.y,n.x-r),a=n.y-e,s=o*o+a*a;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||gn.prototype._containsPoint.call(this,t,!0)}}),vn=sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;ea.x&&(s=i.x+l-a.x+o.x),i.x-s-r.x<(l=0)&&(s=i.x-r.x),i.y+n+o.y>a.y&&(l=i.y+n-a.y+o.y),i.y-l-r.y<0&&(l=i.y-r.y),(s||l)&&e.fire("autopanstart").panBy([s,l],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),On=(Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return this._initOverlay(Pn,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Pn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ee(t),e=t.layer||t.target,this._popup._source!==e||e instanceof dn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ln.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,i=this._container,r=n.latLngToContainerPoint(n.getCenter()),o=(n=n.layerPointToContainerPoint(t),this.options.direction),a=i.offsetWidth,s=i.offsetHeight,l=N(this.options.offset),u=this._getAnchor();n="top"===o?(e=a/2,s):"bottom"===o?(e=a/2,0):(e="center"===o?a/2:"right"===o?0:"left"===o?a:n.xthis.options.maxZoom||ithis.options.maxZoom||void 0!==this.options.minZoom&&rn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),B(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n);return n=i.add(n),[e.unproject(i,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){return t=new z((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new O(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(ne(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Dt.ielt9&&this.options.opacity<1&&ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(r(this._tileReady,this,t,null,o)),fe(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(ce(n.el,0),A(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(se(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Dt.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),kn=Nn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Dt.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn=(dt={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Bn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vn("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ne(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e=e||(t._stroke=Vn("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n=n||(t._fill=Vn("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){oe(t._container)}},Dt.vml?Vn:Y),Hn=Bn.extend({_initContainer:function(){this._container=Gn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ne(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(Bn.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),fe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Gn("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ne(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options,e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ",this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){oe(t._path)}});function Un(t){return Dt.svg||Dt.vml?new Hn(t):null}Dt.vml&&Hn.include(dt),Ze.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Fn(t)||Un(t)}});var Wn=mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Hn.create=Gn,Hn.pointsToPath=q,vn.geometryToLayer=yn,vn.coordsToLatLng=xn,vn.coordsToLatLngs=bn,vn.latLngToCoords=wn,vn.latLngsToCoords=Sn,vn.getFeature=Tn,vn.asFeature=Mn,Ze.mergeOptions({boxZoom:!0}),K=$.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ne(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),jt(),me(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new k(this._point,this._startPoint)).getSize();fe(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ne(this._box),le(this._container,"leaflet-crosshair")),Xt(),ve(),Te(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ze.addInitHook("addHandler","boxZoom",K),Ze.mergeOptions({doubleClickZoom:!0}),pt=$.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta;n=t.originalEvent.shiftKey?n-i:n+i,"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});var jn=(Ze.addInitHook("addHandler","doubleClickZoom",pt),Ze.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),$.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Ye(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=B(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=((r=this._draggable._newPos.x)-e+n)%t+e-n,r=(r+e+n)%t-e-n;t=Math.abs(i+n)e.getMaxZoom()&&1{"use strict";n.d(e,{ZT:()=>r}); +!function(t){"use strict";function e(t){for(var e,n,i=1,r=arguments.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>=e.x&&i.x<=n.x;return t=t.y>=e.y&&i.y<=n.y,r&&t},overlaps:function(t){t=R(t);var e=this.min,n=this.max,i=t.min,r=(t=t.max).x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=r.lat&&e.lng>=i.lng&&n.lng<=r.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>=e.lat&&i.lat<=n.lat;return t=t.lng>=e.lng&&i.lng<=n.lng,r&&t},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),r=(t=t.getNorthEast()).lat>e.lat&&i.late.lng&&i.lng","http://www.w3.org/2000/svg"===(Ct.firstChild&&Ct.firstChild.namespaceURI));function At(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var It={ie:J,ielt9:Q,edge:$,webkit:tt,android:et,android23:nt,androidStock:it,opera:rt,chrome:ot,gecko:at,safari:st,phantom:lt,opera12:ut,win:ht,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:pt,mobile:jn,mobileWebkit:ft,mobileWebkit3d:gt,msPointer:mt,pointer:vt,touch:_t,touchNative:yt,mobileOpera:xt,mobileGecko:bt,retina:wt,passiveEvents:St,canvas:Tt,svg:Mt,vml:!Mt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Ct},Dt=It.msPointer?"MSPointerDown":"pointerdown",Lt=It.msPointer?"MSPointerMove":"pointermove",Pt=It.msPointer?"MSPointerUp":"pointerup",Ot=It.msPointer?"MSPointerCancel":"pointercancel",Et={touchstart:Dt,touchmove:Lt,touchend:Pt,touchcancel:Ot},Nt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Oe(e),Vt(t,e)},touchmove:Vt,touchend:Vt,touchcancel:Vt},kt={},Rt=!1;function zt(t,e,n){return"touchstart"!==e||Rt||(document.addEventListener(Dt,Bt,!0),document.addEventListener(Lt,Zt,!0),document.addEventListener(Pt,Ft,!0),document.addEventListener(Ot,Ft,!0),Rt=!0),Nt[e]?(n=Nt[e].bind(this,n),t.addEventListener(Et[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function Bt(t){kt[t.pointerId]=t}function Zt(t){kt[t.pointerId]&&(kt[t.pointerId]=t)}function Ft(t){delete kt[t.pointerId]}function Vt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],kt)e.touches.push(kt[n]);e.changedTouches=[e],t(e)}}var Gt=200;function Ht(t,e){t.addEventListener("dblclick",e);var n,i=0;function r(t){var r;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((r=Date.now())-i<=Gt?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return(t=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r)}return t.addEventListener("click",r),{dblclick:e,simDblclick:r}}var Ut,Wt,jt,Xt,Yt,qt,Kt=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Jt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qt="webkitTransition"===Jt||"OTransition"===Jt?Jt+"End":"transitionend";function $t(t){return"string"==typeof t?document.getElementById(t):t}function te(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:n}function ee(t,e,n){return(t=document.createElement(t)).className=e||"",n&&n.appendChild(t),t}function ne(t){var e=t.parentNode;e&&e.removeChild(t)}function ie(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function oe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ae(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=he(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var n;if(void 0!==t.classList)for(var i=d(e),r=0,o=i.length;rthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter();return t=this._limitCenter(n,this._zoom,B(t)),n.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=N((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=N(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=(t=this.project(t),(n=R([(o=this.getPixelBounds()).min.add(n),o.max.subtract(i)])).getSize());return n.contains(t)||(this._enforcingBounds=!0,i=t.subtract(n.getCenter()),n=n.extend(t).getSize().subtract(o),r.x+=i.x<0?-n.x:n.x,r.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),o=n.divideBy(2).round(),a=i.divideBy(2).round();return(o=o.subtract(a)).x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,n,i=new Z(t.coords.latitude,t.coords.longitude),r=i.toBounds(2*t.coords.accuracy),o=this._locateOptions,a=(o.setView&&(e=this.getBoundsZoom(r),this.setView(i,o.maxZoom?Math.min(e,o.maxZoom):e)),{latlng:i,bounds:r,timestamp:t.timestamp});for(n in t.coords)"number"==typeof t.coords[n]&&(a[n]=t.coords[n]);this.fire("locationfound",a)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ne(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ne(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=ee("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=N(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=(t=t.getSouthEast(),n=this.getSize().subtract(n),t=R(this.project(t,i),this.project(a,i)).getSize(),a=It.any3d?this.options.zoomSnap:1,n.x/t.x);return n=n.y/t.y,t=e?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(t,i),a&&(i=Math.round(i/(a/100))*(a/100),i=e?Math.ceil(i/a)*a:Math.floor(i/a)*a),Math.max(r,Math.min(o,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new k(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,t=n.zoom(t*n.scale(e)),isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(N(t),e)},layerPointToLatLng:function(t){return t=N(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return N(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return N(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(N(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=$t(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");we(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&It.any3d,se(t,"leaflet-container"+(It.touch?" leaflet-touch":"")+(It.retina?" leaflet-retina":"")+(It.ielt9?" leaflet-oldie":"")+(It.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),te(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fe(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){fe(this._mapPane,new O(0,0));var n=!this._loaded,i=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){fe(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?Te:we;e((this._targets[a(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),It.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((n=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(r&&!ze(o,t))break;if(i.push(n),r)break}if(o===this._container)break;o=o.parentNode}return i.length||s||r||!this.listens(e,!0)?i:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,n=t.target||t.srcElement;!this._loaded||n._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(n)||("mousedown"===(e=t.type)&&ye(n),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){"click"===t.type&&((l=e({},t)).type="preclick",this._fireDOMEvent(l,l.type,i));var r=this._findEventTargets(t,n);if(i){for(var o=[],a=0;athis.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e);return i=this._getCenterOffset(t)._divideBy(1-1/i),!(!0!==n.animate&&!this.getSize().contains(i)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Fe(t){return new Ge(t)}var Ve,Ge=I.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition();return t=t._controlCorners[n],se(e,"leaflet-control"),-1!==n.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ne(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer),r=((t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),we(e,"click",this._onInputClick,this),i=document.createElement("span")).innerHTML=" "+t.name,document.createElement("span"));return n.appendChild(r),r.appendChild(e),r.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var o=n.length-1;0<=o;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||r.push(e);for(o=0;oe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ue=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ee("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,r){return(n=ee("a",n,i)).innerHTML=t,n.href="#",n.title=e,n.setAttribute("role","button"),n.setAttribute("aria-label",e),Pe(n),we(n,"click",Ee),we(n,"click",r,this),we(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";le(this._zoomInButton,e),le(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),We=(Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ue,this.addControl(this.zoomControl))})),Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ee("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ee("div",e,n)),t.imperial&&(this._iScale=ee("div",e,n))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,n;5280<(t*=3.2808399)?(n=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,n+" mi",n/e)):(n=this._getRoundNum(t),this._updateScale(this._iScale,n+" ft",n/t))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t/=e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),je=Ge.extend({options:{position:"bottomright",prefix:''+(It.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ee("div","leaflet-control-attribution"),Pe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' ')}}}),Xe=(Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook((function(){this.options.attributionControl&&(new je).addTo(this)})),Ge.Layers=He,Ge.Zoom=Ue,Ge.Scale=We,Ge.Attribution=je,Fe.layers=function(t,e,n){return new He(t,e,n)},Fe.zoom=function(t){return new Ue(t)},Fe.scale=function(t){return new We(t)},Fe.attribution=function(t){return new je(t)},$=I.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}),$.addTo=function(t,e){return t.addHandler(e,this),this},tt={Events:D},It.touch?"touchstart mousedown":"mousedown"),Ye=P.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(we(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ye._dragging===this&&this.finishDrag(!0),Te(this._dragStartTarget,Xe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,n;this._enabled&&(this._moved=!1,ae(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Ye._dragging===this&&this.finishDrag():Ye._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Ye._dragging=this)._preventOutline&&ye(this._element),me(),jt(),this._moving||(this.fire("down"),n=t.touches?t.touches[0]:t,e=xe(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=ge(this._element),this._parentScale=be(e),n="mousedown"===t.type,we(document,n?"mousemove":"touchmove",this._onMove,this),we(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(n.push(t[i]),r=i);return re.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function tn(t,e,n,i){var r=e.x,o=(e=e.y,n.x-r),a=n.y-e,s=o*o+a*a;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||gn.prototype._containsPoint.call(this,t,!0)}}),vn=sn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,r=v(t)?t:t.features;if(r){for(e=0,n=r.length;ea.x&&(s=i.x+l-a.x+o.x),i.x-s-r.x<(l=0)&&(s=i.x-r.x),i.y+n+o.y>a.y&&(l=i.y+n-a.y+o.y),i.y-l-r.y<0&&(l=i.y-r.y),(s||l)&&e.fire("autopanstart").panBy([s,l],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),On=(Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return this._initOverlay(Pn,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Pn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ee(t),e=t.layer||t.target,this._popup._source!==e||e instanceof dn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ln.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ee("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n=this._map,i=this._container,r=n.latLngToContainerPoint(n.getCenter()),o=(n=n.layerPointToContainerPoint(t),this.options.direction),a=i.offsetWidth,s=i.offsetHeight,l=N(this.options.offset),u=this._getAnchor();n="top"===o?(e=a/2,s):"bottom"===o?(e=a/2,0):(e="center"===o?a/2:"right"===o?0:"left"===o?a:n.xthis.options.maxZoom||ithis.options.maxZoom||void 0!==this.options.minZoom&&rn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),B(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n);return n=i.add(n),[e.unproject(i,t.z),e.unproject(n,t.z)]},_tileCoordsToBounds:function(t){return t=new z((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new O(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(ne(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,It.ielt9&&this.options.opacity<1&&ce(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(r(this._tileReady,this,t,null,o)),fe(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(ce(n.el,0),C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(se(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),It.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new k(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),kn=Nn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&It.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Gn=(dt={_initContainer:function(){this._container=ee("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Bn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vn("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ne(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,r=t._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(e=e||(t._stroke=Vn("stroke")),r.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(r.removeChild(e),t._stroke=null),i.fill?(n=n||(t._fill=Vn("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){oe(t._container)}},It.vml?Vn:Y),Hn=Bn.extend({_initContainer:function(){this._container=Gn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ne(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,n;this._map._animatingZoom&&this._bounds||(Bn.prototype._update.call(this),e=(t=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),fe(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Gn("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ne(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options,e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ",this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){oe(t._path)}});function Un(t){return It.svg||It.vml?new Hn(t):null}It.vml&&Hn.include(dt),Ze.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Fn(t)||Un(t)}});var Wn=mn.extend({initialize:function(t,e){mn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Hn.create=Gn,Hn.pointsToPath=q,vn.geometryToLayer=yn,vn.coordsToLatLng=xn,vn.coordsToLatLngs=bn,vn.latLngToCoords=wn,vn.latLngsToCoords=Sn,vn.getFeature=Tn,vn.asFeature=Mn,Ze.mergeOptions({boxZoom:!0}),K=$.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){we(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ne(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),jt(),me(),this._startPoint=this._map.mouseEventToContainerPoint(t),we(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ee("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new k(this._point,this._startPoint)).getSize();fe(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ne(this._box),le(this._container,"leaflet-crosshair")),Xt(),ve(),Te(document,{contextmenu:Ee,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ze.addInitHook("addHandler","boxZoom",K),Ze.mergeOptions({doubleClickZoom:!0}),pt=$.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta;n=t.originalEvent.shiftKey?n-i:n+i,"center"===e.options.doubleClickZoom?e.setZoom(n):e.setZoomAround(t.containerPoint,n)}});var jn=(Ze.addInitHook("addHandler","doubleClickZoom",pt),Ze.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),$.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Ye(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=B(this._map.options.maxBounds),this._offsetLimit=R(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,n;this._map.options.inertia&&(e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=((r=this._draggable._newPos.x)-e+n)%t+e-n,r=(r+e+n)%t-e-n;t=Math.abs(i+n)e.getMaxZoom()&&1{"use strict";n.d(e,{ZT:()=>r}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -18,5 +18,5 @@ 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 i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;Object.create},5823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(7411),r=n(5622),o=n(479),a=n(3510),s=n(423),l=n(3051),u=n(4990),h=n(1092),c=n(4414),d="__zr_normal__",p=i.dN.concat(["ignore"]),f=(0,l.reduce)(i.dN,(function(t,e){return t[e]=!0,t}),{ignore:!1}),g={},m=new o.Z(0,0,0,0),v=function(){function t(t){this.id=(0,l.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.copyTransform(e),null!=n.position){var h=m;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,h):(0,s.wI)(g,n,h),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*h.width,f=.5*h.height):(p=(0,s.GM)(d[0],h.width),f=(0,s.GM)(d[1],h.height)),u=!0,r.originX=-r.x+p+(i?0:h.x),r.originY=-r.y+f+(i?0:h.y)}}null!=n.rotation&&(r.rotation=n.rotation);var v=n.offset;v&&(r.x+=v[0],r.y+=v[1],u||(r.originX=-v[0],r.originY=-v[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,_=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),x=void 0,b=void 0,w=void 0;y&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,null!=x&&"auto"!==x||(x=this.getInsideTextFill()),null!=b&&"auto"!==b||(b=this.getInsideTextStroke(x),w=!0)):(x=n.outsideFill,b=n.outsideStroke,null!=x&&"auto"!==x||(x=this.getOutsideFill()),null!=b&&"auto"!==b||(b=this.getOutsideStroke(x),w=!0)),(x=x||"#000")===_.fill&&b===_.stroke&&w===_.autoStroke&&o===_.align&&a===_.verticalAlign||(l=!0,_.fill=x,_.stroke=b,_.autoStroke=w,_.align=o,_.verticalAlign=a,e.setDefaultTextStyle(_)),e.__dirty|=c.YV,l&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,h.parse)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,h.stringify)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.isObject)(t))for(var n=t,i=(0,l.keys)(n),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(d,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===d;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.indexOf)(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||i);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,p=this._textGuide;return h&&h.useState(t,e,n,u),p&&p.useState(t,e,n,u),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV),s}(0,l.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,f);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,e,d),m&&m.useStates(t,e,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.indexOf)(i,t),o=(0,l.indexOf)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||o.force&&!s.length){var A,C=void 0,D=void 0,I=void 0;if(u){D={},f&&(C={});for(T=0;T{"use strict";n.d(e,{V:()=>v,Z:()=>S});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i;var o=n(3051),a=n(5188);const s=function(){function t(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||o.noop,this.ondestroy=t.ondestroy||o.noop,this.onrestart=t.onrestart||o.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=(0,o.isFunction)(t)?t:r[t]||(0,a.H)(t)},t}();var l=n(1092),u=n(4839),h=Array.prototype.slice;function c(t,e,n){return(e-t)*n+t}function d(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,s=i.length,h=!1,c=6,d=e;if((0,o.isArrayLike)(e)){var p=function(t){return(0,o.isArrayLike)(t&&t[0])?2:1}(e);c=p,(1===p&&!(0,o.isNumber)(e[0])||2===p&&!(0,o.isNumber)(e[0][0]))&&(h=!0)}else if((0,o.isNumber)(e)&&!(0,o.eqNaN)(e))c=0;else if((0,o.isString)(e))if(isNaN(+e)){var f=l.parse(e);f&&(d=f,c=3)}else c=0;else if((0,o.isGradientObject)(e)){var g=(0,o.extend)({},d);g.colorStops=(0,o.map)(e.colorStops,(function(t){return{offset:t.offset,color:l.parse(t.color)}})),(0,u.I1)(e)?c=4:(0,u.gO)(e)&&(c=5),d=g}0===s?this.valType=c:c===this.valType&&6!==c||(h=!0),this.discrete=this.discrete||h;var m={time:t,value:d,rawValue:e,percent:0};return n&&(m.easing=n,m.easingFunc=(0,o.isFunction)(n)?n:r[n]||(0,a.H)(n)),i.push(m),m},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=x(i),l=_(i),u=0;u=0&&!(u[n].percent<=e);n--);n=m(n,h-2)}else{for(n=g;ne);n++);n=m(n-1,h-2)}r=u[n+1],i=u[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var v=r.percent-i.percent,w=0===v?1:m((e-i.percent)/v,1);r.easingFunc&&(w=r.easingFunc(w));var S=a?this._additiveValue:f?b:t[p];if(!x(l)&&!f||S||(S=this._additiveValue=[]),this.discrete)t[p]=w<1?i.rawValue:r.rawValue;else if(x(l))1===l?d(S,i[s],r[s],w):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,v(l),i),this._trackKeys.push(a)}s.addKeyframe(t,v(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var s=a.pop();r.addKeyframe(s.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}()},5188:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var i=n(8554),r=n(3051),o=/cubic-bezier\(([0-9,\.e ]+)\)/;function a(t){var e=t&&o.exec(t);if(e){var n=e[1].split(","),a=+(0,r.trim)(n[0]),s=+(0,r.trim)(n[1]),l=+(0,r.trim)(n[2]),u=+(0,r.trim)(n[3]);if(isNaN(a+s+l+u))return;var h=[];return function(t){return t<=0?0:t>=1?1:(0,i.kD)(0,a,l,1,t,h)&&(0,i.af)(0,s,u,1,h[0])}}}},2795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6387).default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)}},810:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(3051);function r(t){var e,n,r=t.style,o=r.lineDash&&r.lineWidth>0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:(0,i.isNumber)(e)?[e]:(0,i.isArray)(e)?e:null:null),a=r.lineDashOffset;if(o){var s=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(o=(0,i.map)(o,(function(t){return t/s})),a/=s)}return[o,a]}},7772:(t,e,n)=>{"use strict";n.d(e,{Dm:()=>I,RV:()=>D,RZ:()=>x});var i=n(7719),r=n(4014),o=n(8007),a=n(5787),s=n(327),l=n(4535),u=n(1505),h=n(3051),c=n(810),d=n(4414),p=n(3132),f=new r.Z(!0);function g(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function m(t){return"string"==typeof t&&"none"!==t}function v(t){var e=t.fill;return null!=e&&"none"!==e}function y(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function _(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function x(t,e,n){var i=(0,o.Gq)(e.image,e.__image,n);if((0,o.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*h.RADIAN_TO_DEGREE),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}var b=["shadowBlur","shadowOffsetX","shadowOffsetY"],w=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function S(t,e,n,r,o){var a=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){A(t,o),a=!0;var s=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(s)?i.tj.opacity:s}(r||e.blend!==n.blend)&&(a||(A(t,o),a=!0),t.globalCompositeOperation=e.blend||i.tj.blend);for(var l=0;l{"use strict";function i(t){return isFinite(t)}function r(t,e,n){for(var r="radial"===e.type?function(t,e,n){var r=n.width,o=n.height,a=Math.min(r,o),s=null==e.x?.5:e.x,l=null==e.y?.5:e.y,u=null==e.r?.5:e.r;return e.global||(s=s*r+n.x,l=l*o+n.y,u*=a),s=i(s)?s:.5,l=i(l)?l:.5,u=u>=0&&i(u)?u:.5,t.createRadialGradient(s,l,0,s,l,u)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,s=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,s=s*n.height+n.y),r=i(r)?r:0,o=i(o)?o:1,a=i(a)?a:0,s=i(s)?s:0,t.createLinearGradient(r,a,o,s)}(t,e,n),o=e.colorStops,a=0;ar,ap:()=>s,cF:()=>o})},4990:(t,e,n)=>{"use strict";n.d(e,{Ak:()=>o,GD:()=>s,KL:()=>r,iv:()=>l,vU:()=>a});var i=1;n(6387).default.hasGlobalWindow&&(i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},3640:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oi})},765:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var i=n(7637);function r(t,e){return Math.abs(t-e)<1e-8}function o(t,e,n){var o=0,a=t[0];if(!a)return!1;for(var s=1;s{"use strict";n.d(e,{m:()=>r});var i=n(8554);function r(t,e,n,r,o,a,s,l,u){if(0===s)return!1;var h=s;return!(u>e+h&&u>r+h&&u>a+h||ut+h&&l>n+h&&l>o+h||l{"use strict";n.d(e,{Dp:()=>d,GM:()=>p,M3:()=>h,dz:()=>s,lP:()=>u,mU:()=>c,wI:()=>f});var i=n(479),r=n(2528),o=n(3132),a={};function s(t,e){e=e||o.Uo;var n=a[e];n||(n=a[e]=new r.ZP(500));var i=n.get(t);return null==i&&(i=o.qW.measureText(t,e).width,n.put(t,i)),i}function l(t,e,n,r){var o=s(t,e),a=d(e),l=h(0,o,n),u=c(0,a,r);return new i.Z(l,u,o,a)}function u(t,e,n,r){var o=((t||"")+"").split("\n");if(1===o.length)return l(o[0],e,n,r);for(var a=new i.Z(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function f(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=p(i[0],n.width),u+=p(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}},3266:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},7637:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}n.d(e,{Z:()=>i})},479:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(2892),r=n(1610),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,h=new r.Z,c=new r.Z,d=new r.Z;const p=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.create();return i.translate(o,o,[-e.x,-e.y]),i.scale(o,o,[n,r]),i.translate(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,h=e.x+e.width,p=e.y,f=e.y+e.height,g=!(av&&(v=w,y<_?r.Z.set(d,-y,0):r.Z.set(d,_,0)):wv&&(v=S,x=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],c=i[3],d=i[4],p=i[5];return e.x=n.x*r+d,e.y=n.y*c+p,e.width=n.width*r,e.height=n.height*c,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=h.y=n.y,l.x=h.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),h.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,h.x),e.y=o(s.y,l.y,u.y,h.y);var f=a(s.x,l.x,u.x,h.x),g=a(s.y,l.y,u.y,h.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},3510:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},1587:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(1610),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,h=0;h<2;h++){var c=this._axes[h];if(this._getProjMinMaxOnAxis(h,t._corners,r),this._getProjMinMaxOnAxis(h,e._corners,o),r[1]o[1]){if(u=!1,s)return u;var d=Math.abs(o[0]-r[1]),p=Math.abs(r[0]-o[1]);Math.min(d,p)>a.len()&&(d{"use strict";n.d(e,{L:()=>M,Z:()=>A});var i=n(5280),r=n(479),o=n(4990),a=n(3726),s=n(8554),l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],p=[],f=[],g=Math.min,m=Math.max,v=Math.cos,y=Math.sin,_=Math.abs,x=Math.PI,b=2*x,w="undefined"!=typeof Float32Array,S=[];function T(t){return Math.round(t/x*1e8)/1e8%2*x}function M(t,e){var n=T(t[0]);n<0&&(n+=b);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=b?r=n+b:e&&n-r>=b?r=n-b:!e&&n>r?r=n+(b-T(n-r)):e&&n0&&(this._ux=_(n/o.KL/t)||0,this._uy=_(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=_(t-this._xi),i=_(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(l.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(l.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(l.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),S[0]=i,S[1]=r,M(S,o),i=S[0];var a=(r=S[1])-i;return this.addData(l.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=v(r)*n+t,this._yi=y(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(l.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!w||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){c[0]=c[1]=p[0]=p[1]=Number.MAX_VALUE,d[0]=d[1]=f[0]=f[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,s=0,u=0;for(t=0;tn||_(T)>i||p===e-1)&&(w=Math.sqrt(z*z+T*T),r=S,o=C);break;case l.C:var M=t[p++],A=t[p++],C=(S=t[p++],t[p++]),D=t[p++],I=t[p++];w=(0,s.Ci)(r,o,M,A,S,C,D,I,10),r=D,o=I;break;case l.Q:M=t[p++],A=t[p++],S=t[p++],C=t[p++];w=(0,s.wQ)(r,o,M,A,S,C,10),r=S,o=C;break;case l.A:var L=t[p++],P=t[p++],O=t[p++],E=t[p++],N=t[p++],k=t[p++],R=k+N;p+=1;t[p++];x&&(a=v(N)*O+L,u=y(N)*E+P),w=m(O,E)*g(b,Math.abs(k)),r=v(R)*O+L,o=y(R)*E+P;break;case l.R:a=r=t[p++],u=o=t[p++],w=2*t[p++]+2*t[p++];break;case l.Z:var z=a-r;T=u-o;w=Math.sqrt(z*z+T*T),r=a,o=u}w>=0&&(h[d++]=w,c+=w)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,c,d,p,f,x,b=this.data,w=this._ux,S=this._uy,T=this._len,M=e<1,A=0,C=0,D=0;if(!M||(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=e*this._pathLen))t:for(var I=0;I0&&(t.lineTo(f,x),D=0),L){case l.M:n=r=b[I++],i=o=b[I++],t.moveTo(r,o);break;case l.L:a=b[I++],c=b[I++];var O=_(a-r),E=_(c-o);if(O>w||E>S){if(M){if(A+(it=d[C++])>p){var N=(p-A)/it;t.lineTo(r*(1-N)+a*N,o*(1-N)+c*N);break t}A+=it}t.lineTo(a,c),r=a,o=c,D=0}else{var k=O*O+E*E;k>D&&(f=a,x=c,D=k)}break;case l.C:var R=b[I++],z=b[I++],B=b[I++],Z=b[I++],F=b[I++],V=b[I++];if(M){if(A+(it=d[C++])>p){N=(p-A)/it;(0,s.Vz)(r,R,B,F,N,u),(0,s.Vz)(o,z,Z,V,N,h),t.bezierCurveTo(u[1],h[1],u[2],h[2],u[3],h[3]);break t}A+=it}t.bezierCurveTo(R,z,B,Z,F,V),r=F,o=V;break;case l.Q:R=b[I++],z=b[I++],B=b[I++],Z=b[I++];if(M){if(A+(it=d[C++])>p){N=(p-A)/it;(0,s.Lx)(r,R,B,N,u),(0,s.Lx)(o,z,Z,N,h),t.quadraticCurveTo(u[1],h[1],u[2],h[2]);break t}A+=it}t.quadraticCurveTo(R,z,B,Z),r=B,o=Z;break;case l.A:var G=b[I++],H=b[I++],U=b[I++],W=b[I++],j=b[I++],X=b[I++],Y=b[I++],q=!b[I++],K=U>W?U:W,J=_(U-W)>.001,Q=j+X,$=!1;if(M)A+(it=d[C++])>p&&(Q=j+X*(p-A)/it,$=!0),A+=it;if(J&&t.ellipse?t.ellipse(G,H,U,W,Y,j,Q,q):t.arc(G,H,K,j,Q,q),$)break t;P&&(n=v(j)*U+G,i=y(j)*W+H),r=v(Q)*U+G,o=y(Q)*W+H;break;case l.R:n=r=b[I],i=o=b[I+1],a=b[I++],c=b[I++];var tt=b[I++],et=b[I++];if(M){if(A+(it=d[C++])>p){var nt=p-A;t.moveTo(a,c),t.lineTo(a+g(nt,tt),c),(nt-=tt)>0&&t.lineTo(a+tt,c+g(nt,et)),(nt-=et)>0&&t.lineTo(a+m(tt-nt,0),c+et),(nt-=tt)>0&&t.lineTo(a,c+m(et-nt,0));break t}A+=it}t.rect(a,c,tt,et);break;case l.Z:if(M){var it;if(A+(it=d[C++])>p){N=(p-A)/it;t.lineTo(r*(1-N)+n*N,o*(1-N)+i*N);break t}A+=it}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=l,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}()},1610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},7411:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>g,dN:()=>p,kY:()=>f});var i=n(2892),r=n(5280),o=i.identity,a=5e-5;function s(t){return t>a||t<-5e-5}var l=[],u=[],h=i.create(),c=Math.abs,d=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return s(this.rotation)||s(this.x)||s(this.y)||s(this.scaleX-1)||s(this.scaleY-1)||s(this.skewX)||s(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||i.create(),e?this.getLocalTransform(n):o(n),t&&(e?i.mul(n,t,n):i.copy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&o(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(l);var n=l[0]<0?-1:1,r=l[1]<0?-1:1,o=((l[0]-n)*e+n)/l[0]||0,a=((l[1]-r)*e+r)/l[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var n=this.originX,r=this.originY;(n||r)&&(h[4]=n,h[5]=r,i.mul(u,e,h),u[4]-=n,u[5]-=r,e=u),this.setLocalTransform(e)}},t.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)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.applyTransform(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.applyTransform(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){f(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,o=t.scaleX,a=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,d=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||r||s||l){var f=n+s,g=r+l;e[4]=-f*o-d*g*a,e[5]=-g*a-p*f*o}else e[4]=e[5]=0;return e[0]=o,e[3]=a,e[1]=p*o,e[2]=d*a,u&&i.rotate(e,e,u),e[4]+=n+h,e[5]+=r+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),p=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f(t,e){for(var n=0;n{"use strict";n.d(e,{H9:()=>v,mJ:()=>y,qL:()=>_,u4:()=>f,zk:()=>p});var i=n(5280),r=n(8554),o=Math.min,a=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,h=i.create(),c=i.create(),d=i.create();function p(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],s=i[0],l=i[1],u=i[1],h=1;h1e-4)return f[0]=t-n,f[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(h[0]=l(o)*n+t,h[1]=s(o)*r+e,c[0]=l(a)*n+t,c[1]=s(a)*r+e,m(f,h,c),v(g,h,c),(o%=u)<0&&(o+=u),(a%=u)<0&&(a+=u),o>a&&!p?a+=u:oo&&(d[0]=l(x)*n+t,d[1]=s(x)*r+e,m(f,d,f),v(g,d,g))}},8554:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>S,Ci:()=>b,Jz:()=>T,Lx:()=>A,QC:()=>M,Vz:()=>_,Wr:()=>C,X_:()=>m,Zm:()=>w,af:()=>g,kD:()=>v,pP:()=>y,t1:()=>x,wQ:()=>D});var i=n(5280),r=Math.pow,o=Math.sqrt,a=1e-8,s=1e-4,l=o(3),u=1/3,h=(0,i.create)(),c=(0,i.create)(),d=(0,i.create)();function p(t){return t>-1e-8&&ta||t<-1e-8}function g(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function m(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,s){var h=i+3*(e-n)-t,c=3*(n-2*e+t),d=3*(e-t),f=t-a,g=c*c-3*h*d,m=c*d-9*h*f,v=d*d-3*c*f,y=0;if(p(g)&&p(m)){if(p(c))s[0]=0;else(I=-d/c)>=0&&I<=1&&(s[y++]=I)}else{var _=m*m-4*g*v;if(p(_)){var x=m/g,b=-x/2;(I=-c/h+x)>=0&&I<=1&&(s[y++]=I),b>=0&&b<=1&&(s[y++]=b)}else if(_>0){var w=o(_),S=g*c+1.5*h*(-m+w),T=g*c+1.5*h*(-m-w);(I=(-c-((S=S<0?-r(-S,u):r(S,u))+(T=T<0?-r(-T,u):r(T,u))))/(3*h))>=0&&I<=1&&(s[y++]=I)}else{var M=(2*g*c-3*h*m)/(2*o(g*g*g)),A=Math.acos(M)/3,C=o(g),D=Math.cos(A),I=(-c-2*C*D)/(3*h),L=(b=(-c+C*(D+l*Math.sin(A)))/(3*h),(-c+C*(D-l*Math.sin(A)))/(3*h));I>=0&&I<=1&&(s[y++]=I),b>=0&&b<=1&&(s[y++]=b),L>=0&&L<=1&&(s[y++]=L)}}return y}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s)){if(f(a))(c=-l/a)>=0&&c<=1&&(r[u++]=c)}else{var h=a*a-4*s*l;if(p(h))r[0]=-a/(2*s);else if(h>0){var c,d=o(h),g=(-a-d)/(2*s);(c=(-a+d)/(2*s))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function _(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function x(t,e,n,r,a,l,u,p,f,m,v){var y,_,x,b,w,S=.005,T=1/0;h[0]=f,h[1]=m;for(var M=0;M<1;M+=.05)c[0]=g(t,n,a,u,M),c[1]=g(e,r,l,p,M),(b=(0,i.distSquare)(h,c))=0&&b=0&&c<=1&&(r[u++]=c)}else{var h=s*s-4*a*l;if(p(h))(c=-s/(2*a))>=0&&c<=1&&(r[u++]=c);else if(h>0){var c,d=o(h),g=(-s-d)/(2*a);(c=(-s+d)/(2*a))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function M(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function A(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function C(t,e,n,r,a,l,u,p,f){var g,m=.005,v=1/0;h[0]=u,h[1]=p;for(var y=0;y<1;y+=.05){c[0]=w(t,n,a,y),c[1]=w(e,r,l,y),(S=(0,i.distSquare)(h,c))=0&&S{"use strict";n.d(e,{UK:()=>h,A4:()=>u,YB:()=>l});var i=n(6387),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),u=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,p=c.left,f=c.top;s.push(p,f),u=u&&o&&p===o[d]&&f===o[d+1],l.push(t[h].offsetLeft,t[h].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(l,s,o);if(u)return u(t,n,r),!0}return!1}function h(t){return"CANVAS"===t.nodeName.toUpperCase()}},6387:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);const o=r},1158:(t,e,n)=>{"use strict";n.d(e,{OD:()=>c,Oo:()=>d,eV:()=>l,iP:()=>h,sT:()=>f,x1:()=>g,xg:()=>p});var i=n(6387),r=n(4058),o=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,a=[],s=i.default.browser.firefox&&+i.default.browser.version.split(".")[0]<39;function l(t,e,n,i){return n=n||{},i?u(t,e,n):s&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.default.domSupported&&t.getBoundingClientRect){var o=e.clientX,s=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=s-l.top)}if((0,r.A4)(a,t,o,s))return n.zrX=a[0],void(n.zrY=a[1])}n.zrX=n.zrY=0}function h(t){return t||window.event}function c(t,e,n){if(null!=(e=h(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var a=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&o.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function d(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var f=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function g(t){return 2===t.which||3===t.which}},2892:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function h(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function c(t){var e=[1,0,0,1,0,0];return o(e,t),e}n.r(e),n.d(e,{clone:()=>c,copy:()=>o,create:()=>i,identity:()=>r,invert:()=>h,mul:()=>a,rotate:()=>l,scale:()=>u,translate:()=>s})},3132:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>o,g2:()=>h,n5:()=>i,qW:()=>u,rk:()=>r});var i=12,r="sans-serif",o=i+"px "+r;var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)c=h*t.length;else for(var d=0;d{"use strict";n.d(e,{Z:()=>l});function i(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function r(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function o(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function a(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function s(t,e){var n,i,r,s=7,l=0;n=t.length;var u=[];function h(n){var h=i[n],c=r[n],d=i[n+1],p=r[n+1];r[n]=c+p,n===l-3&&(i[n+1]=i[n+2],r[n+1]=r[n+2]),l--;var f=a(t[d],t,h,c,0,e);h+=f,0!==(c-=f)&&0!==(p=o(t[h+c-1],t,d,p,p-1,e))&&(c<=p?function(n,i,r,l){var h=0;for(h=0;h=7||g>=7);if(m)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===i){for(h=0;h=0;h--)t[g+h]=t[f+h];return void(t[p]=u[d])}var m=s;for(;;){var v=0,y=0,_=!1;do{if(e(u[d],t[c])<0){if(t[p--]=t[c--],v++,y=0,0==--i){_=!0;break}}else if(t[p--]=u[d--],y++,v=0,1==--l){_=!0;break}}while((v|y)=0;h--)t[g+h]=t[f+h];if(0===i){_=!0;break}}if(t[p--]=u[d--],1==--l){_=!0;break}if(0!==(y=l-o(t[c],u,0,l,l-1,e))){for(l-=y,g=(p-=y)+1,f=(d-=y)+1,h=0;h=7||y>=7);if(_)break;m<0&&(m=0),m+=2}(s=m)<1&&(s=1);if(1===l){for(g=(p-=i)+1,f=(c-=i)+1,h=i-1;h>=0;h--)t[g+h]=t[f+h];t[p]=u[d]}else{if(0===l)throw new Error;for(f=p-(l-1),h=0;h1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;h(t)}},forceMergeRuns:function(){for(;l>1;){var t=l-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((l=i(t,n,o,e))h&&(c=h),r(t,n,n+c,n+l,e),l=c}u.pushRun(n,l),u.mergeRuns(),a-=l,n+=l}while(0!==a);u.forceMergeRuns()}}}},3051:(t,e,n)=>{"use strict";n.r(e),n.d(e,{HashMap:()=>ot,RADIAN_TO_DEGREE:()=>dt,assert:()=>tt,bind:()=>N,clone:()=>y,concatArray:()=>st,createCanvas:()=>S,createHashMap:()=>at,createObject:()=>lt,curry:()=>k,defaults:()=>w,disableUserSelect:()=>ut,each:()=>D,eqNaN:()=>Y,extend:()=>b,filter:()=>P,find:()=>O,guid:()=>m,hasOwn:()=>ht,indexOf:()=>T,inherits:()=>M,isArray:()=>R,isArrayLike:()=>C,isBuiltInObject:()=>G,isDom:()=>U,isFunction:()=>z,isGradientObject:()=>W,isImagePatternObject:()=>j,isNumber:()=>F,isObject:()=>V,isPrimitive:()=>rt,isRegExp:()=>X,isString:()=>B,isStringSafe:()=>Z,isTypedArray:()=>H,keys:()=>E,logError:()=>v,map:()=>I,merge:()=>_,mergeAll:()=>x,mixin:()=>A,noop:()=>ct,normalizeCssArray:()=>$,reduce:()=>L,retrieve:()=>q,retrieve2:()=>K,retrieve3:()=>J,setAsPrimitive:()=>it,slice:()=>Q,trim:()=>et});var i=n(3132),r=L(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),o=L(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),a=Object.prototype.toString,s=Array.prototype,l=s.forEach,u=s.filter,h=s.slice,c=s.map,d=function(){}.constructor,p=d?d.prototype:null,f="__proto__",g=2311;function m(){return g++}function v(){for(var t=[],e=0;e{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t){return[t[0],t[1]]}function a(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function l(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t){return Math.sqrt(d(t))}n.r(e),n.d(e,{add:()=>s,applyTransform:()=>M,clone:()=>o,copy:()=>r,create:()=>i,dist:()=>x,distSquare:()=>w,distance:()=>_,distanceSquare:()=>b,div:()=>g,dot:()=>m,len:()=>h,lenSquare:()=>d,length:()=>c,lengthSquare:()=>p,lerp:()=>T,max:()=>C,min:()=>A,mul:()=>f,negate:()=>S,normalize:()=>y,scale:()=>v,scaleAndAdd:()=>l,set:()=>a,sub:()=>u});var c=h;function d(t){return t[0]*t[0]+t[1]*t[1]}var p=d;function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function g(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function m(t,e){return t[0]*e[0]+t[1]*e[1]}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function y(t,e){var n=h(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function _(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var x=_;function b(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var w=b;function S(t,e){return t[0]=-e[0],t[1]=-e[1],t}function T(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function M(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function A(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function C(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},2776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(655),r=n(327);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n{"use strict";n.d(e,{ZP:()=>m,ik:()=>h,tj:()=>u});var i=n(655),r=n(5823),o=n(479),a=n(3051),s=n(4414),l="__zr_style_"+Math.round(10*Math.random()),u={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},h={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};u[l]=!0;var c=["z","z2","invisible"],d=["invisible"],p=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.keys)(e),i=0;i{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},8154:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(3051),o=n(5823),a=n(479),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=r.indexOf(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.indexOf(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n{"use strict";n.d(e,{ZP:()=>h});var i=n(655),r=n(7719),o=n(479),a=n(3051),s=(0,a.defaults)({x:0,y:0},r.tj),l={style:(0,a.defaults)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)};var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.createObject)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const h=u},1754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(7719),o=n(479),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(1797).Z)},327:(t,e,n)=>{"use strict";n.d(e,{$t:()=>C,ZP:()=>L});var i=n(655),r=n(7719),o=n(4014),a=n(3640),s=n(8554);function l(t,e,n,i,r,o,a,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>i+d&&c>o+d&&c>l+d||ct+d&&h>n+d&&h>r+d&&h>a+d||hn||d+ur&&(r+=c);var f=Math.atan2(l,s);return f<0&&(f+=c),f>=i&&f<=r||f+c>=i&&f+c<=r}var p=n(7637),f=o.Z.CMD,g=2*Math.PI;var m=[-1,-1,-1],v=[-1,-1];function y(t,e,n,i,r,o,a,l,u,h){if(h>e&&h>i&&h>o&&h>l||h1&&(c=void 0,c=v[0],v[0]=v[1],v[1]=c),g=s.af(e,i,o,l,v[0]),f>1&&(y=s.af(e,i,o,l,v[1]))),2===f?xe&&l>i&&l>o||l=0&&h<=1){for(var c=0,d=s.Zm(e,i,o,h),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);m[0]=-l,m[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=g-1e-4){i=0,r=g;var h=o?1:-1;return a>=m[0]+t&&a<=m[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=g,r+=g);for(var d=0,p=0;p<2;p++){var f=m[p];if(f+t>a){var v=Math.atan2(s,f);h=o?1:-1;v<0&&(v=g+v),(v>=i&&v<=r||v+g>=i&&v+g<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(h=-h),d+=h)}}return d}function b(t,e,n,i,r){for(var o,s,h,c,g=t.data,m=t.len(),v=0,b=0,w=0,S=0,T=0,M=0;M1&&(n||(v+=(0,p.Z)(b,w,S,T,i,r))),C&&(S=b=g[M],T=w=g[M+1]),A){case f.M:b=S=g[M++],w=T=g[M++];break;case f.L:if(n){if(a.m(b,w,g[M],g[M+1],e,i,r))return!0}else v+=(0,p.Z)(b,w,g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.C:if(n){if(l(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=y(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.Q:if(n){if(u.m(b,w,g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=_(b,w,g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.A:var D=g[M++],I=g[M++],L=g[M++],P=g[M++],O=g[M++],E=g[M++];M+=1;var N=!!(1-g[M++]);o=Math.cos(O)*L+D,s=Math.sin(O)*P+I,C?(S=o,T=s):v+=(0,p.Z)(b,w,o,s,i,r);var k=(i-D)*P/L+D;if(n){if(d(D,I,P,O,O+E,N,e,k,r))return!0}else v+=x(D,I,P,O,O+E,N,k,r);b=Math.cos(O+E)*L+D,w=Math.sin(O+E)*P+I;break;case f.R:if(S=b=g[M++],T=w=g[M++],o=S+g[M++],s=T+g[M++],n){if(a.m(S,T,o,T,e,i,r)||a.m(o,T,o,s,e,i,r)||a.m(o,s,S,s,e,i,r)||a.m(S,s,S,T,e,i,r))return!0}else v+=(0,p.Z)(o,T,o,s,i,r),v+=(0,p.Z)(S,s,S,T,i,r);break;case f.Z:if(n){if(a.m(b,w,S,T,e,i,r))return!0}else v+=(0,p.Z)(b,w,S,T,i,r);b=S,w=T}}return n||(h=w,c=T,Math.abs(h-c)<1e-4)||(v+=(0,p.Z)(b,w,S,T,i,r)||0),0!==v}var w=n(3051),S=n(1092),T=n(4990),M=n(4414),A=n(7411),C=(0,w.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),D={style:(0,w.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},I=A.dN.concat(["invisible","culling","z","z2","zlevel","parent"]);const L=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?T.vU:e>.2?T.iv:T.GD}if(t)return T.GD}return T.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,w.isString)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===(0,S.lum)(t,0)0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&M.RH)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return b(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return b(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=M.RH,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,w.extend)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&M.RH)},e.prototype.createStyle=function(t){return(0,w.createObject)(C,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,w.extend)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,w.extend)({},i.shape),(0,w.extend)(s,n.shape)):(s=(0,w.extend)({},r?this.shape:i.shape),(0,w.extend)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,w.extend)({},this.shape);for(var u={},h=(0,w.keys)(s),c=0;c{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(1797).Z)},1505:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(7719),o=n(423),a=n(327),s=n(3051),l=n(3132),u=(0,s.defaults)({strokeFirst:!0,font:l.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.createObject)(u,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);h.prototype.type="tspan";const c=h},6498:(t,e,n)=>{"use strict";n.d(e,{VG:()=>_,Y1:()=>b,ZP:()=>D});var i=n(655),r=n(6918),o=n(1505),a=n(3051),s=n(423),l=n(4535),u=n(5151),h=n(479),c=n(7719),d=n(3132),p={fill:"#000"},f={style:(0,a.defaults)({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},c.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=p,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,z=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),B=a.calculatedLineHeight,Z=0;Z=0&&"right"===(O=w[P]).align;)this._placeToken(O,t,T,v,L,"right",_),M-=O.width,L-=O.width,P--;for(I+=(i-(I-m)-(y-L)-M)/2;D<=P;)O=w[D],this._placeToken(O,t,T,v,I+O.width/2,"center",_),I+=O.width,D++;v+=T}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var c=e.rich[t.styleName]||{};c.text=t.text;var p=t.verticalAlign,f=i+n/2;"top"===p?f=i+t.height/2:"bottom"===p&&(f=i+n-t.height/2),!t.isLineHolder&&C(c)&&this._renderBackground(c,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,f-t.height/2,t.width,t.height);var g=!!c.backgroundColor,m=t.textPadding;m&&(r=M(r,l,m),f-=t.height/2-m[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var _=this._defaultStyle,b=!1,w=0,A=T("fill"in c?c.fill:"fill"in e?e.fill:(b=!0,_.fill)),D=S("stroke"in c?c.stroke:"stroke"in e?e.stroke:g||u||_.autoStroke&&!b?null:(w=2,_.stroke)),I=c.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=f,I&&(y.shadowBlur=c.textShadowBlur||e.textShadowBlur||0,y.shadowColor=c.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=c.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=c.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||d.Uo,y.opacity=(0,a.retrieve3)(c.opacity,e.opacity,1),x(y,c),D&&(y.lineWidth=(0,a.retrieve3)(c.lineWidth,e.lineWidth,w),y.lineDash=(0,a.retrieve2)(c.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=D),A&&(y.fill=A);var L=t.contentWidth,P=t.contentHeight;v.setBoundingRect(new h.Z((0,s.M3)(y.x,L,y.textAlign),(0,s.mU)(y.y,P,y.textBaseline),L,P))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,h,c,d=t.backgroundColor,p=t.borderWidth,f=t.borderColor,g=d&&d.image,m=d&&!g,v=t.borderRadius,y=this;if(m||t.lineHeight||p&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var _=s.shape;_.x=n,_.y=i,_.width=r,_.height=o,_.r=v,s.dirtyShape()}if(m)(c=s.style).fill=d||null,c.fillOpacity=(0,a.retrieve2)(t.fillOpacity,1);else if(g){(h=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var x=h.style;x.image=d.image,x.x=n,x.y=i,x.width=r,x.height=o}p&&f&&((c=s.style).lineWidth=p,c.stroke=f,c.strokeOpacity=(0,a.retrieve2)(t.strokeOpacity,1),c.lineDash=t.borderDash,c.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var b=(s||h).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=(0,a.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return b(t)&&(e=[t.fontStyle,t.fontWeight,_(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&(0,a.trim)(e)||t.textFont||t.font},e}(c.ZP),m={left:!0,right:1,center:1},v={top:1,bottom:1,middle:1},y=["fontStyle","fontWeight","fontSize","fontFamily"];function _(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?d.n5+"px":t+"px":t}function x(t,e){for(var n=0;n{"use strict";n.d(e,{RH:()=>o,SE:()=>r,YV:()=>i});var i=1,r=2,o=4},8007:(t,e,n)=>{"use strict";n.d(e,{Gq:()=>s,ko:()=>a,v5:()=>u});var i=n(2528),r=n(3132),o=new i.ZP(50);function a(t){if("string"==typeof t){var e=o.get(t);return e&&e.image}return t}function s(t,e,n,i,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var s=o.get(t),h={hostEl:n,cb:i,cbPayload:a};return s?!u(e=s.image)&&s.pending.push(h):((e=r.qW.loadImage(t,l,l)).__zrImageSrc=t,o.put(t,e.__cachedImgObj={image:e,pending:[h]})),e}return t}return e}function l(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e{"use strict";n.d(e,{$F:()=>g,NY:()=>c,aF:()=>s});var i=n(8007),r=n(3051),o=n(423),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a=l;h++)u-=l;var c=(0,o.dz)(n,e);return c>u&&(n="",c=0),u=t-c,a.ellipsis=n,a.ellipsisWidth=c,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?h(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function h(t,e,n,i){for(var r=0,o=0,a=t.length;ov&&f){var y=Math.floor(v/d);n=n.slice(0,y)}if(t&&h&&null!=g)for(var x=l(g,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b=0;bp&&m(n,t.substring(p,g),e,d),m(n,l[2],e,d,l[1]),p=a.lastIndex}ph){D>0?(M.tokens=M.tokens.slice(0,D),S(M,C,A),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var N=I.width,k=null==N||"auto"===N;if("string"==typeof N&&"%"===N.charAt(N.length-1))Z.percentWidth=N,v.push(Z),Z.contentWidth=(0,o.dz)(Z.text,O);else{if(k){var R=I.backgroundColor,z=R&&R.image;z&&(z=i.ko(z),i.v5(z)&&(Z.width=Math.max(Z.width,z.width*E/z.height)))}var B=b&&null!=u?u-C:null;null!=B&&B0&&v+i.accumWidth>i.width&&(a=e.split("\n"),f=!0),i.accumWidth=v}else{var y=_(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=y.accumWidth+m,s=y.linesWidths,a=y.lines}}else a=e.split("\n");for(var x=0;x=33&&e<=383}(t)||!!v[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",h=0,c=0,d=0;dn:r+c+f>n)?c?(l||u)&&(g?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=p,l="",c=h+=f):(u&&(l+=u,u="",h=0),a.push(l),s.push(c),l=p,c=f)):g?(a.push(u),s.push(h),u=p,h=f):(a.push(p),s.push(f)):(c+=f,g?(u+=p,h+=f):(u&&(l+=u,u="",h=0),l+=p))}else u&&(l+=u,c+=h),a.push(l),s.push(c),l="",u="",h=0,c=0}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=r),{accumWidth:c,lines:a,linesWidths:s}}},924:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var i=n(5280);function r(t,e,n){var r=e.smooth,o=e.points;if(o&&o.length>=2){if(r){var a=function(t,e,n,r){var o,a,s,l,u=[],h=[],c=[],d=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var p=0,f=t.length;p{"use strict";n.d(e,{Pw:()=>o,_3:()=>r,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},4826:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},4174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(327),o=n(5280),a=n(8554),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var h=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,h=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(n,i),null==h||null==c?(d<1&&((0,a.Lx)(n,l,r,d,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,d,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(d<1&&((0,a.Vz)(n,l,h,r,d,s),l=s[1],h=s[2],r=s[3],(0,a.Vz)(i,u,c,o,d,s),u=s[1],c=s[2],o=s[3]),t.bezierCurveTo(l,u,h,c,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.normalize(e,e)},e}(r.ZP);h.prototype.type="bezier-curve";const c=h},9538:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},2797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},2095:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327),o=n(4111),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},5094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},2514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},5151:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327);var o=n(4111),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},5795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},7214:(t,e,n)=>{"use strict";n.d(e,{C:()=>b});var i=n(655),r=n(327),o=n(3051),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,h=Math.acos,c=Math.atan2,d=Math.abs,p=Math.sqrt,f=Math.max,g=Math.min,m=1e-4;function v(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/p(s*s+l*l),h=u*l,c=-u*s,d=t+h,g=e+c,m=n+h,v=i+c,y=(d+m)/2,_=(g+v)/2,x=m-d,b=v-g,w=x*x+b*b,S=r-o,T=d*v-m*g,M=(b<0?-1:1)*p(f(0,S*S*w-T*T)),A=(T*b-x*M)/w,C=(-T*x-b*M)/w,D=(T*b+x*M)/w,I=(-T*x+b*M)/w,L=A-y,P=C-_,O=D-y,E=I-_;return L*L+P*P>O*O+E*E&&(A=D,C=I),{cx:A,cy:C,x0:-h,y0:-c,x1:A*(r/S-1),y1:C*(r/S-1)}}function y(t,e){var n,i=f(e.r,0),r=f(e.r0||0,0),y=i>0;if(y||r>0){if(y||(i=r,r=0),r>i){var _=i;i=r,r=_}var x=e.startAngle,b=e.endAngle;if(!isNaN(x)&&!isNaN(b)){var w=e.cx,S=e.cy,T=!!e.clockwise,M=d(b-x),A=M>s&&M%s;if(A>m&&(M=A),i>m)if(M>s-m)t.moveTo(w+i*u(x),S+i*l(x)),t.arc(w,S,i,x,b,!T),r>m&&(t.moveTo(w+r*u(b),S+r*l(b)),t.arc(w,S,r,b,x,T));else{var C=void 0,D=void 0,I=void 0,L=void 0,P=void 0,O=void 0,E=void 0,N=void 0,k=void 0,R=void 0,z=void 0,B=void 0,Z=void 0,F=void 0,V=void 0,G=void 0,H=i*u(x),U=i*l(x),W=r*u(b),j=r*l(b),X=M>m;if(X){var Y=e.cornerRadius;Y&&(C=(n=function(t){var e;if((0,o.isArray)(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(Y))[0],D=n[1],I=n[2],L=n[3]);var q=d(i-r)/2;if(P=g(q,I),O=g(q,L),E=g(q,C),N=g(q,D),z=k=f(P,O),B=R=f(E,N),(k>m||R>m)&&(Z=i*u(b),F=i*l(b),V=r*u(x),G=r*l(x),Mm){var it=g(I,z),rt=g(L,z),ot=v(V,G,H,U,i,it,T),at=v(Z,F,W,j,i,rt,T);t.moveTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),z0&&t.arc(w+ot.cx,S+ot.cy,it,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,i,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),!T),rt>0&&t.arc(w+at.cx,S+at.cy,rt,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.moveTo(w+H,S+U),t.arc(w,S,i,x,b,!T);else t.moveTo(w+H,S+U);if(r>m&&X)if(B>m){it=g(C,B),ot=v(W,j,Z,F,r,-(rt=g(D,B)),T),at=v(H,U,V,G,r,-it,T);t.lineTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),B0&&t.arc(w+ot.cx,S+ot.cy,rt,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,r,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),T),it>0&&t.arc(w+at.cx,S+at.cy,it,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.lineTo(w+W,S+j),t.arc(w,S,r,b,x,T);else t.lineTo(w+W,S+j)}else t.moveTo(w,S);t.closePath()}}}var _=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},x=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new _},e.prototype.buildPath=function(t,e){y(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);x.prototype.type="sector";const b=x},6076:(t,e,n)=>{"use strict";n.d(e,{Z:()=>wt});var i=n(4839),r=n(327),o=n(4535),a=n(423),s=n(1505),l=Math.sin,u=Math.cos,h=Math.PI,c=2*Math.PI,d=180/h;const p=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,r,o,a,s,p){var f=s-a,g=!p,m=Math.abs(f),v=(0,i.zT)(m-c)||(g?f>=c:-f>=c),y=f>0?f%c:f%c+c,_=!1;_=!!v||!(0,i.zT)(m)&&y>=h==!!g;var x=t+n*u(a),b=e+r*l(a);this._start&&this._add("M",x,b);var w=Math.round(o*d);if(v){var S=1/this._p,T=(g?1:-1)*(c-S);this._add("A",n,r,w,1,+g,t+n*u(a+T),e+r*l(a+T)),S>.01&&this._add("A",n,r,w,0,+g,x,b)}else{var M=t+n*u(s),A=e+r*l(s);this._add("A",n,r,w,+_,+g,M,A)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+(0,g.map)(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function A(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function C(t,e,n,i){return T("svg","root",{width:t,height:e,xmlns:b,"xmlns:xlink":w,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var D=n(8007),I=n(7411),L=n(4014),P=n(2776),O=n(5188),E={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"},N="transform-origin";function k(t,e,n){var r=(0,g.extend)({},t.shape);(0,g.extend)(r,e),t.buildPath(n,r);var o=new p;return o.reset((0,i.Gk)(t)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function R(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[N]=n+"px "+i+"px")}var z={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function B(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Z(t){return(0,g.isString)(t)?E[t]?"cubic-bezier("+E[t]+")":(0,O.H)(t)?t:"":""}function F(t,e,n,r){var o=t.animators,a=o.length,s=[];if(t instanceof P.Z){var l=function(t,e,n){var i,r,o=t.shape.paths,a={};if((0,g.each)(o,(function(t){var e=A(n.zrId);e.animation=!0,F(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=(0,g.keys)(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var d=h[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=B(a,n);return i.replace(r,s)}}(t,e,n);if(l)s.push(l);else if(!a)return}else if(!a)return;for(var u={},h=0;h0})).length)return B(c,n)+" "+o[0]+" both"}for(var y in u){(l=v(u[y]))&&s.push(l)}if(s.length){var _=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+_]={animation:s.join(",")},e.class=_}}var V=n(6498),G=n(3132),H=Math.round;function U(t){return t&&(0,g.isString)(t.src)}function W(t){return t&&(0,g.isFunction)(t.toDataURL)}function j(t,e,n,r){x((function(o,a){var s="fill"===o||"stroke"===o;s&&(0,i.H3)(a)?function(t,e,n,r){var o,a=t[n],s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if((0,i.I1)(a))o="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else{if(!(0,i.gO)(a))return void 0;o="radialGradient",s.cx=(0,g.retrieve2)(a.x,.5),s.cy=(0,g.retrieve2)(a.y,.5),s.r=(0,g.retrieve2)(a.r,.5)}for(var l=a.colorStops,u=[],h=0,c=l.length;hl?mt(t,null==n[c+1]?null:n[c+1].elm,n,s,c):vt(t,e,a,l))}(n,i,r):dt(r)?(dt(t.text)&&ut(n,""),mt(n,null,r,0,r.length-1)):dt(i)?vt(n,i,0,i.length-1):dt(t.text)&&ut(n,""):t.text!==e.text&&(dt(i)&&vt(n,i,0,i.length-1),ut(n,e.text)))}var xt=n(5787),bt=0;const wt=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=n=(0,g.extend)({},n),this.root=t,this._id="zr"+bt++,this._oldVNode=C(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=S("svg");yt(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(ft(t,e))_t(t,e);else{var n=t.elm,i=st(n);gt(e),null!==i&&(rt(i,e.elm,lt(n)),vt(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return et(t,A(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,r=this._width,o=this._height,a=A(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var s=[];if(n&&"none"!==n){var l=(0,i.ut)(n),u=l.color,h=l.opacity;this._bgVNode=T("rect","bg",{width:r,height:o,x:"0",y:"0",id:"0",fill:u,"fill-opacity":h}),s.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=T("g","main",{},[]);this._paintList(e,a,c?c.children:s),c&&s.push(c);var d=(0,g.map)((0,g.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&s.push(T("defs","defs",{},d)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=(0,g.map)((0,g.keys)(t),(function(e){return e+r+(0,g.map)((0,g.keys)(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=(0,g.map)((0,g.keys)(e),(function(t){return"@keyframes "+t+r+(0,g.map)((0,g.keys)(e[t]),(function(n){return n+r+(0,g.map)((0,g.keys)(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(a.cssNodes,a.cssAnims,{newline:!0});if(p){var f=T("style","stl",{},[],p);s.push(f)}}return C(r,o,s,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},M(this.renderToVNode({animation:(0,g.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:(0,g.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=(0,i.ut)(t),r=n.color,o=n.opacity;e.elm.setAttribute("fill",r),o<1&&e.elm.setAttribute("fill-opacity",o)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m{"use strict";n.d(e,{Cv:()=>v,Gk:()=>S,H3:()=>b,I1:()=>_,Pn:()=>c,R:()=>y,gA:()=>T,gO:()=>x,i2:()=>g,jY:()=>p,m1:()=>w,mU:()=>f,n1:()=>m,oF:()=>M,qV:()=>d,ut:()=>s,zT:()=>u});var i=n(3051),r=n(1092),o=n(6387),a=Math.round;function s(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=(0,r.parse)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var l=1e-4;function u(t){return t-1e-4}function h(t){return a(1e3*t)/1e3}function c(t){return a(1e4*t)/1e4}function d(t){return"matrix("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+c(t[4])+","+c(t[5])+")"}var p={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function g(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function m(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(t){return t&&!!t.image}function y(t){return v(t)||function(t){return t&&!!t.svgElement}(t)}function _(t){return"linear"===t.type}function x(t){return"radial"===t.type}function b(t){return t&&("linear"===t.type||"radial"===t.type)}function w(t){return"url(#"+t+")"}function S(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function T(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*i.RADIAN_TO_DEGREE,o=(0,i.retrieve2)(t.scaleX,1),s=(0,i.retrieve2)(t.scaleY,1),l=t.skewX||0,u=t.skewY||0,h=[];return(e||n)&&h.push("translate("+e+"px,"+n+"px)"),r&&h.push("rotate("+r+")"),1===o&&1===s||h.push("scale("+o+","+s+")"),(l||u)&&h.push("skew("+a(l*i.RADIAN_TO_DEGREE)+"deg, "+a(u*i.RADIAN_TO_DEGREE)+"deg)"),h.join(" ")}var M=o.default.hasGlobalWindow&&(0,i.isFunction)(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}},1092:(t,e,n)=>{"use strict";n.r(e),n.d(e,{fastLerp:()=>x,fastMapToColor:()=>b,lerp:()=>w,lift:()=>y,lum:()=>C,mapToColor:()=>S,modifyAlpha:()=>M,modifyHSL:()=>T,parse:()=>m,random:()=>D,stringify:()=>A,toHex:()=>_});var i=n(2528),r={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function h(t,e,n){return t+(e-t)*n}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),f=null;function g(t,e){f&&d(f,e),f=p.put(t,f||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return d(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return d(e,r[i]),g(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),g(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),g(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),h=i.indexOf(")");if(-1!==u&&h+1===a){var f=i.substr(0,u),m=i.substr(u+1,h-(u+1)).split(","),y=1;switch(f){case"rgba":if(4!==m.length)return 3===m.length?c(e,+m[0],+m[1],+m[2],1):c(e,0,0,0,1);y=l(m.pop());case"rgb":return 3!==m.length?void c(e,0,0,0,1):(c(e,s(m[0]),s(m[1]),s(m[2]),y),g(t,e),e);case"hsla":return 4!==m.length?void c(e,0,0,0,1):(m[3]=l(m[3]),v(m,e),g(t,e),e);case"hsl":return 3!==m.length?void c(e,0,0,0,1):(v(m,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return A(n,4===n.length?"rgba":"rgb")}}function _(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=e[r],u=e[s],c=i-r;return n[0]=o(h(l[0],u[0],c)),n[1]=o(h(l[1],u[1],c)),n[2]=o(h(l[2],u[2],c)),n[3]=a(h(l[3],u[3],c)),n}}var b=x;function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=m(e[r]),u=m(e[s]),c=i-r,d=A([o(h(l[0],u[0],c)),o(h(l[1],u[1],c)),o(h(l[2],u[2],c)),a(h(l[3],u[3],c))],"rgba");return n?{color:d,leftIndex:r,rightIndex:s,value:i}:d}}var S=w;function T(t,e,n,i){var r,o=m(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=l(n)),null!=i&&(o[2]=l(i)),A(v(o),"rgba")}function M(t,e){var n=m(t);if(n&&null!=e)return n[3]=a(e),A(n,"rgba")}function A(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function C(t,e){var n=m(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function D(){return A([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},7494:(t,e,n)=>{"use strict";n.d(e,{U5:()=>I,iR:()=>A,Pc:()=>C,AA:()=>D});var i=n(655),r=n(327),o=n(4014),a=n(5280),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,h=Math.atan2;function c(t,e){if(e){var n,i,r,o,c,d,p=t.data,f=t.len(),g=s.M,m=s.C,v=s.L,y=s.R,_=s.A,x=s.Q;for(r=0,o=0;r1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(v*v)-s*s*(d*d))/(a*a*(v*v)+s*s*(d*d)))||0,w=b*a*v/s,S=b*-s*d/a,T=(t+n)/2+g(c)*w-f(c)*S,M=(e+i)/2+f(c)*w+g(c)*S,A=_([1,0],[(d-w)/a,(v-S)/s]),C=[(d-w)/a,(v-S)/s],D=[(-1*d-w)/a,(-1*v-S)/s],I=_(C,D);if(y(C,D)<=-1&&(I=m),y(C,D)>=1&&(I=0),I<0){var L=Math.round(I/m*1e6)/1e6;I=2*m+L%2*m}h.addData(u,T,M,a,s,A,I,c,o)}var b=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,w=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function T(t){return null!=t.setData}function M(t,e){var n=function(t){var e=new o.Z;if(!t)return e;var n,i=0,r=0,a=i,s=r,l=o.Z.CMD,u=t.match(b);if(!u)return e;for(var h=0;h{"use strict";n.r(e),n.d(e,{dispose:()=>ot,disposeAll:()=>at,getInstance:()=>st,init:()=>rt,registerPainter:()=>lt,version:()=>ut});var i=n(6387),r=n(3051),o=n(655),a=n(5280),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.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 s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(3510),h=n(1158),c=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=d(r)/d(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){h.sT(this.event)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,o.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),v=function(t,e){this.x=t,this.y=e},y=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new v(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new m,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,o.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(r.each(y,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new v(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new v(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new v(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new c);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new v;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(9455),T=n(4414),M=!1;function A(){M||(M=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function C(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const D=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=C}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(A(),u.z=0),isNaN(u.z2)&&(A(),u.z2=0),isNaN(u.zlevel)&&(A(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();var I=n(2795),L=n(5622);function P(){return(new Date).getTime()}const O=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return(0,o.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=P()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,(0,I.Z)((function e(){t._running&&((0,I.Z)(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=P(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=P(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=P()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new L.Z(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var E,N,k=i.default.domSupported,R=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:E=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:r.map(E,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),z=["mousemove","mouseup"],B=["pointermove","pointerup"],Z=!1;function F(t){var e=t.pointerType;return"pen"===e||"touch"===e}function V(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var H=function(t,e){this.stopPropagation=r.noop,this.stopImmediatePropagation=r.noop,this.preventDefault=r.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},U={mousedown:function(t){t=(0,h.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,h.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,h.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){G(this,(t=(0,h.OD)(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Z=!0,t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Z||(t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){V(t=(0,h.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),U.mousemove.call(this,t),U.mousedown.call(this,t)},touchmove:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"change"),U.mousemove.call(this,t)},touchend:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"end"),U.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&U.click.call(this,t)},pointerdown:function(t){U.mousedown.call(this,t)},pointermove:function(t){F(t)||U.mousemove.call(this,t)},pointerup:function(t){U.mouseup.call(this,t)},pointerout:function(t){F(t)||U.mouseout.call(this,t)}};r.each(["click","dblclick","contextmenu"],(function(t){U[t]=function(e){e=(0,h.OD)(this.dom,e),this.trigger(t,e)}}));var W={pointermove:function(t){F(t)||W.mousemove.call(this,t)},pointerup:function(t){W.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function j(t,e){var n=e.domHandlers;i.default.pointerEventsSupported?r.each(R.pointer,(function(i){Y(e,i,(function(e){n[i].call(t,e)}))})):(i.default.touchEventsSupported&&r.each(R.touch,(function(i){Y(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),r.each(R.mouse,(function(i){Y(e,i,(function(r){r=(0,h.iP)(r),e.touching||n[i].call(t,r)}))})))}function X(t,e){function n(n){Y(e,n,(function(i){i=(0,h.iP)(i),G(t,i.target)||(i=function(t,e){return(0,h.OD)(t.dom,new H(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}i.default.pointerEventsSupported?r.each(B,n):i.default.touchEventsSupported||r.each(z,n)}function Y(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,h.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,h.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new K(e,U),k&&(i._globalHandlerScope=new K(document,W)),j(i,i._localHandlerScope),i}return(0,o.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),k&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,k&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?X(this,e):q(e)}},e}(u.Z);var Q=n(1092),$=n(4990),tt=n(8154),et={},nt={};var it=function(){function t(t,e,n){var o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new D,s=n.renderer||"canvas";et[s]||(s=r.keys(et)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var l=new et[s](e,a,n,t),u=n.ssr||l.ssrOnly;this.storage=a,this.painter=l;var h=i.default.node||i.default.worker||u?null:new J(l.getViewportRoot(),l.root);this.handler=new w(a,l,h,l.root),this.animation=new O({stage:{update:u?null:function(){return o._flush(!0)}}}),u||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,Q.lum)(t,1)<$.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{Axis:()=>a.RD,ChartView:()=>a.TA,ComponentModel:()=>a.tF,ComponentView:()=>a.Ir,List:()=>a.aV,Model:()=>a.Hn,PRIORITY:()=>a.Hr,SeriesModel:()=>a.wJ,color:()=>a.$_,connect:()=>a.$j,dataTool:()=>a.Ok,default:()=>d,dependencies:()=>a.HO,disConnect:()=>a.eU,disconnect:()=>a.zP,dispose:()=>a.B9,env:()=>a.OB,extendChartView:()=>a.Zy,extendComponentModel:()=>a.tv,extendComponentView:()=>a.Sp,extendSeriesModel:()=>a.Zr,format:()=>a.WU,getCoordinateSystemDimensions:()=>a.wL,getInstanceByDom:()=>a.JE,getInstanceById:()=>a.rp,getMap:()=>a.FU,graphic:()=>a.Q,helper:()=>a._y,init:()=>a.S1,innerDrawElementOnCanvas:()=>a.z$,matrix:()=>a.pI,number:()=>a.Rx,parseGeoJSON:()=>a.Nu,parseGeoJson:()=>a.pQ,registerAction:()=>a.zl,registerCoordinateSystem:()=>a.RS,registerLayout:()=>a.qR,registerLoading:()=>a.yn,registerLocale:()=>a.I2,registerMap:()=>a.je,registerPostInit:()=>a.sq,registerPostUpdate:()=>a.Br,registerPreprocessor:()=>a.ds,registerProcessor:()=>a.Pu,registerTheme:()=>a.aW,registerTransform:()=>a.rV,registerUpdateLifecycle:()=>a.YK,registerVisual:()=>a.Og,setCanvasCreator:()=>a.jQ,setPlatformAPI:()=>a.g2,throttle:()=>a.P2,time:()=>a.XV,use:()=>a.D$,util:()=>a.D5,vector:()=>a.xr,version:()=>a.i8,zrUtil:()=>a.gf,zrender:()=>a.x_});const e={...{metadata:!0,svgRender:!1,echartsOption:{title:{text:"NetJSONGraph",link:"",textStyle:{color:"grey",fontWeight:"bold",fontSize:30},left:"center",top:"5%"},aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}},color:["#d66b30","#a3c7dd","#5c9660","#d66b30"]},graphConfig:{layout:"force",label:{show:!0,color:"#000000",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,focusNodeAdjacency:!1,hoverAnimation:!0,legendHoverLink:!0},mapOptions:{roam:!0},mapTileConfig:[],mapLinkConfig:[{}],mapNodeConfig:{label:{show:!0,color:"#000000",position:"top",formatter:"{b}"}},nodeSize:25,nodeStyleProperty:(()=>{const t=[{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#a3c7dd"},{offset:.7,color:"#a3c7dd"},{offset:.71,color:"#e3edf6"},{offset:1,color:"#e3edf6"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#5c9660"},{offset:.7,color:"#5c9660"},{offset:.71,color:"#aecbb0"},{offset:1,color:"#aecbb0"}]}},{color:{type:"radial",x:.5,y:.5,r:.5,colorStops:[{offset:0,color:"#d66b30"},{offset:.7,color:"#d66b30"},{offset:.71,color:"#ebb598"},{offset:1,color:"#ebb598"}]}}];let e=0;return()=>(e+=1,t[e%t.length])})(),linkStyleProperty:()=>({width:5,color:"#999",shadowColor:"rgba(0, 0, 0, 0.5)",shadowBlur:10}),prepareData(t){},onClickElement(t,e){const n=document.getElementsByClassName("njg-overlay")[0];n.style.visibility="visible",n.innerHTML=`\n
\n ${"link"===t?this.utils.linkInfo(e):this.utils.nodeInfo(e)}\n
\n `;const i=document.createElement("a");i.setAttribute("class","njg-close"),i.setAttribute("id","nodelinkOverlay-close"),i.onclick=()=>{n.style.visibility="hidden"},n.appendChild(i)}}};const i=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json?t.json():t)).catch((t=>{console.error(t)})):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:n=(new Date).getTimezoneOffset()/60}){const i=e.exec(t);if(!i||i.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],o={},a=i[1]%4==0&&i[1]%100!=0||i[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,a?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t-=1)o[r[t-1]]=parseInt(i[t],10);let l,u=-n;for(let t=r.length;t>0;t-=1){if("dateYear"===r[t-1]){o[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[o.dateMonth-1]:s.get(r[t-1]);let e=o[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(o[r[t-1]]+10)%11]),e+=l),o[r[t-1]]=e}return`${o.dateYear}.${this.numberMinDigit(o.dateMonth)}.${this.numberMinDigit(o.dateDay)} ${this.numberMinDigit(o.dateHour)}:${this.numberMinDigit(i[5])}:${this.numberMinDigit(i[6])}${i[7]?`.${this.numberMinDigit(i[7],3)}`:""}`}numberMinDigit(t,e=2,n="0"){return(Array(e).join(n)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),n=e.length;for(let t=0;t{i[t]&&this.isObject(i[t])&&this.isObject(n[t])?this.deepMergeObj(i[t],n[t]):i[t]=n[t]})):i||(e[t+1]=n)}return e[n-1]}NetJSONMetadata(){const t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("a");return t.setAttribute("class","njg-metadata njg-container"),t.setAttribute("style","display: block"),e.setAttribute("class","njg-inner"),e.setAttribute("id","metadata-innerDiv"),n.setAttribute("class","njg-close"),n.setAttribute("id","metadata-close"),n.onclick=()=>{t.style.visibility="hidden"},e.innerHTML=this.utils.getMetadata.call(this),t.appendChild(e),t.appendChild(n),t}updateMetadata(){this.config.metadata&&(document.getElementsByClassName("njg-metadata")[0].style.visibility="visible",document.getElementById("metadata-innerDiv").innerHTML=this.utils.getMetadata.call(this))}getMetadata(){const t=this.data;let e="";return t.label&&(e+=`

${t.label}

`),["protocol","version","revision","metric","router_id","topology_id"].forEach((n=>{t[n]&&(e+=`

${n}: ${t[n]}

`)})),e+=`\n

nodes: ${t.nodes.length}

\n

links: ${t.links.length}

\n `,e}nodeInfo(t){let e=`

id: ${t.id}

`;return t.label&&"string"==typeof t.label&&(e+=`

label: ${t.label}

`),t.properties&&Object.keys(t.properties).forEach((n=>{e+="location"===n?`

location:
lat: ${t.properties.location.lat}
lng: ${t.properties.location.lng}

`:"time"===n?`

time: ${this.dateParse({dateString:t.properties[n]})}

`:`

${n.replace(/_/g," ")}: ${t.properties[n]}

`})),t.linkCount&&(e+=`

links: ${t.linkCount}

`),t.local_addresses&&(e+=`

local addresses:
${t.local_addresses.join("
")}

`),e}linkInfo(t){let e=`

source: ${t.source}

target: ${t.target}

cost: ${t.cost}

`;return t.properties&&Object.keys(t.properties).forEach((n=>{e+="time"===n?`

time: ${this.dateParse({dateString:t.properties[n]})}

`:`

${n.replace(/_/g," ")}: ${t.properties[n]}

`})),e}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...n){t.set(e,[...t.get(e)||[],...n])},once(t,...n){e.set(t,[...e.get(t)||[],...n])},emit(n){const i=t.get(n)||[],r=e.get(n)||[],o=i.map((t=>t())),a=r.map((t=>t()));return e.delete(n),[...o,...a]},delete(n){t.delete(n),e.delete(n)}}}};const r=class extends i{searchElements(t){const e=this,n={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=i=>{n[i.state.searchValue]?e.utils.JSONDataUpdate.call(e,n[i.state.searchValue].data).then((()=>{e.JSONParam=n[i.state.searchValue].param})):e.utils.JSONDataUpdate.call(e,t+i.state.searchValue)},function(i,r=!0,o=!0){const a=i.trim();if(!window.history.state||window.history.state&&window.history.state.searchValue!==a)return window.history.pushState({searchValue:a},""),e.utils.JSONDataUpdate.call(e,t+a,r,o).then((()=>{n[a]={data:{...e.data},param:[...e.JSONParam]}}))}}JSONDataUpdate(t,e=!0,n=!0){const i=this;return i.config.onUpdate.call(i),i.utils.JSONParamParse(t).then((r=>{function o(){e?(i.JSONParam=[t],i.utils.overrideData(r,i)):(i.JSONParam.push(t),i.config.render===i.utils.mapRender?i.utils.appendData(r,i):i.utils.addData(r,i)),i.utils.updateMetadata.call(i)}return n?(i.config.prepareData.call(i,r),i.config.dealDataByWorker?i.utils.dealDataByWorker.call(i,r,i.config.dealDataByWorker,o):o()):o(),r})).catch((t=>{console.error(t)}))}dealDataByWorker(t,e,n){const i=new Worker(e),r=this;i.postMessage(t),i.addEventListener("error",(t=>{console.error(t),console.error("Error in dealing JSONData!")})),i.addEventListener("message",(t=>{n?n():(r.utils.overrideData(t.data,r),r.utils.updateMetadata.call(r))}))}overrideData(t,e){e.data=t,e.utils.render(),e.config.afterUpdate.call(e)}};const o=class{constructor(t,n){this.utils=new r,this.config={...e},this.setConfig(n),this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.body,this.el&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then((t=>{this.config.prepareData.call(this,t),this.data=t,function(t){const e=document.createElement("div");e.setAttribute("class","njg-overlay njg-container"),t.el.appendChild(e)}(this),this.config.metadata&&this.el.appendChild(this.utils.NetJSONMetadata.call(this)),this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils.render())})).catch((t=>{console.error(t)})),e.length){const n=function(){e.map((t=>this.utils.JSONDataUpdate.call(this,t,!1)))};this.JSONParam=[t],this.event.once("renderArray",n.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}};var a=n(9060),s=n(8023),l=n(1615),u=n(12),h=n(7240),c=n(7164);(0,s.D)([u.N,h.N]);const d={init:function(){return l.S1.apply(null,arguments)}};(0,s.D)(c.T);var p=n(6026);(0,s.D)(p.N);var f=n(9517);(0,s.D)(f.N);var g=n(241);(0,s.D)(g.N);var m=n(7813);(0,s.D)(m.N);var v=n(8690);(0,s.D)(v.N);var y=n(5045);(0,s.D)(y.N);var _=n(3450);(0,s.D)(_.N);var x=n(9448),b=n(6076);(0,x.registerPainter)("svg",b.Z);n(3721);var w=n(531),S=n.n(w);class T{echartsSetOption(t,e){const n=e.config,i=e.echarts,r=e.utils.deepMergeObj({tooltip:{confine:!0,position:(t,e,n,i,r)=>{let o="right";return r.viewSize[0]-t[0]"graph"===t.componentSubType?"edge"===t.dataType?e.utils.linkInfo(t.data):e.utils.nodeInfo(t.data):"graphGL"===t.componentSubType?e.utils.nodeInfo(t.data):"lines"===t.componentSubType?e.utils.linkInfo(t.data.link):e.utils.nodeInfo(t.data.node)}},n.echartsOption);return i.setOption(e.utils.deepMergeObj(r,t)),i.on("click",(t=>{const i=n.onClickElement.bind(e);return"graph"===t.componentSubType?i("edge"===t.dataType?"link":"node",t.data):"graphGL"===t.componentSubType?i("node",t.data):"lines"===t.componentSubType?i("link",t.data.link):i("node",t.data.node)}),{passive:!0}),i}generateGraphOption(t,e){const n=[],i=e.config,r=t.nodes.map((t=>{const e=JSON.parse(JSON.stringify(t));return e.itemStyle="function"==typeof i.nodeStyleProperty?i.nodeStyleProperty(t):i.nodeStyleProperty,e.symbolSize="function"==typeof i.nodeSize?i.nodeSize(t):i.nodeSize,e.name="string"==typeof t.label?t.label:t.id,t.properties&&t.properties.category&&(e.category=String(t.properties.category)),e.category&&-1===n.indexOf(e.category)&&n.push(e.category),e})),o=t.links.map((t=>{const e=JSON.parse(JSON.stringify(t));return e.lineStyle="function"==typeof i.linkStyleProperty?i.linkStyleProperty(t):i.linkStyleProperty,e})),a=[Object.assign(i.graphConfig,{type:"graphGL"===i.graphConfig.type?"graphGL":"graph",layout:"graphGL"===i.graphConfig.type?"forceAtlas2":i.graphConfig.layout,nodes:r,links:o,categories:n.map((t=>({name:t})))})];return{legend:n.length?{data:n}:void 0,series:a}}generateMapOption(t,e){const n=e.config,{nodes:i,links:r}=t,o=t.flatNodes||{},a=[],s=[];i.forEach((e=>{if(e.properties){const{location:i}=e.properties;i&&i.lng&&i.lat?(s.push({name:"string"==typeof e.label?e.label:e.id,value:[i.lng,i.lat],symbolSize:"function"==typeof n.nodeSize?n.nodeSize(e):n.nodeSize,itemStyle:"function"==typeof n.nodeStyleProperty?n.nodeStyleProperty(e):n.nodeStyleProperty,node:e}),t.flatNodes||(o[e.id]=JSON.parse(JSON.stringify(e)))):console.error(`Node ${e.id} position is undefined!`)}else console.error(`Node ${e.id} position is undefined!`)})),r.forEach((t=>{o[t.source]?o[t.target]?a.push({coords:[[o[t.source].properties.location.lng,o[t.source].properties.location.lat],[o[t.target].properties.location.lng,o[t.target].properties.location.lat]],lineStyle:"function"==typeof n.linkStyleProperty?n.linkStyleProperty(t):n.linkStyleProperty,link:t}):console.error(`Node ${t.target} is not exist!`):console.error(`Node ${t.source} is not exist!`)}));const l=[Object.assign(n.mapNodeConfig,{type:"effectScatter"===n.mapNodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s,animationDuration:1e3}),...n.mapLinkConfig.map((t=>Object.assign(t,{type:"lines",coordinateSystem:"leaflet",data:a})))];return{leaflet:{tiles:n.mapTileConfig,mapOptions:n.mapOptions},toolbox:{show:!1},series:l}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.leaflet._zoomAnimated=!1,e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach(((t,n)=>{e.echarts.appendData({seriesIndex:n,data:t.data})})),e.utils.mergeData(t,e),e.config.afterUpdate.call(e)}addData(t,e){e.utils.mergeData(t,e),e.utils.render(),e.config.afterUpdate.call(e)}mergeData(t,e){const n=e.data.nodes.concat(t.nodes),i=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:n,links:i})}}const M=function(t,e){const{util:n,graphic:i,matrix:r}=t,o=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container)},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function a(t,n){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=n,this._projection=e.Projection.Mercator}function s(t,e,n,i){const{leafletModel:r,seriesModel:o}=n,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}return a.dimensions=["lng","lat"],a.prototype.dimensions=["lng","lat"],a.prototype.setZoom=function(t){this._zoom=t},a.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},a.prototype.setMapOffset=function(t){this._mapOffset=t},a.prototype.getLeaflet=function(){return this._map},a.prototype.getViewRect=function(){const t=this._api;return new i.BoundingRect(0,0,t.getWidth(),t.getHeight())},a.prototype.getRoamTransform=function(){return r.create()},a.prototype.dataToPoint=function(t){const n=new e.LatLng(t[1],t[0]),i=this._map.latLngToLayerPoint(n),r=this._mapOffset;return[i.x-r[0],i.y-r[1]]},a.prototype.pointToData=function(t){const e=this._mapOffset,n=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[n.lng,n.lat]},a.prototype.convertToPixel=n.curry(s,"dataToPoint"),a.prototype.convertFromPixel=n.curry(s,"pointToData"),a.create=function(t,n){let i;const r=[],s=n.getDom();return t.eachComponent("leaflet",(t=>{const l=n.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(i)throw new Error("Only one leaflet component can exist");if(!t.__map){let n=s.querySelector(".ec-extension-leaflet");n&&(l.style.left="0px",l.style.top="0px",s.removeChild(n)),n=document.createElement("div"),n.style.cssText="width:100%;height:100%",n.classList.add("ec-extension-leaflet"),s.appendChild(n),t.__map=e.map(n,t.get("mapOptions"));const i=t.__map,r=t.get("tiles"),a={};let u=!1;if(r.forEach((t=>{const n=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(n.addTo(i),u=!0),a[t.label]=n):n.addTo(i)})),r.length>1){const n=t.get("layerControl");e.control.layers(a,{},n).addTo(i)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new o(h).addTo(i)}const u=t.__map;i=new a(u,n),r.push(i),i.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(i.setZoom(c),i.setCenter(h)),t.coordinateSystem=i})),t.eachSeries((t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=i)})),r},a};function A(t,e){t.extendComponentView({type:"leaflet",render(t,n,i){let r=!0;const o=t.getLeaflet(),a=i.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};function u(t,e){const n=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*n[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*n[1]),t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`}function h(t){[...t.childNodes].forEach((e=>{u(e,t),e.childNodes.length&&h(e)}))}function c(t){const n=e.DomUtil.getPosition(t.getPanes().mapPane);if(n)return n;console.error("Can't get the map offset!")}this._oldMoveStartHandler&&o.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&o.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&o.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&o.off("resize",this._oldResizeHandler);const{roam:d}=t.get("mapOptions");function p(){if(r)return;const t=c(o);t&&Object.assign(l,{x:t.x,y:t.y})}function f(){if(r)return;const n=function(){const n=c(o);if(n){const{x:i,y:r}=n,o=i-l.x,u=r-l.y;return Object.assign(l,{x:i,y:r}),e.DomUtil.setPosition(a,{x:-i,y:-r}),s.setMapOffset([-i,-r]),t.__mapOffset=[-i,-r],{dx:o,dy:u}}}();if(n){const{dx:t,dy:e}=n;i.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function g(){r||i.dispatchAction({type:"leafletZoom"})}function m(){const t=i.getDom();u(a,t),h(a),i.dispatchAction({type:"leafletZoom"})}d&&"scale"!==d?o.dragging.enable():o.dragging.disable(),d&&"move"!==d?(o.scrollWheelZoom.enable(),o.doubleClickZoom.enable(),o.touchZoom.enable()):(o.scrollWheelZoom.disable(),o.doubleClickZoom.disable(),o.touchZoom.disable()),o.on("movestart",p),o.on("move",f),o.on("zoomend",g),o.on("resize",m),this._oldMoveStartHandler=p,this._oldMoveHandler=f,this._oldZoomEndHandler=g,this._oldResizeHandler=m,r=!1}})}function C(t,e,n){const{target:i}=t,r=i.position;r[0]+=e,r[1]+=n,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(i)}function D(t,e){const n=this._model,i=this._api,r=this._zr,o=this._coordSysMgr,a=this._scheduler,{colorTool:s,each:l,env:u}=e;if(!n)return;a.restoreData(n,t),a.performSeriesTasks(n),o.create(n,i),a.performDataProcessorTasks(n,t),function(t,e){const n=t._chartsMap,i=t._scheduler;e.eachSeries((t=>{i.updateStreamModes(t,n[t.__viewId])}))}(this,n),o.update(n,i),function(t){t.clearColorPalette(),t.eachSeries((t=>{t.clearColorPalette()}))}(n),a.performVisualTasks(n,t),function(t,e,n,i){(function(t,e,n,i,r){l(r||t._componentsViews,(t=>{const r=t.__model;t.render(r,e,n,i),c(r,t)}))})(t,e,n,i),l(t._chartsViews,(t=>{t.__alive=!1})),function(t,e,n,i,r){const o=t._scheduler;let a;e.eachSeries((e=>{const n=t._chartsMap[e.__viewId];n.__alive=!0;const s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),c(e,n),function(t,e){const n=t.get("blendMode")||null;e.group.traverse((t=>{t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((t=>{t.setStyle("blend",n)}))}))}(e,n)})),o.unfinished|=a,function(t,e){const n=t.storage;let i=0;n.traverse((t=>{t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!u.node&&n.traverse((t=>{t.isGroup||(t.useHoverLayer=!0)}))}(t._zr,e)}(t,e,0,i),l(t._chartsViews,(t=>{t.__alive||t.remove(e,n)}))}(this,n,i,t),r.refreshImmediately();let h=n.get("backgroundColor")||"transparent";if(u.canvasSupported)r.setBackgroundColor(h);else{const t=s.parse(h);h=s.stringify(t,"rgb"),0===t[3]&&(h="transparent")}function c(t,e){const n=t.get("z"),i=t.get("zlevel");e.group.traverse((t=>{"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}}function I(t,e,n){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:n}=this;return i=t,r=n.center,!(i&&r&&i[0]===r[0]&&i[1]===r[1]&&e===n.zoom);var i,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),A(t,e),t.registerCoordinateSystem("leaflet",M(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},((t,e)=>{e.scheduler.ecInstance._chartsViews.forEach((({group:e})=>{C({target:e},t.dx,t.dy)})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))})),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},((t,e)=>{const i=e.scheduler.ecInstance;D.call(i,t,n),i._chartsViews.forEach((({group:t})=>{C({target:t},-t.position[0],-t.position[1])})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))}))}I.version="1.0.0";const L=I,P=n(1092),{each:O}=n(3051),E=n(6387);L(t,S(),{colorTool:P,each:O,env:E}),window.NetJSONGraph=class{constructor(t,e){e&&"map"===e.render?e.render=T.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=T.prototype.graphRender);const n=new o(t);return Object.setPrototypeOf(T.prototype,n.utils),n.utils=new T,n.setUtils(),n.event=n.utils.createEvent(),n.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){return this.utils.hideLoading.call(this),this.config},...e}),n.echarts=a.S1(n.el,null,{renderer:n.config.svgRender?"svg":"canvas"}),n.config.onInit.call(n),n}},window.echarts=t,window.L=S()})()})(); +var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;Object.create},5823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(7411),r=n(5622),o=n(479),a=n(3510),s=n(423),l=n(3051),u=n(4990),h=n(1092),c=n(4414),d="__zr_normal__",p=i.dN.concat(["ignore"]),f=(0,l.reduce)(i.dN,(function(t,e){return t[e]=!0,t}),{ignore:!1}),g={},m=new o.Z(0,0,0,0),v=function(){function t(t){this.id=(0,l.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,l=!1;r.parent=i?this:null;var u=!1;if(r.copyTransform(e),null!=n.position){var h=m;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g,n,h):(0,s.wI)(g,n,h),r.x=g.x,r.y=g.y,o=g.align,a=g.verticalAlign;var d=n.origin;if(d&&null!=n.rotation){var p=void 0,f=void 0;"center"===d?(p=.5*h.width,f=.5*h.height):(p=(0,s.GM)(d[0],h.width),f=(0,s.GM)(d[1],h.height)),u=!0,r.originX=-r.x+p+(i?0:h.x),r.originY=-r.y+f+(i?0:h.y)}}null!=n.rotation&&(r.rotation=n.rotation);var v=n.offset;v&&(r.x+=v[0],r.y+=v[1],u||(r.originX=-v[0],r.originY=-v[1]));var y=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,_=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),x=void 0,b=void 0,w=void 0;y&&this.canBeInsideText()?(x=n.insideFill,b=n.insideStroke,null!=x&&"auto"!==x||(x=this.getInsideTextFill()),null!=b&&"auto"!==b||(b=this.getInsideTextStroke(x),w=!0)):(x=n.outsideFill,b=n.outsideStroke,null!=x&&"auto"!==x||(x=this.getOutsideFill()),null!=b&&"auto"!==b||(b=this.getOutsideStroke(x),w=!0)),(x=x||"#000")===_.fill&&b===_.stroke&&w===_.autoStroke&&o===_.align&&a===_.verticalAlign||(l=!0,_.fill=x,_.stroke=b,_.autoStroke=w,_.align=o,_.verticalAlign=a,e.setDefaultTextStyle(_)),e.__dirty|=c.YV,l&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?u.GD:u.vU},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&(0,h.parse)(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,(0,h.stringify)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},(0,l.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if((0,l.isObject)(t))for(var n=t,i=(0,l.keys)(n),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(d,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===d;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!((0,l.indexOf)(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var u=!!(s&&s.hoverLayer||i);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var h=this._textContent,p=this._textGuide;return h&&h.useState(t,e,n,u),p&&p.useState(t,e,n,u),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV),s}(0,l.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,f);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,e,d),m&&m.useStates(t,e,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~c.YV)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=(0,l.indexOf)(i,t),o=(0,l.indexOf)(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||o.force&&!s.length){var C,A=void 0,I=void 0,D=void 0;if(u){I={},f&&(A={});for(T=0;T{"use strict";n.d(e,{V:()=>v,Z:()=>S});var i={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-i.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*i.bounceIn(2*t):.5*i.bounceOut(2*t-1)+.5}};const r=i;var o=n(3051),a=n(5188);const s=function(){function t(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||o.noop,this.ondestroy=t.ondestroy||o.noop,this.onrestart=t.onrestart||o.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=(0,o.isFunction)(t)?t:r[t]||(0,a.H)(t)},t}();var l=n(1092),u=n(4839),h=Array.prototype.slice;function c(t,e,n){return(e-t)*n+t}function d(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,s=i.length,h=!1,c=6,d=e;if((0,o.isArrayLike)(e)){var p=function(t){return(0,o.isArrayLike)(t&&t[0])?2:1}(e);c=p,(1===p&&!(0,o.isNumber)(e[0])||2===p&&!(0,o.isNumber)(e[0][0]))&&(h=!0)}else if((0,o.isNumber)(e)&&!(0,o.eqNaN)(e))c=0;else if((0,o.isString)(e))if(isNaN(+e)){var f=l.parse(e);f&&(d=f,c=3)}else c=0;else if((0,o.isGradientObject)(e)){var g=(0,o.extend)({},d);g.colorStops=(0,o.map)(e.colorStops,(function(t){return{offset:t.offset,color:l.parse(t.color)}})),(0,u.I1)(e)?c=4:(0,u.gO)(e)&&(c=5),d=g}0===s?this.valType=c:c===this.valType&&6!==c||(h=!0),this.discrete=this.discrete||h;var m={time:t,value:d,rawValue:e,percent:0};return n&&(m.easing=n,m.easingFunc=(0,o.isFunction)(n)?n:r[n]||(0,a.H)(n)),i.push(m),m},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=x(i),l=_(i),u=0;u=0&&!(u[n].percent<=e);n--);n=m(n,h-2)}else{for(n=g;ne);n++);n=m(n-1,h-2)}r=u[n+1],i=u[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var v=r.percent-i.percent,w=0===v?1:m((e-i.percent)/v,1);r.easingFunc&&(w=r.easingFunc(w));var S=a?this._additiveValue:f?b:t[p];if(!x(l)&&!f||S||(S=this._additiveValue=[]),this.discrete)t[p]=w<1?i.rawValue:r.rawValue;else if(x(l))1===l?d(S,i[s],r[s],w):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,v(l),i),this._trackKeys.push(a)}s.addKeyframe(t,v(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var s=a.pop();r.addKeyframe(s.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}()},5188:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var i=n(8554),r=n(3051),o=/cubic-bezier\(([0-9,\.e ]+)\)/;function a(t){var e=t&&o.exec(t);if(e){var n=e[1].split(","),a=+(0,r.trim)(n[0]),s=+(0,r.trim)(n[1]),l=+(0,r.trim)(n[2]),u=+(0,r.trim)(n[3]);if(isNaN(a+s+l+u))return;var h=[];return function(t){return t<=0?0:t>=1?1:(0,i.kD)(0,a,l,1,t,h)&&(0,i.af)(0,s,u,1,h[0])}}}},2795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(6387).default.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)}},810:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(3051);function r(t){var e,n,r=t.style,o=r.lineDash&&r.lineWidth>0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:(0,i.isNumber)(e)?[e]:(0,i.isArray)(e)?e:null:null),a=r.lineDashOffset;if(o){var s=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(o=(0,i.map)(o,(function(t){return t/s})),a/=s)}return[o,a]}},7772:(t,e,n)=>{"use strict";n.d(e,{Dm:()=>D,RV:()=>I,RZ:()=>x});var i=n(7719),r=n(4014),o=n(8007),a=n(5787),s=n(327),l=n(4535),u=n(1505),h=n(3051),c=n(810),d=n(4414),p=n(3132),f=new r.Z(!0);function g(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function m(t){return"string"==typeof t&&"none"!==t}function v(t){var e=t.fill;return null!=e&&"none"!==e}function y(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function _(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function x(t,e,n){var i=(0,o.Gq)(e.image,e.__image,n);if((0,o.v5)(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*h.RADIAN_TO_DEGREE),a.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(a)}return r}}var b=["shadowBlur","shadowOffsetX","shadowOffsetY"],w=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function S(t,e,n,r,o){var a=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){C(t,o),a=!0;var s=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(s)?i.tj.opacity:s}(r||e.blend!==n.blend)&&(a||(C(t,o),a=!0),t.globalCompositeOperation=e.blend||i.tj.blend);for(var l=0;l{"use strict";function i(t){return isFinite(t)}function r(t,e,n){for(var r="radial"===e.type?function(t,e,n){var r=n.width,o=n.height,a=Math.min(r,o),s=null==e.x?.5:e.x,l=null==e.y?.5:e.y,u=null==e.r?.5:e.r;return e.global||(s=s*r+n.x,l=l*o+n.y,u*=a),s=i(s)?s:.5,l=i(l)?l:.5,u=u>=0&&i(u)?u:.5,t.createRadialGradient(s,l,0,s,l,u)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,s=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,s=s*n.height+n.y),r=i(r)?r:0,o=i(o)?o:1,a=i(a)?a:0,s=i(s)?s:0,t.createLinearGradient(r,a,o,s)}(t,e,n),o=e.colorStops,a=0;ar,ap:()=>s,cF:()=>o})},4990:(t,e,n)=>{"use strict";n.d(e,{Ak:()=>o,GD:()=>s,KL:()=>r,iv:()=>l,vU:()=>a});var i=1;n(6387).default.hasGlobalWindow&&(i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var r=i,o=.4,a="#333",s="#ccc",l="#eee"},3640:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oi})},765:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var i=n(7637);function r(t,e){return Math.abs(t-e)<1e-8}function o(t,e,n){var o=0,a=t[0];if(!a)return!1;for(var s=1;s{"use strict";n.d(e,{m:()=>r});var i=n(8554);function r(t,e,n,r,o,a,s,l,u){if(0===s)return!1;var h=s;return!(u>e+h&&u>r+h&&u>a+h||ut+h&&l>n+h&&l>o+h||l{"use strict";n.d(e,{Dp:()=>d,GM:()=>p,M3:()=>h,dz:()=>s,lP:()=>u,mU:()=>c,wI:()=>f});var i=n(479),r=n(2528),o=n(3132),a={};function s(t,e){e=e||o.Uo;var n=a[e];n||(n=a[e]=new r.ZP(500));var i=n.get(t);return null==i&&(i=o.qW.measureText(t,e).width,n.put(t,i)),i}function l(t,e,n,r){var o=s(t,e),a=d(e),l=h(0,o,n),u=c(0,a,r);return new i.Z(l,u,o,a)}function u(t,e,n,r){var o=((t||"")+"").split("\n");if(1===o.length)return l(o[0],e,n,r);for(var a=new i.Z(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function f(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=p(i[0],n.width),u+=p(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}},3266:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=2*Math.PI;function r(t){return(t%=i)<0&&(t+=i),t}},7637:(t,e,n)=>{"use strict";function i(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}n.d(e,{Z:()=>i})},479:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var i=n(2892),r=n(1610),o=Math.min,a=Math.max,s=new r.Z,l=new r.Z,u=new r.Z,h=new r.Z,c=new r.Z,d=new r.Z;const p=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=o(t.x,this.x),n=o(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,o=i.create();return i.translate(o,o,[-e.x,-e.y]),i.scale(o,o,[n,r]),i.translate(o,o,[t.x,t.y]),o},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,o=i.x,a=i.x+i.width,s=i.y,l=i.y+i.height,u=e.x,h=e.x+e.width,p=e.y,f=e.y+e.height,g=!(av&&(v=w,y<_?r.Z.set(d,-y,0):r.Z.set(d,_,0)):wv&&(v=S,x=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],c=i[3],d=i[4],p=i[5];return e.x=n.x*r+d,e.y=n.y*c+p,e.width=n.width*r,e.height=n.height*c,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}s.x=u.x=n.x,s.y=h.y=n.y,l.x=h.x=n.x+n.width,l.y=u.y=n.y+n.height,s.transform(i),h.transform(i),l.transform(i),u.transform(i),e.x=o(s.x,l.x,u.x,h.x),e.y=o(s.y,l.y,u.y,h.y);var f=a(s.x,l.x,u.x,h.x),g=a(s.y,l.y,u.y,h.y);e.width=f-e.x,e.height=g-e.y}else e!==n&&t.copy(e,n)},t}()},3510:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a{"use strict";n.d(e,{ZP:()=>o});var i=function(t){this.value=t},r=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new i(t);return this.insertEntry(e),e},t.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}();const o=function(){function t(t){this._list=new r,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,o=null;if(null==r[t]){var a=n.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=n.head;n.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,n.insertEntry(s),r[t]=s}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}()},1587:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(1610),r=[0,0],o=[0,0],a=new i.Z,s=new i.Z;const l=function(){function t(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new i.Z;for(n=0;n<2;n++)this._axes[n]=new i.Z;t&&this.fromBoundingRect(t,e)}return t.prototype.fromBoundingRect=function(t,e){var n=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(n[0].set(o,a),n[1].set(s,a),n[2].set(s,l),n[3].set(o,l),e)for(var u=0;u<4;u++)n[u].transform(e);i.Z.sub(r[0],n[1],n[0]),i.Z.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(u=0;u<2;u++)this._origin[u]=r[u].dot(n[0])},t.prototype.intersect=function(t,e){var n=!0,r=!e;return a.set(1/0,1/0),s.set(0,0),!this._intersectCheckOneSide(this,t,a,s,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(t,this,a,s,r,-1)&&(n=!1,r)||r||i.Z.copy(e,n?a:s),n},t.prototype._intersectCheckOneSide=function(t,e,n,a,s,l){for(var u=!0,h=0;h<2;h++){var c=this._axes[h];if(this._getProjMinMaxOnAxis(h,t._corners,r),this._getProjMinMaxOnAxis(h,e._corners,o),r[1]o[1]){if(u=!1,s)return u;var d=Math.abs(o[0]-r[1]),p=Math.abs(r[0]-o[1]);Math.min(d,p)>a.len()&&(d{"use strict";n.d(e,{L:()=>M,Z:()=>C});var i=n(5280),r=n(479),o=n(4990),a=n(3726),s=n(8554),l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},u=[],h=[],c=[],d=[],p=[],f=[],g=Math.min,m=Math.max,v=Math.cos,y=Math.sin,_=Math.abs,x=Math.PI,b=2*x,w="undefined"!=typeof Float32Array,S=[];function T(t){return Math.round(t/x*1e8)/1e8%2*x}function M(t,e){var n=T(t[0]);n<0&&(n+=b);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=b?r=n+b:e&&n-r>=b?r=n-b:!e&&n>r?r=n+(b-T(n-r)):e&&n0&&(this._ux=_(n/o.KL/t)||0,this._uy=_(n/o.KL/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=_(t-this._xi),i=_(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(l.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(l.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(l.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),S[0]=i,S[1]=r,M(S,o),i=S[0];var a=(r=S[1])-i;return this.addData(l.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=v(r)*n+t,this._yi=y(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(l.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!w||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){c[0]=c[1]=p[0]=p[1]=Number.MAX_VALUE,d[0]=d[1]=f[0]=f[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,o=0,s=0,u=0;for(t=0;tn||_(T)>i||p===e-1)&&(w=Math.sqrt(z*z+T*T),r=S,o=A);break;case l.C:var M=t[p++],C=t[p++],A=(S=t[p++],t[p++]),I=t[p++],D=t[p++];w=(0,s.Ci)(r,o,M,C,S,A,I,D,10),r=I,o=D;break;case l.Q:M=t[p++],C=t[p++],S=t[p++],A=t[p++];w=(0,s.wQ)(r,o,M,C,S,A,10),r=S,o=A;break;case l.A:var L=t[p++],P=t[p++],O=t[p++],E=t[p++],N=t[p++],k=t[p++],R=k+N;p+=1;t[p++];x&&(a=v(N)*O+L,u=y(N)*E+P),w=m(O,E)*g(b,Math.abs(k)),r=v(R)*O+L,o=y(R)*E+P;break;case l.R:a=r=t[p++],u=o=t[p++],w=2*t[p++]+2*t[p++];break;case l.Z:var z=a-r;T=u-o;w=Math.sqrt(z*z+T*T),r=a,o=u}w>=0&&(h[d++]=w,c+=w)}return this._pathLen=c,c},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,c,d,p,f,x,b=this.data,w=this._ux,S=this._uy,T=this._len,M=e<1,C=0,A=0,I=0;if(!M||(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=e*this._pathLen))t:for(var D=0;D0&&(t.lineTo(f,x),I=0),L){case l.M:n=r=b[D++],i=o=b[D++],t.moveTo(r,o);break;case l.L:a=b[D++],c=b[D++];var O=_(a-r),E=_(c-o);if(O>w||E>S){if(M){if(C+(it=d[A++])>p){var N=(p-C)/it;t.lineTo(r*(1-N)+a*N,o*(1-N)+c*N);break t}C+=it}t.lineTo(a,c),r=a,o=c,I=0}else{var k=O*O+E*E;k>I&&(f=a,x=c,I=k)}break;case l.C:var R=b[D++],z=b[D++],B=b[D++],Z=b[D++],F=b[D++],V=b[D++];if(M){if(C+(it=d[A++])>p){N=(p-C)/it;(0,s.Vz)(r,R,B,F,N,u),(0,s.Vz)(o,z,Z,V,N,h),t.bezierCurveTo(u[1],h[1],u[2],h[2],u[3],h[3]);break t}C+=it}t.bezierCurveTo(R,z,B,Z,F,V),r=F,o=V;break;case l.Q:R=b[D++],z=b[D++],B=b[D++],Z=b[D++];if(M){if(C+(it=d[A++])>p){N=(p-C)/it;(0,s.Lx)(r,R,B,N,u),(0,s.Lx)(o,z,Z,N,h),t.quadraticCurveTo(u[1],h[1],u[2],h[2]);break t}C+=it}t.quadraticCurveTo(R,z,B,Z),r=B,o=Z;break;case l.A:var G=b[D++],H=b[D++],U=b[D++],W=b[D++],j=b[D++],X=b[D++],Y=b[D++],q=!b[D++],K=U>W?U:W,J=_(U-W)>.001,Q=j+X,$=!1;if(M)C+(it=d[A++])>p&&(Q=j+X*(p-C)/it,$=!0),C+=it;if(J&&t.ellipse?t.ellipse(G,H,U,W,Y,j,Q,q):t.arc(G,H,K,j,Q,q),$)break t;P&&(n=v(j)*U+G,i=y(j)*W+H),r=v(Q)*U+G,o=y(Q)*W+H;break;case l.R:n=r=b[D],i=o=b[D+1],a=b[D++],c=b[D++];var tt=b[D++],et=b[D++];if(M){if(C+(it=d[A++])>p){var nt=p-C;t.moveTo(a,c),t.lineTo(a+g(nt,tt),c),(nt-=tt)>0&&t.lineTo(a+tt,c+g(nt,et)),(nt-=et)>0&&t.lineTo(a+m(tt-nt,0),c+et),(nt-=tt)>0&&t.lineTo(a,c+m(et-nt,0));break t}C+=it}t.rect(a,c,tt,et);break;case l.Z:if(M){var it;if(C+(it=d[A++])>p){N=(p-C)/it;t.lineTo(r*(1-N)+n*N,o*(1-N)+i*N);break t}C+=it}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=l,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}()},1610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}()},7411:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>g,dN:()=>p,kY:()=>f});var i=n(2892),r=n(5280),o=i.identity,a=5e-5;function s(t){return t>a||t<-5e-5}var l=[],u=[],h=i.create(),c=Math.abs,d=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return s(this.rotation)||s(this.x)||s(this.y)||s(this.scaleX-1)||s(this.scaleY-1)||s(this.skewX)||s(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||i.create(),e?this.getLocalTransform(n):o(n),t&&(e?i.mul(n,t,n):i.copy(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&o(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(l);var n=l[0]<0?-1:1,r=l[1]<0?-1:1,o=((l[0]-n)*e+n)/l[0]||0,a=((l[1]-r)*e+r)/l[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var n=this.originX,r=this.originY;(n||r)&&(h[4]=n,h[5]=r,i.mul(u,e,h),u[4]-=n,u[5]-=r,e=u),this.setLocalTransform(e)}},t.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)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&r.applyTransform(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&r.applyTransform(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&c(t[0]-1)>1e-10&&c(t[3]-1)>1e-10?Math.sqrt(c(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){f(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,o=t.scaleX,a=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,h=t.x,c=t.y,d=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||r||s||l){var f=n+s,g=r+l;e[4]=-f*o-d*g*a,e[5]=-g*a-p*f*o}else e[4]=e[5]=0;return e[0]=o,e[3]=a,e[1]=p*o,e[2]=d*a,u&&i.rotate(e,e,u),e[4]+=n+h,e[5]+=r+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),p=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function f(t,e){for(var n=0;n{"use strict";n.d(e,{H9:()=>v,mJ:()=>y,qL:()=>_,u4:()=>f,zk:()=>p});var i=n(5280),r=n(8554),o=Math.min,a=Math.max,s=Math.sin,l=Math.cos,u=2*Math.PI,h=i.create(),c=i.create(),d=i.create();function p(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],s=i[0],l=i[1],u=i[1],h=1;h1e-4)return f[0]=t-n,f[1]=e-r,g[0]=t+n,void(g[1]=e+r);if(h[0]=l(o)*n+t,h[1]=s(o)*r+e,c[0]=l(a)*n+t,c[1]=s(a)*r+e,m(f,h,c),v(g,h,c),(o%=u)<0&&(o+=u),(a%=u)<0&&(a+=u),o>a&&!p?a+=u:oo&&(d[0]=l(x)*n+t,d[1]=s(x)*r+e,m(f,d,f),v(g,d,g))}},8554:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>S,Ci:()=>b,Jz:()=>T,Lx:()=>C,QC:()=>M,Vz:()=>_,Wr:()=>A,X_:()=>m,Zm:()=>w,af:()=>g,kD:()=>v,pP:()=>y,t1:()=>x,wQ:()=>I});var i=n(5280),r=Math.pow,o=Math.sqrt,a=1e-8,s=1e-4,l=o(3),u=1/3,h=(0,i.create)(),c=(0,i.create)(),d=(0,i.create)();function p(t){return t>-1e-8&&ta||t<-1e-8}function g(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function m(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function v(t,e,n,i,a,s){var h=i+3*(e-n)-t,c=3*(n-2*e+t),d=3*(e-t),f=t-a,g=c*c-3*h*d,m=c*d-9*h*f,v=d*d-3*c*f,y=0;if(p(g)&&p(m)){if(p(c))s[0]=0;else(D=-d/c)>=0&&D<=1&&(s[y++]=D)}else{var _=m*m-4*g*v;if(p(_)){var x=m/g,b=-x/2;(D=-c/h+x)>=0&&D<=1&&(s[y++]=D),b>=0&&b<=1&&(s[y++]=b)}else if(_>0){var w=o(_),S=g*c+1.5*h*(-m+w),T=g*c+1.5*h*(-m-w);(D=(-c-((S=S<0?-r(-S,u):r(S,u))+(T=T<0?-r(-T,u):r(T,u))))/(3*h))>=0&&D<=1&&(s[y++]=D)}else{var M=(2*g*c-3*h*m)/(2*o(g*g*g)),C=Math.acos(M)/3,A=o(g),I=Math.cos(C),D=(-c-2*A*I)/(3*h),L=(b=(-c+A*(I+l*Math.sin(C)))/(3*h),(-c+A*(I-l*Math.sin(C)))/(3*h));D>=0&&D<=1&&(s[y++]=D),b>=0&&b<=1&&(s[y++]=b),L>=0&&L<=1&&(s[y++]=L)}}return y}function y(t,e,n,i,r){var a=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,l=3*e-3*t,u=0;if(p(s)){if(f(a))(c=-l/a)>=0&&c<=1&&(r[u++]=c)}else{var h=a*a-4*s*l;if(p(h))r[0]=-a/(2*s);else if(h>0){var c,d=o(h),g=(-a-d)/(2*s);(c=(-a+d)/(2*s))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function _(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function x(t,e,n,r,a,l,u,p,f,m,v){var y,_,x,b,w,S=.005,T=1/0;h[0]=f,h[1]=m;for(var M=0;M<1;M+=.05)c[0]=g(t,n,a,u,M),c[1]=g(e,r,l,p,M),(b=(0,i.distSquare)(h,c))=0&&b=0&&c<=1&&(r[u++]=c)}else{var h=s*s-4*a*l;if(p(h))(c=-s/(2*a))>=0&&c<=1&&(r[u++]=c);else if(h>0){var c,d=o(h),g=(-s-d)/(2*a);(c=(-s+d)/(2*a))>=0&&c<=1&&(r[u++]=c),g>=0&&g<=1&&(r[u++]=g)}}return u}function M(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function C(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function A(t,e,n,r,a,l,u,p,f){var g,m=.005,v=1/0;h[0]=u,h[1]=p;for(var y=0;y<1;y+=.05){c[0]=w(t,n,a,y),c[1]=w(e,r,l,y),(S=(0,i.distSquare)(h,c))=0&&S{"use strict";n.d(e,{UK:()=>h,A4:()=>u,YB:()=>l});var i=n(6387),r=Math.log(2);function o(t,e,n,i,a,s){var l=i+"-"+a,u=t.length;if(s.hasOwnProperty(l))return s[l];if(1===e){var h=Math.round(Math.log((1<>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,s),u=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],l=[],u=!0,h=0;h<4;h++){var c=t[h].getBoundingClientRect(),d=2*h,p=c.left,f=c.top;s.push(p,f),u=u&&o&&p===o[d]&&f===o[d+1],l.push(t[h].offsetLeft,t[h].offsetTop)}return u&&r?r:(e.srcCoords=s,e[i]=n?a(l,s):a(s,l))}(l,s,o);if(u)return u(t,n,r),!0}return!1}function h(t){return"CANVAS"===t.nodeName.toUpperCase()}},6387:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,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="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);const o=r},1158:(t,e,n)=>{"use strict";n.d(e,{OD:()=>c,Oo:()=>d,eV:()=>l,iP:()=>h,sT:()=>f,x1:()=>g,xg:()=>p});var i=n(6387),r=n(4058),o=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,a=[],s=i.default.browser.firefox&&+i.default.browser.version.split(".")[0]<39;function l(t,e,n,i){return n=n||{},i?u(t,e,n):s&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):u(t,e,n),n}function u(t,e,n){if(i.default.domSupported&&t.getBoundingClientRect){var o=e.clientX,s=e.clientY;if((0,r.UK)(t)){var l=t.getBoundingClientRect();return n.zrX=o-l.left,void(n.zrY=s-l.top)}if((0,r.A4)(a,t,o,s))return n.zrX=a[0],void(n.zrY=a[1])}n.zrX=n.zrY=0}function h(t){return t||window.event}function c(t,e,n){if(null!=(e=h(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&l(t,r,e,n)}else{l(t,e,e,n);var a=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&o.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function d(t,e,n,i){t.addEventListener(e,n,i)}function p(t,e,n,i){t.removeEventListener(e,n,i)}var f=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function g(t){return 2===t.which||3===t.which}},2892:(t,e,n)=>{"use strict";function i(){return[1,0,0,1,0,0]}function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function s(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function l(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function u(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function h(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function c(t){var e=[1,0,0,1,0,0];return o(e,t),e}n.r(e),n.d(e,{clone:()=>c,copy:()=>o,create:()=>i,identity:()=>r,invert:()=>h,mul:()=>a,rotate:()=>l,scale:()=>u,translate:()=>s})},3132:(t,e,n)=>{"use strict";n.d(e,{Uo:()=>o,g2:()=>h,n5:()=>i,qW:()=>u,rk:()=>r});var i=12,r="sans-serif",o=i+"px "+r;var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)c=h*t.length;else for(var d=0;d{"use strict";n.d(e,{Z:()=>l});function i(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function r(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function o(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function a(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function s(t,e){var n,i,r,s=7,l=0;n=t.length;var u=[];function h(n){var h=i[n],c=r[n],d=i[n+1],p=r[n+1];r[n]=c+p,n===l-3&&(i[n+1]=i[n+2],r[n+1]=r[n+2]),l--;var f=a(t[d],t,h,c,0,e);h+=f,0!==(c-=f)&&0!==(p=o(t[h+c-1],t,d,p,p-1,e))&&(c<=p?function(n,i,r,l){var h=0;for(h=0;h=7||g>=7);if(m)break;v<0&&(v=0),v+=2}if((s=v)<1&&(s=1),1===i){for(h=0;h=0;h--)t[g+h]=t[f+h];return void(t[p]=u[d])}var m=s;for(;;){var v=0,y=0,_=!1;do{if(e(u[d],t[c])<0){if(t[p--]=t[c--],v++,y=0,0==--i){_=!0;break}}else if(t[p--]=u[d--],y++,v=0,1==--l){_=!0;break}}while((v|y)=0;h--)t[g+h]=t[f+h];if(0===i){_=!0;break}}if(t[p--]=u[d--],1==--l){_=!0;break}if(0!==(y=l-o(t[c],u,0,l,l-1,e))){for(l-=y,g=(p-=y)+1,f=(d-=y)+1,h=0;h=7||y>=7);if(_)break;m<0&&(m=0),m+=2}(s=m)<1&&(s=1);if(1===l){for(g=(p-=i)+1,f=(c-=i)+1,h=i-1;h>=0;h--)t[g+h]=t[f+h];t[p]=u[d]}else{if(0===l)throw new Error;for(f=p-(l-1),h=0;h1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;h(t)}},forceMergeRuns:function(){for(;l>1;){var t=l-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((l=i(t,n,o,e))h&&(c=h),r(t,n,n+c,n+l,e),l=c}u.pushRun(n,l),u.mergeRuns(),a-=l,n+=l}while(0!==a);u.forceMergeRuns()}}}},3051:(t,e,n)=>{"use strict";n.r(e),n.d(e,{HashMap:()=>ot,RADIAN_TO_DEGREE:()=>dt,assert:()=>tt,bind:()=>N,clone:()=>y,concatArray:()=>st,createCanvas:()=>S,createHashMap:()=>at,createObject:()=>lt,curry:()=>k,defaults:()=>w,disableUserSelect:()=>ut,each:()=>I,eqNaN:()=>Y,extend:()=>b,filter:()=>P,find:()=>O,guid:()=>m,hasOwn:()=>ht,indexOf:()=>T,inherits:()=>M,isArray:()=>R,isArrayLike:()=>A,isBuiltInObject:()=>G,isDom:()=>U,isFunction:()=>z,isGradientObject:()=>W,isImagePatternObject:()=>j,isNumber:()=>F,isObject:()=>V,isPrimitive:()=>rt,isRegExp:()=>X,isString:()=>B,isStringSafe:()=>Z,isTypedArray:()=>H,keys:()=>E,logError:()=>v,map:()=>D,merge:()=>_,mergeAll:()=>x,mixin:()=>C,noop:()=>ct,normalizeCssArray:()=>$,reduce:()=>L,retrieve:()=>q,retrieve2:()=>K,retrieve3:()=>J,setAsPrimitive:()=>it,slice:()=>Q,trim:()=>et});var i=n(3132),r=L(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),o=L(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),a=Object.prototype.toString,s=Array.prototype,l=s.forEach,u=s.filter,h=s.slice,c=s.map,d=function(){}.constructor,p=d?d.prototype:null,f="__proto__",g=2311;function m(){return g++}function v(){for(var t=[],e=0;e{"use strict";function i(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function r(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t){return[t[0],t[1]]}function a(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function l(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function h(t){return Math.sqrt(d(t))}n.r(e),n.d(e,{add:()=>s,applyTransform:()=>M,clone:()=>o,copy:()=>r,create:()=>i,dist:()=>x,distSquare:()=>w,distance:()=>_,distanceSquare:()=>b,div:()=>g,dot:()=>m,len:()=>h,lenSquare:()=>d,length:()=>c,lengthSquare:()=>p,lerp:()=>T,max:()=>A,min:()=>C,mul:()=>f,negate:()=>S,normalize:()=>y,scale:()=>v,scaleAndAdd:()=>l,set:()=>a,sub:()=>u});var c=h;function d(t){return t[0]*t[0]+t[1]*t[1]}var p=d;function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function g(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function m(t,e){return t[0]*e[0]+t[1]*e[1]}function v(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function y(t,e){var n=h(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function _(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var x=_;function b(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var w=b;function S(t,e){return t[0]=-e[0],t[1]=-e[1],t}function T(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function M(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function C(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function A(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},2776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(655),r=n(327);const o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="compound",e}return(0,i.ZT)(e,t),e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n{"use strict";n.d(e,{ZP:()=>m,ik:()=>h,tj:()=>u});var i=n(655),r=n(5823),o=n(479),a=n(3051),s=n(4414),l="__zr_style_"+Math.round(10*Math.random()),u={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},h={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};u[l]=!0;var c=["z","z2","invisible"],d=["invisible"],p=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype._init=function(e){for(var n=(0,a.keys)(e),i=0;i{"use strict";n.d(e,{Z:()=>i});const i=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},t}()},8154:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(3051),o=n(5823),a=n(479),s=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=r.indexOf(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=r.indexOf(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n{"use strict";n.d(e,{ZP:()=>h});var i=n(655),r=n(7719),o=n(479),a=n(3051),s=(0,a.defaults)({x:0,y:0},r.tj),l={style:(0,a.defaults)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},r.ik.style)};var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.createStyle=function(t){return(0,a.createObject)(s,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return l},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new o.Z(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(r.ZP);u.prototype.type="image";const h=u},1754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(7719),o=n(479),a=[];const s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return(0,i.ZT)(e,t),e.prototype.traverse=function(t,e){t.call(e,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o,a){var s=t.call(this,o)||this;return s.x=null==e?0:e,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return(0,i.ZT)(e,t),e}(n(1797).Z)},327:(t,e,n)=>{"use strict";n.d(e,{$t:()=>A,ZP:()=>L});var i=n(655),r=n(7719),o=n(4014),a=n(3640),s=n(8554);function l(t,e,n,i,r,o,a,l,u,h,c){if(0===u)return!1;var d=u;return!(c>e+d&&c>i+d&&c>o+d&&c>l+d||ct+d&&h>n+d&&h>r+d&&h>a+d||hn||d+ur&&(r+=c);var f=Math.atan2(l,s);return f<0&&(f+=c),f>=i&&f<=r||f+c>=i&&f+c<=r}var p=n(7637),f=o.Z.CMD,g=2*Math.PI;var m=[-1,-1,-1],v=[-1,-1];function y(t,e,n,i,r,o,a,l,u,h){if(h>e&&h>i&&h>o&&h>l||h1&&(c=void 0,c=v[0],v[0]=v[1],v[1]=c),g=s.af(e,i,o,l,v[0]),f>1&&(y=s.af(e,i,o,l,v[1]))),2===f?xe&&l>i&&l>o||l=0&&h<=1){for(var c=0,d=s.Zm(e,i,o,h),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);m[0]=-l,m[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=g-1e-4){i=0,r=g;var h=o?1:-1;return a>=m[0]+t&&a<=m[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=g,r+=g);for(var d=0,p=0;p<2;p++){var f=m[p];if(f+t>a){var v=Math.atan2(s,f);h=o?1:-1;v<0&&(v=g+v),(v>=i&&v<=r||v+g>=i&&v+g<=r)&&(v>Math.PI/2&&v<1.5*Math.PI&&(h=-h),d+=h)}}return d}function b(t,e,n,i,r){for(var o,s,h,c,g=t.data,m=t.len(),v=0,b=0,w=0,S=0,T=0,M=0;M1&&(n||(v+=(0,p.Z)(b,w,S,T,i,r))),A&&(S=b=g[M],T=w=g[M+1]),C){case f.M:b=S=g[M++],w=T=g[M++];break;case f.L:if(n){if(a.m(b,w,g[M],g[M+1],e,i,r))return!0}else v+=(0,p.Z)(b,w,g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.C:if(n){if(l(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=y(b,w,g[M++],g[M++],g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.Q:if(n){if(u.m(b,w,g[M++],g[M++],g[M],g[M+1],e,i,r))return!0}else v+=_(b,w,g[M++],g[M++],g[M],g[M+1],i,r)||0;b=g[M++],w=g[M++];break;case f.A:var I=g[M++],D=g[M++],L=g[M++],P=g[M++],O=g[M++],E=g[M++];M+=1;var N=!!(1-g[M++]);o=Math.cos(O)*L+I,s=Math.sin(O)*P+D,A?(S=o,T=s):v+=(0,p.Z)(b,w,o,s,i,r);var k=(i-I)*P/L+I;if(n){if(d(I,D,P,O,O+E,N,e,k,r))return!0}else v+=x(I,D,P,O,O+E,N,k,r);b=Math.cos(O+E)*L+I,w=Math.sin(O+E)*P+D;break;case f.R:if(S=b=g[M++],T=w=g[M++],o=S+g[M++],s=T+g[M++],n){if(a.m(S,T,o,T,e,i,r)||a.m(o,T,o,s,e,i,r)||a.m(o,s,S,s,e,i,r)||a.m(S,s,S,T,e,i,r))return!0}else v+=(0,p.Z)(o,T,o,s,i,r),v+=(0,p.Z)(S,s,S,T,i,r);break;case f.Z:if(n){if(a.m(b,w,S,T,e,i,r))return!0}else v+=(0,p.Z)(b,w,S,T,i,r);b=S,w=T}}return n||(h=w,c=T,Math.abs(h-c)<1e-4)||(v+=(0,p.Z)(b,w,S,T,i,r)||0),0!==v}var w=n(3051),S=n(1092),T=n(4990),M=n(4414),C=n(7411),A=(0,w.defaults)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},r.tj),I={style:(0,w.defaults)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},r.ik.style)},D=C.dN.concat(["invisible","culling","z","z2","zlevel","parent"]);const L=function(t){function e(e){return t.call(this,e)||this}var n;return(0,i.ZT)(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?T.vU:e>.2?T.iv:T.GD}if(t)return T.GD}return T.vU},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if((0,w.isString)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===(0,S.lum)(t,0)0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||this.__dirty&M.RH)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return b(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return b(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=M.RH,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:(0,w.extend)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&M.RH)},e.prototype.createStyle=function(t){return(0,w.createObject)(A,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=(0,w.extend)({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=(0,w.extend)({},i.shape),(0,w.extend)(s,n.shape)):(s=(0,w.extend)({},r?this.shape:i.shape),(0,w.extend)(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=(0,w.extend)({},this.shape);for(var u={},h=(0,w.keys)(s),c=0;c{"use strict";n.d(e,{Z:()=>r});var i=n(655);const r=function(t){function e(e,n,i,r,o){var a=t.call(this,r)||this;return a.x=null==e?.5:e,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return(0,i.ZT)(e,t),e}(n(1797).Z)},1505:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(7719),o=n(423),a=n(327),s=n(3051),l=n(3132),u=(0,s.defaults)({strokeFirst:!0,font:l.Uo,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},a.$t),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return(0,s.createObject)(u,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=(0,o.lP)(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(r.ZP);h.prototype.type="tspan";const c=h},6498:(t,e,n)=>{"use strict";n.d(e,{VG:()=>_,Y1:()=>b,ZP:()=>I});var i=n(655),r=n(6918),o=n(1505),a=n(3051),s=n(423),l=n(4535),u=n(5151),h=n(479),c=n(7719),d=n(3132),p={fill:"#000"},f={style:(0,a.defaults)({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},c.ik.style)},g=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=p,n.attr(e),n}return(0,i.ZT)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,z=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),B=a.calculatedLineHeight,Z=0;Z=0&&"right"===(O=w[P]).align;)this._placeToken(O,t,T,v,L,"right",_),M-=O.width,L-=O.width,P--;for(D+=(i-(D-m)-(y-L)-M)/2;I<=P;)O=w[I],this._placeToken(O,t,T,v,D+O.width/2,"center",_),D+=O.width,I++;v+=T}},e.prototype._placeToken=function(t,e,n,i,r,l,u){var c=e.rich[t.styleName]||{};c.text=t.text;var p=t.verticalAlign,f=i+n/2;"top"===p?f=i+t.height/2:"bottom"===p&&(f=i+n-t.height/2),!t.isLineHolder&&A(c)&&this._renderBackground(c,e,"right"===l?r-t.width:"center"===l?r-t.width/2:r,f-t.height/2,t.width,t.height);var g=!!c.backgroundColor,m=t.textPadding;m&&(r=M(r,l,m),f-=t.height/2-m[0]-t.innerHeight/2);var v=this._getOrCreateChild(o.Z),y=v.createStyle();v.useStyle(y);var _=this._defaultStyle,b=!1,w=0,C=T("fill"in c?c.fill:"fill"in e?e.fill:(b=!0,_.fill)),I=S("stroke"in c?c.stroke:"stroke"in e?e.stroke:g||u||_.autoStroke&&!b?null:(w=2,_.stroke)),D=c.textShadowBlur>0||e.textShadowBlur>0;y.text=t.text,y.x=r,y.y=f,D&&(y.shadowBlur=c.textShadowBlur||e.textShadowBlur||0,y.shadowColor=c.textShadowColor||e.textShadowColor||"transparent",y.shadowOffsetX=c.textShadowOffsetX||e.textShadowOffsetX||0,y.shadowOffsetY=c.textShadowOffsetY||e.textShadowOffsetY||0),y.textAlign=l,y.textBaseline="middle",y.font=t.font||d.Uo,y.opacity=(0,a.retrieve3)(c.opacity,e.opacity,1),x(y,c),I&&(y.lineWidth=(0,a.retrieve3)(c.lineWidth,e.lineWidth,w),y.lineDash=(0,a.retrieve2)(c.lineDash,e.lineDash),y.lineDashOffset=e.lineDashOffset||0,y.stroke=I),C&&(y.fill=C);var L=t.contentWidth,P=t.contentHeight;v.setBoundingRect(new h.Z((0,s.M3)(y.x,L,y.textAlign),(0,s.mU)(y.y,P,y.textBaseline),L,P))},e.prototype._renderBackground=function(t,e,n,i,r,o){var s,h,c,d=t.backgroundColor,p=t.borderWidth,f=t.borderColor,g=d&&d.image,m=d&&!g,v=t.borderRadius,y=this;if(m||t.lineHeight||p&&f){(s=this._getOrCreateChild(u.Z)).useStyle(s.createStyle()),s.style.fill=null;var _=s.shape;_.x=n,_.y=i,_.width=r,_.height=o,_.r=v,s.dirtyShape()}if(m)(c=s.style).fill=d||null,c.fillOpacity=(0,a.retrieve2)(t.fillOpacity,1);else if(g){(h=this._getOrCreateChild(l.ZP)).onload=function(){y.dirtyStyle()};var x=h.style;x.image=d.image,x.x=n,x.y=i,x.width=r,x.height=o}p&&f&&((c=s.style).lineWidth=p,c.stroke=f,c.strokeOpacity=(0,a.retrieve2)(t.strokeOpacity,1),c.lineDash=t.borderDash,c.lineDashOffset=t.borderDashOffset||0,s.strokeContainThreshold=0,s.hasFill()&&s.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var b=(s||h).style;b.shadowBlur=t.shadowBlur||0,b.shadowColor=t.shadowColor||"transparent",b.shadowOffsetX=t.shadowOffsetX||0,b.shadowOffsetY=t.shadowOffsetY||0,b.opacity=(0,a.retrieve3)(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return b(t)&&(e=[t.fontStyle,t.fontWeight,_(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&(0,a.trim)(e)||t.textFont||t.font},e}(c.ZP),m={left:!0,right:1,center:1},v={top:1,bottom:1,middle:1},y=["fontStyle","fontWeight","fontSize","fontFamily"];function _(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?d.n5+"px":t+"px":t}function x(t,e){for(var n=0;n{"use strict";n.d(e,{RH:()=>o,SE:()=>r,YV:()=>i});var i=1,r=2,o=4},8007:(t,e,n)=>{"use strict";n.d(e,{Gq:()=>s,ko:()=>a,v5:()=>u});var i=n(2528),r=n(3132),o=new i.ZP(50);function a(t){if("string"==typeof t){var e=o.get(t);return e&&e.image}return t}function s(t,e,n,i,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var s=o.get(t),h={hostEl:n,cb:i,cbPayload:a};return s?!u(e=s.image)&&s.pending.push(h):((e=r.qW.loadImage(t,l,l)).__zrImageSrc=t,o.put(t,e.__cachedImgObj={image:e,pending:[h]})),e}return t}return e}function l(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e{"use strict";n.d(e,{$F:()=>g,NY:()=>c,aF:()=>s});var i=n(8007),r=n(3051),o=n(423),a=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function s(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=l(e,n,i,r);for(var a=0,s=o.length;a=l;h++)u-=l;var c=(0,o.dz)(n,e);return c>u&&(n="",c=0),u=t-c,a.ellipsis=n,a.ellipsisWidth=c,a.contentWidth=u,a.containerWidth=t,a}function u(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=(0,o.dz)(t,i);if(a<=n)return t;for(var s=0;;s++){if(a<=r||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?h(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;t=t.substr(0,l),a=(0,o.dz)(t,i)}return""===t&&(t=e.placeholder),t}function h(t,e,n,i){for(var r=0,o=0,a=t.length;ov&&f){var y=Math.floor(v/d);n=n.slice(0,y)}if(t&&h&&null!=g)for(var x=l(g,s,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b=0;bp&&m(n,t.substring(p,g),e,d),m(n,l[2],e,d,l[1]),p=a.lastIndex}ph){I>0?(M.tokens=M.tokens.slice(0,I),S(M,A,C),n.lines=n.lines.slice(0,T+1)):n.lines=n.lines.slice(0,T);break t}var N=D.width,k=null==N||"auto"===N;if("string"==typeof N&&"%"===N.charAt(N.length-1))Z.percentWidth=N,v.push(Z),Z.contentWidth=(0,o.dz)(Z.text,O);else{if(k){var R=D.backgroundColor,z=R&&R.image;z&&(z=i.ko(z),i.v5(z)&&(Z.width=Math.max(Z.width,z.width*E/z.height)))}var B=b&&null!=u?u-A:null;null!=B&&B0&&v+i.accumWidth>i.width&&(a=e.split("\n"),f=!0),i.accumWidth=v}else{var y=_(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=y.accumWidth+m,s=y.linesWidths,a=y.lines}}else a=e.split("\n");for(var x=0;x=33&&e<=383}(t)||!!v[t]}function _(t,e,n,i,r){for(var a=[],s=[],l="",u="",h=0,c=0,d=0;dn:r+c+f>n)?c?(l||u)&&(g?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=p,l="",c=h+=f):(u&&(l+=u,u="",h=0),a.push(l),s.push(c),l=p,c=f)):g?(a.push(u),s.push(h),u=p,h=f):(a.push(p),s.push(f)):(c+=f,g?(u+=p,h+=f):(u&&(l+=u,u="",h=0),l+=p))}else u&&(l+=u,c+=h),a.push(l),s.push(c),l="",u="",h=0,c=0}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=r),{accumWidth:c,lines:a,linesWidths:s}}},924:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var i=n(5280);function r(t,e,n){var r=e.smooth,o=e.points;if(o&&o.length>=2){if(r){var a=function(t,e,n,r){var o,a,s,l,u=[],h=[],c=[],d=[];if(r){s=[1/0,1/0],l=[-1/0,-1/0];for(var p=0,f=t.length;p{"use strict";n.d(e,{Pw:()=>o,_3:()=>r,vu:()=>a});var i=Math.round;function r(t,e,n){if(e){var r=e.x1,o=e.x2,s=e.y1,l=e.y2;t.x1=r,t.x2=o,t.y1=s,t.y2=l;var u=n&&n.lineWidth;return u?(i(2*r)===i(2*o)&&(t.x1=t.x2=a(r,u,!0)),i(2*s)===i(2*l)&&(t.y1=t.y2=a(s,u,!0)),t):t}}function o(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var l=n&&n.lineWidth;return l?(t.x=a(i,l,!0),t.y=a(r,l,!0),t.width=Math.max(a(i+o,l,!1)-t.x,0===o?0:1),t.height=Math.max(a(r+s,l,!1)-t.y,0===s?0:1),t):t}}function a(t,e,n){if(!e)return t;var r=i(2*t);return(r+i(e))%2==0?r/2:(r+(n?1:-1))/2}},4826:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+n,u*r+i),t.arc(n,i,r,o,a,!s)},e}(r.ZP);a.prototype.type="arc";const s=a},4174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(655),r=n(327),o=n(5280),a=n(8554),s=[],l=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function u(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?a.X_:a.af)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?a.X_:a.af)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?a.AZ:a.Zm)(t.x1,t.cpx1,t.x2,e),(n?a.AZ:a.Zm)(t.y1,t.cpy1,t.y2,e)]}var h=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new l},e.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,l=e.cpx1,u=e.cpy1,h=e.cpx2,c=e.cpy2,d=e.percent;0!==d&&(t.moveTo(n,i),null==h||null==c?(d<1&&((0,a.Lx)(n,l,r,d,s),l=s[1],r=s[2],(0,a.Lx)(i,u,o,d,s),u=s[1],o=s[2]),t.quadraticCurveTo(l,u,r,o)):(d<1&&((0,a.Vz)(n,l,h,r,d,s),l=s[1],h=s[2],r=s[3],(0,a.Vz)(i,u,c,o,d,s),u=s[1],c=s[2],o=s[3]),t.bezierCurveTo(l,u,h,c,r,o)))},e.prototype.pointAt=function(t){return u(this.shape,t,!1)},e.prototype.tangentAt=function(t){var e=u(this.shape,t,!0);return o.normalize(e,e)},e}(r.ZP);h.prototype.type="bezier-curve";const c=h},9538:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},e}(r.ZP);a.prototype.type="circle";const s=a},2797:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=.5522848,i=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*n,l=a*n;t.moveTo(i-o,r),t.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),t.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),t.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),t.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),t.closePath()},e}(r.ZP);a.prototype.type="ellipse";const s=a},2095:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327),o=n(4111),a={},s=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s},e.prototype.buildPath=function(t,e){var n,i,r,s;if(this.subPixelOptimize){var l=(0,o._3)(a,e,this.style);n=l.x1,i=l.y1,r=l.x2,s=l.y2}else n=e.x1,i=e.y1,r=e.x2,s=e.y2;var u=e.percent;0!==u&&(t.moveTo(n,i),u<1&&(r=n*(1-u)+r*u,s=i*(1-u)+s*u),t.lineTo(r,s))},e.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},e}(r.ZP);l.prototype.type="line";const u=l},5094:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!0)},e}(r.ZP);s.prototype.type="polygon";const l=s},2514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(655),r=n(327),o=n(924),a=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},s=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){o.L(t,e,!1)},e}(r.ZP);s.prototype.type="polyline";const l=s},5151:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(655),r=n(327);var o=n(4111),a=function(){this.x=0,this.y=0,this.width=0,this.height=0},s={},l=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new a},e.prototype.buildPath=function(t,e){var n,i,r,a;if(this.subPixelOptimize){var l=(0,o.Pw)(s,e,this.style);n=l.x,i=l.y,r=l.width,a=l.height,l.r=e.r,e=l}else n=e.x,i=e.y,r=e.width,a=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(r.ZP);l.prototype.type="rect";const u=l},5795:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(655),r=n(327),o=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},a=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new o},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(r.ZP);a.prototype.type="ring";const s=a},7214:(t,e,n)=>{"use strict";n.d(e,{C:()=>b});var i=n(655),r=n(327),o=n(3051),a=Math.PI,s=2*a,l=Math.sin,u=Math.cos,h=Math.acos,c=Math.atan2,d=Math.abs,p=Math.sqrt,f=Math.max,g=Math.min,m=1e-4;function v(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/p(s*s+l*l),h=u*l,c=-u*s,d=t+h,g=e+c,m=n+h,v=i+c,y=(d+m)/2,_=(g+v)/2,x=m-d,b=v-g,w=x*x+b*b,S=r-o,T=d*v-m*g,M=(b<0?-1:1)*p(f(0,S*S*w-T*T)),C=(T*b-x*M)/w,A=(-T*x-b*M)/w,I=(T*b+x*M)/w,D=(-T*x+b*M)/w,L=C-y,P=A-_,O=I-y,E=D-_;return L*L+P*P>O*O+E*E&&(C=I,A=D),{cx:C,cy:A,x0:-h,y0:-c,x1:C*(r/S-1),y1:A*(r/S-1)}}function y(t,e){var n,i=f(e.r,0),r=f(e.r0||0,0),y=i>0;if(y||r>0){if(y||(i=r,r=0),r>i){var _=i;i=r,r=_}var x=e.startAngle,b=e.endAngle;if(!isNaN(x)&&!isNaN(b)){var w=e.cx,S=e.cy,T=!!e.clockwise,M=d(b-x),C=M>s&&M%s;if(C>m&&(M=C),i>m)if(M>s-m)t.moveTo(w+i*u(x),S+i*l(x)),t.arc(w,S,i,x,b,!T),r>m&&(t.moveTo(w+r*u(b),S+r*l(b)),t.arc(w,S,r,b,x,T));else{var A=void 0,I=void 0,D=void 0,L=void 0,P=void 0,O=void 0,E=void 0,N=void 0,k=void 0,R=void 0,z=void 0,B=void 0,Z=void 0,F=void 0,V=void 0,G=void 0,H=i*u(x),U=i*l(x),W=r*u(b),j=r*l(b),X=M>m;if(X){var Y=e.cornerRadius;Y&&(A=(n=function(t){var e;if((0,o.isArray)(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(Y))[0],I=n[1],D=n[2],L=n[3]);var q=d(i-r)/2;if(P=g(q,D),O=g(q,L),E=g(q,A),N=g(q,I),z=k=f(P,O),B=R=f(E,N),(k>m||R>m)&&(Z=i*u(b),F=i*l(b),V=r*u(x),G=r*l(x),Mm){var it=g(D,z),rt=g(L,z),ot=v(V,G,H,U,i,it,T),at=v(Z,F,W,j,i,rt,T);t.moveTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),z0&&t.arc(w+ot.cx,S+ot.cy,it,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,i,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),!T),rt>0&&t.arc(w+at.cx,S+at.cy,rt,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.moveTo(w+H,S+U),t.arc(w,S,i,x,b,!T);else t.moveTo(w+H,S+U);if(r>m&&X)if(B>m){it=g(A,B),ot=v(W,j,Z,F,r,-(rt=g(I,B)),T),at=v(H,U,V,G,r,-it,T);t.lineTo(w+ot.cx+ot.x0,S+ot.cy+ot.y0),B0&&t.arc(w+ot.cx,S+ot.cy,rt,c(ot.y0,ot.x0),c(ot.y1,ot.x1),!T),t.arc(w,S,r,c(ot.cy+ot.y1,ot.cx+ot.x1),c(at.cy+at.y1,at.cx+at.x1),T),it>0&&t.arc(w+at.cx,S+at.cy,it,c(at.y1,at.x1),c(at.y0,at.x0),!T))}else t.lineTo(w+W,S+j),t.arc(w,S,r,b,x,T);else t.lineTo(w+W,S+j)}else t.moveTo(w,S);t.closePath()}}}var _=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},x=function(t){function e(e){return t.call(this,e)||this}return(0,i.ZT)(e,t),e.prototype.getDefaultShape=function(){return new _},e.prototype.buildPath=function(t,e){y(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(r.ZP);x.prototype.type="sector";const b=x},6076:(t,e,n)=>{"use strict";n.d(e,{Z:()=>wt});var i=n(4839),r=n(327),o=n(4535),a=n(423),s=n(1505),l=Math.sin,u=Math.cos,h=Math.PI,c=2*Math.PI,d=180/h;const p=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,r,o,a,s,p){var f=s-a,g=!p,m=Math.abs(f),v=(0,i.zT)(m-c)||(g?f>=c:-f>=c),y=f>0?f%c:f%c+c,_=!1;_=!!v||!(0,i.zT)(m)&&y>=h==!!g;var x=t+n*u(a),b=e+r*l(a);this._start&&this._add("M",x,b);var w=Math.round(o*d);if(v){var S=1/this._p,T=(g?1:-1)*(c-S);this._add("A",n,r,w,1,+g,t+n*u(a+T),e+r*l(a+T)),S>.01&&this._add("A",n,r,w,0,+g,x,b)}else{var M=t+n*u(s),C=e+r*l(s);this._add("A",n,r,w,+_,+g,M,C)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,e.attrs)+(e.text||"")+(i?""+n+(0,g.map)(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function C(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function A(t,e,n,i){return T("svg","root",{width:t,height:e,xmlns:b,"xmlns:xlink":w,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var I=n(8007),D=n(7411),L=n(4014),P=n(2776),O=n(5188),E={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"},N="transform-origin";function k(t,e,n){var r=(0,g.extend)({},t.shape);(0,g.extend)(r,e),t.buildPath(n,r);var o=new p;return o.reset((0,i.Gk)(t)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function R(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[N]=n+"px "+i+"px")}var z={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function B(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function Z(t){return(0,g.isString)(t)?E[t]?"cubic-bezier("+E[t]+")":(0,O.H)(t)?t:"":""}function F(t,e,n,r){var o=t.animators,a=o.length,s=[];if(t instanceof P.Z){var l=function(t,e,n){var i,r,o=t.shape.paths,a={};if((0,g.each)(o,(function(t){var e=C(n.zrId);e.animation=!0,F(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=(0,g.keys)(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var d=h[c];a[c]=a[c]||{d:""},a[c].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=B(a,n);return i.replace(r,s)}}(t,e,n);if(l)s.push(l);else if(!a)return}else if(!a)return;for(var u={},h=0;h0})).length)return B(c,n)+" "+o[0]+" both"}for(var y in u){(l=v(u[y]))&&s.push(l)}if(s.length){var _=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+_]={animation:s.join(",")},e.class=_}}var V=n(6498),G=n(3132),H=Math.round;function U(t){return t&&(0,g.isString)(t.src)}function W(t){return t&&(0,g.isFunction)(t.toDataURL)}function j(t,e,n,r){x((function(o,a){var s="fill"===o||"stroke"===o;s&&(0,i.H3)(a)?function(t,e,n,r){var o,a=t[n],s={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if((0,i.I1)(a))o="linearGradient",s.x1=a.x,s.y1=a.y,s.x2=a.x2,s.y2=a.y2;else{if(!(0,i.gO)(a))return void 0;o="radialGradient",s.cx=(0,g.retrieve2)(a.x,.5),s.cy=(0,g.retrieve2)(a.y,.5),s.r=(0,g.retrieve2)(a.r,.5)}for(var l=a.colorStops,u=[],h=0,c=l.length;hl?mt(t,null==n[c+1]?null:n[c+1].elm,n,s,c):vt(t,e,a,l))}(n,i,r):dt(r)?(dt(t.text)&&ut(n,""),mt(n,null,r,0,r.length-1)):dt(i)?vt(n,i,0,i.length-1):dt(t.text)&&ut(n,""):t.text!==e.text&&(dt(i)&&vt(n,i,0,i.length-1),ut(n,e.text)))}var xt=n(5787),bt=0;const wt=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=n=(0,g.extend)({},n),this.root=t,this._id="zr"+bt++,this._oldVNode=A(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=S("svg");yt(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(ft(t,e))_t(t,e);else{var n=t.elm,i=st(n);gt(e),null!==i&&(rt(i,e.elm,lt(n)),vt(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return et(t,C(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._backgroundColor,r=this._width,o=this._height,a=C(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress;var s=[];if(n&&"none"!==n){var l=(0,i.ut)(n),u=l.color,h=l.opacity;this._bgVNode=T("rect","bg",{width:r,height:o,x:"0",y:"0",id:"0",fill:u,"fill-opacity":h}),s.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=T("g","main",{},[]);this._paintList(e,a,c?c.children:s),c&&s.push(c);var d=(0,g.map)((0,g.keys)(a.defs),(function(t){return a.defs[t]}));if(d.length&&s.push(T("defs","defs",{},d)),t.animation){var p=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=(0,g.map)((0,g.keys)(t),(function(e){return e+r+(0,g.map)((0,g.keys)(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=(0,g.map)((0,g.keys)(e),(function(t){return"@keyframes "+t+r+(0,g.map)((0,g.keys)(e[t]),(function(n){return n+r+(0,g.map)((0,g.keys)(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(a.cssNodes,a.cssAnims,{newline:!0});if(p){var f=T("style","stl",{},[],p);s.push(f)}}return A(r,o,s,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},M(this.renderToVNode({animation:(0,g.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:(0,g.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var n=(0,i.ut)(t),r=n.color,o=n.opacity;e.elm.setAttribute("fill",r),o<1&&e.elm.setAttribute("fill-opacity",o)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m{"use strict";n.d(e,{Cv:()=>v,Gk:()=>S,H3:()=>b,I1:()=>_,Pn:()=>c,R:()=>y,gA:()=>T,gO:()=>x,i2:()=>g,jY:()=>p,m1:()=>w,mU:()=>f,n1:()=>m,oF:()=>M,qV:()=>d,ut:()=>s,zT:()=>u});var i=n(3051),r=n(1092),o=n(6387),a=Math.round;function s(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=(0,r.parse)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var l=1e-4;function u(t){return t-1e-4}function h(t){return a(1e3*t)/1e3}function c(t){return a(1e4*t)/1e4}function d(t){return"matrix("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+c(t[4])+","+c(t[5])+")"}var p={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function g(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function m(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(t){return t&&!!t.image}function y(t){return v(t)||function(t){return t&&!!t.svgElement}(t)}function _(t){return"linear"===t.type}function x(t){return"radial"===t.type}function b(t){return t&&("linear"===t.type||"radial"===t.type)}function w(t){return"url(#"+t+")"}function S(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function T(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*i.RADIAN_TO_DEGREE,o=(0,i.retrieve2)(t.scaleX,1),s=(0,i.retrieve2)(t.scaleY,1),l=t.skewX||0,u=t.skewY||0,h=[];return(e||n)&&h.push("translate("+e+"px,"+n+"px)"),r&&h.push("rotate("+r+")"),1===o&&1===s||h.push("scale("+o+","+s+")"),(l||u)&&h.push("skew("+a(l*i.RADIAN_TO_DEGREE)+"deg, "+a(u*i.RADIAN_TO_DEGREE)+"deg)"),h.join(" ")}var M=o.default.hasGlobalWindow&&(0,i.isFunction)(window.btoa)?function(t){return window.btoa(unescape(t))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}},1092:(t,e,n)=>{"use strict";n.r(e),n.d(e,{fastLerp:()=>x,fastMapToColor:()=>b,lerp:()=>w,lift:()=>y,lum:()=>A,mapToColor:()=>S,modifyAlpha:()=>M,modifyHSL:()=>T,parse:()=>m,random:()=>I,stringify:()=>C,toHex:()=>_});var i=n(2528),r={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 o(t){return(t=Math.round(t))<0?0:t>255?255:t}function a(t){return t<0?0:t>1?1:t}function s(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?a(parseFloat(e)/100):a(parseFloat(e))}function u(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function h(t,e,n){return t+(e-t)*n}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function d(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.ZP(20),f=null;function g(t,e){f&&d(f,e),f=p.put(t,f||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return d(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in r)return d(e,r[i]),g(t,e),e;var o,a=i.length;if("#"===i.charAt(0))return 4===a||5===a?(o=parseInt(i.slice(1,4),16))>=0&&o<=4095?(c(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===a?parseInt(i.slice(4),16)/15:1),g(t,e),e):void c(e,0,0,0,1):7===a||9===a?(o=parseInt(i.slice(1,7),16))>=0&&o<=16777215?(c(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===a?parseInt(i.slice(7),16)/255:1),g(t,e),e):void c(e,0,0,0,1):void 0;var u=i.indexOf("("),h=i.indexOf(")");if(-1!==u&&h+1===a){var f=i.substr(0,u),m=i.substr(u+1,h-(u+1)).split(","),y=1;switch(f){case"rgba":if(4!==m.length)return 3===m.length?c(e,+m[0],+m[1],+m[2],1):c(e,0,0,0,1);y=l(m.pop());case"rgb":return 3!==m.length?void c(e,0,0,0,1):(c(e,s(m[0]),s(m[1]),s(m[2]),y),g(t,e),e);case"hsla":return 4!==m.length?void c(e,0,0,0,1):(m[3]=l(m[3]),v(m,e),g(t,e),e);case"hsl":return 3!==m.length?void c(e,0,0,0,1):(v(m,e),g(t,e),e);default:return}}c(e,0,0,0,1)}}function v(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=l(t[1]),r=l(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return c(e=e||[],o(255*u(s,a,n+1/3)),o(255*u(s,a,n)),o(255*u(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function y(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return C(n,4===n.length?"rgba":"rgb")}}function _(t){var e=m(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=e[r],u=e[s],c=i-r;return n[0]=o(h(l[0],u[0],c)),n[1]=o(h(l[1],u[1],c)),n[2]=o(h(l[2],u[2],c)),n[3]=a(h(l[3],u[3],c)),n}}var b=x;function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),s=Math.ceil(i),l=m(e[r]),u=m(e[s]),c=i-r,d=C([o(h(l[0],u[0],c)),o(h(l[1],u[1],c)),o(h(l[2],u[2],c)),a(h(l[3],u[3],c))],"rgba");return n?{color:d,leftIndex:r,rightIndex:s,value:i}:d}}var S=w;function T(t,e,n,i){var r,o=m(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=l(n)),null!=i&&(o[2]=l(i)),C(v(o),"rgba")}function M(t,e){var n=m(t);if(n&&null!=e)return n[3]=a(e),C(n,"rgba")}function C(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function A(t,e){var n=m(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function I(){return C([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},7494:(t,e,n)=>{"use strict";n.d(e,{U5:()=>D,iR:()=>C,Pc:()=>A,AA:()=>I});var i=n(655),r=n(327),o=n(4014),a=n(5280),s=o.Z.CMD,l=[[],[],[]],u=Math.sqrt,h=Math.atan2;function c(t,e){if(e){var n,i,r,o,c,d,p=t.data,f=t.len(),g=s.M,m=s.C,v=s.L,y=s.R,_=s.A,x=s.Q;for(r=0,o=0;r1&&(a*=p(x),s*=p(x));var b=(r===o?-1:1)*p((a*a*(s*s)-a*a*(v*v)-s*s*(d*d))/(a*a*(v*v)+s*s*(d*d)))||0,w=b*a*v/s,S=b*-s*d/a,T=(t+n)/2+g(c)*w-f(c)*S,M=(e+i)/2+f(c)*w+g(c)*S,C=_([1,0],[(d-w)/a,(v-S)/s]),A=[(d-w)/a,(v-S)/s],I=[(-1*d-w)/a,(-1*v-S)/s],D=_(A,I);if(y(A,I)<=-1&&(D=m),y(A,I)>=1&&(D=0),D<0){var L=Math.round(D/m*1e6)/1e6;D=2*m+L%2*m}h.addData(u,T,M,a,s,C,D,c,o)}var b=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,w=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.prototype.applyTransform=function(t){},e}(r.ZP);function T(t){return null!=t.setData}function M(t,e){var n=function(t){var e=new o.Z;if(!t)return e;var n,i=0,r=0,a=i,s=r,l=o.Z.CMD,u=t.match(b);if(!u)return e;for(var h=0;h{"use strict";n.r(e),n.d(e,{dispose:()=>ot,disposeAll:()=>at,getInstance:()=>st,init:()=>rt,registerPainter:()=>lt,version:()=>ut});var i=n(6387),r=n(3051),o=n(655),a=n(5280),s=function(t,e){this.target=t,this.topTarget=e&&e.topTarget};const l=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.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 s(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(r,o,t),this.handler.dispatchToElement(new s(e,t),"drag",t.event);var a=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=a,e!==a&&(l&&a!==l&&this.handler.dispatchToElement(new s(l,t),"dragleave",t.event),a&&a!==l&&this.handler.dispatchToElement(new s(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new s(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new s(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}();var u=n(3510),h=n(1158),c=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=d(r)/d(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},f="silent";function g(){h.sT(this.event)}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return(0,o.ZT)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(u.Z),v=function(t,e){this.x=t,this.y=e},y=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new v(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new m,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new l(o),o}return(0,o.ZT)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(r.each(y,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=b(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new v(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new v(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:g}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new v(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=x(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==f)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new c);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new v;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(u.Z);function x(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||f}return!1}function b(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){_.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,s=b(this,r,o);if("mouseup"===t&&s||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||a.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));const w=_;var S=n(9455),T=n(4414),M=!1;function C(){M||(M=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function A(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}const I=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=A}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(C(),u.z=0),isNaN(u.z2)&&(C(),u.z2=0),isNaN(u.zlevel)&&(C(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();var D=n(2795),L=n(5622);function P(){return(new Date).getTime()}const O=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return(0,o.ZT)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=P()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,(0,D.Z)((function e(){t._running&&((0,D.Z)(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=P(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=P(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=P()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new L.Z(t,e.loop);return this.addAnimator(n),n},e}(u.Z);var E,N,k=i.default.domSupported,R=(N={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:E=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:r.map(E,(function(t){var e=t.replace("mouse","pointer");return N.hasOwnProperty(e)?e:t}))}),z=["mousemove","mouseup"],B=["pointermove","pointerup"],Z=!1;function F(t){var e=t.pointerType;return"pen"===e||"touch"===e}function V(t){t&&(t.zrByTouch=!0)}function G(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var H=function(t,e){this.stopPropagation=r.noop,this.stopImmediatePropagation=r.noop,this.preventDefault=r.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},U={mousedown:function(t){t=(0,h.OD)(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=(0,h.OD)(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=(0,h.OD)(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){G(this,(t=(0,h.OD)(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Z=!0,t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Z||(t=(0,h.OD)(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){V(t=(0,h.OD)(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),U.mousemove.call(this,t),U.mousedown.call(this,t)},touchmove:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"change"),U.mousemove.call(this,t)},touchend:function(t){V(t=(0,h.OD)(this.dom,t)),this.handler.processGesture(t,"end"),U.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&U.click.call(this,t)},pointerdown:function(t){U.mousedown.call(this,t)},pointermove:function(t){F(t)||U.mousemove.call(this,t)},pointerup:function(t){U.mouseup.call(this,t)},pointerout:function(t){F(t)||U.mouseout.call(this,t)}};r.each(["click","dblclick","contextmenu"],(function(t){U[t]=function(e){e=(0,h.OD)(this.dom,e),this.trigger(t,e)}}));var W={pointermove:function(t){F(t)||W.mousemove.call(this,t)},pointerup:function(t){W.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function j(t,e){var n=e.domHandlers;i.default.pointerEventsSupported?r.each(R.pointer,(function(i){Y(e,i,(function(e){n[i].call(t,e)}))})):(i.default.touchEventsSupported&&r.each(R.touch,(function(i){Y(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),r.each(R.mouse,(function(i){Y(e,i,(function(r){r=(0,h.iP)(r),e.touching||n[i].call(t,r)}))})))}function X(t,e){function n(n){Y(e,n,(function(i){i=(0,h.iP)(i),G(t,i.target)||(i=function(t,e){return(0,h.OD)(t.dom,new H(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}i.default.pointerEventsSupported?r.each(B,n):i.default.touchEventsSupported||r.each(z,n)}function Y(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,(0,h.Oo)(t.domTarget,e,n,i)}function q(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&(0,h.xg)(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var K=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e};const J=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new K(e,U),k&&(i._globalHandlerScope=new K(document,W)),j(i,i._localHandlerScope),i}return(0,o.ZT)(e,t),e.prototype.dispose=function(){q(this._localHandlerScope),k&&q(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,k&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?X(this,e):q(e)}},e}(u.Z);var Q=n(1092),$=n(4990),tt=n(8154),et={},nt={};var it=function(){function t(t,e,n){var o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new I,s=n.renderer||"canvas";et[s]||(s=r.keys(et)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var l=new et[s](e,a,n,t),u=n.ssr||l.ssrOnly;this.storage=a,this.painter=l;var h=i.default.node||i.default.worker||u?null:new J(l.getViewportRoot(),l.root);this.handler=new w(a,l,h,l.root),this.animation=new O({stage:{update:u?null:function(){return o._flush(!0)}}}),u||this.animation.start()}return t.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},t.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return(0,Q.lum)(t,1)<$.Ak;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{Axis:()=>s.RD,ChartView:()=>s.TA,ComponentModel:()=>s.tF,ComponentView:()=>s.Ir,List:()=>s.aV,Model:()=>s.Hn,PRIORITY:()=>s.Hr,SeriesModel:()=>s.wJ,color:()=>s.$_,connect:()=>s.$j,dataTool:()=>s.Ok,default:()=>p,dependencies:()=>s.HO,disConnect:()=>s.eU,disconnect:()=>s.zP,dispose:()=>s.B9,env:()=>s.OB,extendChartView:()=>s.Zy,extendComponentModel:()=>s.tv,extendComponentView:()=>s.Sp,extendSeriesModel:()=>s.Zr,format:()=>s.WU,getCoordinateSystemDimensions:()=>s.wL,getInstanceByDom:()=>s.JE,getInstanceById:()=>s.rp,getMap:()=>s.FU,graphic:()=>s.Q,helper:()=>s._y,init:()=>s.S1,innerDrawElementOnCanvas:()=>s.z$,matrix:()=>s.pI,number:()=>s.Rx,parseGeoJSON:()=>s.Nu,parseGeoJson:()=>s.pQ,registerAction:()=>s.zl,registerCoordinateSystem:()=>s.RS,registerLayout:()=>s.qR,registerLoading:()=>s.yn,registerLocale:()=>s.I2,registerMap:()=>s.je,registerPostInit:()=>s.sq,registerPostUpdate:()=>s.Br,registerPreprocessor:()=>s.ds,registerProcessor:()=>s.Pu,registerTheme:()=>s.aW,registerTransform:()=>s.rV,registerUpdateLifecycle:()=>s.YK,registerVisual:()=>s.Og,setCanvasCreator:()=>s.jQ,setPlatformAPI:()=>s.g2,throttle:()=>s.P2,time:()=>s.XV,use:()=>s.D$,util:()=>s.D5,vector:()=>s.xr,version:()=>s.i8,zrUtil:()=>s.gf,zrender:()=>s.x_});const e={...{metadata:!0,svgRender:!1,switchMode:!1,echartsOption:{aria:{show:!0,description:"This is a force-oriented graph chart that depicts the relationship between ip nodes."},toolbox:{show:!0,iconStyle:{borderColor:"#fff"},feature:{restore:{show:!0,title:"Restore view"},saveAsImage:{show:!0,title:"Save image"}}}},graphConfig:{series:{layout:"force",label:{show:!0,color:"#fff",position:"top"},force:{gravity:.1,edgeLength:[20,60],repulsion:120},roam:!0,draggable:!0,legendHoverLink:!0,emphasis:{focus:"none",lineStyle:{color:"#3acc38",opacity:1}},nodeStyle:{color:"#f4d38c"},linkStyle:{width:5,color:"#1ba619"},nodeSize:"17"},baseOptions:{backgroundColor:"#2B2B2B"}},mapOptions:{roam:!0,nodeConfig:{type:"scatter",label:{show:!0,color:"#000000",position:"top",formatter:"{b}"},nodeStyle:{color:"#1566a9"},nodeSize:"17"},linkConfig:{linkStyle:{width:5,color:"#1ba619"},emphasis:{focus:"none",lineStyle:{color:"#3acc38",opacity:1}}},baseOptions:{toolbox:{show:!1}}},mapTileConfig:[{urlTemplate:"https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png",options:{minZoom:3,maxZoom:32,attribution:'© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors'}}],nodeCategories:[],linkCategories:[],prepareData(t){},onClickElement(t,e){}}};const i=class{constructor(t){this.self=t,this.renderModeSelector=null,this.controls=null,this.sideBar=null,this.aboutContainer=null,this.nodeLinkInfoContainer=null}createControls(){const t=document.createElement("div");return t.setAttribute("class","njg-controls"),this.self.el.appendChild(t),t}createRenderModeSelector(){const t=document.createElement("div"),e=document.createElement("span");return e.setAttribute("class","iconfont icon-eye"),t.setAttribute("class","njg-selectIcon"),t.appendChild(e),this.controls.appendChild(t),t}createSideBar(){const t=document.createElement("div");t.setAttribute("class","njg-sideBar");const{body:e}=document,n=document.createElement("button");return t.appendChild(n),n.classList.add("sideBarHandle"),n.onclick=()=>{t.classList.toggle("hidden")},e.appendChild(t),t}createAboutContainer(){const t=document.createElement("div"),e=document.createElement("h2"),n=document.createElement("div");return n.classList.add("njg-metaData"),t.classList.add("njg-aboutContainer"),e.innerHTML="About",t.appendChild(e),t.appendChild(n),this.sideBar.appendChild(t),this.nodeLinkInfoContainer=this.createNodeLinkInfoContainer(),t}createNodeLinkInfoContainer(){const t=document.createElement("div");return t.classList.add("njg-nodeLinkInfoContainer"),t.style.visibility="hidden",this.sideBar.appendChild(t),t}getNodeLinkInfo(t,e){const n=document.querySelectorAll(".njg-infoContainer"),i=document.querySelectorAll(".njg-headerContainer");for(let t=0;t{const n=document.createElement("div");n.classList.add("njg-infoItems");const i=document.createElement("span");i.setAttribute("class","njg-keyLabel");const r=document.createElement("span");r.setAttribute("class","njg-valueLabel"),"location"===t?(i.innerHTML="Location",r.innerHTML=`${Math.round(1e3*e[t].lat)/1e3}, ${Math.round(1e3*e[t].lng)/1e3}`):"localAddresses"===t?(i.innerHTML="Local Addresses",r.innerHTML=e[t].join("
")):(i.innerHTML=t,r.innerHTML=e[t]),n.appendChild(i),n.appendChild(r),o.appendChild(n)})),r.appendChild(a),r.appendChild(s),this.nodeLinkInfoContainer.appendChild(r),this.nodeLinkInfoContainer.appendChild(o),s.onclick=()=>{this.nodeLinkInfoContainer.style.visibility="hidden"}}init(){this.sideBar=this.createSideBar(),this.self.config.switchMode&&(this.controls=this.createControls(),this.renderModeSelector=this.createRenderModeSelector())}};const r=class{JSONParamParse(t){return"string"==typeof t?fetch(t,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json?t.json():t)).catch((t=>{console.error(t)})):Promise.resolve(t)}dateParse({dateString:t,parseRegular:e=/^([1-9]\d{3})-(\d{1,2})-(\d{1,2})T(\d{1,2}):(\d{1,2}):(\d{1,2})(?:\.(\d{1,3}))?Z$/,hourDiffer:n=(new Date).getTimezoneOffset()/60}){const i=e.exec(t);if(!i||i.length<7)return console.error("Date doesn't meet the specifications."),"";const r=["dateYear","dateMonth","dateDay","dateHour"],o={},a=i[1]%4==0&&i[1]%100!=0||i[1]%400==0,s=new Map([["dateMonth",12],["dateDay",[31,a?29:28,31,30,31,30,31,31,30,31,30,31]],["dateHour",24]]);for(let t=r.length;t>0;t-=1)o[r[t-1]]=parseInt(i[t],10);let l,u=-n;for(let t=r.length;t>0;t-=1){if("dateYear"===r[t-1]){o[r[t-1]]+=u;break}l="dateDay"===r[t-1]?s.get("dateDay")[o.dateMonth-1]:s.get(r[t-1]);let e=o[r[t-1]]+u;u="dateHour"===r[t-1]?e<0?-1:e>=l?1:0:e<=0?-1:e>l?1:0,1===u?e-=l:u<0&&("dateDay"===r[t-1]&&(l=s.get("dateDay")[(o[r[t-1]]+10)%11]),e+=l),o[r[t-1]]=e}return`${o.dateYear}.${this.numberMinDigit(o.dateMonth)}.${this.numberMinDigit(o.dateDay)} ${this.numberMinDigit(o.dateHour)}:${this.numberMinDigit(i[5])}:${this.numberMinDigit(i[6])}${i[7]?`.${this.numberMinDigit(i[7],3)}`:""}`}numberMinDigit(t,e=2,n="0"){return(Array(e).join(n)+t).slice(-e)}isObject(t){return"Object"===Object.prototype.toString.call(t).slice(8,14)}isArray(t){return"Array"===Object.prototype.toString.call(t).slice(8,13)}isElement(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName}deepMergeObj(...t){const e=[...t].reverse(),n=e.length;for(let t=0;t{i[t]&&this.isObject(i[t])&&this.isObject(n[t])?this.deepMergeObj(i[t],n[t]):i[t]=n[t]})):i||(e[t+1]=n)}return e[n-1]}updateMetadata(){if(this.config.metadata){const t=this.utils.getMetadata(this.data),e=document.querySelector(".njg-metaData"),n=document.querySelectorAll(".njg-metaDataItems");for(let t=0;t{const i=document.createElement("div");i.classList.add("njg-metaDataItems");const r=document.createElement("span");r.setAttribute("class","njg-keyLabel");const o=document.createElement("span");o.setAttribute("class","njg-valueLabel"),r.innerHTML=n,o.innerHTML=t[n],i.appendChild(r),i.appendChild(o),e.appendChild(i)}))}}getMetadata(t){const e=t,n={};return e.label&&(n.label=e.label),["protocol","version","revision","metric","router_id","topology_id"].forEach((t=>{e[t]&&(n[t]=e[t])})),n.nodes=e.nodes.length,n.links=e.links.length,n}nodeInfo(t){const e={};return e.id=t.id,t.label&&"string"==typeof t.label&&(e.label=t.label),t.name&&(e.name=t.name),t.location&&(e.location=t.location),t.properties&&Object.keys(t.properties).forEach((n=>{if("location"===n)e[n]={lat:t.properties.location.lat,lng:t.properties.location.lng};else if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e[n]=i}else e[n.replace(/_/g," ")]=t.properties[n]})),t.linkCount&&(e.links=t.linkCount),t.local_addresses&&(e.localAddresses=t.local_addresses),e}createTooltipItem(t,e){const n=document.createElement("div");n.classList.add("njg-tooltip-item");const i=document.createElement("span");i.setAttribute("class","njg-tooltip-key");const r=document.createElement("span");return r.setAttribute("class","njg-tooltip-value"),i.innerHTML=t,r.innerHTML=e,n.appendChild(i),n.appendChild(r),n}getNodeTooltipInfo(t){const e=document.createElement("div");return e.classList.add("njg-tooltip-inner"),t.id&&e.appendChild(this.createTooltipItem("id",t.id)),t.label&&"string"==typeof t.label&&e.appendChild(this.createTooltipItem("label",t.label)),t.properties&&Object.keys(t.properties).forEach((n=>{if("location"===n)e.appendChild(this.createTooltipItem("location",`${Math.round(1e3*t.properties.location.lat)/1e3}, ${Math.round(1e3*t.properties.location.lng)/1e3}`));else if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e.appendChild(this.createTooltipItem("time",i))}else e.appendChild(this.createTooltipItem(`${n.replace(/_/g," ")}`,t.properties[n]))})),t.linkCount&&e.appendChild(this.createTooltipItem("Links",t.linkCount)),t.local_addresses&&e.appendChild(this.createTooltipItem("Local Addresses",t.local_addresses.join("
"))),e}getLinkTooltipInfo(t){const e=document.createElement("div");return e.classList.add("njg-tooltip-inner"),e.appendChild(this.createTooltipItem("source",t.source)),e.appendChild(this.createTooltipItem("target",t.target)),e.appendChild(this.createTooltipItem("cost",t.cost)),t.properties&&Object.keys(t.properties).forEach((n=>{if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e.appendChild(this.createTooltipItem("time",i))}else e.appendChild(this.createTooltipItem(`${n.replace(/_/g," ")}`,t.properties[n]))})),e}linkInfo(t){const e={};return e.source=t.source,e.target=t.target,e.cost=t.cost,t.properties&&Object.keys(t.properties).forEach((n=>{if("time"===n){const i=this.dateParse({dateString:t.properties[n]});e[n]=i}else e[n.replace(/_/g," ")]=t.properties[n]})),e}generateStyle(t,e){return"function"==typeof t?t(e):t}getNodeStyle(t,e,n){let i,r={},o={};if(t.category&&e.nodeCategories.length){const n=e.nodeCategories.find((e=>e.name===t.category));i=this.generateStyle(n.nodeStyle||{},t),r=this.generateStyle(n.nodeSize||{},t),o={...o,nodeStyle:n.emphasis?this.generateStyle(n.emphasis.nodeStyle||{},t):{}},o={...o,nodeSize:n.empahsis?this.generateStyle(n.emphasis.nodeSize||{},t):{}}}else"map"===n?(i=this.generateStyle(e.mapOptions.nodeConfig.nodeStyle,t),r=this.generateStyle(e.mapOptions.nodeConfig.nodeSize,t)):(i=this.generateStyle(e.graphConfig.series.nodeStyle,t),r=this.generateStyle(e.graphConfig.series.nodeSize,t));return{nodeStyleConfig:i,nodeSizeConfig:r,nodeEmphasisConfig:o}}getLinkStyle(t,e,n){let i,r={};if(t.category&&e.linkCategories.length){const n=e.linkCategories.find((e=>e.name===t.category));i=this.generateStyle(n.linkStyle||{},t),r={...r,linkStyle:n.emphasis?this.generateStyle(n.emphasis.linkStyle||{},t):{}}}else i="map"===n?this.generateStyle(e.mapOptions.linkConfig.linkStyle,t):this.generateStyle(e.graphConfig.series.linkStyle,t);return{linkStyleConfig:i,linkEmphasisConfig:r}}getGUI(t){return new i(t)}showLoading(){let t=document.getElementById("loadingContainer");return t?t.style.visibility="visible":(t=document.createElement("div"),t.setAttribute("id","loadingContainer"),t.innerHTML='\n
\n
\n

Loading...

\n
\n ',this.el.appendChild(t)),t}hideLoading(){const t=document.getElementById("loadingContainer");return t&&(t.style.visibility="hidden"),t}createEvent(){const t=new Map,e=new Map;return{on(e,...n){t.set(e,[...t.get(e)||[],...n])},once(t,...n){e.set(t,[...e.get(t)||[],...n])},emit(n){const i=t.get(n)||[],r=e.get(n)||[],o=i.map((t=>t())),a=r.map((t=>t()));return e.delete(n),[...o,...a]},delete(n){t.delete(n),e.delete(n)}}}};const o=class extends r{searchElements(t){const e=this,n={"":{data:{...e.data},param:[...e.JSONParam]}};return window.history.pushState({searchValue:""},""),window.onpopstate=i=>{n[i.state.searchValue]?e.utils.JSONDataUpdate.call(e,n[i.state.searchValue].data).then((()=>{e.JSONParam=n[i.state.searchValue].param})):e.utils.JSONDataUpdate.call(e,t+i.state.searchValue)},function(i,r=!0,o=!0){const a=i.trim();if(!window.history.state||window.history.state&&window.history.state.searchValue!==a)return window.history.pushState({searchValue:a},""),e.utils.JSONDataUpdate.call(e,t+a,r,o).then((()=>{n[a]={data:{...e.data},param:[...e.JSONParam]}}))}}JSONDataUpdate(t,e=!0,n=!0){const i=this;return i.config.onUpdate.call(i),i.utils.JSONParamParse(t).then((r=>{function o(){e?(i.JSONParam=[t],i.utils.overrideData(r,i)):(i.JSONParam.push(t),i.config.render===i.utils.mapRender?i.utils.appendData(r,i):i.utils.addData(r,i)),i.utils.updateMetadata.call(i)}return n?(i.config.prepareData.call(i,r),i.config.dealDataByWorker?i.utils.dealDataByWorker.call(i,r,i.config.dealDataByWorker,o):o()):o(),r})).catch((t=>{console.error(t)}))}dealDataByWorker(t,e,n){const i=new Worker(e),r=this;i.postMessage(t),i.addEventListener("error",(t=>{console.error(t),console.error("Error in dealing JSONData!")})),i.addEventListener("message",(t=>{n?n():r.utils.overrideData(t.data,r)}))}overrideData(t,e){e.data=t,e.utils.render(),e.config.afterUpdate.call(e)}};const a=class{constructor(t){this.utils=new o,this.config={...e},this.JSONParam=this.utils.isArray(t)?t:[t]}setConfig(t){return this.utils.deepMergeObj(this.config,t),this.el?t&&t.el&&console.error("Can't change el again!"):(this.config.el?this.utils.isElement(this.config.el)?this.el=this.config.el:this.el=document.getElementById(this.config.el):this.el=document.body,this.el===document.body&&(this.el.classList.add("njg-relativePosition"),this.el.setAttribute("id","graphChartContainer"))),this.config}render(){const[t,...e]=this.JSONParam;if(this.config.onRender.call(this),this.event.once("onLoad",this.config.onLoad.bind(this)),this.utils.JSONParamParse(t).then((t=>{this.config.prepareData.call(this,t),this.data=t,this.config.dealDataByWorker?this.utils.dealDataByWorker.call(this,t,this.config.dealDataByWorker):(this.data=t,this.utils.render())})).catch((t=>{console.error(t)})),e.length){const n=function(){e.map((t=>this.utils.JSONDataUpdate.call(this,t,!1)))};this.JSONParam=[t],this.event.once("renderArray",n.bind(this))}}setUtils(t={}){const e=this;return e.utils=Object.assign(e.utils,{...t},{render(){if(!e.config.render)throw new Error("No render function!");e.config.render(e.data,e)}}),e.utils}};var s=n(9060),l=n(8023),u=n(1615),h=n(12),c=n(7240),d=n(7164);(0,l.D)([h.N,c.N]);const p={init:function(){return u.S1.apply(null,arguments)}};(0,l.D)(d.T);var f=n(6026);(0,l.D)(f.N);var g=n(9517);(0,l.D)(g.N);var m=n(241);(0,l.D)(m.N);var v=n(7813);(0,l.D)(v.N);var y=n(8690);(0,l.D)(y.N);var _=n(5045);(0,l.D)(_.N);var x=n(3450);(0,l.D)(x.N);var b=n(9448),w=n(6076);(0,b.registerPainter)("svg",w.Z);n(3721);var S=n(531),T=n.n(S);class M{echartsSetOption(t,e){const n=e.config,i=e.echarts,r=e.utils.deepMergeObj({tooltip:{confine:!0,position:(t,e,n,i,r)=>{let o="right";return r.viewSize[0]-t[0]"graph"===t.componentSubType?"edge"===t.dataType?e.utils.getLinkTooltipInfo(t.data):e.utils.getNodeTooltipInfo(t.data):"graphGL"===t.componentSubType?e.utils.getNodeTooltipInfo(t.data):"lines"===t.componentSubType?e.utils.getLinkTooltipInfo(t.data.link):e.utils.getNodeTooltipInfo(t.data.node)}},n.echartsOption);return i.setOption(e.utils.deepMergeObj(r,t)),i.on("click",(t=>{const i=n.onClickElement.bind(e);return"graph"===t.componentSubType?i("edge"===t.dataType?"link":"node",t.data):"graphGL"===t.componentSubType?i("node",t.data):"lines"===t.componentSubType?i("link",t.data.link):i("node",t.data.node)}),{passive:!0}),i}generateGraphOption(t,e){const n=[],i=e.config,r=t.nodes.map((t=>{const n=JSON.parse(JSON.stringify(t)),{nodeStyleConfig:r,nodeSizeConfig:o,nodeEmphasisConfig:a}=e.utils.getNodeStyle(t,i,"graph");return n.itemStyle=r,n.symbolSize=o,n.emphasis={itemStyle:a.nodeStyle,symbolSize:a.nodeSize},n.name="string"==typeof t.label?t.label:t.id,n})),o=t.links.map((t=>{const n=JSON.parse(JSON.stringify(t)),{linkStyleConfig:r,linkEmphasisConfig:o}=e.utils.getLinkStyle(t,i,"graph");return n.lineStyle=r,n.emphasis={lineStyle:o.linkStyle},n})),a=[Object.assign(i.graphConfig.series,{type:"graphGL"===i.graphConfig.series.type?"graphGL":"graph",layout:"graphGL"===i.graphConfig.series.type?"forceAtlas2":i.graphConfig.series.layout,nodes:r,links:o})];return{legend:n.length?{data:n}:void 0,series:a,...i.graphConfig.baseOptions}}generateMapOption(t,e){const n=e.config,{nodes:i,links:r}=t,o=t.flatNodes||{},a=[],s=[];i.forEach((i=>{if(i.properties){const{location:r}=i.properties;if(r&&r.lng&&r.lat){const{nodeStyleConfig:a,nodeSizeConfig:l,nodeEmphasisConfig:u}=e.utils.getNodeStyle(i,n,"map");s.push({name:"string"==typeof i.label?i.label:i.id,value:[r.lng,r.lat],symbolSize:l,itemStyle:a,emphasis:{itemStyle:u.nodeStyle,symbolSize:u.nodeSize},node:i}),t.flatNodes||(o[i.id]=JSON.parse(JSON.stringify(i)))}else console.error(`Node ${i.id} position is undefined!`)}else console.error(`Node ${i.id} position is undefined!`)})),r.forEach((t=>{if(o[t.source])if(o[t.target]){const{linkStyleConfig:i,linkEmphasisConfig:r}=e.utils.getLinkStyle(t,n,"map");a.push({coords:[[o[t.source].properties.location.lng,o[t.source].properties.location.lat],[o[t.target].properties.location.lng,o[t.target].properties.location.lat]],lineStyle:i,emphasis:{lineStyle:r.linkStyle},link:t})}else console.error(`Node ${t.target} is not exist!`);else console.error(`Node ${t.source} is not exist!`)}));const l=[Object.assign(n.mapOptions.nodeConfig,{type:"effectScatter"===n.mapOptions.nodeConfig.type?"effectScatter":"scatter",coordinateSystem:"leaflet",data:s,animationDuration:1e3}),Object.assign(n.mapOptions.linkConfig,{type:"lines",coordinateSystem:"leaflet",data:a})];return{leaflet:{tiles:n.mapTileConfig,mapOptions:n.mapOptions},series:l,...n.mapOptions.baseOptions}}graphRender(t,e){e.utils.echartsSetOption(e.utils.generateGraphOption(t,e),e),window.onresize=()=>{e.echarts.resize()},e.event.emit("onLoad"),e.event.emit("renderArray")}mapRender(t,e){e.config.mapTileConfig[0]?(e.utils.echartsSetOption(e.utils.generateMapOption(t,e),e),e.leaflet=e.echarts._api.getCoordinateSystems()[0].getLeaflet(),e.leaflet._zoomAnimated=!1,e.event.emit("onLoad"),e.event.emit("renderArray")):console.error('You must add the tiles via the "mapTileConfig" param!')}appendData(t,e){if(e.config.render!==e.utils.mapRender)return void console.error("AppendData function can only be used for map render!");e.utils.generateMapOption(t,e).series.forEach(((t,n)=>{e.echarts.appendData({seriesIndex:n,data:t.data})})),e.utils.mergeData(t,e),e.config.afterUpdate.call(e)}addData(t,e){e.utils.mergeData(t,e),e.utils.render(),e.config.afterUpdate.call(e)}mergeData(t,e){const n=e.data.nodes.concat(t.nodes),i=e.data.links.concat(t.links);Object.assign(e.data,t,{nodes:n,links:i})}}const C=function(t,e){const{util:n,graphic:i,matrix:r}=t,o=e.Layer.extend({initialize(t){this._container=t},onAdd(t){t.getPane(this.options.pane).appendChild(this._container),t.zoomControl.setPosition("topright")},onRemove(){e.DomUtil.remove(this._container)},_update(){}});function a(t,n){this._map=t,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=n,this._projection=e.Projection.Mercator}function s(t,e,n,i){const{leafletModel:r,seriesModel:o}=n,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("leaflet")[0]||{}).coordinateSystem:null;return a===this?a[t](i):null}return a.dimensions=["lng","lat"],a.prototype.dimensions=["lng","lat"],a.prototype.setZoom=function(t){this._zoom=t},a.prototype.setCenter=function(t){this._center=this._projection.project(new e.LatLng(t[1],t[0]))},a.prototype.setMapOffset=function(t){this._mapOffset=t},a.prototype.getLeaflet=function(){return this._map},a.prototype.getViewRect=function(){const t=this._api;return new i.BoundingRect(0,0,t.getWidth(),t.getHeight())},a.prototype.getRoamTransform=function(){return r.create()},a.prototype.dataToPoint=function(t){const n=new e.LatLng(t[1],t[0]),i=this._map.latLngToLayerPoint(n),r=this._mapOffset;return[i.x-r[0],i.y-r[1]]},a.prototype.pointToData=function(t){const e=this._mapOffset,n=this._map.layerPointToLatLng({x:t[0]+e[0],y:t[1]+e[1]});return[n.lng,n.lat]},a.prototype.convertToPixel=n.curry(s,"dataToPoint"),a.prototype.convertFromPixel=n.curry(s,"pointToData"),a.create=function(t,n){let i;const r=[],s=n.getDom();return t.eachComponent("leaflet",(t=>{const l=n.getZr().painter.getViewportRoot();if(void 0===e)throw new Error("Leaflet api is not loaded");if(i)throw new Error("Only one leaflet component can exist");if(!t.__map){let n=s.querySelector(".ec-extension-leaflet");n&&(l.style.left="0px",l.style.top="0px",s.removeChild(n)),n=document.createElement("div"),n.style.cssText="width:100%;height:100%",n.classList.add("ec-extension-leaflet"),s.appendChild(n),t.__map=e.map(n,t.get("mapOptions"));const i=t.__map,r=t.get("tiles"),a={};let u=!1;if(r.forEach((t=>{const n=e.tileLayer(t.urlTemplate,t.options);t.label?(u||(n.addTo(i),u=!0),a[t.label]=n):n.addTo(i)})),r.length>1){const n=t.get("layerControl");e.control.layers(a,{},n).addTo(i)}const h=document.createElement("div");h.style="position: absolute;left: 0;top: 0;z-index: 100",h.appendChild(l),new o(h).addTo(i)}const u=t.__map;i=new a(u,n),r.push(i),i.setMapOffset(t.__mapOffset||[0,0]);const{center:h,zoom:c}=t.get("mapOptions");h&&c&&(i.setZoom(c),i.setCenter(h)),t.coordinateSystem=i})),t.eachSeries((t=>{"leaflet"===t.get("coordinateSystem")&&(t.coordinateSystem=i)})),r},a};function A(t,e){t.extendComponentView({type:"leaflet",render(t,n,i){let r=!0;const o=t.getLeaflet(),a=i.getZr().painter.getViewportRoot().parentNode,s=t.coordinateSystem,l={x:0,y:0};function u(t,e){const n=[parseFloat(getComputedStyle(e).width),parseFloat(getComputedStyle(e).height)];"CANVAS"===t.tagName&&(t.width=t.width/parseFloat(getComputedStyle(t).width)*n[0],t.height=t.height/parseFloat(getComputedStyle(t).height)*n[1]),t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`}function h(t){[...t.childNodes].forEach((e=>{u(e,t),e.childNodes.length&&h(e)}))}function c(t){const n=e.DomUtil.getPosition(t.getPanes().mapPane);if(n)return n;console.error("Can't get the map offset!")}this._oldMoveStartHandler&&o.off("movestart",this._oldMoveStartHandler),this._oldMoveHandler&&o.off("move",this._oldMoveHandler),this._oldZoomEndHandler&&o.off("zoomend",this._oldZoomEndHandler),this._oldResizeHandler&&o.off("resize",this._oldResizeHandler);const{roam:d}=t.get("mapOptions");function p(){if(r)return;const t=c(o);t&&Object.assign(l,{x:t.x,y:t.y})}function f(){if(r)return;const n=function(){const n=c(o);if(n){const{x:i,y:r}=n,o=i-l.x,u=r-l.y;return Object.assign(l,{x:i,y:r}),e.DomUtil.setPosition(a,{x:-i,y:-r}),s.setMapOffset([-i,-r]),t.__mapOffset=[-i,-r],{dx:o,dy:u}}}();if(n){const{dx:t,dy:e}=n;i.dispatchAction({type:"leafletMove",dx:t,dy:e})}}function g(){r||i.dispatchAction({type:"leafletZoom"})}function m(){const t=i.getDom();u(a,t),h(a),i.dispatchAction({type:"leafletZoom"})}d&&"scale"!==d?o.dragging.enable():o.dragging.disable(),d&&"move"!==d?(o.scrollWheelZoom.enable(),o.doubleClickZoom.enable(),o.touchZoom.enable()):(o.scrollWheelZoom.disable(),o.doubleClickZoom.disable(),o.touchZoom.disable()),o.on("movestart",p),o.on("move",f),o.on("zoomend",g),o.on("resize",m),this._oldMoveStartHandler=p,this._oldMoveHandler=f,this._oldZoomEndHandler=g,this._oldResizeHandler=m,r=!1}})}function I(t,e,n){const{target:i}=t,r=i.position;r[0]+=e,r[1]+=n,function(t){t.__dirty=!0,t.__zr&&t.__zr.refreshImmediately()}(i)}function D(t,e){const n=this._model,i=this._api,r=this._zr,o=this._coordSysMgr,a=this._scheduler,{colorTool:s,each:l,env:u}=e;if(!n)return;a.restoreData(n,t),a.performSeriesTasks(n),o.create(n,i),a.performDataProcessorTasks(n,t),function(t,e){const n=t._chartsMap,i=t._scheduler;e.eachSeries((t=>{i.updateStreamModes(t,n[t.__viewId])}))}(this,n),o.update(n,i),function(t){t.clearColorPalette(),t.eachSeries((t=>{t.clearColorPalette()}))}(n),a.performVisualTasks(n,t),function(t,e,n,i){(function(t,e,n,i,r){l(r||t._componentsViews,(t=>{const r=t.__model;t.render(r,e,n,i),c(r,t)}))})(t,e,n,i),l(t._chartsViews,(t=>{t.__alive=!1})),function(t,e,n,i,r){const o=t._scheduler;let a;e.eachSeries((e=>{const n=t._chartsMap[e.__viewId];n.__alive=!0;const s=n.renderTask;o.updatePayload(s,i),r&&r.get(e.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!e.get("silent"),c(e,n),function(t,e){const n=t.get("blendMode")||null;e.group.traverse((t=>{t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable((t=>{t.setStyle("blend",n)}))}))}(e,n)})),o.unfinished|=a,function(t,e){const n=t.storage;let i=0;n.traverse((t=>{t.isGroup||i++})),i>e.get("hoverLayerThreshold")&&!u.node&&n.traverse((t=>{t.isGroup||(t.useHoverLayer=!0)}))}(t._zr,e)}(t,e,0,i),l(t._chartsViews,(t=>{t.__alive||t.remove(e,n)}))}(this,n,i,t),r.refreshImmediately();let h=n.get("backgroundColor")||"transparent";if(u.canvasSupported)r.setBackgroundColor(h);else{const t=s.parse(h);h=s.stringify(t,"rgb"),0===t[3]&&(h="transparent")}function c(t,e){const n=t.get("z"),i=t.get("zlevel");e.group.traverse((t=>{"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}}function L(t,e,n){!function(t){t.extendComponentModel({type:"leaflet",getLeaflet(){return this.__map},setCenterAndZoom(t,e){this.option.center=t,this.option.zoom=e},centerOrZoomChanged(t,e){const{option:n}=this;return i=t,r=n.center,!(i&&r&&i[0]===r[0]&&i[1]===r[1]&&e===n.zoom);var i,r},defaultOption:{mapOptions:{},tiles:[{urlTemplate:"http://{s}.tile.osm.org/{z}/{x}/{y}.png",options:{attribution:'© OpenStreetMap contributors'}}],layerControl:{}}})}(t),A(t,e),t.registerCoordinateSystem("leaflet",C(t,e)),t.registerAction({type:"leafletMove",event:"leafletMove",update:"none"},((t,e)=>{e.scheduler.ecInstance._chartsViews.forEach((({group:e})=>{I({target:e},t.dx,t.dy)})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))})),t.registerAction({type:"leafletZoom",event:"leafletZoom",update:"none"},((t,e)=>{const i=e.scheduler.ecInstance;D.call(i,t,n),i._chartsViews.forEach((({group:t})=>{I({target:t},-t.position[0],-t.position[1])})),e.eachComponent("leaflet",(t=>{const e=t.getLeaflet(),n=e.getCenter();t.setCenterAndZoom([n.lng,n.lat],e.getZoom())}))}))}L.version="1.0.0";const P=L,O=n(1092),{each:E}=n(3051),N=n(6387);class k{constructor(t,e){e&&"map"===e.render?e.render=M.prototype.mapRender:e&&e.render&&"graph"!==e.render||((e=e||{}).render=M.prototype.graphRender);let n=new a(t);return Object.setPrototypeOf(M.prototype,n.utils),n.utils=new M,n.setUtils(),n.event=n.utils.createEvent(),n.setConfig({onInit(){return this.config},onRender(){return this.utils.showLoading.call(this),this.config},onUpdate(){return this.config},afterUpdate(){return this.config},onLoad(){const t=this.utils.getGUI(this);return t.init(),this.config.metadata&&(t.createAboutContainer(n),this.utils.updateMetadata.call(this)),this.config.switchMode&&(t.renderModeSelector.onclick=()=>{this.config.render===this.utils.mapRender?(this.config.render=this.utils.graphRender,this.echarts.dispose(),n=new k(this.data,{...this.config}),n.render()):(this.config.render=this.utils.mapRender,this.config.render(this.data,this))}),this.config.onClickElement=(e,n)=>{let i;i="node"===e?this.utils.nodeInfo(n):this.utils.linkInfo(n),t.getNodeLinkInfo(e,i),t.sideBar.classList.remove("hidden")},this.utils.hideLoading.call(this),this.config},...e}),n.echarts=s.S1(n.el,null,{renderer:n.config.svgRender?"svg":"canvas"}),n.config.onInit.call(n),n}}P(t,T(),{colorTool:O,each:E,env:N}),window.NetJSONGraph=k,window.echarts=t,window.L=T()})()})(); //# sourceMappingURL=netjsongraph.min.js.map \ No newline at end of file diff --git a/examples/realtime_update/index.html b/examples/realtime_update/index.html index a07b84ab..4e83f77c 100644 --- a/examples/realtime_update/index.html +++ b/examples/realtime_update/index.html @@ -26,6 +26,12 @@ }, title:{ text:'Live update example', + textStyle:{ + color:'#fff', + fontSize:24, + }, + left:'center', + top:20, } }, }); diff --git a/index.html b/index.html index 52f2ab4b..51ad70b3 100644 --- a/index.html +++ b/index.html @@ -108,11 +108,6 @@

NetJSONGraph.js Example Demos

>Indoor map -
Leaflet pluginsNetJSONGraph.js Example Demos
Set colorful elementsCustom attributes
diff --git a/lib/css/leaflet-measure.css b/lib/css/leaflet-measure.css index e93a2d1a..2c41af27 100644 --- a/lib/css/leaflet-measure.css +++ b/lib/css/leaflet-measure.css @@ -1,3 +1,6 @@ +.leaflet-control-measure{ + margin-top: -55px !important; +} .leaflet-control-measure h3, .leaflet-measure-resultpopup h3 { margin: 0 0 12px; diff --git a/lib/js/echarts-leaflet/LeafletCoordSys.js b/lib/js/echarts-leaflet/LeafletCoordSys.js index 91dd1853..c16a6dfe 100644 --- a/lib/js/echarts-leaflet/LeafletCoordSys.js +++ b/lib/js/echarts-leaflet/LeafletCoordSys.js @@ -17,6 +17,7 @@ function createLeafletCoordSystem(echarts, L) { onAdd(map) { const pane = map.getPane(this.options.pane); pane.appendChild(this._container); + map.zoomControl.setPosition('topright'); // Calculate initial position of container with // `L.Map.latLngToLayerPoint()`, `getPixelOrigin() diff --git a/package.json b/package.json index da8e1ba4..ebbc2868 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,8 @@ ], "devDependencies": { "@babel/preset-env": "^7.18.2", + "@testing-library/jest-dom": "^5.16.4", + "@types/jest": "^28.1.6", "acorn": "^8.7.1", "coveralls": "^3.1.1", "eslint": "^8.18.0", @@ -60,7 +62,7 @@ "dependencies": { "echarts": "^5.3.3", "echarts-gl": "^2.0.8", - "leaflet": "^1.5.1", + "leaflet": "^1.8.0", "zrender": "^5.3.2" } } diff --git a/src/css/netjsongraph-theme.css b/src/css/netjsongraph-theme.css index 447b1c91..80f2eb8f 100755 --- a/src/css/netjsongraph-theme.css +++ b/src/css/netjsongraph-theme.css @@ -26,9 +26,10 @@ p { .switch-wrap { position: absolute; - left: 50px; - bottom: 45px; + right: 40px; + bottom: 30px; z-index: 1; + color: #fff; } .switch-wrap input[type="checkbox"] { @@ -78,9 +79,10 @@ p { } .njg-date { position: absolute; - right: 0; + right: 20px; bottom: 20px; z-index: 1; + color: #fff; } @font-face { @@ -104,8 +106,13 @@ p { -moz-osx-font-smoothing: grayscale; } -.icon-eye:hover { - color: red; +.iconfont { + font-family: "iconfont" !important; + font-size: 30px; + font-style: normal; + cursor: pointer; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .icon-eye:before { @@ -115,21 +122,25 @@ p { } .njg-selectIcon { - position: absolute; - right: 20px; - top: 20px; - z-index: 999; width: 35px; height: 35px; line-height: 35px; text-align: center; - background: #fbfbfb; - border-radius: 4px; - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); - border: 1px solid #ccc; - color: #6d6357; + background: rgba(217, 79, 52, 0.85); + border-radius: 5px; + border: 0; + color: #ffffff; +} +.njg-controls { + display: flex; + justify-content: space-between; + align-items: center; + position: absolute; + right: 10px; + top: 20px; + z-index: 999; + background-color: inherit; } - .njg-searchInput { width: 250px; height: 20px; @@ -141,7 +152,151 @@ p { } .njg-searchContainer { position: absolute; - left: 300px; + left: 550px; top: 10px; z-index: 1; } + +.njg-sideBar { + position: absolute; + left: 0; + top: 0; + width: 350px; + height: 100%; + z-index: 1000; + background-color: #fff; + transition: left 0.5s; + display: flex; + flex-direction: column; + user-select: text; +} + +.hidden { + left: -500px; +} + +.sideBarHandle { + background: rgba(217, 79, 52, 0.85); + position: fixed; + top: 15px; + left: 370px; + border: 0; + border-radius: 5px; + outline: none; + font-size: 24px; + width: 45px; + height: 45px; + cursor: pointer; + padding: 0; + transition: all 0.5s; + transform: rotateY(180deg); +} + +.sideBarHandle::before { + content: "\27A4"; + color: #fff; +} + +.hidden .sideBarHandle { + left: 15px; + transform: rotateY(0deg); +} + +.njg-aboutContainer, +.njg-nodeLinkInfoContainer { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 20px 0px; +} + +.njg-metaData, +.njg-infoContainer { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + background-color: inherit; + padding: 0 20px; + margin-top: 20px; +} + +.njg-keyLabel { + font-size: 14px; + font-weight: 600; + flex: 1 1 50%; + word-break: break-word; +} + +.njg-valueLabel { + flex: 1 1 50%; + word-break: break-word; +} + +.njg-metaDataItems, +.njg-infoItems { + display: flex; + align-items: center; + width: 100%; + text-transform: capitalize; + padding: 5px 0; +} + +.njg-tooltip { + background: #fff !important; + border: none !important; +} + +.njg-tooltip-item { + display: flex; + align-items: center; + width: 100%; + padding: 1px 0; + flex-wrap: wrap; +} + +.njg-tooltip-key { + display: inline-flex; + flex-basis: 40%; + flex-wrap: wrap; + text-transform: capitalize; + font-weight: 600; + color: #000; +} +.njg-tooltip-value { + display: inline-flex; + align-items: center; + flex-wrap: wrap; + flex-basis: 60%; + color: #000; +} + +.njg-headerContainer { + display: flex; + align-items: center; + justify-content: center; + text-transform: capitalize; + width: 100%; + padding: 0 15px; + position: relative; +} + +.njg-headerContainer #closeButton { + position: absolute; + right: 20px; + cursor: pointer; +} + +@media only screen and (max-width: 500px) { + .njg-sideBar { + margin-top: -60px; + top: unset; + width: 100%; + height: fit-content; + } + + .sideBarHandle { + display: none; + } +} diff --git a/src/css/netjsongraph.css b/src/css/netjsongraph.css index 0f24293e..af77207f 100755 --- a/src/css/netjsongraph.css +++ b/src/css/netjsongraph.css @@ -2,6 +2,7 @@ margin: 0; padding: 0; outline: none; + box-sizing: border-box; } html, body { @@ -64,6 +65,7 @@ body { height: 100%; overflow: hidden; z-index: 0; + overflow-y: scroll; } #loadingContainer { @@ -73,7 +75,6 @@ body { height: 100%; width: 100%; z-index: 100; - /* background-color: red; */ } .loadingElement { @@ -99,7 +100,53 @@ body { text-align: center; } -.njg-tooltip { - background: rgba(251, 251, 251, 0.9) !important; +.leaflet-control-zoom { + top: 5px; + border: 0 !important; +} + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + background: rgba(217, 79, 52, 0.85) !important; + color: #fff !important; +} + +.leaflet-control-zoom-in { + border-top-left-radius: 5px !important; + border-top-right-radius: 5px !important; +} + +.leaflet-control-zoom-out { + border-bottom-left-radius: 5px !important; + border-bottom-right-radius: 5px !important; +} + +.leaflet-control-layers { + background: rgba(217, 79, 52, 0.85) !important; + color: #fff !important; border: none !important; + right: 3px !important; +} + +.leaflet-control-layers-toggle { + height: 35px !important; + width: 35px !important; + background-size: 20px 20px !important; +} + +.leaflet-zoom-animated { + transform-origin: 0 0 !important; +} + +.leaflet-zoom-anim > .leaflet-zoom-animated { + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) !important; + will-change: transform !important; +} + +.leaflet-zoom-anim > .leaflet-zoom-hide { + visibility: hidden !important; +} + +.leaflet-zoom-anim > .leaflet-tile { + transition: none !important; } diff --git a/src/js/netjsongraph.config.js b/src/js/netjsongraph.config.js index 662de14d..997c104e 100644 --- a/src/js/netjsongraph.config.js +++ b/src/js/netjsongraph.config.js @@ -31,18 +31,8 @@ const NetJSONGraphDefaultConfig = { metadata: true, svgRender: false, + switchMode: false, echartsOption: { - title: { - text: "NetJSONGraph", - link: "", - textStyle: { - color: "grey", - fontWeight: "bold", - fontSize: 30, - }, - left: "center", - top: "5%", - }, aria: { show: true, description: @@ -50,6 +40,9 @@ const NetJSONGraphDefaultConfig = { }, toolbox: { show: true, + iconStyle: { + borderColor: "#fff", + }, feature: { restore: { show: true, @@ -61,162 +54,94 @@ const NetJSONGraphDefaultConfig = { }, }, }, - color: ["#d66b30", "#a3c7dd", "#5c9660", "#d66b30"], }, graphConfig: { - layout: "force", - label: { - show: true, - color: "#000000", - position: "top", + series: { + layout: "force", + label: { + show: true, + color: "#fff", + position: "top", + }, + force: { + gravity: 0.1, + edgeLength: [20, 60], + repulsion: 120, + }, + roam: true, + draggable: true, + legendHoverLink: true, + emphasis: { + focus: "none", + lineStyle: { + color: "#3acc38", + opacity: 1, + }, + }, + nodeStyle: { + color: "#f4d38c", + }, + linkStyle: { + width: 5, + color: "#1ba619", + }, + nodeSize: "17", }, - force: { - gravity: 0.1, - edgeLength: [20, 60], - repulsion: 120, + baseOptions: { + backgroundColor: "#2B2B2B", }, - roam: true, - draggable: true, - focusNodeAdjacency: false, - hoverAnimation: true, - legendHoverLink: true, }, mapOptions: { roam: true, - }, - mapTileConfig: [], - mapLinkConfig: [{}], - mapNodeConfig: { - label: { - show: true, - color: "#000000", - position: "top", - formatter: "{b}", + nodeConfig: { + type: "scatter", + label: { + show: true, + color: "#000000", + position: "top", + formatter: "{b}", + }, + nodeStyle: { + color: "#1566a9", + }, + nodeSize: "17", }, - }, - - nodeSize: 25, - nodeStyleProperty: (() => { - const styles = [ - { - color: { - type: "radial", - x: 0.5, - y: 0.5, - r: 0.5, - colorStops: [ - { - offset: 0, - color: "#d66b30", - }, - { - offset: 0.7, - color: "#d66b30", - }, - { - offset: 0.71, - color: "#ebb598", - }, - { - offset: 1, - color: "#ebb598", - }, - ], - }, + linkConfig: { + linkStyle: { + width: 5, + color: "#1ba619", }, - { - color: { - type: "radial", - x: 0.5, - y: 0.5, - r: 0.5, - colorStops: [ - { - offset: 0, - color: "#a3c7dd", - }, - { - offset: 0.7, - color: "#a3c7dd", - }, - { - offset: 0.71, - color: "#e3edf6", - }, - { - offset: 1, - color: "#e3edf6", - }, - ], + emphasis: { + focus: "none", + lineStyle: { + color: "#3acc38", + opacity: 1, }, }, - { - color: { - type: "radial", - x: 0.5, - y: 0.5, - r: 0.5, - colorStops: [ - { - offset: 0, - color: "#5c9660", - }, - { - offset: 0.7, - color: "#5c9660", - }, - { - offset: 0.71, - color: "#aecbb0", - }, - { - offset: 1, - color: "#aecbb0", - }, - ], - }, + }, + baseOptions: { + toolbox: { + show: false, }, - { - color: { - type: "radial", - x: 0.5, - y: 0.5, - r: 0.5, - colorStops: [ - { - offset: 0, - color: "#d66b30", - }, - { - offset: 0.7, - color: "#d66b30", - }, - { - offset: 0.71, - color: "#ebb598", - }, - { - offset: 1, - color: "#ebb598", - }, - ], - }, + }, + }, + mapTileConfig: [ + { + urlTemplate: + "https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png", + options: { + minZoom: 3, + maxZoom: 32, + attribution: + '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors', }, - ]; - let i = 0; - return () => { - i += 1; - return styles[i % styles.length]; - }; - })(), - linkStyleProperty: () => ({ - width: 5, - color: "#999", - shadowColor: "rgba(0, 0, 0, 0.5)", - shadowBlur: 10, - }), + }, + ], + nodeCategories: [], + linkCategories: [], + /** * @function * @name prepareData @@ -229,6 +154,7 @@ const NetJSONGraphDefaultConfig = { */ // eslint-disable-next-line no-unused-vars prepareData(JSONData) {}, + /** * @function * @name onClickElement @@ -240,28 +166,8 @@ const NetJSONGraphDefaultConfig = { * @this {object} The instantiated object of NetJSONGraph * */ - onClickElement(type, data) { - const nodeLinkOverlay = document.getElementsByClassName("njg-overlay")[0]; - nodeLinkOverlay.style.visibility = "visible"; - nodeLinkOverlay.innerHTML = ` -
- ${ - type === "link" - ? this.utils.linkInfo(data) - : this.utils.nodeInfo(data) - } -
- `; - - const closeA = document.createElement("a"); - closeA.setAttribute("class", "njg-close"); - closeA.setAttribute("id", "nodelinkOverlay-close"); - closeA.onclick = () => { - nodeLinkOverlay.style.visibility = "hidden"; - }; - - nodeLinkOverlay.appendChild(closeA); - }, + // eslint-disable-next-line no-unused-vars + onClickElement(type, data) {}, }; export default {...NetJSONGraphDefaultConfig}; diff --git a/src/js/netjsongraph.core.js b/src/js/netjsongraph.core.js index a3daa86e..642de8dd 100644 --- a/src/js/netjsongraph.core.js +++ b/src/js/netjsongraph.core.js @@ -8,11 +8,10 @@ class NetJSONGraph { * @param {string} JSONParam The NetJSON file param * @param {Object} config */ - constructor(JSONParam, config) { + constructor(JSONParam) { this.utils = new NetJSONGraphUpdate(); this.config = {...NetJSONGraphDefaultConfig}; - this.setConfig(config); this.JSONParam = this.utils.isArray(JSONParam) ? JSONParam : [JSONParam]; } @@ -29,7 +28,6 @@ class NetJSONGraph { */ setConfig(config) { this.utils.deepMergeObj(this.config, config); - if (!this.el) { if (!this.config.el) { this.el = document.body; @@ -38,7 +36,7 @@ class NetJSONGraph { } else { this.el = document.getElementById(this.config.el); } - if (this.el) { + if (this.el === document.body) { this.el.classList.add("njg-relativePosition"); this.el.setAttribute("id", "graphChartContainer"); } @@ -68,16 +66,6 @@ class NetJSONGraph { this.config.prepareData.call(this, JSONData); this.data = JSONData; - (function addNodeLinkOverlay(_this) { - const nodeLinkOverlay = document.createElement("div"); - nodeLinkOverlay.setAttribute("class", "njg-overlay njg-container"); - _this.el.appendChild(nodeLinkOverlay); - })(this); - - if (this.config.metadata) { - this.el.appendChild(this.utils.NetJSONMetadata.call(this)); - } - if (this.config.dealDataByWorker) { this.utils.dealDataByWorker.call( this, @@ -122,7 +110,7 @@ class NetJSONGraph { { /** * @function - * @name _render + * @name render * Perform different renderings according to `render` config. */ diff --git a/src/js/netjsongraph.gui.js b/src/js/netjsongraph.gui.js new file mode 100644 index 00000000..d5174d31 --- /dev/null +++ b/src/js/netjsongraph.gui.js @@ -0,0 +1,136 @@ +class NetJSONGraphGUI { + constructor(_this) { + this.self = _this; + this.renderModeSelector = null; + this.controls = null; + this.sideBar = null; + this.aboutContainer = null; + this.nodeLinkInfoContainer = null; + } + + createControls() { + const controls = document.createElement("div"); + controls.setAttribute("class", "njg-controls"); + this.self.el.appendChild(controls); + return controls; + } + + createRenderModeSelector() { + const selectIconContainer = document.createElement("div"); + const iconEye = document.createElement("span"); + iconEye.setAttribute("class", "iconfont icon-eye"); + selectIconContainer.setAttribute("class", "njg-selectIcon"); + selectIconContainer.appendChild(iconEye); + this.controls.appendChild(selectIconContainer); + return selectIconContainer; + } + + createSideBar() { + const sideBar = document.createElement("div"); + sideBar.setAttribute("class", "njg-sideBar"); + const {body} = document; + const button = document.createElement("button"); + sideBar.appendChild(button); + + button.classList.add("sideBarHandle"); + button.onclick = () => { + sideBar.classList.toggle("hidden"); + }; + body.appendChild(sideBar); + return sideBar; + } + + createAboutContainer() { + const aboutContainer = document.createElement("div"); + const header = document.createElement("h2"); + const metadataContainer = document.createElement("div"); + + metadataContainer.classList.add("njg-metaData"); + aboutContainer.classList.add("njg-aboutContainer"); + header.innerHTML = "About"; + aboutContainer.appendChild(header); + aboutContainer.appendChild(metadataContainer); + + this.sideBar.appendChild(aboutContainer); + this.nodeLinkInfoContainer = this.createNodeLinkInfoContainer(); + return aboutContainer; + } + + createNodeLinkInfoContainer() { + const nodeLinkInfoContainer = document.createElement("div"); + nodeLinkInfoContainer.classList.add("njg-nodeLinkInfoContainer"); + nodeLinkInfoContainer.style.visibility = "hidden"; + this.sideBar.appendChild(nodeLinkInfoContainer); + return nodeLinkInfoContainer; + } + + getNodeLinkInfo(type, data) { + const nodeLinkInfoChildren = + document.querySelectorAll(".njg-infoContainer"); + const headerInfoChildren = document.querySelectorAll( + ".njg-headerContainer", + ); + for (let i = 0; i < nodeLinkInfoChildren.length; i += 1) { + nodeLinkInfoChildren[i].remove(); + } + + for (let i = 0; i < headerInfoChildren.length; i += 1) { + headerInfoChildren[i].remove(); + } + + const headerContainer = document.createElement("div"); + const infoContainer = document.createElement("div"); + const header = document.createElement("h2"); + const closeButton = document.createElement("span"); + + infoContainer.classList.add("njg-infoContainer"); + headerContainer.classList.add("njg-headerContainer"); + closeButton.setAttribute("id", "closeButton"); + this.nodeLinkInfoContainer.style.visibility = "visible"; + header.innerHTML = `${type} Info`; + closeButton.innerHTML = " ✕"; + + Object.keys(data).forEach((key) => { + const infoItems = document.createElement("div"); + infoItems.classList.add("njg-infoItems"); + const keyLabel = document.createElement("span"); + keyLabel.setAttribute("class", "njg-keyLabel"); + const valueLabel = document.createElement("span"); + valueLabel.setAttribute("class", "njg-valueLabel"); + if (key === "location") { + keyLabel.innerHTML = "Location"; + valueLabel.innerHTML = `${Math.round(data[key].lat * 1000) / 1000}, ${ + Math.round(data[key].lng * 1000) / 1000 + }`; + } else if (key === "localAddresses") { + keyLabel.innerHTML = "Local Addresses"; + valueLabel.innerHTML = data[key].join("
"); + } else { + keyLabel.innerHTML = key; + valueLabel.innerHTML = data[key]; + } + + infoItems.appendChild(keyLabel); + infoItems.appendChild(valueLabel); + infoContainer.appendChild(infoItems); + }); + headerContainer.appendChild(header); + headerContainer.appendChild(closeButton); + this.nodeLinkInfoContainer.appendChild(headerContainer); + this.nodeLinkInfoContainer.appendChild(infoContainer); + + closeButton.onclick = () => { + this.nodeLinkInfoContainer.style.visibility = "hidden"; + }; + } + + init() { + this.sideBar = this.createSideBar(); + if (this.self.config.switchMode) { + this.controls = this.createControls(); + this.renderModeSelector = this.createRenderModeSelector(); + } + } +} + +export default NetJSONGraphGUI; diff --git a/src/js/netjsongraph.js b/src/js/netjsongraph.js index e66261ce..f5ad305a 100644 --- a/src/js/netjsongraph.js +++ b/src/js/netjsongraph.js @@ -21,13 +21,14 @@ class NetJSONGraph { config.render = NetJSONGraphRender.prototype.graphRender; } - const graph = new NetJSONGraphCore(JSONParam); + let graph = new NetJSONGraphCore(JSONParam); Object.setPrototypeOf(NetJSONGraphRender.prototype, graph.utils); graph.utils = new NetJSONGraphRender(); graph.setUtils(); graph.event = graph.utils.createEvent(); + graph.setConfig({ /** * @function @@ -93,8 +94,40 @@ class NetJSONGraph { * @return {object} this.config */ onLoad() { + const gui = this.utils.getGUI(this); + gui.init(); + if (this.config.metadata) { + gui.createAboutContainer(graph); + this.utils.updateMetadata.call(this); + } + if (this.config.switchMode) { + gui.renderModeSelector.onclick = () => { + if (this.config.render === this.utils.mapRender) { + this.config.render = this.utils.graphRender; + this.echarts.dispose(); + graph = new NetJSONGraph(this.data, { + ...this.config, + }); + graph.render(); + } else { + this.config.render = this.utils.mapRender; + this.config.render(this.data, this); + const sidebar = gui.sideBar; + this.el.appendChild(sidebar); + } + }; + } + this.config.onClickElement = (type, data) => { + let nodeLinkData; + if (type === "node") { + nodeLinkData = this.utils.nodeInfo(data); + } else { + nodeLinkData = this.utils.linkInfo(data); + } + gui.getNodeLinkInfo(type, nodeLinkData); + gui.sideBar.classList.remove("hidden"); + }; this.utils.hideLoading.call(this); - return this.config; }, ...config, diff --git a/src/js/netjsongraph.render.js b/src/js/netjsongraph.render.js index ae564fbe..b88d02cd 100644 --- a/src/js/netjsongraph.render.js +++ b/src/js/netjsongraph.render.js @@ -52,21 +52,24 @@ class NetJSONGraphRender { } return position; }, - padding: [5, 16], + padding: [5, 12], + textStyle: { + lineHeight: 5, + }, renderMode: "html", className: "njg-tooltip", formatter: (params) => { if (params.componentSubType === "graph") { return params.dataType === "edge" - ? self.utils.linkInfo(params.data) - : self.utils.nodeInfo(params.data); + ? self.utils.getLinkTooltipInfo(params.data) + : self.utils.getNodeTooltipInfo(params.data); } if (params.componentSubType === "graphGL") { - return self.utils.nodeInfo(params.data); + return self.utils.getNodeTooltipInfo(params.data); } return params.componentSubType === "lines" - ? self.utils.linkInfo(params.data.link) - : self.utils.nodeInfo(params.data.node); + ? self.utils.getLinkTooltipInfo(params.data.link) + : self.utils.getNodeTooltipInfo(params.data.node); }, }, }, @@ -76,10 +79,8 @@ class NetJSONGraphRender { echartsLayer.setOption(self.utils.deepMergeObj(commonOption, customOption)); echartsLayer.on( "click", - (params) => { const clickElement = configs.onClickElement.bind(self); - if (params.componentSubType === "graph") { return clickElement( params.dataType === "edge" ? "link" : "node", @@ -116,48 +117,43 @@ class NetJSONGraphRender { const configs = self.config; const nodes = JSONData.nodes.map((node) => { const nodeResult = JSON.parse(JSON.stringify(node)); - - nodeResult.itemStyle = - typeof configs.nodeStyleProperty === "function" - ? configs.nodeStyleProperty(node) - : configs.nodeStyleProperty; - nodeResult.symbolSize = - typeof configs.nodeSize === "function" - ? configs.nodeSize(node) - : configs.nodeSize; + const {nodeStyleConfig, nodeSizeConfig, nodeEmphasisConfig} = + self.utils.getNodeStyle(node, configs, "graph"); + + nodeResult.itemStyle = nodeStyleConfig; + nodeResult.symbolSize = nodeSizeConfig; + nodeResult.emphasis = { + itemStyle: nodeEmphasisConfig.nodeStyle, + symbolSize: nodeEmphasisConfig.nodeSize, + }; nodeResult.name = typeof node.label === "string" ? node.label : node.id; - if (node.properties && node.properties.category) { - nodeResult.category = String(node.properties.category); - } - if ( - nodeResult.category && - categories.indexOf(nodeResult.category) === -1 - ) { - categories.push(nodeResult.category); - } return nodeResult; }); const links = JSONData.links.map((link) => { const linkResult = JSON.parse(JSON.stringify(link)); + const {linkStyleConfig, linkEmphasisConfig} = self.utils.getLinkStyle( + link, + configs, + "graph", + ); - linkResult.lineStyle = - typeof configs.linkStyleProperty === "function" - ? configs.linkStyleProperty(link) - : configs.linkStyleProperty; + linkResult.lineStyle = linkStyleConfig; + linkResult.emphasis = {lineStyle: linkEmphasisConfig.linkStyle}; return linkResult; }); + const series = [ - Object.assign(configs.graphConfig, { - type: configs.graphConfig.type === "graphGL" ? "graphGL" : "graph", + Object.assign(configs.graphConfig.series, { + type: + configs.graphConfig.series.type === "graphGL" ? "graphGL" : "graph", layout: - configs.graphConfig.type === "graphGL" + configs.graphConfig.series.type === "graphGL" ? "forceAtlas2" - : configs.graphConfig.layout, + : configs.graphConfig.series.layout, nodes, links, - categories: categories.map((category) => ({name: category})), }), ]; const legend = categories.length @@ -169,6 +165,7 @@ class NetJSONGraphRender { return { legend, series, + ...configs.graphConfig.baseOptions, }; } @@ -200,17 +197,18 @@ class NetJSONGraphRender { if (!location || !location.lng || !location.lat) { console.error(`Node ${node.id} position is undefined!`); } else { + const {nodeStyleConfig, nodeSizeConfig, nodeEmphasisConfig} = + self.utils.getNodeStyle(node, configs, "map"); + nodesData.push({ name: typeof node.label === "string" ? node.label : node.id, value: [location.lng, location.lat], - symbolSize: - typeof configs.nodeSize === "function" - ? configs.nodeSize(node) - : configs.nodeSize, - itemStyle: - typeof configs.nodeStyleProperty === "function" - ? configs.nodeStyleProperty(node) - : configs.nodeStyleProperty, + symbolSize: nodeSizeConfig, + itemStyle: nodeStyleConfig, + emphasis: { + itemStyle: nodeEmphasisConfig.nodeStyle, + symbolSize: nodeEmphasisConfig.nodeSize, + }, node, }); if (!JSONData.flatNodes) { @@ -225,6 +223,11 @@ class NetJSONGraphRender { } else if (!flatNodes[link.target]) { console.error(`Node ${link.target} is not exist!`); } else { + const {linkStyleConfig, linkEmphasisConfig} = self.utils.getLinkStyle( + link, + configs, + "map", + ); linesData.push({ coords: [ [ @@ -236,32 +239,28 @@ class NetJSONGraphRender { flatNodes[link.target].properties.location.lat, ], ], - lineStyle: - typeof configs.linkStyleProperty === "function" - ? configs.linkStyleProperty(link) - : configs.linkStyleProperty, + lineStyle: linkStyleConfig, + emphasis: {lineStyle: linkEmphasisConfig.linkStyle}, link, }); } }); const series = [ - Object.assign(configs.mapNodeConfig, { + Object.assign(configs.mapOptions.nodeConfig, { type: - configs.mapNodeConfig.type === "effectScatter" + configs.mapOptions.nodeConfig.type === "effectScatter" ? "effectScatter" : "scatter", coordinateSystem: "leaflet", data: nodesData, animationDuration: 1000, }), - ...configs.mapLinkConfig.map((lineConfig) => - Object.assign(lineConfig, { - type: "lines", - coordinateSystem: "leaflet", - data: linesData, - }), - ), + Object.assign(configs.mapOptions.linkConfig, { + type: "lines", + coordinateSystem: "leaflet", + data: linesData, + }), ]; return { @@ -269,10 +268,8 @@ class NetJSONGraphRender { tiles: configs.mapTileConfig, mapOptions: configs.mapOptions, }, - toolbox: { - show: false, - }, series, + ...configs.mapOptions.baseOptions, }; } diff --git a/src/js/netjsongraph.update.js b/src/js/netjsongraph.update.js index 18514d3f..a07add01 100644 --- a/src/js/netjsongraph.update.js +++ b/src/js/netjsongraph.update.js @@ -152,7 +152,7 @@ class NetJSONGraphUpdate extends NetJSONGraphUtil { callback(); } else { self.utils.overrideData(e.data, self); - self.utils.updateMetadata.call(self); + // self.utils.updateMetadata.call(self); } }); } diff --git a/src/js/netjsongraph.util.js b/src/js/netjsongraph.util.js index eb087e86..d17fbf8e 100644 --- a/src/js/netjsongraph.util.js +++ b/src/js/netjsongraph.util.js @@ -1,3 +1,5 @@ +import NetJSONGraphGUI from "./netjsongraph.gui"; + class NetJSONGraphUtil { /** * @function @@ -213,37 +215,6 @@ class NetJSONGraphUtil { return objs[len - 1]; } - /** - * @function - * @name NetJSONMetadata - * Display metadata of NetJSONGraph. - * - * @this {object} NetJSONGraph object - * - * @return {object} metadataContainer DOM - */ - - NetJSONMetadata() { - const metadataContainer = document.createElement("div"); - const innerDiv = document.createElement("div"); - const closeA = document.createElement("a"); - metadataContainer.setAttribute("class", "njg-metadata njg-container"); - metadataContainer.setAttribute("style", "display: block"); - innerDiv.setAttribute("class", "njg-inner"); - innerDiv.setAttribute("id", "metadata-innerDiv"); - closeA.setAttribute("class", "njg-close"); - closeA.setAttribute("id", "metadata-close"); - - closeA.onclick = () => { - metadataContainer.style.visibility = "hidden"; - }; - innerDiv.innerHTML = this.utils.getMetadata.call(this); - metadataContainer.appendChild(innerDiv); - metadataContainer.appendChild(closeA); - - return metadataContainer; - } - /** * @function * @name updateMetadata @@ -253,10 +224,27 @@ class NetJSONGraphUtil { */ updateMetadata() { if (this.config.metadata) { - document.getElementsByClassName("njg-metadata")[0].style.visibility = - "visible"; - document.getElementById("metadata-innerDiv").innerHTML = - this.utils.getMetadata.call(this); + const metaData = this.utils.getMetadata(this.data); + const metadataContainer = document.querySelector(".njg-metaData"); + const metadataChildren = document.querySelectorAll(".njg-metaDataItems"); + + for (let i = 0; i < metadataChildren.length; i += 1) { + metadataChildren[i].remove(); + } + + Object.keys(metaData).forEach((key) => { + const metaDataItems = document.createElement("div"); + metaDataItems.classList.add("njg-metaDataItems"); + const keyLabel = document.createElement("span"); + keyLabel.setAttribute("class", "njg-keyLabel"); + const valueLabel = document.createElement("span"); + valueLabel.setAttribute("class", "njg-valueLabel"); + keyLabel.innerHTML = key; + valueLabel.innerHTML = metaData[key]; + metaDataItems.appendChild(keyLabel); + metaDataItems.appendChild(valueLabel); + metadataContainer.appendChild(metaDataItems); + }); } } @@ -269,7 +257,7 @@ class NetJSONGraphUtil { * @this {object} NetJSONGraph object * @return {string} Dom string */ - getMetadata() { + getMetadata(data) { const attrs = [ "protocol", "version", @@ -278,67 +266,162 @@ class NetJSONGraphUtil { "router_id", "topology_id", ]; - const metadata = this.data; - let html = ""; + const metadata = data; + const metaDataObj = {}; if (metadata.label) { - html += `

${metadata.label}

`; + metaDataObj.label = metadata.label; } attrs.forEach((attr) => { if (metadata[attr]) { - html += `

${attr}: ${metadata[attr]}

`; + metaDataObj[attr] = metadata[attr]; } }); - html += ` -

nodes: ${metadata.nodes.length}

-

links: ${metadata.links.length}

- `; - return html; + metaDataObj.nodes = metadata.nodes.length; + metaDataObj.links = metadata.links.length; + return metaDataObj; } /** * @function * @name nodeInfo * - * Parse the infomation of incoming node data. + * Parse the information of incoming node data. * @param {object} node * * @return {string} html dom string */ nodeInfo(node) { - let html = `

id: ${node.id}

`; + const nodeInfo = {}; + nodeInfo.id = node.id; if (node.label && typeof node.label === "string") { - html += `

label: ${node.label}

`; + nodeInfo.label = node.label; } + if (node.name) { + nodeInfo.name = node.name; + } + if (node.location) { + nodeInfo.location = node.location; + } + if (node.properties) { Object.keys(node.properties).forEach((key) => { if (key === "location") { - html += `

location:
lat: ${node.properties.location.lat}
lng: ${node.properties.location.lng}

`; + nodeInfo[key] = { + lat: node.properties.location.lat, + lng: node.properties.location.lng, + }; } else if (key === "time") { - html += `

time: ${this.dateParse({ + const time = this.dateParse({ dateString: node.properties[key], - })}

`; + }); + nodeInfo[key] = time; } else { - html += `

${key.replace(/_/g, " ")}: ${ - node.properties[key] - }

`; + nodeInfo[key.replace(/_/g, " ")] = node.properties[key]; } }); } if (node.linkCount) { - html += `

links: ${node.linkCount}

`; + nodeInfo.links = node.linkCount; } if (node.local_addresses) { - html += `

local addresses:
${node.local_addresses.join( - "
", - )}

`; + nodeInfo.localAddresses = node.local_addresses; } - return html; + return nodeInfo; + } + + createTooltipItem(key, value) { + const item = document.createElement("div"); + item.classList.add("njg-tooltip-item"); + const keyLabel = document.createElement("span"); + keyLabel.setAttribute("class", "njg-tooltip-key"); + const valueLabel = document.createElement("span"); + valueLabel.setAttribute("class", "njg-tooltip-value"); + keyLabel.innerHTML = key; + valueLabel.innerHTML = value; + item.appendChild(keyLabel); + item.appendChild(valueLabel); + return item; + } + + getNodeTooltipInfo(node) { + const container = document.createElement("div"); + container.classList.add("njg-tooltip-inner"); + if (node.id) { + container.appendChild(this.createTooltipItem("id", node.id)); + } + if (node.label && typeof node.label === "string") { + container.appendChild(this.createTooltipItem("label", node.label)); + } + + if (node.properties) { + Object.keys(node.properties).forEach((key) => { + if (key === "location") { + container.appendChild( + this.createTooltipItem( + "location", + `${Math.round(node.properties.location.lat * 1000) / 1000}, ${ + Math.round(node.properties.location.lng * 1000) / 1000 + }`, + ), + ); + } else if (key === "time") { + const time = this.dateParse({ + dateString: node.properties[key], + }); + container.appendChild(this.createTooltipItem("time", time)); + } else { + container.appendChild( + this.createTooltipItem( + `${key.replace(/_/g, " ")}`, + node.properties[key], + ), + ); + } + }); + } + if (node.linkCount) { + container.appendChild(this.createTooltipItem("Links", node.linkCount)); + } + if (node.local_addresses) { + container.appendChild( + this.createTooltipItem( + "Local Addresses", + node.local_addresses.join("
"), + ), + ); + } + return container; } + getLinkTooltipInfo(link) { + const container = document.createElement("div"); + container.classList.add("njg-tooltip-inner"); + container.appendChild(this.createTooltipItem("source", link.source)); + container.appendChild(this.createTooltipItem("target", link.target)); + container.appendChild(this.createTooltipItem("cost", link.cost)); + if (link.properties) { + Object.keys(link.properties).forEach((key) => { + if (key === "time") { + const time = this.dateParse({ + dateString: link.properties[key], + }); + container.appendChild(this.createTooltipItem("time", time)); + } else { + container.appendChild( + this.createTooltipItem( + `${key.replace(/_/g, " ")}`, + link.properties[key], + ), + ); + } + }); + } + return container; + } /** * @function * @name linkInfo @@ -350,22 +433,114 @@ class NetJSONGraphUtil { */ linkInfo(link) { - let html = `

source: ${link.source}

target: ${link.target}

cost: ${link.cost}

`; + const linkInfo = {}; + linkInfo.source = link.source; + linkInfo.target = link.target; + linkInfo.cost = link.cost; if (link.properties) { Object.keys(link.properties).forEach((key) => { if (key === "time") { - html += `

time: ${this.dateParse({ + const time = this.dateParse({ dateString: link.properties[key], - })}

`; + }); + linkInfo[key] = time; } else { - html += `

${key.replace(/_/g, " ")}: ${ - link.properties[key] - }

`; + linkInfo[key.replace(/_/g, " ")] = link.properties[key]; } }); } - return html; + return linkInfo; + } + + generateStyle(styleConfig, item) { + const styles = + typeof styleConfig === "function" ? styleConfig(item) : styleConfig; + return styles; + } + + getNodeStyle(node, config, type) { + let nodeStyleConfig; + let nodeSizeConfig = {}; + let nodeEmphasisConfig = {}; + if (node.category && config.nodeCategories.length) { + const category = config.nodeCategories.find( + (cat) => cat.name === node.category, + ); + + nodeStyleConfig = this.generateStyle(category.nodeStyle || {}, node); + + nodeSizeConfig = this.generateStyle(category.nodeSize || {}, node); + + nodeEmphasisConfig = { + ...nodeEmphasisConfig, + nodeStyle: category.emphasis + ? this.generateStyle(category.emphasis.nodeStyle || {}, node) + : {}, + }; + + nodeEmphasisConfig = { + ...nodeEmphasisConfig, + nodeSize: category.empahsis + ? this.generateStyle(category.emphasis.nodeSize || {}, node) + : {}, + }; + } else if (type === "map") { + nodeStyleConfig = this.generateStyle( + config.mapOptions.nodeConfig.nodeStyle, + node, + ); + nodeSizeConfig = this.generateStyle( + config.mapOptions.nodeConfig.nodeSize, + node, + ); + } else { + nodeStyleConfig = this.generateStyle( + config.graphConfig.series.nodeStyle, + node, + ); + nodeSizeConfig = this.generateStyle( + config.graphConfig.series.nodeSize, + node, + ); + } + return {nodeStyleConfig, nodeSizeConfig, nodeEmphasisConfig}; + } + + getLinkStyle(link, config, type) { + let linkStyleConfig; + let linkEmphasisConfig = {}; + if (link.category && config.linkCategories.length) { + const category = config.linkCategories.find( + (cat) => cat.name === link.category, + ); + + linkStyleConfig = this.generateStyle(category.linkStyle || {}, link); + + linkEmphasisConfig = { + ...linkEmphasisConfig, + linkStyle: category.emphasis + ? this.generateStyle(category.emphasis.linkStyle || {}, link) + : {}, + }; + } else if (type === "map") { + linkStyleConfig = this.generateStyle( + config.mapOptions.linkConfig.linkStyle, + link, + ); + } else { + linkStyleConfig = this.generateStyle( + config.graphConfig.series.linkStyle, + link, + ); + } + + return {linkStyleConfig, linkEmphasisConfig}; + } + + getGUI(graph) { + const gui = new NetJSONGraphGUI(graph); + return gui; } /** diff --git a/test/netjsongraph.calc.test.js b/test/netjsongraph.calc.test.js index 54f7dbd6..f7d75eb4 100644 --- a/test/netjsongraph.calc.test.js +++ b/test/netjsongraph.calc.test.js @@ -1,4 +1,37 @@ import NetJSONGraphUtil from "../src/js/netjsongraph.util"; +import NetJSONGraphGUI from "../src/js/netjsongraph.gui"; +import NetJSONGraph from "../src/js/netjsongraph.core"; + +const configs = { + nodeCategories: [], + linkCategories: [], + mapOptions: { + nodeConfig: { + nodeStyle: { + color: "blue", + }, + nodeSize: 15, + }, + linkConfig: { + linkStyle: { + width: 5, + color: "green", + }, + }, + }, + graphConfig: { + series: { + nodeStyle: { + color: "blue", + }, + nodeSize: 15, + linkStyle: { + width: 5, + color: "green", + }, + }, + }, +}; describe("Test netjsongraph function utils", () => { const util = new NetJSONGraphUtil("", {}); @@ -14,13 +47,28 @@ describe("Test netjsongraph function utils", () => { properties: { name: "Node", color: "red", + location: { + lng: 0, + lat: 0, + }, }, linkCount: 1, local_addresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], }, ], // value - "

id: 0

label: test

name: Node

color: red

links: 1

local addresses:
192.168.0.01
192.168.0.02
192.168.0.03

", + { + color: "red", + id: 0, + label: "test", + location: { + lng: 0, + lat: 0, + }, + links: 1, + localAddresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], + name: "Node", + }, ], [ // key @@ -29,20 +77,33 @@ describe("Test netjsongraph function utils", () => { { id: 0, label: "test", + name: "Node", + location: { + lng: 0, + lat: 0, + }, properties: { - name: "Node", color: "red", - location: { - lng: 0, - lat: 0, - }, + time: "2019-04-03T05:06:54.000Z", }, linkCount: 1, local_addresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], }, ], // value - "

id: 0

label: test

name: Node

color: red

location:
lat: 0
lng: 0

links: 1

local addresses:
192.168.0.01
192.168.0.02
192.168.0.03

", + { + color: "red", + id: 0, + label: "test", + links: 1, + location: { + lng: 0, + lat: 0, + }, + time: "2019.04.03 05:06:54.000", + localAddresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], + name: "Node", + }, ], ]); const linkInfoData = new Map([ @@ -57,11 +118,19 @@ describe("Test netjsongraph function utils", () => { properties: { name: "Link", color: "blue", + time: "2019-04-03T05:06:54.000Z", }, }, ], // value - `

source: 192.168.0.01

target: 192.168.1.01

cost: 1.000

name: Link

color: blue

`, + { + color: "blue", + cost: "1.000", + name: "Link", + source: "192.168.0.01", + target: "192.168.1.01", + time: "2019.04.03 05:06:54.000", + }, ], [ // key @@ -72,7 +141,7 @@ describe("Test netjsongraph function utils", () => { }, ], // value - `

source: 192.168.0.01

target: 192.168.1.01

cost: undefined

`, + {cost: undefined, source: "192.168.0.01", target: "192.168.1.01"}, ], ]); const numberMinDigitData = new Map([ @@ -203,4 +272,165 @@ describe("Test netjsongraph function utils", () => { expect(event.emit("none_event")).toEqual([]); event.delete("once_test"); }); + + test("Parse the metadata information from the JSON data", () => { + const data = { + type: "NetworkGraph", + label: "Ninux Roma", + protocol: "OLSR", + version: "0.6.6.2", + metric: "ETX", + nodes: [], + links: [], + }; + const metadata = util.getMetadata(data); + expect(metadata).toEqual({ + label: "Ninux Roma", + protocol: "OLSR", + version: "0.6.6.2", + metric: "ETX", + nodes: 0, + links: 0, + }); + }); + + test("Generate the style of a node or a link", () => { + let style = { + color: "red", + }; + const link = {}; + expect(util.generateStyle(style, link)).toEqual(style); + + const node = { + opacity: 0.5, + }; + style = (n) => n.opacity * 2; + expect(util.generateStyle(style, node)).toEqual(1); + }); + + test("Get the style of a node", () => { + let node = {}; + let style = util.getNodeStyle(node, configs, "map"); + expect(style).toEqual({ + nodeStyleConfig: { + color: "blue", + }, + nodeSizeConfig: 15, + nodeEmphasisConfig: {}, + }); + + node = { + category: "test", + }; + style = util.getNodeStyle( + node, + { + ...configs, + nodeCategories: [ + { + name: "test", + nodeStyle: { + color: "red", + opacity: 0.5, + }, + emphasis: { + nodeStyle: { + color: "green", + opacity: 0.8, + }, + }, + }, + ], + }, + "graph", + ); + expect(style).toEqual({ + nodeStyleConfig: { + color: "red", + opacity: 0.5, + }, + nodeSizeConfig: {}, + nodeEmphasisConfig: { + nodeStyle: { + color: "green", + opacity: 0.8, + }, + nodeSize: {}, + }, + }); + + node = {}; + style = util.getNodeStyle(node, configs, "graph"); + expect(style).toEqual({ + nodeStyleConfig: { + color: "blue", + }, + nodeSizeConfig: 15, + nodeEmphasisConfig: {}, + }); + }); + + test("Get the style of a link", () => { + let link = {}; + let style = util.getLinkStyle(link, configs, "map"); + expect(style).toEqual({ + linkStyleConfig: { + color: "green", + width: 5, + }, + linkEmphasisConfig: {}, + }); + + link = { + category: "test", + }; + style = util.getLinkStyle( + link, + { + ...configs, + linkCategories: [ + { + name: "test", + linkStyle: { + color: "red", + opacity: 0.5, + }, + emphasis: { + linkStyle: { + opacity: 1, + }, + }, + }, + ], + }, + "graph", + ); + expect(style).toEqual({ + linkStyleConfig: { + color: "red", + opacity: 0.5, + }, + linkEmphasisConfig: { + linkStyle: { + opacity: 1, + }, + }, + }); + + link = {}; + style = util.getLinkStyle(link, configs, "graph"); + expect(style).toEqual({ + linkStyleConfig: { + color: "green", + width: 5, + }, + linkEmphasisConfig: {}, + }); + }); + + test("Get the GUI instance", () => { + const graph = new NetJSONGraph({}); + const gui = util.getGUI(graph); + expect(gui).toBeInstanceOf(NetJSONGraphGUI); + }); }); diff --git a/test/netjsongraph.dom.test.js b/test/netjsongraph.dom.test.js index 8708246d..46451b80 100644 --- a/test/netjsongraph.dom.test.js +++ b/test/netjsongraph.dom.test.js @@ -1,4 +1,6 @@ +import "@testing-library/jest-dom"; import NetJSONGraph from "../src/js/netjsongraph.core"; +import NetJSONGraphGUI from "../src/js/netjsongraph.gui"; const graph = new NetJSONGraph({ type: "NetworkGraph", @@ -24,37 +26,6 @@ graph.setUtils(); graph.render(); describe("Test netjsongraph utils dom functions", () => { - const NetJSONMetadataData = new Map([ - [ - // key - [ - { - type: "NetworkGraph", - label: "Ninux Roma", - protocol: "OLSR", - version: "0.6.6.2", - metric: "ETX", - nodes: [], - links: [], - }, - ], - // value - HTMLDivElement, - ], - [ - // key - [ - { - type: "NetworkGraph", - nodes: [], - links: [], - }, - ], - // value - HTMLDivElement, - ], - ]); - const loadingData = new Map([ [ // key @@ -65,10 +36,6 @@ describe("Test netjsongraph utils dom functions", () => { ]); const utilsDOMObj = { - "Display metadata of NetJSONGraph.": [ - "NetJSONMetadata", - NetJSONMetadataData, - ], "Display loading animation": ["showLoading", loadingData], "Cancel loading animation": ["hideLoading", loadingData], }; @@ -89,27 +56,293 @@ describe("Test netjsongraph utils dom functions", () => { graph.utils.showLoading.call(graph); }); }); + + test("Create a tooltip item", () => { + const toolTipItem = `
testtest
`; + + expect(graph.utils.createTooltipItem("test", "test")).toBeInstanceOf( + HTMLElement, + ); + expect(graph.utils.createTooltipItem("test", "test").outerHTML).toEqual( + toolTipItem, + ); + }); + + test("Create a tooltip element for node info ", () => { + const node = { + label: "test", + id: "22", + properties: { + name: "Node", + color: "red", + location: { + lng: 0, + lat: 0, + }, + time: "2019-04-03T05:06:54.000Z", + }, + linkCount: 1, + local_addresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], + }; + + expect(graph.utils.getNodeTooltipInfo(node)).toBeInstanceOf(HTMLElement); + expect(graph.utils.getNodeTooltipInfo(node).innerHTML).toContain( + "id", + "label", + "links", + "location", + "localAddresses", + "name", + "time", + ); + expect(graph.utils.getNodeTooltipInfo(node).innerHTML).toContain( + "22", + "test", + "1", + "0", + "0", + "Node", + "192.168.0.01", + "192.168.0.02", + "192.168.0.03", + "2019.04.03 .5:06:54.000", + ); + }); + + test("Create a tooltip element for link info ", () => { + const link = { + source: "192.168.0.01", + target: "192.168.1.01", + cost: "1.000", + properties: { + name: "Link", + color: "blue", + time: "2019-04-03T05:06:54.000Z", + }, + }; + expect(graph.utils.getLinkTooltipInfo(link)).toBeInstanceOf(HTMLElement); + expect(graph.utils.getLinkTooltipInfo(link).innerHTML).toContain( + "source", + "target", + "cost", + "name", + "color", + "time", + ); + expect(graph.utils.getLinkTooltipInfo(link).innerHTML).toContain( + "192.168.0.01", + "192.168.1.01", + "1.000", + "Link", + "2019.04.03 .5:06:54.000", + ); + }); }); +describe("Test netjsongraph gui", () => { + let gui; + beforeEach(() => { + gui = new NetJSONGraphGUI(graph); + }); + + afterEach(() => { + gui = null; + }); + + test("Creating a gui instance", () => { + expect(gui.self).toEqual(graph); + expect(gui.renderModeSelector).toBe(null); + expect(gui.controls).toBe(null); + expect(gui.sideBar).toBe(null); + expect(gui.aboutContainer).toBe(null); + expect(gui.nodeLinkInfoContainer).toBe(null); + }); + + test("Create a controls container", () => { + const controls = '
'; + expect(gui.createControls).toBeInstanceOf(Function); + expect(gui.createControls()).toBeInstanceOf(HTMLElement); + expect(graph.el).toContainElement(gui.createControls()); + expect(gui.createControls().outerHTML).toEqual(controls); + }); + + test("Create a render mode selector button", () => { + const button = + '
'; + const controls = gui.createControls(); + gui.controls = controls; + expect(gui.createRenderModeSelector).toBeInstanceOf(Function); + expect(gui.createRenderModeSelector()).toBeInstanceOf(HTMLElement); + expect(graph.el).toContainElement(gui.createRenderModeSelector()); + expect(gui.controls).toContainElement(gui.createRenderModeSelector()); + expect(gui.createRenderModeSelector().outerHTML).toEqual(button); + }); + + test("Create a side bar", () => { + const sidebar = + '
'; + expect(gui.createSideBar).toBeInstanceOf(Function); + expect(gui.createSideBar()).toBeInstanceOf(HTMLElement); + expect(graph.el).toContainElement(gui.createSideBar()); + expect(gui.createSideBar().outerHTML).toEqual(sidebar); + }); + + test("Create a container for node and link info", () => { + const container = + ''; + gui.sideBar = gui.createSideBar(); + expect(gui.createNodeLinkInfoContainer).toBeInstanceOf(Function); + expect(gui.createNodeLinkInfoContainer()).toBeInTheDocument(HTMLElement); + expect(graph.el).toContainElement(gui.createNodeLinkInfoContainer()); + expect(gui.sideBar).toContainElement(gui.createNodeLinkInfoContainer()); + expect(gui.createNodeLinkInfoContainer().outerHTML).toEqual(container); + }); + + test("Create a container for meta data", () => { + const container = + '

About

'; + gui.sideBar = gui.createSideBar(); + expect(gui.nodeLinkInfoContainer).toBe(null); + expect(gui.createAboutContainer).toBeInstanceOf(Function); + expect(gui.createAboutContainer()).toBeInstanceOf(HTMLElement); + expect(graph.el).toContainElement(gui.createAboutContainer()); + expect(gui.sideBar).toContainElement(gui.createAboutContainer()); + expect(gui.createAboutContainer().outerHTML).toEqual(container); + + gui.aboutContainer = gui.createAboutContainer(); + expect(gui.nodeLinkInfoContainer).not.toBe(null); + }); + + test("Display node and link data", () => { + const nodeData = { + id: 0, + label: "test", + links: 1, + location: { + lng: 0, + lat: 0, + }, + localAddresses: ["192.168.0.01", "192.168.0.02", "192.168.0.03"], + name: "Node", + }; + + gui.sideBar = gui.createSideBar(); + gui.nodeLinkInfoContainer = gui.createNodeLinkInfoContainer(); + expect(gui.getNodeLinkInfo).toBeInstanceOf(Function); + expect(gui.nodeLinkInfoContainer).not.toBe(null); + gui.getNodeLinkInfo("node", nodeData); + + const infoContainer = document.querySelector(".njg-infoContainer"); + const header = document.querySelector(".njg-headerContainer"); + expect(gui.nodeLinkInfoContainer).toContainElement(infoContainer); + expect(gui.nodeLinkInfoContainer).toContainElement(header); + expect(header.innerHTML).toContain("node"); + expect(header).toContainElement(document.getElementById("closeButton")); + expect(infoContainer.innerHTML).toContain( + "id", + "label", + "links", + "location", + "localAddresses", + "name", + ); + expect(infoContainer.innerHTML).toContain( + "0", + "test", + "1", + "0", + "0", + "Node", + "192.168.0.01", + "192.168.0.02", + "192.168.0.03", + ); + }); + + test("Create sidebar on loading", () => { + expect(gui.sideBar).toBe(null); + gui.init(); + expect(gui.sideBar).not.toBe(null); + expect(gui.controls).toBe(null); + expect(gui.renderModeSelector).toBe(null); + graph.setConfig({ + switchMode: true, + }); + gui.init(); + expect(gui.controls).not.toBe(null); + expect(gui.renderModeSelector).not.toBe(null); + }); +}); describe("Test netjsongraph dom operate", () => { + let gui; + beforeEach(() => { + gui = new NetJSONGraphGUI(graph); + gui.init(); + gui.createAboutContainer(); + graph.setConfig({ + onClickElement: (type, data) => { + let nodeLinkData; + if (type === "node") { + nodeLinkData = graph.utils.nodeInfo(data); + } else { + nodeLinkData = graph.utils.linkInfo(data); + } + gui.getNodeLinkInfo(type, nodeLinkData); + gui.sideBar.classList.remove("hidden"); + }, + }); + }); + test("Click a node", () => { - graph.config.onClickElement.call(graph, "node", { - id: "2", + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("hidden"); + graph.config.onClickElement("node", { + id: "33", + }); + expect(gui.nodeLinkInfoContainer.innerHTML).toContain("33"); + graph.config.onClickElement("node", { + id: "21", }); - const closeBtn = document.getElementById("nodelinkOverlay-close"); + expect(gui.nodeLinkInfoContainer.innerHTML).toContain("21"); + expect(gui.nodeLinkInfoContainer.innerHTML).not.toContain("33"); + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("visible"); + const closeBtn = document.getElementById("closeButton"); closeBtn.click(); + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("hidden"); }); test("Click a link", () => { - graph.config.onClickElement.call(graph, "link", { - id: "2", + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("hidden"); + graph.config.onClickElement("link", { + source: "192.168.0.01", + target: "192.168.1.01", + }); + expect(gui.nodeLinkInfoContainer.innerHTML).toContain( + "192.168.0.01", + "192.168.1.01", + ); + graph.config.onClickElement("link", { + source: "192.168.4.02", + target: "192.168.5.03", }); - const closeBtn = document.getElementById("nodelinkOverlay-close"); + expect(gui.nodeLinkInfoContainer.innerHTML).not.toContain( + "192.168.0.01", + "192.168.1.01", + ); + expect(gui.nodeLinkInfoContainer.innerHTML).toContain( + "192.168.4.02", + "192.168.5.03", + ); + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("visible"); + const closeBtn = document.getElementById("closeButton"); closeBtn.click(); + expect(gui.nodeLinkInfoContainer.style.visibility).toEqual("hidden"); }); - test("Close the metadata", () => { - const metadataClose = document.getElementById("metadata-close"); - metadataClose.click(); + test("Toggle the sidebar", () => { + const sidebar = document.querySelector(".njg-sideBar"); + const handle = document.querySelector(".sideBarHandle"); + expect(sidebar).not.toHaveClass("hidden"); + handle.click(); + expect(sidebar).toHaveClass("njg-sideBar hidden"); }); }); diff --git a/test/netjsongraph.render.test.js b/test/netjsongraph.render.test.js index 17f6fec9..3cfe06fd 100644 --- a/test/netjsongraph.render.test.js +++ b/test/netjsongraph.render.test.js @@ -68,18 +68,36 @@ describe("Test netjsongraph setConfig", () => { }); test("Modify el config", () => { const obj1 = new NetJSONGraph([JSONFILE, JSONFILE]); - // unused variables is required in this test - // eslint-disable-next-line no-unused-vars - const obj2 = new NetJSONGraph([JSONFILE, JSONFILE], { - el: document.getElementsByTagName("body")[0], + expect(obj1.config.el).toBeUndefined(); + obj1.setConfig({}); + expect(obj1.el).toBe(document.body); + + const container = document.createElement("div"); + document.body.appendChild(container); + const obj2 = new NetJSONGraph([JSONFILE, JSONFILE]); + obj2.setConfig({ + el: container, }); - // eslint-disable-next-line no-unused-vars - const obj3 = new NetJSONGraph([JSONFILE, JSONFILE], { - el: "error", + expect(obj2.config.el).toBe(container); + obj2.setConfig({}); + expect(obj2.el).toBe(container); + + const obj3 = new NetJSONGraph([JSONFILE, JSONFILE]); + obj3.setConfig(); + expect(obj3.el).toBe(document.body); + + container.setAttribute("id", "container"); + const obj4 = new NetJSONGraph([JSONFILE, JSONFILE]); + obj4.setConfig({ + el: "container", }); + expect(obj4.el).toBe(container); + document.body.removeChild(container); + obj1.setConfig({ - el: "error", + el: "container", }); + expect(obj1.el).toBe(document.body); }); }); @@ -98,7 +116,7 @@ describe("Test netjsongraph JSONDataUpdate", () => { }); }); - test("Callback function executed when data update.Update Information and view.", () => { + test("Callback function executed when data update. Update Information and view.", () => { graph.utils.JSONDataUpdate.call(graph, { metadata: {}, date: "2019-04-03T09:06:54.000Z", diff --git a/test/netjsongraph.spec.js b/test/netjsongraph.spec.js index 2802b777..f59aa2a4 100644 --- a/test/netjsongraph.spec.js +++ b/test/netjsongraph.spec.js @@ -2,17 +2,6 @@ import NetJSONGraph from "../src/js/netjsongraph.core"; describe("NetJSONGraph Specification", () => { const NetJSONGraphOption = { - title: { - text: "NetJSONGraph", - link: "", - textStyle: { - color: "grey", - fontWeight: "bold", - fontSize: 30, - }, - left: "center", - top: "5%", - }, aria: { show: true, description: @@ -20,6 +9,9 @@ describe("NetJSONGraph Specification", () => { }, toolbox: { show: true, + iconStyle: { + borderColor: "#fff", + }, feature: { restore: { show: true, @@ -31,31 +23,76 @@ describe("NetJSONGraph Specification", () => { }, }, }, - color: ["#d66b30", "#a3c7dd", "#5c9660", "#d66b30"], }; const NetJSONGraphConfig = { - layout: "force", - label: { - show: true, - color: "#000000", - position: "top", + series: { + layout: "force", + label: { + show: true, + color: "#fff", + position: "top", + }, + force: { + gravity: 0.1, + edgeLength: [20, 60], + repulsion: 120, + }, + roam: true, + draggable: true, + legendHoverLink: true, + emphasis: { + focus: "none", + lineStyle: { + color: "#3acc38", + opacity: 1, + }, + }, + nodeStyle: { + color: "#f4d38c", + }, + linkStyle: { + width: 5, + color: "#1ba619", + }, + nodeSize: "17", }, - force: { - gravity: 0.1, - edgeLength: [20, 60], - repulsion: 120, + baseOptions: { + backgroundColor: "#2B2B2B", }, - roam: true, - draggable: true, - focusNodeAdjacency: false, - hoverAnimation: true, - legendHoverLink: true, }; - const NetJSONGraphLinkStyle = { - width: 5, - color: "#999", - shadowColor: "rgba(0, 0, 0, 0.5)", - shadowBlur: 10, + const NetJSONGraphMapOptions = { + roam: true, + nodeConfig: { + type: "scatter", + label: { + show: true, + color: "#000000", + position: "top", + formatter: "{b}", + }, + nodeStyle: { + color: "#1566a9", + }, + nodeSize: "17", + }, + linkConfig: { + linkStyle: { + width: 5, + color: "#1ba619", + }, + emphasis: { + focus: "none", + lineStyle: { + color: "#3acc38", + opacity: 1, + }, + }, + }, + baseOptions: { + toolbox: { + show: false, + }, + }, }; test("APIs exist", () => { @@ -109,18 +146,23 @@ describe("NetJSONGraph Specification", () => { expect(graph.config.graphConfig).toEqual(NetJSONGraphConfig); - expect(graph.config.mapOptions).toEqual({ - roam: true, - }); - expect(graph.config.mapTileConfig).toEqual([]); - expect(graph.config.mapLinkConfig).toEqual([{}]); - expect(graph.config.mapNodeConfig).toBeInstanceOf(Object); - - expect(graph.config.nodeSize).toBeDefined(); - expect(graph.config.nodeStyleProperty).toBeInstanceOf(Function); - expect(graph.config.linkStyleProperty).toBeInstanceOf(Function); - expect(graph.config.nodeStyleProperty()).toBeInstanceOf(Object); - expect(graph.config.linkStyleProperty()).toEqual(NetJSONGraphLinkStyle); + expect(graph.config.mapOptions).toEqual(NetJSONGraphMapOptions); + expect(graph.config.mapTileConfig).toEqual([ + { + urlTemplate: + "https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png", + options: { + minZoom: 3, + maxZoom: 32, + attribution: + '© Stadia Maps, © OpenMapTiles © OpenStreetMap contributors', + }, + }, + ]); + expect(graph.config.mapOptions.nodeConfig).toBeInstanceOf(Object); + expect(graph.config.mapOptions.linkConfig).toBeInstanceOf(Object); + expect(graph.config.nodeCategories).toEqual([]); + expect(graph.config.linkCategories).toEqual([]); expect(graph.config.onInit).toBeInstanceOf(Function); expect(graph.config.onInit.call(graph)).toBe(graph.config); @@ -141,7 +183,6 @@ describe("NetJSONGraph Specification", () => { expect(graph.utils.searchElements).toBeInstanceOf(Function); // NetJSON Utils - expect(graph.utils.NetJSONMetadata).toBeInstanceOf(Function); expect(graph.utils.updateMetadata).toBeInstanceOf(Function); expect(graph.utils.nodeInfo).toBeInstanceOf(Function); expect(graph.utils.linkInfo).toBeInstanceOf(Function); @@ -155,5 +196,13 @@ describe("NetJSONGraph Specification", () => { expect(graph.utils.hideLoading).toBeInstanceOf(Function); expect(graph.utils.createEvent).toBeInstanceOf(Function); expect(graph.utils.numberMinDigit).toBeInstanceOf(Function); + expect(graph.utils.generateStyle).toBeInstanceOf(Function); + expect(graph.utils.getGUI).toBeInstanceOf(Function); + expect(graph.utils.getLinkStyle).toBeInstanceOf(Function); + expect(graph.utils.getMetadata).toBeInstanceOf(Function); + expect(graph.utils.getNodeStyle).toBeInstanceOf(Function); + expect(graph.utils.createTooltipItem).toBeInstanceOf(Function); + expect(graph.utils.getNodeTooltipInfo).toBeInstanceOf(Function); + expect(graph.utils.getLinkTooltipInfo).toBeInstanceOf(Function); }); });