diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-18 20:06:58 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-18 20:06:58 +0200 |
commit | f5b860bfe60354766af5084e09060cfc3f3d9126 (patch) | |
tree | 1456e79358b45a4aacc614734068c2afa7438ea4 /web-build/static/js/2.88717ad6.chunk.js | |
parent | 86b2cf2696ecf3171c9ef05734c940ffbc750537 (diff) |
trying to fix 3d
Diffstat (limited to 'web-build/static/js/2.88717ad6.chunk.js')
-rw-r--r-- | web-build/static/js/2.88717ad6.chunk.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web-build/static/js/2.88717ad6.chunk.js b/web-build/static/js/2.88717ad6.chunk.js new file mode 100644 index 0000000..6846d3f --- /dev/null +++ b/web-build/static/js/2.88717ad6.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.88717ad6.chunk.js.LICENSE.txt */ +(this.webpackJsonp=this.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(298)},function(e,t,n){e.exports=n(312)()},function(t,n,r){"use strict";r.d(n,"a",(function(){return fs})),r.d(n,"b",(function(){return a})),r.d(n,"c",(function(){return L})),r.d(n,"d",(function(){return nt})),r.d(n,"e",(function(){return pt})),r.d(n,"f",(function(){return Ms})),r.d(n,"g",(function(){return Je})),r.d(n,"h",(function(){return mo})),r.d(n,"i",(function(){return Oo})),r.d(n,"j",(function(){return po})),r.d(n,"k",(function(){return ds})),r.d(n,"l",(function(){return c})),r.d(n,"m",(function(){return ot})),r.d(n,"n",(function(){return si})),r.d(n,"o",(function(){return eo})),r.d(n,"p",(function(){return Yi})),r.d(n,"q",(function(){return s})),r.d(n,"r",(function(){return i})),r.d(n,"s",(function(){return se})),r.d(n,"t",(function(){return Pt})),r.d(n,"u",(function(){return $e})),r.d(n,"v",(function(){return xa})),r.d(n,"w",(function(){return us})),r.d(n,"x",(function(){return zt})),r.d(n,"y",(function(){return Xt})),r.d(n,"z",(function(){return Po})),r.d(n,"A",(function(){return O})),r.d(n,"B",(function(){return l})),r.d(n,"C",(function(){return Hs})),r.d(n,"D",(function(){return mi})),r.d(n,"E",(function(){return Bt})),r.d(n,"F",(function(){return da})),r.d(n,"G",(function(){return da})),r.d(n,"H",(function(){return Gs})),r.d(n,"I",(function(){return Li})),r.d(n,"J",(function(){return bi})),r.d(n,"K",(function(){return o})),r.d(n,"L",(function(){return A})),r.d(n,"M",(function(){return Xa})),r.d(n,"N",(function(){return fa})),r.d(n,"O",(function(){return jt})),r.d(n,"P",(function(){return b})),r.d(n,"Q",(function(){return R})),r.d(n,"R",(function(){return T})),r.d(n,"S",(function(){return di}));const i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=1,s=1006,l=1023;class c{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const u=[];for(let e=0;e<256;e++)u[e]=(e<16?"0":"")+e.toString(16);const h=Math.PI/180,d=180/Math.PI;function f(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(u[255&e]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+"-"+u[255&t]+u[t>>8&255]+"-"+u[t>>16&15|64]+u[t>>24&255]+"-"+u[63&n|128]+u[n>>8&255]+"-"+u[n>>16&255]+u[n>>24&255]+u[255&r]+u[r>>8&255]+u[r>>16&255]+u[r>>24&255]).toUpperCase()}function p(e,t,n){return Math.max(t,Math.min(n,e))}function m(e,t){return(e%t+t)%t}function g(e,t,n){return(1-n)*e+n*t}function v(e){return 0===(e&e-1)&&0!==e}function y(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}class b{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}b.prototype.isVector2=!0;class w{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,a){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}let x;w.prototype.isMatrix3=!0;class _{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===x&&(x=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),x.width=e.width,x.height=e.height;const n=x.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=x}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let E=0;class A extends c{constructor(e=A.DEFAULT_IMAGE,t=A.DEFAULT_MAPPING,n=1001,r=1001,i=s,o=1008,a=l,c=1009,u=1,h=3e3){super(),Object.defineProperty(this,"id",{value:E++}),this.uuid=f(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=c,this.offset=new b(0,0),this.repeat=new b(1,1),this.center=new b(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new w,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=h,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){const t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=f()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(S(r[e].image)):t.push(S(r[e]))}else t=S(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function S(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?_.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}A.DEFAULT_IMAGE=void 0,A.DEFAULT_MAPPING=300,A.prototype.isTexture=!0;class M{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(a+1)/2,o=(u+1)/2,m=(p+1)/2,g=(s+c)/4,v=(l+d)/4,y=(h+f)/4;return e>o&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=v/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=v/i,r=y/i),this.set(n,r,i,t),this}let m=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(m)<.001&&(m=1),this.x=(f-h)/m,this.y=(l-d)/m,this.z=(c-s)/m,this.w=Math.acos((a+u+p-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}M.prototype.isVector4=!0;class T extends c{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new M(0,0,e,t),this.scissorTest=!1,this.viewport=new M(0,0,e,t),this.texture=new A(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:s,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}T.prototype.isWebGLRenderTarget=!0;(class extends T{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let i=0;i<n;i++)this.texture[i]=r.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class C extends T{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}C.prototype.isWebGLMultisampleRenderTarget=!0;class O{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===a)return e[t+0]=h,e[t+1]=d,e[t+2]=f,void(e[t+3]=p);if(u!==p||s!==h||l!==d||c!==f){let e=1-a;const t=s*h+l*d+c*f+u*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+h*i,l=l*e+d*i,c=c*e+f*i,u=u*e+p*i,e===1-a){const e=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=e,l*=e,c*=e,u*=e}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>a&&n>u){const e=2*Math.sqrt(1+n-a-u);this._w=(c-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(a>u){const e=2*Math.sqrt(1+a-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+u-n-a);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(p(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,a),u=Math.sin((1-t)*c)/l,h=Math.sin(t*c)/l;return this._w=o*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=i*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}O.prototype.isQuaternion=!0;class R{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(P.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(P.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return k.copy(this).projectOnVector(e),this.sub(k)}reflect(e){return this.sub(k.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(p(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}R.prototype.isVector3=!0;const k=new R,P=new O;class L{constructor(e=new R(1/0,1/0,1/0),t=new R(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.length;s<l;s+=3){const l=e[s],c=e[s+1],u=e[s+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.count;s<l;s++){const l=e.getX(s),c=e.getY(s),u=e.getZ(s);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=I.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),N.copy(t.boundingBox),N.applyMatrix4(e.matrixWorld),this.union(N));const n=e.children;for(let r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,I),I.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(V),G.subVectors(this.max,V),j.subVectors(e.a,V),B.subVectors(e.b,V),F.subVectors(e.c,V),z.subVectors(B,j),H.subVectors(F,B),U.subVectors(j,F);let t=[0,-z.z,z.y,0,-H.z,H.y,0,-U.z,U.y,z.z,0,-z.x,H.z,0,-H.x,U.z,0,-U.x,-z.y,z.x,0,-H.y,H.x,0,-U.y,U.x,0];return!!X(t,j,B,F,G)&&(t=[1,0,0,0,1,0,0,0,1],!!X(t,j,B,F,G)&&(W.crossVectors(z,H),t=[W.x,W.y,W.z],X(t,j,B,F,G)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return I.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(I).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(D[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),D[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),D[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),D[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),D[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),D[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),D[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),D[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(D)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}L.prototype.isBox3=!0;const D=[new R,new R,new R,new R,new R,new R,new R,new R],I=new R,N=new L,j=new R,B=new R,F=new R,z=new R,H=new R,U=new R,V=new R,G=new R,W=new R,q=new R;function X(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){q.fromArray(e,o);const a=i.x*Math.abs(q.x)+i.y*Math.abs(q.y)+i.z*Math.abs(q.z),s=t.dot(q),l=n.dot(q),c=r.dot(q);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>a)return!1}return!0}const Y=new L,K=new R,Q=new R,Z=new R;class J{constructor(e=new R,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Y.setFromPoints(e).getCenter(n);let r=0;for(let i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Z.subVectors(e,this.center);const t=Z.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Z.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return Q.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(K.copy(e.center).add(Q)),this.expandByPoint(K.copy(e.center).sub(Q)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const $=new R,ee=new R,te=new R,ne=new R,re=new R,ie=new R,oe=new R;class ae{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,$)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=$.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):($.copy(this.direction).multiplyScalar(t).add(this.origin),$.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ee.copy(e).add(t).multiplyScalar(.5),te.copy(t).sub(e).normalize(),ne.copy(this.origin).sub(ee);const i=.5*e.distanceTo(t),o=-this.direction.dot(te),a=ne.dot(this.direction),s=-ne.dot(te),l=ne.lengthSq(),c=Math.abs(1-o*o);let u,h,d,f;if(c>0)if(u=o*s-a,h=o*a-s,f=i*c,u>=0)if(h>=-f)if(h<=f){const e=1/c;u*=e,h*=e,d=u*(u+o*h+2*a)+h*(o*u+h+2*s)+l}else h=i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h=-i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h<=-f?(u=Math.max(0,-(-o*i+a)),h=u>0?-i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l):h<=f?(u=0,h=Math.min(Math.max(-i,-s),i),d=h*(h+2*s)+l):(u=Math.max(0,-(o*i+a)),h=u>0?i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l);else h=o>0?-i:i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(te).multiplyScalar(h).add(ee),d}intersectSphere(e,t){$.subVectors(e.center,this.origin);const n=$.dot(this.direction),r=$.dot($)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,$)}intersectTriangle(e,t,n,r,i){re.subVectors(t,e),ie.subVectors(n,e),oe.crossVectors(re,ie);let o,a=this.direction.dot(oe);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}ne.subVectors(this.origin,e);const s=o*this.direction.dot(ie.crossVectors(ne,ie));if(s<0)return null;const l=o*this.direction.dot(re.cross(ne));if(l<0)return null;if(s+l>a)return null;const c=-o*ne.dot(oe);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class se{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new se).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/le.setFromMatrixColumn(e,0).length(),i=1/le.setFromMatrixColumn(e,1).length(),o=1/le.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*s}else if("YXZ"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e-i*a,t[4]=-o*u,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*c,t[9]=i-e*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=a*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ue,e,he)}lookAt(e,t,n){const r=this.elements;return pe.subVectors(e,t),0===pe.lengthSq()&&(pe.z=1),pe.normalize(),de.crossVectors(n,pe),0===de.lengthSq()&&(1===Math.abs(n.z)?pe.x+=1e-4:pe.z+=1e-4,pe.normalize(),de.crossVectors(n,pe)),de.normalize(),fe.crossVectors(pe,de),r[0]=de.x,r[4]=fe.x,r[8]=pe.x,r[1]=de.y,r[5]=fe.y,r[9]=pe.y,r[2]=de.z,r[6]=fe.z,r[10]=pe.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*h*l+p*s*d-a*m*d-u*s*g+a*h*g,y=f*h*l-c*m*l-f*s*d+o*m*d+c*s*g-o*h*g,b=c*p*l-f*u*l+f*a*d-o*p*d-c*a*g+o*u*g,w=f*u*s-c*p*s-f*a*h+o*p*h+c*a*m-o*u*m,x=t*v+n*y+r*b+i*w;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/x;return e[0]=v*_,e[1]=(p*h*i-u*m*i-p*r*d+n*m*d+u*r*g-n*h*g)*_,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*_,e[3]=(u*s*i-a*h*i-u*r*l+n*h*l+a*r*d-n*s*d)*_,e[4]=y*_,e[5]=(c*m*i-f*h*i+f*r*d-t*m*d-c*r*g+t*h*g)*_,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*_,e[7]=(o*h*i-c*s*i+c*r*l-t*h*l-o*r*d+t*s*d)*_,e[8]=b*_,e[9]=(f*u*i-c*p*i-f*n*d+t*p*d+c*n*g-t*u*g)*_,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*_,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*d-t*a*d)*_,e[12]=w*_,e[13]=(c*p*r-f*u*r+f*n*h-t*p*h-c*n*m+t*u*m)*_,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*_,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*h+t*a*h)*_,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=le.set(r[0],r[1],r[2]).length();const o=le.set(r[4],r[5],r[6]).length(),a=le.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],ce.copy(this);const s=1/i,l=1/o,c=1/a;return ce.elements[0]*=s,ce.elements[1]*=s,ce.elements[2]*=s,ce.elements[4]*=l,ce.elements[5]*=l,ce.elements[6]*=l,ce.elements[8]*=c,ce.elements[9]*=c,ce.elements[10]*=c,t.setFromRotationMatrix(ce),n.x=i,n.y=o,n.z=a,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}se.prototype.isMatrix4=!0;const le=new R,ce=new se,ue=new R(0,0,0),he=new R(1,1,1),de=new R,fe=new R,pe=new R,me=new se,ge=new O;class ve{constructor(e=0,t=0,n=0,r=ve.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],l=r[5],c=r[9],u=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(p(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-p(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(p(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-p(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(p(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-p(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return me.makeRotationFromQuaternion(e),this.setFromRotationMatrix(me,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ge.setFromEuler(this),this.setFromQuaternion(ge,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new R(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ve.prototype.isEuler=!0,ve.DefaultOrder="XYZ",ve.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class ye{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}}let be=0;const we=new R,xe=new O,_e=new se,Ee=new R,Ae=new R,Se=new R,Me=new O,Te=new R(1,0,0),Ce=new R(0,1,0),Oe=new R(0,0,1),Re={type:"added"},ke={type:"removed"};class Pe extends c{constructor(){super(),Object.defineProperty(this,"id",{value:be++}),this.uuid=f(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Pe.DefaultUp.clone();const e=new R,t=new ve,n=new O,r=new R(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new se},normalMatrix:{value:new w}}),this.matrix=new se,this.matrixWorld=new se,this.matrixAutoUpdate=Pe.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ye,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.multiply(xe),this}rotateOnWorldAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.premultiply(xe),this}rotateX(e){return this.rotateOnAxis(Te,e)}rotateY(e){return this.rotateOnAxis(Ce,e)}rotateZ(e){return this.rotateOnAxis(Oe,e)}translateOnAxis(e,t){return we.copy(e).applyQuaternion(this.quaternion),this.position.add(we.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Te,e)}translateY(e){return this.translateOnAxis(Ce,e)}translateZ(e){return this.translateOnAxis(Oe,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(_e.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ee.copy(e):Ee.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Ae.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_e.lookAt(Ae,Ee,this.up):_e.lookAt(Ee,Ae,this.up),this.quaternion.setFromRotationMatrix(_e),r&&(_e.extractRotation(r.matrixWorld),xe.setFromRotationMatrix(_e),this.quaternion.premultiply(xe.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Re)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(ke)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(ke)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),_e.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),_e.multiply(e.parent.matrixWorld)),e.applyMatrix4(_e),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,e,Se),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,Me,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),l=o(e.skeletons),c=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}Pe.DefaultUp=new R(0,1,0),Pe.DefaultMatrixAutoUpdate=!0,Pe.prototype.isObject3D=!0;const Le=new R,De=new R,Ie=new R,Ne=new R,je=new R,Be=new R,Fe=new R,ze=new R,He=new R,Ue=new R;class Ve{constructor(e=new R,t=new R,n=new R){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Le.subVectors(e,t),r.cross(Le);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Le.subVectors(r,t),De.subVectors(n,t),Ie.subVectors(e,t);const o=Le.dot(Le),a=Le.dot(De),s=Le.dot(Ie),l=De.dot(De),c=De.dot(Ie),u=o*l-a*a;if(0===u)return i.set(-2,-1,-1);const h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ne),Ne.x>=0&&Ne.y>=0&&Ne.x+Ne.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,Ne),s.set(0,0),s.addScaledVector(i,Ne.x),s.addScaledVector(o,Ne.y),s.addScaledVector(a,Ne.z),s}static isFrontFacing(e,t,n,r){return Le.subVectors(n,t),De.subVectors(e,t),Le.cross(De).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Le.subVectors(this.c,this.b),De.subVectors(this.a,this.b),.5*Le.cross(De).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ve.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ve.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return Ve.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Ve.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ve.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,a;je.subVectors(r,n),Be.subVectors(i,n),ze.subVectors(e,n);const s=je.dot(ze),l=Be.dot(ze);if(s<=0&&l<=0)return t.copy(n);He.subVectors(e,r);const c=je.dot(He),u=Be.dot(He);if(c>=0&&u<=c)return t.copy(r);const h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return o=s/(s-c),t.copy(n).addScaledVector(je,o);Ue.subVectors(e,i);const d=je.dot(Ue),f=Be.dot(Ue);if(f>=0&&d<=f)return t.copy(i);const p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return a=l/(l-f),t.copy(n).addScaledVector(Be,a);const m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return Fe.subVectors(i,r),a=(u-c)/(u-c+(d-f)),t.copy(r).addScaledVector(Fe,a);const g=1/(m+p+h);return o=p*g,a=h*g,t.copy(n).addScaledVector(je,o).addScaledVector(Be,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Ge=0;class We extends c{constructor(){super(),Object.defineProperty(this,"id",{value:Ge++}),this.uuid=f(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}We.prototype.isMaterial=!0;const qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xe={h:0,s:0,l:0},Ye={h:0,s:0,l:0};function Ke(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ze(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Je{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=m(e,1),t=p(t,0,1),n=p(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ke(i,r,e+1/3),this.g=Ke(i,r,e),this.b=Ke(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=qe[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Qe(e.r),this.g=Qe(e.g),this.b=Qe(e.b),this}copyLinearToSRGB(e){return this.r=Ze(e.r),this.g=Ze(e.g),this.b=Ze(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const l=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=l<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=l,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Xe),Xe.h+=e,Xe.s+=t,Xe.l+=n,this.setHSL(Xe.h,Xe.s,Xe.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Xe),e.getHSL(Ye);const n=g(Xe.h,Ye.h,t),r=g(Xe.s,Ye.s,t),i=g(Xe.l,Ye.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Je.NAMES=qe,Je.prototype.isColor=!0,Je.prototype.r=1,Je.prototype.g=1,Je.prototype.b=1;class $e extends We{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this}}$e.prototype.isMeshBasicMaterial=!0;const et=new R,tt=new b;class nt{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Je),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new b),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new R),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new M),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)tt.fromBufferAttribute(this,t),tt.applyMatrix3(e),this.setXY(t,tt.x,tt.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyMatrix4(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyNormalMatrix(e),this.setXYZ(t,et.x,et.y,et.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.transformDirection(e),this.setXYZ(t,et.x,et.y,et.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}nt.prototype.isBufferAttribute=!0;class rt extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class it extends nt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class ot extends nt{constructor(e,t,n){super(new Float32Array(e),t,n)}}function at(e){if(0===e.length)return-1/0;let t=e[0];for(let n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;let st=0;const lt=new se,ct=new Pe,ut=new R,ht=new L,dt=new L,ft=new R;class pt extends c{constructor(){super(),Object.defineProperty(this,"id",{value:st++}),this.uuid=f(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(at(e)>65535?it:rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new w).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return lt.makeRotationFromQuaternion(e),this.applyMatrix4(lt),this}rotateX(e){return lt.makeRotationX(e),this.applyMatrix4(lt),this}rotateY(e){return lt.makeRotationY(e),this.applyMatrix4(lt),this}rotateZ(e){return lt.makeRotationZ(e),this.applyMatrix4(lt),this}translate(e,t,n){return lt.makeTranslation(e,t,n),this.applyMatrix4(lt),this}scale(e,t,n){return lt.makeScale(e,t,n),this.applyMatrix4(lt),this}lookAt(e){return ct.lookAt(e),ct.updateMatrix(),this.applyMatrix4(ct.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ut).negate(),this.translate(ut.x,ut.y,ut.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new ot(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new L);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new R(-1/0,-1/0,-1/0),new R(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];ht.setFromBufferAttribute(e),this.morphTargetsRelative?(ft.addVectors(this.boundingBox.min,ht.min),this.boundingBox.expandByPoint(ft),ft.addVectors(this.boundingBox.max,ht.max),this.boundingBox.expandByPoint(ft)):(this.boundingBox.expandByPoint(ht.min),this.boundingBox.expandByPoint(ht.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new J);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new R,1/0);if(e){const n=this.boundingSphere.center;if(ht.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];dt.setFromBufferAttribute(n),this.morphTargetsRelative?(ft.addVectors(ht.min,dt.min),ht.expandByPoint(ft),ft.addVectors(ht.max,dt.max),ht.expandByPoint(ft)):(ht.expandByPoint(dt.min),ht.expandByPoint(dt.max))}ht.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)ft.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(ft));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)ft.fromBufferAttribute(o,t),a&&(ut.fromBufferAttribute(e,t),ft.add(ut)),r=Math.max(r,n.distanceToSquared(ft))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new nt(new Float32Array(4*a),4));const s=t.tangent.array,l=[],c=[];for(let b=0;b<a;b++)l[b]=new R,c[b]=new R;const u=new R,h=new R,d=new R,f=new b,p=new b,m=new b,g=new R,v=new R;function y(e,t,n){u.fromArray(r,3*e),h.fromArray(r,3*t),d.fromArray(r,3*n),f.fromArray(o,2*e),p.fromArray(o,2*t),m.fromArray(o,2*n),h.sub(u),d.sub(u),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(d,-p.y).multiplyScalar(i),v.copy(d).multiplyScalar(p.x).addScaledVector(h,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)y(n[r+0],n[r+1],n[r+2])}const x=new R,_=new R,E=new R,A=new R;function S(e){E.fromArray(i,3*e),A.copy(E);const t=l[e];x.copy(t),x.sub(E.multiplyScalar(E.dot(t))).normalize(),_.crossVectors(A,t);const n=_.dot(c[e])<0?-1:1;s[4*e]=x.x,s[4*e+1]=x.y,s[4*e+2]=x.z,s[4*e+3]=n}for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)S(n[r+0]),S(n[r+1]),S(n[r+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new nt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new R,i=new R,o=new R,a=new R,s=new R,l=new R,c=new R,u=new R;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),f=e.getX(h+1),p=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,f),o.fromBufferAttribute(t,p),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),a.fromBufferAttribute(n,d),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),a.add(c),s.add(c),l.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,h=t.count;e<h;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s);for(let e=0,t=s;e<l;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ft.fromBufferAttribute(e,t),ft.normalize(),e.setXYZ(t,ft.x,ft.y,ft.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let l=0,c=t.length;l<c;l++){a=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new nt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new pt,n=this.index.array,r=this.attributes;for(const a in r){const i=e(r[a],n);t.setAttribute(a,i)}const i=this.morphAttributes;for(const a in i){const r=[],o=i[a];for(let t=0,i=o.length;t<i;t++){const i=e(o[t],n);r.push(i)}t.morphAttributes[a]=r}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,s=o.length;a<s;a++){const e=o[a];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const s in n){const t=n[s];e.data.attributes[s]=t.toJSON(e.data)}const r={};let i=!1;for(const s in this.morphAttributes){const t=this.morphAttributes[s],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[s]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new pt).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let l=0,c=o.length;l<c;l++){const e=o[l];this.addGroup(e.start,e.count,e.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}pt.prototype.isBufferGeometry=!0;const mt=new se,gt=new ae,vt=new J,yt=new R,bt=new R,wt=new R,xt=new R,_t=new R,Et=new R,At=new R,St=new R,Mt=new R,Tt=new b,Ct=new b,Ot=new b,Rt=new R,kt=new R;class Pt extends Pe{constructor(e=new pt,t=new $e){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),vt.copy(n.boundingSphere),vt.applyMatrix4(i),!1===e.ray.intersectsSphere(vt))return;if(mt.copy(i).invert(),gt.copy(e.ray).applyMatrix4(mt),null!==n.boundingBox&&!1===gt.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,h=n.groups,d=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const f=h[n],p=r[f.materialIndex];for(let n=Math.max(f.start,d.start),r=Math.min(f.start+f.count,d.start+d.count);n<r;n+=3){const r=i.getX(n),h=i.getX(n+1),d=i.getX(n+2);o=Lt(this,p,e,gt,a,s,l,c,u,r,h,d),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=f.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),h=Math.min(i.count,d.start+d.count);n<h;n+=3){const h=i.getX(n),d=i.getX(n+1),f=i.getX(n+2);o=Lt(this,r,e,gt,a,s,l,c,u,h,d,f),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const i=h[n],f=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(i.start+i.count,d.start+d.count);n<r;n+=3){o=Lt(this,f,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),i=Math.min(a.count,d.start+d.count);n<i;n+=3){o=Lt(this,r,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Lt(e,t,n,r,i,o,s,l,c,u,h,d){yt.fromBufferAttribute(i,u),bt.fromBufferAttribute(i,h),wt.fromBufferAttribute(i,d);const f=e.morphTargetInfluences;if(t.morphTargets&&o&&f){At.set(0,0,0),St.set(0,0,0),Mt.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=f[e],n=o[e];0!==t&&(xt.fromBufferAttribute(n,u),_t.fromBufferAttribute(n,h),Et.fromBufferAttribute(n,d),s?(At.addScaledVector(xt,t),St.addScaledVector(_t,t),Mt.addScaledVector(Et,t)):(At.addScaledVector(xt.sub(yt),t),St.addScaledVector(_t.sub(bt),t),Mt.addScaledVector(Et.sub(wt),t)))}yt.add(At),bt.add(St),wt.add(Mt)}e.isSkinnedMesh&&(e.boneTransform(u,yt),e.boneTransform(h,bt),e.boneTransform(d,wt));const p=function(e,t,n,r,i,o,s,l){let c;if(c=t.side===a?r.intersectTriangle(s,o,i,!0,l):r.intersectTriangle(i,o,s,2!==t.side,l),null===c)return null;kt.copy(l),kt.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(kt);return u<n.near||u>n.far?null:{distance:u,point:kt.clone(),object:e}}(e,t,n,r,yt,bt,wt,Rt);if(p){l&&(Tt.fromBufferAttribute(l,u),Ct.fromBufferAttribute(l,h),Ot.fromBufferAttribute(l,d),p.uv=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b)),c&&(Tt.fromBufferAttribute(c,u),Ct.fromBufferAttribute(c,h),Ot.fromBufferAttribute(c,d),p.uv2=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b));const e={a:u,b:h,c:d,normal:new R,materialIndex:0};Ve.getNormal(yt,bt,wt,e.normal),p.face=e}return p}Pt.prototype.isMesh=!0;class Dt extends pt{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],l=[],c=[],u=[];let h=0,d=0;function f(e,t,n,r,i,o,f,p,m,g,v){const y=o/m,b=f/g,w=o/2,x=f/2,_=p/2,E=m+1,A=g+1;let S=0,M=0;const T=new R;for(let a=0;a<A;a++){const o=a*b-x;for(let s=0;s<E;s++){const h=s*y-w;T[e]=h*r,T[t]=o*i,T[n]=_,l.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=p>0?1:-1,c.push(T.x,T.y,T.z),u.push(s/m),u.push(1-a/g),S+=1}}for(let a=0;a<g;a++)for(let e=0;e<m;e++){const t=h+e+E*a,n=h+e+E*(a+1),r=h+(e+1)+E*(a+1),i=h+(e+1)+E*a;s.push(t,n,i),s.push(n,r,i),M+=6}a.addGroup(d,M,v),d+=M,h+=S}f("z","y","x",-1,-1,n,t,e,o,i,0),f("z","y","x",1,-1,n,t,-e,o,i,1),f("x","z","y",1,1,e,n,t,r,o,2),f("x","z","y",1,-1,e,n,-t,r,o,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new ot(l,3)),this.setAttribute("normal",new ot(c,3)),this.setAttribute("uv",new ot(u,2))}static fromJSON(e){return new Dt(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function It(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function Nt(e){const t={};for(let n=0;n<e.length;n++){const r=It(e[n]);for(const e in r)t[e]=r[e]}return t}const jt={clone:It,merge:Nt};class Bt extends We{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=It(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}Bt.prototype.isShaderMaterial=!0;class Ft extends Pe{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new se,this.projectionMatrix=new se,this.projectionMatrixInverse=new se}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Ft.prototype.isCamera=!0;class zt extends Ft{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*d*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*h*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*d*Math.atan(Math.tan(.5*h*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*h*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}zt.prototype.isPerspectiveCamera=!0;class Ht extends Pe{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new zt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new R(1,0,0)),this.add(r);const i=new zt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new R(-1,0,0)),this.add(i);const o=new zt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new R(0,1,0)),this.add(o);const a=new zt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new R(0,-1,0)),this.add(a);const s=new zt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new R(0,0,1)),this.add(s);const l=new zt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new R(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,l]=this.children,c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}class Ut extends A{constructor(e,t,n,r,i,o,a,s,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:301,n,r,i,o,a=void 0!==a?a:1022,s,l,c),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Ut.prototype.isCubeTexture=!0;class Vt extends T{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new Ut(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:s,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=l,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Dt(5,5,5),i=new Bt({name:"CubemapFromEquirect",uniforms:It(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:a,blending:0});i.uniforms.tEquirect.value=t;const o=new Pt(r,i),c=t.minFilter;1008===t.minFilter&&(t.minFilter=s);return new Ht(1,10,this).update(e,o),t.minFilter=c,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)}}Vt.prototype.isWebGLCubeRenderTarget=!0;const Gt=new R,Wt=new R,qt=new w;class Xt{constructor(e=new R(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Gt.subVectors(n,t).cross(Wt.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Gt),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||qt.getNormalMatrix(e),r=this.coplanarPoint(Gt).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}Xt.prototype.isPlane=!0;const Yt=new J,Kt=new R;class Qt{constructor(e=new Xt,t=new Xt,n=new Xt,r=new Xt,i=new Xt,o=new Xt){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Yt.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSprite(e){return Yt.center.set(0,0,0),Yt.radius=.7071067811865476,Yt.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Kt.x=r.normal.x>0?e.max.x:e.min.x,Kt.y=r.normal.y>0?e.max.y:e.min.y,Kt.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Kt)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Zt(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Jt(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:(i instanceof Uint8Array||i instanceof Uint8ClampedArray)&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class $t extends pt{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),l=a+1,c=s+1,u=e/a,h=t/s,d=[],f=[],p=[],m=[];for(let g=0;g<c;g++){const e=g*h-o;for(let t=0;t<l;t++){const n=t*u-i;f.push(n,-e,0),p.push(0,0,1),m.push(t/a),m.push(1-g/s)}}for(let g=0;g<s;g++)for(let e=0;e<a;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;d.push(t,n,i),d.push(n,r,i)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new $t(e.width,e.height,e.widthSegments,e.heightSegments)}}const en={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},tn={common:{diffuse:{value:new Je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new w},uv2Transform:{value:new w},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new b(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}},sprite:{diffuse:{value:new Je(16777215)},opacity:{value:1},center:{value:new b(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}}},nn={basic:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.fog]),vertexShader:en.meshbasic_vert,fragmentShader:en.meshbasic_frag},lambert:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshlambert_vert,fragmentShader:en.meshlambert_frag},phong:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},specular:{value:new Je(1118481)},shininess:{value:30}}]),vertexShader:en.meshphong_vert,fragmentShader:en.meshphong_frag},standard:{uniforms:Nt([tn.common,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.roughnessmap,tn.metalnessmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag},toon:{uniforms:Nt([tn.common,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.gradientmap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshtoon_vert,fragmentShader:en.meshtoon_frag},matcap:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,{matcap:{value:null}}]),vertexShader:en.meshmatcap_vert,fragmentShader:en.meshmatcap_frag},points:{uniforms:Nt([tn.points,tn.fog]),vertexShader:en.points_vert,fragmentShader:en.points_frag},dashed:{uniforms:Nt([tn.common,tn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:en.linedashed_vert,fragmentShader:en.linedashed_frag},depth:{uniforms:Nt([tn.common,tn.displacementmap]),vertexShader:en.depth_vert,fragmentShader:en.depth_frag},normal:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,{opacity:{value:1}}]),vertexShader:en.normal_vert,fragmentShader:en.normal_frag},sprite:{uniforms:Nt([tn.sprite,tn.fog]),vertexShader:en.sprite_vert,fragmentShader:en.sprite_frag},background:{uniforms:{uvTransform:{value:new w},t2D:{value:null}},vertexShader:en.background_vert,fragmentShader:en.background_frag},cube:{uniforms:Nt([tn.envmap,{opacity:{value:1}}]),vertexShader:en.cube_vert,fragmentShader:en.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:en.equirect_vert,fragmentShader:en.equirect_frag},distanceRGBA:{uniforms:Nt([tn.common,tn.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:en.distanceRGBA_vert,fragmentShader:en.distanceRGBA_frag},shadow:{uniforms:Nt([tn.lights,tn.fog,{color:{value:new Je(0)},opacity:{value:1}}]),vertexShader:en.shadow_vert,fragmentShader:en.shadow_frag}};function rn(e,t,n,r,i){const o=new Je(0);let s,l,c=0,u=null,h=0,d=null;function f(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),c=t,f(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,f(o,c)},render:function(n,i){let p=!1,m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));const g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?f(o,c):m&&m.isColor&&(f(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||306===m.mapping)?(void 0===l&&(l=new Pt(new Dt(1,1,1),new Bt({name:"BackgroundCubeMaterial",uniforms:It(nn.cube.uniforms),vertexShader:nn.cube.vertexShader,fragmentShader:nn.cube.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,u===m&&h===m.version&&d===e.toneMapping||(l.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===s&&(s=new Pt(new $t(2,2),new Bt({name:"BackgroundMaterial",uniforms:It(nn.background.uniforms),vertexShader:nn.background.vertexShader,fragmentShader:nn.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(s)),s.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),s.material.uniforms.uvTransform.value.copy(m.matrix),u===m&&h===m.version&&d===e.toneMapping||(s.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function on(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null);let c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){const t=[],n=[],r=[];for(let o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){const o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&(c=l,u(c.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){let w=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let l=s[t.id];void 0===l&&(l={},s[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[a];void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u);return u}(y,h,l);c!==t&&(c=t,u(c.object)),w=function(e,t){const n=c.attributes,r=e.attributes;let i=0;for(const o in r){const e=n[o],t=r[o];if(void 0===e)return!0;if(e.attribute!==t)return!0;if(e.data!==t.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b),w&&function(e,t){const n={},r=e.attributes;let i=0;for(const o in r){const e=r[o],t={};t.attribute=e,e.data&&(t.data=e.data),n[o]=t,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===e||(c.geometry=y.id,c.program=h.id,c.wireframe=e,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(!function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r>=0){const o=l[t];if(void 0!==o){const t=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const l=a.buffer,c=a.type,u=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,h=o.offset;n&&n.isInstancedInterleavedBuffer?(m(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,a*u,h*u)}else o.isInstancedBufferAttribute?(m(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,0,0)}else if("instanceMatrix"===t){const t=n.get(i.instanceMatrix);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r+0,1),m(r+1,1),m(r+2,1),m(r+3,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r+0,4,a,!1,64,0),e.vertexAttribPointer(r+1,4,a,!1,64,16),e.vertexAttribPointer(r+2,4,a,!1,64,32),e.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===t){const t=n.get(i.instanceColor);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r,n);break;case 3:e.vertexAttrib3fv(r,n);break;case 4:e.vertexAttrib4fv(r,n);break;default:e.vertexAttrib1fv(r,n)}}}}g()}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){y();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const n in t){const e=t[n];for(const t in e)h(e[t].object),delete e[t];delete t[n]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function an(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,a,s),n.update(a,o,s)}}function sn(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),h=e.getParameter(35660),d=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=h>0,b=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:o?e.getParameter(36183):0}}function ln(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new Xt,s=new w,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let n=0,l=r;n!==o;++n,l+=4)a.copy(e[n]).applyMatrix4(i,s),a.normal.toArray(c,l),c[l+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){const h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{const e=o?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=u(h,a,t,s);for(let r=0;r!==t;++r)i[r]=n[r];p.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function cn(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(303===o||304===o){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=e.getRenderTarget(),s=new Vt(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}function un(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function hn(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const n in s.attributes)t.remove(s.attributes[n]);s.removeEventListener("dispose",a),delete i[s.id];const l=o.get(s);l&&(t.remove(l),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(at(n)>65535?it:rt)(n,1);s.version=a;const l=o.get(e);l&&t.remove(l),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const i in n)t.update(n[i],34962);const r=e.morphAttributes;for(const i in r){const e=r[i];for(let n=0,r=e.length;n<r;n++)t.update(e[n],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function dn(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,h;if(i)u=e,h="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](o,l,a,r*s,c),n.update(l,o,c)}}function fn(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function pn(e,t){return e[0]-t[0]}function mn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function gn(e){const t={},n=new Float32Array(8),r=[];for(let i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){const l=i.morphTargetInfluences,c=void 0===l?0:l.length;let u=t[o.id];if(void 0===u||u.length!==c){u=[];for(let e=0;e<c;e++)u[e]=[e,0];t[o.id]=u}for(let e=0;e<c;e++){const t=u[e];t[0]=e,t[1]=l[e]}u.sort(mn);for(let e=0;e<8;e++)e<c&&u[e][1]?(r[e][0]=u[e][0],r[e][1]=u[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(pn);const h=a.morphTargets&&o.morphAttributes.position,d=a.morphNormals&&o.morphAttributes.normal;let f=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],a=t[1];i!==Number.MAX_SAFE_INTEGER&&a?(h&&o.getAttribute("morphTarget"+e)!==h[i]&&o.setAttribute("morphTarget"+e,h[i]),d&&o.getAttribute("morphNormal"+e)!==d[i]&&o.setAttribute("morphNormal"+e,d[i]),n[e]=a,f+=a):(h&&!0===o.hasAttribute("morphTarget"+e)&&o.deleteAttribute("morphTarget"+e),d&&!0===o.hasAttribute("morphNormal"+e)&&o.deleteAttribute("morphNormal"+e),n[e]=0)}const p=o.morphTargetsRelative?1:1-f;s.getUniforms().setValue(e,"morphTargetBaseInfluence",p),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function vn(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}nn.physical={uniforms:Nt([nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new b(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Je(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new b},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Je(0)}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag};class yn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}yn.prototype.isDataTexture2DArray=!0;class bn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}bn.prototype.isDataTexture3D=!0;const wn=new A,xn=new yn,_n=new bn,En=new Ut,An=[],Sn=[],Mn=new Float32Array(16),Tn=new Float32Array(9),Cn=new Float32Array(4);function On(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=An[i];if(void 0===o&&(o=new Float32Array(i),An[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function Rn(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function kn(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function Pn(e,t){let n=Sn[t];void 0===n&&(n=new Int32Array(t),Sn[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Ln(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Dn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Rn(n,t))return;e.uniform2fv(this.addr,t),kn(n,t)}}function In(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Rn(n,t))return;e.uniform3fv(this.addr,t),kn(n,t)}}function Nn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Rn(n,t))return;e.uniform4fv(this.addr,t),kn(n,t)}}function jn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Cn.set(r),e.uniformMatrix2fv(this.addr,!1,Cn),kn(n,r)}}function Bn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Tn.set(r),e.uniformMatrix3fv(this.addr,!1,Tn),kn(n,r)}}function Fn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Mn.set(r),e.uniformMatrix4fv(this.addr,!1,Mn),kn(n,r)}}function zn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Hn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2iv(this.addr,t),kn(n,t))}function Un(e,t){const n=this.cache;Rn(n,t)||(e.uniform3iv(this.addr,t),kn(n,t))}function Vn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4iv(this.addr,t),kn(n,t))}function Gn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Wn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2uiv(this.addr,t),kn(n,t))}function qn(e,t){const n=this.cache;Rn(n,t)||(e.uniform3uiv(this.addr,t),kn(n,t))}function Xn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4uiv(this.addr,t),kn(n,t))}function Yn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||wn,i)}function Kn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||_n,i)}function Qn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||En,i)}function Zn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||xn,i)}function Jn(e,t){e.uniform1fv(this.addr,t)}function $n(e,t){const n=On(t,this.size,2);e.uniform2fv(this.addr,n)}function er(e,t){const n=On(t,this.size,3);e.uniform3fv(this.addr,n)}function tr(e,t){const n=On(t,this.size,4);e.uniform4fv(this.addr,n)}function nr(e,t){const n=On(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function rr(e,t){const n=On(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ir(e,t){const n=On(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function or(e,t){e.uniform1iv(this.addr,t)}function ar(e,t){e.uniform2iv(this.addr,t)}function sr(e,t){e.uniform3iv(this.addr,t)}function lr(e,t){e.uniform4iv(this.addr,t)}function cr(e,t){e.uniform1uiv(this.addr,t)}function ur(e,t){e.uniform2uiv(this.addr,t)}function hr(e,t){e.uniform3uiv(this.addr,t)}function dr(e,t){e.uniform4uiv(this.addr,t)}function fr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTexture2D(t[o]||wn,i[o])}function pr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTextureCube(t[o]||En,i[o])}function mr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Ln;case 35664:return Dn;case 35665:return In;case 35666:return Nn;case 35674:return jn;case 35675:return Bn;case 35676:return Fn;case 5124:case 35670:return zn;case 35667:case 35671:return Hn;case 35668:case 35672:return Un;case 35669:case 35673:return Vn;case 5125:return Gn;case 36294:return Wn;case 36295:return qn;case 36296:return Xn;case 35678:case 36198:case 36298:case 36306:case 35682:return Yn;case 35679:case 36299:case 36307:return Kn;case 35680:case 36300:case 36308:case 36293:return Qn;case 36289:case 36303:case 36311:case 36292:return Zn}}(t.type)}function gr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Jn;case 35664:return $n;case 35665:return er;case 35666:return tr;case 35674:return nr;case 35675:return rr;case 35676:return ir;case 5124:case 35670:return or;case 35667:case 35671:return ar;case 35668:case 35672:return sr;case 35669:case 35673:return lr;case 5125:return cr;case 36294:return ur;case 36295:return hr;case 36296:return dr;case 35678:case 36198:case 36298:case 36306:case 35682:return fr;case 35680:case 36300:case 36308:case 36293:return pr}}(t.type)}function vr(e){this.id=e,this.seq=[],this.map={}}gr.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),kn(t,e)},vr.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const yr=/(\w+)(\])?(\[|\.)?/g;function br(e,t){e.seq.push(t),e.map[t.id]=t}function wr(e,t,n){const r=e.name,i=r.length;for(yr.lastIndex=0;;){const o=yr.exec(r),a=yr.lastIndex;let s=o[1];const l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){br(n,void 0===c?new mr(s,e,t):new gr(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new vr(s),br(n,e)),n=e}}}function xr(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);wr(n,e.getUniformLocation(t,n.name),this)}}function _r(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}xr.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},xr.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},xr.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},xr.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let Er=0;function Ar(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Sr(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";return"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){const t=e.split("\n");for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Mr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Tr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Cr(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Or(e){return""!==e}function Rr(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function kr(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Pr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lr(e){return e.replace(Pr,Dr)}function Dr(e,t){const n=en[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Lr(n)}const Ir=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Nr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jr(e){return e.replace(Nr,Fr).replace(Ir,Br)}function Br(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Fr(e,t,n,r)}function Fr(e,t,n,r){let i="";for(let o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function zr(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Hr(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),h=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),d=e.gammaFactor>0?e.gammaFactor:1,f=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission>0)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Or).join("\n")}(n),p=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[p].filter(Or).join("\n"),g.length>0&&(g+="\n"),v=[f,p].filter(Or).join("\n"),v.length>0&&(v+="\n")):(g=[zr(n),"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Or).join("\n"),v=[f,zr(n),"#define SHADER_NAME "+n.shaderName,p,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?en.tonemapping_pars_fragment:"",0!==n.toneMapping?Cr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",en.encodings_pars_fragment,n.map?Mr("mapTexelToLinear",n.mapEncoding):"",n.matcap?Mr("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Mr("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Mr("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Mr("lightMapTexelToLinear",n.lightMapEncoding):"",Tr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Or).join("\n")),a=Lr(a),a=Rr(a,n),a=kr(a,n),s=Lr(s),s=Rr(s,n),s=kr(s,n),a=jr(a),s=jr(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const b=y+v+s,w=_r(i,35633,y+g+a),x=_r(i,35632,b);if(i.attachShader(m,w),i.attachShader(m,x),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(m).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(x).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(m,35714)){r=!1;const t=Sr(i,w,"vertex"),n=Sr(i,x,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(m,35715),"gl.getProgramInfoLog",e,t,n)}else""!==e?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:g},fragmentShader:{log:n,prefix:v}})}let _,E;return i.deleteShader(w),i.deleteShader(x),this.getUniforms=function(){return void 0===_&&(_=new xr(i,m)),_},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i).name;n[r]=e.getAttribLocation(t,r)}return n}(i,m)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=Er++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=w,this.fragmentShader=x,this}function Ur(e,t,n,r,i,o){const s=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,h=r.maxVertexUniforms,d=r.vertexTextures;let f=r.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmission","transmissionMap","thicknessMap"];function g(e){let t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,s,m,v,y){const b=v.fog,w=i.isMeshStandardMaterial?v.environment:null,x=t.get(i.envMap||w),_=p[i.type],E=y.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(u)return 1024;{const e=h,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(y):0;let A,S;if(null!==i.precision&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead.")),_){const e=nn[_];A=e.vertexShader,S=e.fragmentShader}else A=i.vertexShader,S=i.fragmentShader;const M=e.getRenderTarget();return{isWebGL2:l,shaderID:_,shaderName:i.type,vertexShader:A,fragmentShader:S,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:f,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:d,outputEncoding:null!==M?g(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:g(i.map),matcap:!!i.matcap,matcapEncoding:g(i.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:g(x),envMapCubeUV:!!x&&(306===x.mapping||307===x.mapping),lightMap:!!i.lightMap,lightMapEncoding:g(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:g(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmission:!!i.transmission,transmissionMap:!!i.transmissionMap,thicknessMap:!!i.thicknessMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&y.geometry&&y.geometry.attributes.color&&4===y.geometry.attributes.color.itemSize,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap||!!i.thicknessMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmission||i.transmissionMap||i.thicknessMap)&&!!i.displacementMap,fog:!!b,useFog:i.fog,fogExp2:b&&b.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===y.isSkinnedMesh&&E>0,maxBones:E,useVertexTexture:u,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&m.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:i.side===a,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e<m.length;e++)n.push(t[m[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=nn[t];n=jt.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=s.length;e<i;e++){const t=s[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Hr(e,n,t,i),s.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){const t=s.indexOf(e);s[t]=s[s.length-1],s.pop(),e.destroy()}},programs:s}}function Vr(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Gr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Wr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function qr(e){const t=[];let n=0;const r=[],i=[],o=[],a={id:-1};function s(r,i,o,s,l,c){let u=t[n];const h=e.get(o);return void 0===u?(u={id:r.id,object:r,geometry:i,material:o,program:h.program||a,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=o,u.program=h.program||a,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transmissive:i,transparent:o,init:function(){n=0,r.length=0,i.length=0,o.length=0},push:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.push(u):!0===n.transparent?o.push(u):r.push(u)},unshift:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.unshift(u):!0===n.transparent?o.unshift(u):r.unshift(u)},finish:function(){for(let e=n,r=t.length;e<r;e++){const n=t[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Gr),i.length>1&&i.sort(t||Wr),o.length>1&&o.sort(t||Wr)}}}function Xr(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new qr(e),t.set(n,[i])):r>=t.get(n).length?(i=new qr(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function Yr(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new R,color:new Je};break;case"SpotLight":n={position:new R,direction:new R,color:new Je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new R,color:new Je,distance:0,decay:0};break;case"HemisphereLight":n={direction:new R,skyColor:new Je,groundColor:new Je};break;case"RectAreaLight":n={color:new Je,position:new R,halfWidth:new R,halfHeight:new R}}return e[t.id]=n,n}}}let Kr=0;function Qr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Zr(e,t){const n=new Yr,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let l=0;l<9;l++)i.probe.push(new R);const o=new R,a=new se,s=new se;return{setup:function(o){let a=0,s=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0;o.sort(Qr);for(let e=0,t=o.length;e<t;e++){const t=o[e],v=t.color,y=t.intensity,b=t.distance,w=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=v.r*y,s+=v.g*y,l+=v.b*y;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=w,i.directionalShadowMatrix[c]=t.shadow.matrix,p++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(v).multiplyScalar(y),e.distance=b,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=w,i.spotShadowMatrix[h]=t.shadow.matrix,g++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(v).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[d]=e,d++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=w,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y),e.groundColor.copy(t.groundColor).multiplyScalar(y),i.hemi[f]=e,f++}}d>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=tn.LTC_FLOAT_1,i.rectAreaLTC2=tn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=tn.LTC_HALF_1,i.rectAreaLTC2=tn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;const v=i.hash;v.directionalLength===c&&v.pointLength===u&&v.spotLength===h&&v.rectAreaLength===d&&v.hemiLength===f&&v.numDirectionalShadows===p&&v.numPointShadows===m&&v.numSpotShadows===g||(i.directional.length=c,i.spot.length=h,i.rectArea.length=d,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,v.directionalLength=c,v.pointLength=u,v.spotLength=h,v.rectAreaLength=d,v.hemiLength=f,v.numDirectionalShadows=p,v.numPointShadows=m,v.numSpotShadows=g,i.version=Kr++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const h=t.matrixWorldInverse;for(let d=0,f=e.length;d<f;d++){const t=e[d];if(t.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),n++}else if(t.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),l++}else if(t.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),s.identity(),a.copy(t.matrixWorld),a.premultiply(h),s.extractRotation(a),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(t.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),r++}else if(t.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(t.matrixWorld),e.direction.transformDirection(h),e.direction.normalize(),u++}}},state:i}}function Jr(e,t){const n=new Zr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function $r(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Jr(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new Jr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class ei extends We{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}ei.prototype.isMeshDepthMaterial=!0;class ti extends We{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}ti.prototype.isMeshDistanceMaterial=!0;function ni(e,t,n){let r=new Qt;const i=new b,o=new b,c=new M,u=[],h=[],d={},f=n.maxTextureSize,p={0:a,1:0,2:2},m=new Bt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new b},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const v=new pt;v.setAttribute("position",new nt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pt(v,m),w=this;function x(n,r){const i=t.update(y);m.uniforms.shadow_pass.value=n.map.texture,m.uniforms.resolution.value=n.mapSize,m.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,m,y,null),g.uniforms.shadow_pass.value=n.mapPass.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,g,y,null)}function _(e){const t=e<<0;let n=u[t];return void 0===n&&(n=new ei({depthPacking:3201,morphTargets:e}),u[t]=n),n}function E(e){const t=e<<0;let n=h[t];return void 0===n&&(n=new ti({morphTargets:e}),h[t]=n),n}function A(t,n,r,i,o,a,s){let l=null,c=_,u=t.customDepthMaterial;if(!0===i.isPointLight&&(c=E,u=t.customDistanceMaterial),void 0===u){let e=!1;!0===r.morphTargets&&(e=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0),l=c(e)}else l=u;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const e=l.uuid,t=r.uuid;let n=d[e];void 0===n&&(n={},d[e]=n);let i=n[t];void 0===i&&(i=l.clone(),n[t]=i),l=i}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:p[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function S(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=A(n,r,u,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=A(n,r,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)S(l[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,a){if(!1===w.enabled)return;if(!1===w.autoUpdate&&!1===w.needsUpdate)return;if(0===t.length)return;const u=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.state;p.setBlending(0),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(let m=0,g=t.length;m<g;m++){const u=t[m],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const d=h.getFrameExtents();if(i.multiply(d),o.copy(h.mapSize),(i.x>f||i.y>f)&&(i.x>f&&(o.x=Math.floor(f/d.x),i.x=o.x*d.x,h.mapSize.x=o.x),i.y>f&&(o.y=Math.floor(f/d.y),i.y=o.y*d.y,h.mapSize.y=o.y)),null===h.map&&!h.isPointLightShadow&&3===this.type){const e={minFilter:s,magFilter:s,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.mapPass=new T(i.x,i.y,e),h.camera.updateProjectionMatrix()}if(null===h.map){const e={minFilter:1003,magFilter:1003,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const g=h.getViewportCount();for(let e=0;e<g;e++){const t=h.getViewport(e);c.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),p.viewport(c),h.updateMatrices(u,e),r=h.getFrustum(),S(n,a,h.camera,u,this.type)}h.isPointLightShadow||3!==this.type||x(h,a),h.needsUpdate=!1}w.needsUpdate=!1,e.setRenderTarget(u,h,d)}}function ri(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new M;let r=null;const i=new M(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?F(2929):z(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},s=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?F(2960):z(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}};let l={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null;const T=e.getParameter(35661);let C=!1,O=0;const R=e.getParameter(7938);-1!==R.indexOf("WebGL")?(O=parseFloat(/^WebGL (\d)/.exec(R)[1]),C=O>=1):-1!==R.indexOf("OpenGL ES")&&(O=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),C=O>=2);let k=null,P={};const L=e.getParameter(3088),D=e.getParameter(2978),I=(new M).fromArray(L),N=(new M).fromArray(D);function j(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}const B={};function F(t){!0!==l[t]&&(e.enable(t),l[t]=!0)}function z(t){!1!==l[t]&&(e.disable(t),l[t]=!1)}B[3553]=j(3553,3553,1),B[34067]=j(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),F(2929),o.setFunc(3),G(!1),W(1),F(2884),V(0);const H={100:32774,101:32778,102:32779};if(r)H[103]=32775,H[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(H[103]=e.MIN_EXT,H[104]=e.MAX_EXT)}const U={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function V(t,n,r,i,o,a,s,l){if(0!==t){if(!1===d&&(F(3042),d=!0),5===t)o=o||n,a=a||r,s=s||i,n===p&&o===v||(e.blendEquationSeparate(H[n],H[o]),p=n,v=o),r===m&&i===g&&a===y&&s===b||(e.blendFuncSeparate(U[r],U[i],U[a],U[s]),m=r,g=i,y=a,b=s),f=t,w=null;else if(t!==f||l!==w){if(100===p&&100===v||(e.blendEquation(32774),p=100,v=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}m=null,g=null,y=null,b=null,f=t,w=l}}else!0===d&&(z(3042),d=!1)}function G(t){x!==t&&(t?e.frontFace(2304):e.frontFace(2305),x=t)}function W(t){0!==t?(F(2884),t!==_&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):z(2884),_=t}function q(t,n,r){t?(F(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):z(32823)}function X(t){void 0===t&&(t=33984+T-1),k!==t&&(e.activeTexture(t),k=t)}return{buffers:{color:i,depth:o,stencil:s},enable:F,disable:z,bindFramebuffer:function(t,n){return null===n&&null!==c&&(n=c),u[t]!==n&&(e.bindFramebuffer(t,n),u[t]=n,r&&(36009===t&&(u[36160]=n),36160===t&&(u[36009]=n)),!0)},bindXRFramebuffer:function(t){t!==c&&(e.bindFramebuffer(36160,t),c=t)},useProgram:function(t){return h!==t&&(e.useProgram(t),h=t,!0)},setBlending:V,setMaterial:function(e,t){2===e.side?z(2884):F(2884);let n=e.side===a;t&&(n=!n),G(n),1===e.blending&&!1===e.transparent?V(0):V(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;s.setTest(r),r&&(s.setMask(e.stencilWriteMask),s.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),s.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?F(32926):z(32926)},setFlipSided:G,setCullFace:W,setLineWidth:function(t){t!==E&&(C&&e.lineWidth(t),E=t)},setPolygonOffset:q,setScissorTest:function(e){e?F(3089):z(3089)},activeTexture:X,bindTexture:function(t,n){null===k&&X();let r=P[k];void 0===r&&(r={type:void 0,texture:void 0},P[k]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||B[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=P[k];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===I.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),I.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),l={},k=null,P={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null,I.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),s.reset()}}}function ii(e,t,n,r,i,o,a){const c=i.isWebGL2,u=i.maxTextures,h=i.maxCubemapSize,d=i.maxTextureSize,f=i.maxSamples,p=new WeakMap;let m,g=!1;try{g="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(U){}function b(e,t){return g?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function w(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?y:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===m&&(m=b(o,a));const s=n?b(o,a):m;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return v(e.width)&&v(e.height)}function _(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&e.minFilter!==s}function E(t,n,i,o,a=1){e.generateMipmap(t);r.get(n).__maxMipLevel=Math.log2(Math.max(i,o,a))}function A(n,r,i){if(!1===c)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function S(e){return 1003===e||1004===e||1005===e?9728:9729}function M(t){const n=t.target;n.removeEventListener("dispose",M),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&p.delete(n),a.memory.textures--}function T(t){const n=t.target;n.removeEventListener("dispose",T),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(!t)return;void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let s=0,l=n.length;s<l;s++){const t=r.get(n[s]);t.__webglTexture&&(e.deleteTexture(t.__webglTexture),a.memory.textures--),r.remove(n[s])}r.remove(n),r.remove(t)}(n)}let C=0;function O(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void I(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function R(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;D(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=a||s?s?r.image[e].image:r.image[e]:w(r.image[e],!1,!0,h);const d=u[0],f=x(d)||c,p=o.convert(r.format),m=o.convert(r.type),g=A(r.internalFormat,p,m);let v;if(L(34067,r,f),a){for(let e=0;e<6;e++){v=u[e].mipmaps;for(let t=0;t<v.length;t++){const i=v[t];r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(34069+e,t,g,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+e,t,g,i.width,i.height,0,p,m,i.data)}}t.__maxMipLevel=v.length-1}else{v=r.mipmaps;for(let e=0;e<6;e++)if(s){n.texImage2D(34069+e,0,g,u[e].width,u[e].height,0,p,m,u[e].data);for(let t=0;t<v.length;t++){const r=v[t].image[e].image;n.texImage2D(34069+e,t+1,g,r.width,r.height,0,p,m,r.data)}}else{n.texImage2D(34069+e,0,g,p,m,u[e]);for(let t=0;t<v.length;t++){const r=v[t];n.texImage2D(34069+e,t+1,g,p,m,r.image[e])}}t.__maxMipLevel=v.length}_(r,f)&&E(34067,r,d.width,d.height);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const k={1e3:10497,1001:33071,1002:33648},P={1003:9728,1004:9984,1005:9986,[s]:9729,1007:9985,1008:9987};function L(n,o,a){if(a?(e.texParameteri(n,10242,k[o.wrapS]),e.texParameteri(n,10243,k[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,k[o.wrapR]),e.texParameteri(n,10240,P[o.magFilter]),e.texParameteri(n,10241,P[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,S(o.magFilter)),e.texParameteri(n,10241,S(o.minFilter)),1003!==o.minFilter&&o.minFilter!==s&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(1015===o.type&&!1===t.has("OES_texture_float_linear"))return;if(!1===c&&1016===o.type&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function D(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),a.memory.textures++)}function I(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),D(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const u=function(e){return!c&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&e.minFilter!==s)}(r)&&!1===x(r.image),h=w(r.image,u,!1,d),f=x(h)||c,p=o.convert(r.format);let m,g=o.convert(r.type),v=A(r.internalFormat,p,g);L(a,r,f);const y=r.mipmaps;if(r.isDepthTexture)v=6402,c?v=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===v&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,g=o.convert(r.type)),1027===r.format&&6402===v&&(v=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,g=o.convert(r.type))),n.texImage2D(3553,0,v,h.width,h.height,0,p,g,null);else if(r.isDataTexture)if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,h.width,h.height,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=y.length;e<t;e++)m=y[e],r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(3553,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);t.__maxMipLevel=y.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,p,g,m);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,p,g,h),t.__maxMipLevel=0;_(r,f)&&E(a,r,h.width,h.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function N(t,i,a,s,l){const c=o.convert(a.format),u=o.convert(a.type),h=A(a.internalFormat,c,u);32879===l||35866===l?n.texImage3D(l,0,h,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,h,i.width,i.height,0,c,u,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,s,l,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function j(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(1015===t.type?i=36012:1014===t.type&&(i=33190));const r=F(n);e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format),a=o.convert(t.type),s=A(t.internalFormat,i,a);if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function B(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),O(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,o,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),j(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),j(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function F(e){return c&&e.isWebGLMultisampleRenderTarget?Math.min(f,e.samples):0}let z=!1,H=!1;this.allocateTextureUnit=function(){const e=C;return e>=u&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+u),C+=1,e},this.resetTextureUnits=function(){C=0},this.setTexture2D=O,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=R,this.setupRenderTarget=function(t){const s=t.texture,u=r.get(t),h=r.get(s);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(h.__webglTexture=e.createTexture(),h.__version=s.version,a.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,f=!0===t.isWebGLMultipleRenderTargets,p=!0===t.isWebGLMultisampleRenderTarget,m=s.isDataTexture3D||s.isDataTexture2DArray,g=x(t)||c;if(!c||1022!==s.format||1015!==s.type&&1016!==s.type||(s.format=l,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),d){u.__webglFramebuffer=[];for(let t=0;t<6;t++)u.__webglFramebuffer[t]=e.createFramebuffer()}else if(u.__webglFramebuffer=e.createFramebuffer(),f)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(p)if(c){u.__webglMultisampledFramebuffer=e.createFramebuffer(),u.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,u.__webglColorRenderbuffer);const r=o.convert(s.format),i=o.convert(s.type),a=A(s.internalFormat,r,i),l=F(t);e.renderbufferStorageMultisample(36161,l,a,t.width,t.height),n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,u.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(u.__webglDepthRenderbuffer=e.createRenderbuffer(),j(u.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(d){n.bindTexture(34067,h.__webglTexture),L(34067,s,g);for(let e=0;e<6;e++)N(u.__webglFramebuffer[e],t,s,36064,34069+e);_(s,g)&&E(34067,s,t.width,t.height),n.bindTexture(34067,null)}else if(f){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),L(3553,o,g),N(u.__webglFramebuffer,t,o,36064+i,3553),_(o,g)&&E(3553,o,t.width,t.height)}n.bindTexture(3553,null)}else{let e=3553;if(m)if(c){e=s.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,h.__webglTexture),L(e,s,g),N(u.__webglFramebuffer,t,s,36064,e),_(s,g)&&E(e,s,t.width,t.height,t.depth),n.bindTexture(e,null)}t.depthBuffer&&B(t)},this.updateRenderTargetMipmap=function(e){const t=x(e)||c,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(_(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),E(t,a,e.width,e.height),n.bindTexture(t,null)}}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(c){const i=t.width,o=t.height;let a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,s.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===H&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),H=!0),e=e.texture),R(e,t)}}function oi(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(1022===e)return 6407;if(e===l)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(n=t.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(n=t.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return n=t.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&(n=t.get("WEBGL_compressed_texture_etc"),null!==n)){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?(n=t.get("WEBGL_compressed_texture_astc"),null!==n?e:null):36492===e?(n=t.get("EXT_texture_compression_bptc"),null!==n?e:null):1020===e?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class ai extends zt{constructor(e=[]){super(),this.cameras=e}}ai.prototype.isArrayCamera=!0;class si extends Pe{constructor(){super(),this.type="Group"}}si.prototype.isGroup=!0;const li={type:"move"};class ci{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new si,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new si,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new si,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(li))),l&&e.hand){o=!0;for(const o of e.hand.values()){const e=t.getJointPose(o,n);if(void 0===l.joints[o.jointName]){const e=new si;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[o.jointName]=e,l.add(e)}const r=l.joints[o.jointName];null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,c=.005;l.inputState.pinching&&a>s+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class ui extends c{constructor(e,t){super();const n=this,r=e.state;let i=null,o=1,a=null,s="local-floor",l=null,c=null,u=null,h=null;const d=[],f=new Map,p=new zt;p.layers.enable(1),p.viewport=new M;const m=new zt;m.layers.enable(2),m.viewport=new M;const g=[p,m],v=new ai;v.layers.enable(1),v.layers.enable(2);let y=null,b=null;function w(e){const t=f.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){f.forEach((function(e,t){e.disconnect(t)})),f.clear(),y=null,b=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),C.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function _(e){const t=i.inputSources;for(let n=0;n<d.length;n++)f.set(t[n],d[n]);for(let n=0;n<e.removed.length;n++){const t=e.removed[n],r=f.get(t);r&&(r.dispatchEvent({type:"disconnected",data:t}),f.delete(t))}for(let n=0;n<e.added.length;n++){const t=e.added[n],r=f.get(t);r&&r.dispatchEvent({type:"connected",data:t})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getGripSpace()},this.getHand=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=async function(e){if(i=e,null!==i){i.addEventListener("select",w),i.addEventListener("selectstart",w),i.addEventListener("selectend",w),i.addEventListener("squeeze",w),i.addEventListener("squeezestart",w),i.addEventListener("squeezeend",w),i.addEventListener("end",x),i.addEventListener("inputsourceschange",_);const e=t.getContextAttributes();if(!0!==e.xrCompatible&&await t.makeXRCompatible(),void 0===i.renderState.layers){const n={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:o},r=new XRWebGLLayer(i,t,n);i.updateRenderState({baseLayer:r})}else{let n=0;e.depth&&(n=e.stencil?34041:6402);const r={colorFormat:e.alpha?6408:6407,depthFormat:n,scaleFactor:o};c=new XRWebGLBinding(i,t),h=c.createProjectionLayer(r),u=t.createFramebuffer(),i.updateRenderState({layers:[h]})}a=await i.requestReferenceSpace(s),C.setContext(i),C.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const E=new R,A=new R;function S(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(i.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);const t=e.parent,n=v.cameras;S(v,t);for(let i=0;i<n.length;i++)S(n[i],t);v.matrixWorld.decompose(v.position,v.quaternion,v.scale),e.position.copy(v.position),e.quaternion.copy(v.quaternion),e.scale.copy(v.scale),e.matrix.copy(v.matrix),e.matrixWorld.copy(v.matrixWorld);const r=e.children;for(let i=0,o=r.length;i<o;i++)r[i].updateMatrixWorld(!0);2===n.length?function(e,t,n){E.setFromMatrixPosition(t.matrixWorld),A.setFromMatrixPosition(n.matrixWorld);const r=E.distanceTo(A),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix)},this.getCamera=function(){return v};let T=null;const C=new Zt;C.setAnimationLoop((function(e,n){if(l=n.getViewerPose(a),null!==l){const e=l.views,n=i.renderState.baseLayer;void 0===i.renderState.layers&&r.bindXRFramebuffer(n.framebuffer);let o=!1;e.length!==v.cameras.length&&(v.cameras.length=0,o=!0);for(let a=0;a<e.length;a++){const s=e[a];let l=null;if(void 0===i.renderState.layers)l=n.getViewport(s);else{const e=c.getViewSubImage(h,s);r.bindXRFramebuffer(u),t.framebufferTexture2D(36160,36064,3553,e.colorTexture,0),void 0!==e.depthStencilTexture&&t.framebufferTexture2D(36160,36096,3553,e.depthStencilTexture,0),l=e.viewport}const d=g[a];d.matrix.fromArray(s.transform.matrix),d.projectionMatrix.fromArray(s.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===a&&v.matrix.copy(d.matrix),!0===o&&v.cameras.push(d)}}const o=i.inputSources;for(let t=0;t<d.length;t++){const e=d[t],r=o[t];e.update(r,n,a)}T&&T(e,n)})),this.setAnimationLoop=function(e){T=e},this.dispose=function(){}}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,o;n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,n.side===a&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),n.side===a&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias);e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,s){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap);t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===a&&e.clearcoatNormalScale.value.negate());e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap);t.transmission>0&&(e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height));e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap);e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)}(e,r,s):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,c=void 0===e.premultipliedAlpha||e.premultipliedAlpha,u=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,h=void 0!==e.powerPreference?e.powerPreference:"default",d=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let f=null,p=null;const m=[],g=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const v=this;let y=!1,b=0,w=0,x=null,_=-1,E=null;const A=new M,S=new M;let O=null,k=t.width,P=t.height,L=1,D=null,I=null;const N=new M(0,0,k,P),j=new M(0,0,k,P);let B=!1;const F=[],z=new Qt;let H=!1,U=!1,V=null;const G=new se,W=new R,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function X(){return null===x?L:1}let Y,K,Q,Z,J,$,ee,te,ne,re,ie,oe,ae,le,ce,ue,he,de,fe,pe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:r,depth:i,stencil:o,antialias:s,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:h,failIfMajorPerformanceCaveat:d};if(t.addEventListener("webglcontextlost",xe,!1),t.addEventListener("webglcontextrestored",_e,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===v.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Le){throw console.error("THREE.WebGLRenderer: "+Le.message),Le}function be(){Y=new un(ve),K=new sn(ve,Y,e),Y.init(K),me=new oi(ve,Y,K),Q=new ri(ve,Y,K),F[0]=1029,Z=new fn(ve),J=new Vr,$=new ii(ve,Y,Q,J,K,me,Z),ee=new cn(v),te=new Jt(ve,K),ge=new on(ve,Y,te,K),ne=new hn(ve,te,Z,ge),re=new vn(ve,ne,te,Z),de=new gn(ve),ce=new ln(J),ie=new Ur(v,ee,Y,K,ge,ce),oe=new hi(J),ae=new Xr(J),le=new $r(Y,K),he=new rn(v,ee,Q,re,c),ue=new ni(v,re,K),fe=new an(ve,Y,Z,K),pe=new dn(ve,Y,Z,K),Z.programs=ie.programs,v.capabilities=K,v.extensions=Y,v.properties=J,v.renderLists=ae,v.shadowMap=ue,v.state=Q,v.info=Z}be();const we=new ui(v,ve);function xe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function _e(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const e=Z.autoReset,t=ue.enabled,n=ue.autoUpdate,r=ue.needsUpdate,i=ue.type;be(),Z.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=r,ue.type=i}function Ee(e){const t=e.target;t.removeEventListener("dispose",Ee),function(e){(function(e){const t=J.get(e).programs;void 0!==t&&t.forEach((function(e){ie.releaseProgram(e)}))})(e),J.remove(e)}(t)}this.xr=we,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=Y.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Y.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return L},this.setPixelRatio=function(e){void 0!==e&&(L=e,this.setSize(k,P,!1))},this.getSize=function(e){return e.set(k,P)},this.setSize=function(e,n,r){we.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(k=e,P=n,t.width=Math.floor(e*L),t.height=Math.floor(n*L),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(k*L,P*L).floor()},this.setDrawingBufferSize=function(e,n,r){k=e,P=n,L=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(N)},this.setViewport=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),Q.viewport(A.copy(N).multiplyScalar(L).floor())},this.getScissor=function(e){return e.copy(j)},this.setScissor=function(e,t,n,r){e.isVector4?j.set(e.x,e.y,e.z,e.w):j.set(e,t,n,r),Q.scissor(S.copy(j).multiplyScalar(L).floor())},this.getScissorTest=function(){return B},this.setScissorTest=function(e){Q.setScissorTest(B=e)},this.setOpaqueSort=function(e){D=e},this.setTransparentSort=function(e){I=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ve.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",xe,!1),t.removeEventListener("webglcontextrestored",_e,!1),ae.dispose(),le.dispose(),J.dispose(),ee.dispose(),re.dispose(),ge.dispose(),we.dispose(),we.removeEventListener("sessionstart",Se),we.removeEventListener("sessionend",Me),V&&(V.dispose(),V=null),Te.stop()},this.renderBufferImmediate=function(e,t){ge.initAttributes();const n=J.get(e);e.hasPositions&&!n.position&&(n.position=ve.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ve.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ve.createBuffer()),e.hasColors&&!n.color&&(n.color=ve.createBuffer());const r=t.getAttributes();e.hasPositions&&(ve.bindBuffer(34962,n.position),ve.bufferData(34962,e.positionArray,35048),ge.enableAttribute(r.position),ve.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(ve.bindBuffer(34962,n.normal),ve.bufferData(34962,e.normalArray,35048),ge.enableAttribute(r.normal),ve.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(ve.bindBuffer(34962,n.uv),ve.bufferData(34962,e.uvArray,35048),ge.enableAttribute(r.uv),ve.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(ve.bindBuffer(34962,n.color),ve.bufferData(34962,e.colorArray,35048),ge.enableAttribute(r.color),ve.vertexAttribPointer(r.color,3,5126,!1,0,0)),ge.disableUnusedAttributes(),ve.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=q);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Pe(e,t,r,i);Q.setMaterial(r,a);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,h=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&de.update(i,n,r,s),ge.setup(i,r,s,n,l);let d=fe;null!==l&&(u=te.get(l),d=pe,d.setIndex(u));const f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(Q.setLineWidth(r.wireframeLinewidth*X()),d.setMode(1)):d.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),Q.setLineWidth(e*X()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,e)}else d.render(y,w)}},this.compile=function(e,t){p=le.get(e),p.init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Re(n[r],e,t)}else Re(n,e,t)}))};let Ae=null;function Se(){Te.stop()}function Me(){Te.start()}const Te=new Zt;function Ce(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,l=null===r?o.material:r,c=o.group;if(n.isArrayCamera){const e=n.cameras;for(let n=0,r=e.length;n<r;n++){const r=e[n];a.layers.test(r.layers)&&(Q.viewport(A.copy(r.viewport)),p.setupLightsView(r),Oe(a,t,r,s,l,c))}}else Oe(a,t,n,s,l,c)}}function Oe(e,t,n,r,i,o){if(e.onBeforeRender(v,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Pe(n,t,i,e);Q.setMaterial(i),ge.reset(),function(e,t){e.render((function(e){v.renderBufferImmediate(e,t)}))}(e,r)}else!0===i.transparent&&2===i.side?(i.side=a,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=0,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=2):v.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(v,t,n,r,i,o)}function Re(e,t,n){!0!==t.isScene&&(t=q);const r=J.get(e),i=p.state.lights,o=p.state.shadowsArray,a=i.state.version,s=ie.getParameters(e,i.state,o,t,n),l=ie.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=ee.get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",Ee),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===a)return ke(e,s),u}else s.uniforms=ie.getUniforms(e),e.onBuild(s,v),e.onBeforeCompile(s,v),u=ie.acquireProgram(s,l),c.set(l,u),r.uniforms=s.uniforms;const h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(h.clippingPlanes=ce.uniform),ke(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=u.getUniforms(),f=xr.seqWithValue(d.seq,h);return r.currentProgram=u,r.uniformsList=f,u}function ke(e,t){const n=J.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas}function Pe(e,t,n,r){!0!==t.isScene&&(t=q),$.resetTextureUnits();const i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?v.outputEncoding:x.texture.encoding,s=ee.get(n.envMap||o),l=!0===n.vertexColors&&r.geometry&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,c=J.get(n),u=p.state.lights;if(!0===H&&(!0===U||e!==E)){const t=e===E&&n.id===_;ce.setState(n,e,t)}let h=!1;n.version===c.__version?c.needsLights&&c.lightsStateVersion!==u.state.version||c.outputEncoding!==a||r.isInstancedMesh&&!1===c.instancing?h=!0:r.isInstancedMesh||!0!==c.instancing?r.isSkinnedMesh&&!1===c.skinning?h=!0:r.isSkinnedMesh||!0!==c.skinning?c.envMap!==s||n.fog&&c.fog!==i?h=!0:void 0===c.numClippingPlanes||c.numClippingPlanes===ce.numPlanes&&c.numIntersection===ce.numIntersection?c.vertexAlphas!==l&&(h=!0):h=!0:h=!0:h=!0:(h=!0,c.__version=n.version);let d=c.currentProgram;!0===h&&(d=Re(n,t,r));let f=!1,m=!1,g=!1;const y=d.getUniforms(),b=c.uniforms;if(Q.useProgram(d.program)&&(f=!0,m=!0,g=!0),n.id!==_&&(_=n.id,m=!0),f||E!==e){if(y.setValue(ve,"projectionMatrix",e.projectionMatrix),K.logarithmicDepthBuffer&&y.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),E!==e&&(E=e,m=!0,g=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=y.map.cameraPosition;void 0!==t&&t.setValue(ve,W.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&y.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){y.setOptional(ve,r,"bindMatrix"),y.setOptional(ve,r,"bindMatrixInverse");const e=r.skeleton;e&&(K.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),y.setValue(ve,"boneTexture",e.boneTexture,$),y.setValue(ve,"boneTextureSize",e.boneTextureSize)):y.setOptional(ve,e,"boneMatrices"))}return(m||c.receiveShadow!==r.receiveShadow)&&(c.receiveShadow=r.receiveShadow,y.setValue(ve,"receiveShadow",r.receiveShadow)),m&&(y.setValue(ve,"toneMappingExposure",v.toneMappingExposure),c.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,g),i&&n.fog&&oe.refreshFogUniforms(b,i),oe.refreshMaterialUniforms(b,n,L,P,V),xr.upload(ve,c.uniformsList,b,$)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(xr.upload(ve,c.uniformsList,b,$),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(ve,"center",r.center),y.setValue(ve,"modelViewMatrix",r.modelViewMatrix),y.setValue(ve,"normalMatrix",r.normalMatrix),y.setValue(ve,"modelMatrix",r.matrixWorld),d}Te.setAnimationLoop((function(e){Ae&&Ae(e)})),"undefined"!==typeof window&&Te.setContext(window),this.setAnimationLoop=function(e){Ae=e,we.setAnimationLoop(e),null===e?Te.stop():Te.start()},we.addEventListener("sessionstart",Se),we.addEventListener("sessionend",Me),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===y)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===we.enabled&&!0===we.isPresenting&&(!0===we.cameraAutoUpdate&&we.updateCamera(t),t=we.getCamera()),!0===e.isScene&&e.onBeforeRender(v,e,t,x),p=le.get(e,g.length),p.init(),g.push(p),G.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),z.setFromProjectionMatrix(G),U=this.localClippingEnabled,H=ce.init(this.clippingPlanes,U,t),f=ae.get(e,m.length),f.init(),m.push(f),function e(t,n,r,i){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(n);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||z.intersectsSprite(t)){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;n.visible&&f.push(t,e,n,r,W.z,null)}}else if(t.isImmediateRenderObject)i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G),f.push(t,null,t.material,r,W.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==Z.render.frame&&(t.skeleton.update(),t.skeleton.frame=Z.render.frame),!t.frustumCulled||z.intersectsObject(t))){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;if(Array.isArray(n)){const i=e.groups;for(let o=0,a=i.length;o<a;o++){const a=i[o],s=n[a.materialIndex];s&&s.visible&&f.push(t,e,s,r,W.z,a)}}else n.visible&&f.push(t,e,n,r,W.z,null)}const o=t.children;for(let a=0,s=o.length;a<s;a++)e(o[a],n,r,i)}(e,t,0,v.sortObjects),f.finish(),!0===v.sortObjects&&f.sort(D,I),!0===H&&ce.beginShadows();const n=p.state.shadowsArray;ue.render(n,e,t),p.setupLights(),p.setupLightsView(t),!0===H&&ce.endShadows(),!0===this.info.autoReset&&this.info.reset(),he.render(f,e);const r=f.opaque,i=f.transmissive,o=f.transparent;r.length>0&&Ce(r,e,t),i.length>0&&function(e,t,n,r){if(null===V){const e=!0===s&&!0===K.isWebGL2;V=new(e?C:T)(1024,1024,{generateMipmaps:!0,type:null!==me.convert(1016)?1016:1009,minFilter:1008,magFilter:1003,wrapS:1001,wrapT:1001})}const i=v.getRenderTarget();v.setRenderTarget(V),v.clear();const o=v.toneMapping;v.toneMapping=0,Ce(e,n,r),v.toneMapping=o,$.updateMultisampleRenderTarget(V),$.updateRenderTargetMipmap(V),v.setRenderTarget(i),Ce(t,n,r)}(r,i,e,t),o.length>0&&Ce(o,e,t),null!==x&&($.updateMultisampleRenderTarget(x),$.updateRenderTargetMipmap(x)),!0===e.isScene&&e.onAfterRender(v,e,t),Q.buffers.depth.setTest(!0),Q.buffers.depth.setMask(!0),Q.buffers.color.setMask(!0),Q.setPolygonOffset(!1),ge.resetDefaultState(),_=-1,E=null,g.pop(),p=g.length>0?g[g.length-1]:null,m.pop(),f=m.length>0?m[m.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t=0,n=0){x=e,b=t,w=n,e&&void 0===J.get(e).__webglFramebuffer&&$.setupRenderTarget(e);let r=null,i=!1,o=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=J.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=a[t],i=!0):r=e.isWebGLMultisampleRenderTarget?J.get(e).__webglMultisampledFramebuffer:a,A.copy(e.viewport),S.copy(e.scissor),O=e.scissorTest}else A.copy(N).multiplyScalar(L).floor(),S.copy(j).multiplyScalar(L).floor(),O=B;if(Q.bindFramebuffer(36160,r)&&K.drawBuffers){let t=!1;if(e)if(e.isWebGLMultipleRenderTargets){const n=e.texture;if(F.length!==n.length||36064!==F[0]){for(let e=0,t=n.length;e<t;e++)F[e]=36064+e;F.length=n.length,t=!0}}else 1===F.length&&36064===F[0]||(F[0]=36064,F.length=1,t=!0);else 1===F.length&&1029===F[0]||(F[0]=1029,F.length=1,t=!0);t&&(K.isWebGL2?ve.drawBuffers(F):Y.get("WEBGL_draw_buffers").drawBuffersWEBGL(F))}if(Q.viewport(A),Q.scissor(S),Q.setScissorTest(O),i){const r=J.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=J.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=J.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){Q.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,c=a.type;if(s!==l&&me.convert(s)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=1016===c&&(Y.has("EXT_color_buffer_half_float")||K.isWebGL2&&Y.has("EXT_color_buffer_float"));if(1009!==c&&me.convert(c)!==ve.getParameter(35738)&&(1015!==c||!(K.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float")))&&!u)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ve.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,me.convert(s),me.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==x?J.get(x).__webglFramebuffer:null;Q.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);let a=me.convert(t.format);K.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),$.setTexture2D(t,0),ve.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),Q.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=me.convert(n.format),s=me.convert(n.type);$.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),Q.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(v.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,l=me.convert(r.format),c=me.convert(r.type);let u;if(r.isDataTexture3D)$.setTexture3D(r,0),u=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");$.setTexture2DArray(r,0),u=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const h=ve.getParameter(3314),d=ve.getParameter(32878),f=ve.getParameter(3316),p=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,g.data)):ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g),ve.pixelStorei(3314,h),ve.pixelStorei(32878,d),ve.pixelStorei(3316,f),ve.pixelStorei(3315,p),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(u),Q.unbindTexture()},this.initTexture=function(e){$.setTexture2D(e,0),Q.unbindTexture()},this.resetState=function(){b=0,w=0,x=null,Q.reset(),ge.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}(class extends di{}).prototype.isWebGL1Renderer=!0;class fi{constructor(e,t=25e-5){this.name="",this.color=new Je(e),this.density=t}clone(){return new fi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}fi.prototype.isFogExp2=!0;class pi{constructor(e,t=1,n=1e3){this.name="",this.color=new Je(e),this.near=t,this.far=n}clone(){return new pi(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}pi.prototype.isFog=!0;class mi extends Pe{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}mi.prototype.isScene=!0;class gi{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=f()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}gi.prototype.isInterleavedBuffer=!0;const vi=new R;class yi{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyMatrix4(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyNormalMatrix(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.transformDirection(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new nt(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new yi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}yi.prototype.isInterleavedBufferAttribute=!0;class bi extends We{constructor(e){super(),this.type="SpriteMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let wi;bi.prototype.isSpriteMaterial=!0;const xi=new R,_i=new R,Ei=new R,Ai=new b,Si=new b,Mi=new se,Ti=new R,Ci=new R,Oi=new R,Ri=new b,ki=new b,Pi=new b;class Li extends Pe{constructor(e){if(super(),this.type="Sprite",void 0===wi){wi=new pt;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new gi(e,5);wi.setIndex([0,1,2,0,2,3]),wi.setAttribute("position",new yi(t,3,0,!1)),wi.setAttribute("uv",new yi(t,2,3,!1))}this.geometry=wi,this.material=void 0!==e?e:new bi,this.center=new b(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),_i.setFromMatrixScale(this.matrixWorld),Mi.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ei.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&_i.multiplyScalar(-Ei.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;Di(Ti.set(-.5,-.5,0),Ei,o,_i,r,i),Di(Ci.set(.5,-.5,0),Ei,o,_i,r,i),Di(Oi.set(.5,.5,0),Ei,o,_i,r,i),Ri.set(0,0),ki.set(1,0),Pi.set(1,1);let a=e.ray.intersectTriangle(Ti,Ci,Oi,!1,xi);if(null===a&&(Di(Ci.set(-.5,.5,0),Ei,o,_i,r,i),ki.set(0,1),a=e.ray.intersectTriangle(Ti,Oi,Ci,!1,xi),null===a))return;const s=e.ray.origin.distanceTo(xi);s<e.near||s>e.far||t.push({distance:s,point:xi.clone(),uv:Ve.getUV(xi,Ti,Ci,Oi,Ri,ki,Pi,new b),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Di(e,t,n,r,i,o){Ai.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Si.x=o*Ai.x-i*Ai.y,Si.y=i*Ai.x+o*Ai.y):Si.copy(Ai),e.copy(t),e.x+=Si.x,e.y+=Si.y,e.applyMatrix4(Mi)}Li.prototype.isSprite=!0;const Ii=new R,Ni=new M,ji=new M,Bi=new R,Fi=new se;class zi extends Pt{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new se,this.bindMatrixInverse=new se}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new M,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Ni.fromBufferAttribute(r.attributes.skinIndex,e),ji.fromBufferAttribute(r.attributes.skinWeight,e),Ii.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let i=0;i<4;i++){const e=ji.getComponent(i);if(0!==e){const r=Ni.getComponent(i);Fi.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Bi.copy(Ii).applyMatrix4(Fi),e)}}return t.applyMatrix4(this.bindMatrixInverse)}}zi.prototype.isSkinnedMesh=!0;class Hi extends Pe{constructor(){super(),this.type="Bone"}}Hi.prototype.isBone=!0;class Ui extends A{constructor(e=null,t=1,n=1,r,i,o,a,s,l=1003,c=1003,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={data:e,width:t,height:n},this.magFilter=l,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Ui.prototype.isDataTexture=!0;const Vi=new se,Gi=new se,Wi=[],qi=new Pt;class Xi extends Pt{constructor(e,t,n){super(e,t),this.instanceMatrix=new nt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(qi.geometry=this.geometry,qi.material=this.material,void 0!==qi.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Vi),Gi.multiplyMatrices(n,Vi),qi.matrixWorld=Gi,qi.raycast(e,Wi);for(let e=0,n=Wi.length;e<n;e++){const n=Wi[e];n.instanceId=i,n.object=this,t.push(n)}Wi.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new nt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Xi.prototype.isInstancedMesh=!0;class Yi extends We{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Je(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}Yi.prototype.isLineBasicMaterial=!0;const Ki=new R,Qi=new R,Zi=new se,Ji=new ae,$i=new J;class eo extends Pe{constructor(e=new pt,t=new Yi){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Ki.fromBufferAttribute(t,e-1),Qi.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Ki.distanceTo(Qi);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),$i.copy(n.boundingSphere),$i.applyMatrix4(r),$i.radius+=i,!1===e.ray.intersectsSphere($i))return;Zi.copy(r).invert(),Ji.copy(e.ray).applyMatrix4(Zi);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,l=new R,c=new R,u=new R,h=new R,d=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=d){const o=r.getX(n),a=r.getX(n+1);l.fromBufferAttribute(i,o),c.fromBufferAttribute(i,a);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const d=e.ray.origin.distanceTo(h);d<e.near||d>e.far||t.push({distance:d,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=d){l.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(h);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}eo.prototype.isLine=!0;const to=new R,no=new R;class ro extends eo{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)to.fromBufferAttribute(t,e),no.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+to.distanceTo(no);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}ro.prototype.isLineSegments=!0;class io extends eo{constructor(e,t){super(e,t),this.type="LineLoop"}}io.prototype.isLineLoop=!0;class oo extends We{constructor(e){super(),this.type="PointsMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}oo.prototype.isPointsMaterial=!0;const ao=new se,so=new ae,lo=new J,co=new R;class uo extends Pe{constructor(e=new pt,t=new oo){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),lo.copy(n.boundingSphere),lo.applyMatrix4(r),lo.radius+=i,!1===e.ray.intersectsSphere(lo))return;ao.copy(r).invert(),so.copy(e.ray).applyMatrix4(ao);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),l=Math.min(i.count,o.start+o.count);n<l;n++){const o=i.getX(n);co.fromBufferAttribute(a,o),ho(co,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)co.fromBufferAttribute(a,n),ho(co,n,s,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function ho(e,t,n,r,i,o,a){const s=so.distanceSqToPoint(e);if(s<n){const n=new R;so.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}uo.prototype.isPoints=!0;(class extends A{constructor(e,t,n,r,i,o,a,l,c){super(e,t,n,r,i,o,a,l,c),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:s,this.magFilter=void 0!==i?i:s,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;class fo extends A{constructor(e,t,n,r,i,o,a,s,l,c,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}fo.prototype.isCompressedTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l){super(e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),super(null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isDepthTexture=!0;class po extends pt{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],h=[],d=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,o=new b,p=new R;let v=0;const y=!0===n?e:t,w=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*w,0),h.push(0,w,0),d.push(.5,.5),f++;const x=f;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*w,p.z=y*n,u.push(p.x,p.y,p.z),h.push(0,w,0),o.x=.5*n+.5,o.y=.5*i*w+.5,d.push(o.x,o.y),f++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new R,v=new R;let y=0;const b=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),o.set(l,b,p).normalize(),h.push(o.x,o.y,o.z),d.push(t,1-g),c.push(f++)}p.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],o=p[t][e+1];c.push(n,r,o),c.push(r,i,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}static fromJSON(e){return new po(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class mo extends po{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}static fromJSON(e){return new mo(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}new R,new R,new R,new Ve;class go{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,l=i-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);const i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new b:new R);return a.copy(o).sub(i).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new R,r=[],i=[],o=[],a=new R,s=new se;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new R),r[d].normalize()}i[0]=new R,o[0]=new R;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),h<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(p(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(s.makeRotationAxis(a,e))}o[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(p(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vo extends go{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new b,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=l-this.aY;s=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(s,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}vo.prototype.isEllipseCurve=!0;class yo extends vo{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function bo(){let e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){let l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;l*=a,c*=a,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}yo.prototype.isArcCurve=!0;const wo=new R,xo=new bo,_o=new bo,Eo=new bo;class Ao extends go{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new R){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(wo.subVectors(r[0],r[1]).add(r[0]),a=wo);const u=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?s=r[(l+2)%i]:(wo.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=wo),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),xo.initNonuniformCatmullRom(a.x,u.x,h.x,s.x,t,n,r),_o.initNonuniformCatmullRom(a.y,u.y,h.y,s.y,t,n,r),Eo.initNonuniformCatmullRom(a.z,u.z,h.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(xo.initCatmullRom(a.x,u.x,h.x,s.x,this.tension),_o.initCatmullRom(a.y,u.y,h.y,s.y,this.tension),Eo.initCatmullRom(a.z,u.z,h.z,s.z,this.tension));return n.set(xo.calc(c),_o.calc(c),Eo.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new R).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function So(e,t,n,r,i){const o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function Mo(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function To(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}Ao.prototype.isCatmullRomCurve3=!0;class Co extends go{constructor(e=new b,t=new b,n=new b,r=new b){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Co.prototype.isCubicBezierCurve=!0;class Oo extends go{constructor(e=new R,t=new R,n=new R,r=new R){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y),To(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Oo.prototype.isCubicBezierCurve3=!0;class Ro extends go{constructor(e=new b,t=new b){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new b){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new b;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ro.prototype.isLineCurve=!0;class ko extends go{constructor(e=new b,t=new b,n=new b){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}ko.prototype.isQuadraticBezierCurve=!0;class Po extends go{constructor(e=new R,t=new R,n=new R){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y),Mo(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Po.prototype.isQuadraticBezierCurve3=!0;class Lo extends go{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new b){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(So(a,s.x,l.x,c.x,u.x),So(a,s.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new b).fromArray(n))}return this}}Lo.prototype.isSplineCurve=!0;var Do=Object.freeze({__proto__:null,ArcCurve:yo,CatmullRomCurve3:Ao,CubicBezierCurve:Co,CubicBezierCurve3:Oo,EllipseCurve:vo,LineCurve:Ro,LineCurve3:class extends go{constructor(e=new R,t=new R){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new R){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},QuadraticBezierCurve:ko,QuadraticBezierCurve3:Po,SplineCurve:Lo});const Io=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=No(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,d,f;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*r,l=o<a-1?t[o+1]*r:e.length,c=No(e,s,l,r,!1),c===c.next&&(c.steiner=!0),i.push(Xo(c));for(i.sort(Vo),o=0;o<i.length;o++)Go(i[o],n),n=jo(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)h=e[t],d=e[t+1],h<s&&(s=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);f=Math.max(c-s,u-l),f=0!==f?1/f:0}return Bo(o,a,n,s,l,f),a};function No(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=ra(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ra(o,e[o],e[o+1],a);return a&&Zo(a,a.next)&&(ia(a),a=a.next),a}function jo(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Zo(r,r.next)&&0!==Qo(r.prev,r,r.next))r=r.next;else{if(ia(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Bo(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=qo(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?zo(e,r,i,o):Fo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),ia(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Bo(e=Ho(jo(e),t,n),t,n,r,i,o,2):2===a&&Uo(e,t,n,r,i,o):Bo(jo(e),t,n,r,i,o,1);break}}function Fo(e){const t=e.prev,n=e,r=e.next;if(Qo(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(Yo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function zo(e,t,n,r){const i=e.prev,o=e,a=e.next;if(Qo(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=qo(s,l,t,n,r),d=qo(c,u,t,n,r);let f=e.prevZ,p=e.nextZ;for(;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Ho(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Zo(i,o)&&Jo(i,r,r.next,o)&&ta(i,o)&&ta(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),ia(r),ia(r.next),r=e=o),r=r.next}while(r!==e);return jo(r)}function Uo(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Ko(a,e)){let s=na(a,e);return a=jo(a,a.next),s=jo(s,s.next),Bo(a,t,n,r,i,o),void Bo(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function Vo(e,t){return e.x-t.x}function Go(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,l=o.x,c=o.y;let u,h=1/0;n=o;do{r>=n.x&&n.x>=l&&r!==n.x&&Yo(i<c?r:a,i,l,c,i<c?a:r,i,n.x,n.y)&&(u=Math.abs(i-n.y)/(r-n.x),ta(n,e)&&(u<h||u===h&&(n.x>o.x||n.x===o.x&&Wo(o,n)))&&(o=n,h=u)),n=n.next}while(n!==s);return o}(e,t)){const n=na(t,e);jo(t,t.next),jo(n,n.next)}}function Wo(e,t){return Qo(e.prev,e,t.prev)<0&&Qo(t.next,e,e.next)<0}function qo(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Xo(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Yo(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Ko(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Jo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ta(e,t)&&ta(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Qo(e.prev,e,t.prev)||Qo(e,t.prev,t))||Zo(e,t)&&Qo(e.prev,e,e.next)>0&&Qo(t.prev,t,t.next)>0)}function Qo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Zo(e,t){return e.x===t.x&&e.y===t.y}function Jo(e,t,n,r){const i=ea(Qo(e,t,n)),o=ea(Qo(e,t,r)),a=ea(Qo(n,r,e)),s=ea(Qo(n,r,t));return i!==o&&a!==s||(!(0!==i||!$o(e,n,t))||(!(0!==o||!$o(e,r,t))||(!(0!==a||!$o(n,e,r))||!(0!==s||!$o(n,t,r)))))}function $o(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ea(e){return e>0?1:e<0?-1:0}function ta(e,t){return Qo(e.prev,e,e.next)<0?Qo(e,t,e.next)>=0&&Qo(e,e.prev,t)>=0:Qo(e,t,e.prev)<0||Qo(e,e.next,t)<0}function na(e,t){const n=new oa(e.i,e.x,e.y),r=new oa(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function ra(e,t,n,r){const i=new oa(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function ia(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function oa(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class aa{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return aa.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];sa(e),la(n,e);let o=e.length;t.forEach(sa);for(let s=0;s<t.length;s++)r.push(o),o+=t[s].length,la(n,t[s]);const a=Io(n,r);for(let s=0;s<a.length;s+=3)i.push(a.slice(s,s+3));return i}}function sa(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function la(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class ca extends pt{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let a=0,s=e.length;a<s;a++){o(e[a])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:100,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:6,h=void 0!==t.bevelSize?t.bevelSize:u-2,d=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:ua;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,v,y,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,v=p.computeFrenetFrames(s,!1),y=new R,w=new R,x=new R),c||(f=0,u=0,h=0,d=0);const E=e.extractPoints(a);let A=E.shape;const S=E.holes;if(!aa.isClockWise(A)){A=A.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];aa.isClockWise(t)&&(S[e]=t.reverse())}}const M=aa.triangulateShape(A,S),T=A;for(let t=0,n=S.length;t<n;t++){const e=S[t];A=A.concat(e)}function C(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const O=A.length,k=M.length;function P(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(u),d=Math.sqrt(l*l+c*c),f=t.x-s/h,p=t.y+a/h,m=((n.x-c/d-f)*c-(n.y+l/d-p)*l)/(a*c-s*l);r=f+a*m-e.x,i=p+s*m-e.y;const g=r*r+i*i;if(g<=2)return new b(r,i);o=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new b(r/o,i/o)}const L=[];for(let t=0,n=T.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[t]=P(T[t],T[r],T[i]);const D=[];let I,N=L.concat();for(let t=0,n=S.length;t<n;t++){const e=S[t];I=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),I[t]=P(e[t],e[r],e[i]);D.push(I),N=N.concat(I)}for(let t=0;t<f;t++){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,-n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);F(i.x,i.y,-n)}}}const j=h+d;for(let t=0;t<O;t++){const e=c?C(A[t],N[t],j):A[t];_?(w.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(w).add(y),F(x.x,x.y,x.z)):F(e.x,e.y,0)}for(let t=1;t<=s;t++)for(let e=0;e<O;e++){const n=c?C(A[e],N[e],j):A[e];_?(w.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(w).add(y),F(x.x,x.y,x.z)):F(n.x,n.y,l/s*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,l+n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);_?F(i.x,i.y+g[s-1].y,g[s-1].x+n):F(i.x,i.y,l+n)}}}function B(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*f;e<n;e++){const n=O*e,o=O*(e+1);H(t+r+n,t+i+n,t+i+o,t+r+o)}}}function F(e,t,n){o.push(e),o.push(t),o.push(n)}function z(e,t,i){U(e),U(t),U(i);const o=r.length/3,a=m.generateTopUV(n,r,o-3,o-2,o-1);V(a[0]),V(a[1]),V(a[2])}function H(e,t,i,o){U(e),U(t),U(o),U(t),U(i),U(o);const a=r.length/3,s=m.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);V(s[0]),V(s[1]),V(s[3]),V(s[1]),V(s[2]),V(s[3])}function U(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function V(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[2]+t,e[1]+t,e[0]+t)}e=s+2*f,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=M[e];z(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=M[e];z(t[0]+O*s,t[1]+O*s,t[2]+O*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;B(T,t),t+=T.length;for(let n=0,r=S.length;n<r;n++){const e=S[n];B(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new ot(r,3)),this.setAttribute("uv",new ot(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,o=e.shapes.length;i<o;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Do[r.type]).fromJSON(r)),new ca(n,e.options)}}const ua={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new b(o,a),new b(s,l),new b(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<Math.abs(a-c)?[new b(a,1-l),new b(c,1-h),new b(d,1-p),new b(m,1-v)]:[new b(s,1-l),new b(u,1-h),new b(f,1-p),new b(g,1-v)]}};class ha extends pt{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))l(e);else for(let c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){const a=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===aa.isClockWise(c)&&(c=c.reverse());for(let t=0,n=u.length;t<n;t++){const e=u[t];!0===aa.isClockWise(e)&&(u[t]=e.reverse())}const h=aa.triangulateShape(c,u);for(let t=0,n=u.length;t<n;t++){const e=u[t];c=c.concat(e)}for(let t=0,n=c.length;t<n;t++){const e=c[t];r.push(e.x,e.y,0),i.push(0,0,1),o.push(e.x,e.y)}for(let t=0,r=h.length;t<r;t++){const e=h[t],r=e[0]+a,i=e[1]+a,o=e[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new ot(r,3)),this.setAttribute("normal",new ot(i,3)),this.setAttribute("uv",new ot(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new ha(n,e.curveSegments)}}class da extends pt{constructor(e=1,t=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let l=0;const c=[],u=new R,h=new R,d=[],f=[],p=[],m=[];for(let g=0;g<=n;g++){const d=[],v=g/n;let y=0;0==g&&0==o?y=.5/t:g==n&&s==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(o+v*a),u.y=e*Math.cos(o+v*a),u.z=e*Math.sin(r+s*i)*Math.sin(o+v*a),f.push(u.x,u.y,u.z),h.copy(u).normalize(),p.push(h.x,h.y,h.z),m.push(s+y,1-v),d.push(l++)}c.push(d)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=c[g][e+1],r=c[g][e],i=c[g+1][e],a=c[g+1][e+1];(0!==g||o>0)&&d.push(t,r,a),(g!==n-1||s<Math.PI)&&d.push(r,i,a)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new da(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class fa extends pt{constructor(e,t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new R,s=new R,l=new b;let c=new R;const u=[],h=[],d=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=o.normals[i],d=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*l.x+i*d.x,s.y=o*l.y+i*d.y,s.z=o*l.z+i*d.z,s.normalize(),h.push(s.x,s.y,s.z),a.x=c.x+n*s.x,a.y=c.y+n*s.y,a.z=c.z+n*s.z,u.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;f.push(n,i,a),f.push(i,o,a)}}()}(),this.setIndex(f),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new fa((new Do[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class pa extends We{constructor(e){super(),this.type="ShadowMaterial",this.color=new Je(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}pa.prototype.isShadowMaterial=!0;class ma extends Bt{constructor(e){super(e),this.type="RawShaderMaterial"}}ma.prototype.isRawShaderMaterial=!0;class ga extends We{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Je(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}ga.prototype.isMeshStandardMaterial=!0;class va extends ga{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new b(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=p(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Je(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Je).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this}}va.prototype.isMeshPhysicalMaterial=!0;class ya extends We{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Je(16777215),this.specular=new Je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}ya.prototype.isMeshPhongMaterial=!0;class ba extends We{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}ba.prototype.isMeshToonMaterial=!0;class wa extends We{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}wa.prototype.isMeshNormalMaterial=!0;class xa extends We{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}xa.prototype.isMeshLambertMaterial=!0;class _a extends We{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}_a.prototype.isMeshMatcapMaterial=!0;class Ea extends Yi{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Ea.prototype.isLineDashedMaterial=!0;const Aa={arraySlice:function(e,t,n){return Aa.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let l=0;l<o.tracks.length;++l){const e=o.tracks[l],t=e.getValueSize(),s=[],c=[];for(let o=0;o<e.times.length;++o){const a=e.times[o]*i;if(!(a<n||a>=r)){s.push(e.times[o]);for(let n=0;n<t;++n)c.push(e.values[o*t+n])}}0!==s.length&&(e.times=Aa.convertArray(s,e.times.constructor),e.values=Aa.convertArray(c,e.values.constructor),a.push(e))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let a=0;a<i;++a){const t=n.tracks[a],r=t.ValueTypeName;if("bool"===r||"string"===r)continue;const i=e.tracks.find((function(e){return e.name===t.name&&e.ValueTypeName===r}));if(void 0===i)continue;let s=0;const l=t.getValueSize();t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);let c=0;const u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const h=t.times.length-1;let d;if(o<=t.times[0]){const e=s,n=l-s;d=Aa.arraySlice(t.values,e,n)}else if(o>=t.times[h]){const e=h*l+s,n=e+l-s;d=Aa.arraySlice(t.values,e,n)}else{const e=t.createInterpolant(),n=s,r=l-s;e.evaluate(o),d=Aa.arraySlice(e.resultBuffer,n,r)}if("quaternion"===r){(new O).fromArray(d).normalize().conjugate().toArray(d)}const f=i.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===r)O.multiplyQuaternionsFlat(i.values,t,d,0,i.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)i.values[t+n]-=d[n]}}}return e.blendMode=2501,e}};class Sa{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let o=0;o!==r;++o)t[o]=n[i+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Sa.prototype.beforeStart_=Sa.prototype.copySampleValue_,Sa.prototype.afterEnd_=Sa.prototype.copySampleValue_;class Ma extends Sa{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p;for(let w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}class Ta extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c;for(let h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}class Ca extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Oa{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Aa.convertArray(t,this.TimeBufferType),this.values=Aa.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Aa.convertArray(e.times,Array),values:Aa.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Ca(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Ta(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ma(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Aa.arraySlice(n,i,o),this.values=Aa.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==i;a++){const t=n[a];if("number"===typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==o&&o>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,o),e=!1;break}o=t}if(void 0!==r&&Aa.isTypedArray(r))for(let a=0,s=r.length;a!==s;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=Aa.arraySlice(this.times),t=Aa.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=Aa.arraySlice(e,0,o),this.values=Aa.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Aa.arraySlice(this.times,0),t=Aa.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Oa.prototype.TimeBufferType=Float32Array,Oa.prototype.ValueBufferType=Float32Array,Oa.prototype.DefaultInterpolation=2301;class Ra extends Oa{}Ra.prototype.ValueTypeName="bool",Ra.prototype.ValueBufferType=Array,Ra.prototype.DefaultInterpolation=2300,Ra.prototype.InterpolantFactoryMethodLinear=void 0,Ra.prototype.InterpolantFactoryMethodSmooth=void 0;class ka extends Oa{}ka.prototype.ValueTypeName="color";class Pa extends Oa{}Pa.prototype.ValueTypeName="number";class La extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)O.slerpFlat(i,0,o,l-a,o,l,s);return i}}class Da extends Oa{InterpolantFactoryMethodLinear(e){return new La(this.times,this.values,this.getValueSize(),e)}}Da.prototype.ValueTypeName="quaternion",Da.prototype.DefaultInterpolation=2301,Da.prototype.InterpolantFactoryMethodSmooth=void 0;class Ia extends Oa{}Ia.prototype.ValueTypeName="string",Ia.prototype.ValueBufferType=Array,Ia.prototype.DefaultInterpolation=2300,Ia.prototype.InterpolantFactoryMethodLinear=void 0,Ia.prototype.InterpolantFactoryMethodSmooth=void 0;class Na extends Oa{}Na.prototype.ValueTypeName="vector";class ja{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=f(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(Ba(n[o]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,o=n.length;i!==o;++i)t.push(Oa.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let a=0;a<i;a++){let e=[],s=[];e.push((a+i-1)%i,a,(a+1)%i),s.push(0,1,0);const l=Aa.getKeyframeOrder(e);e=Aa.sortedArray(e,1,l),s=Aa.sortedArray(s,1,l),r||0!==e[0]||(e.push(i),s.push(s[0])),o.push(new Pa(".morphTargetInfluences["+t[a].name+"]",e,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let a=0,s=e.length;a<s;a++){const t=e[a],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];Aa.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let c=0;c<l.length;c++){const e=l[c].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],o=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),o.push(r.morphTarget===i?1:0)}r.push(new Pa(".morphTargetInfluence["+i+"]",t,o))}s=t.length*(o||1)}else{const i=".bones["+t[c].name+"]";n(Na,i+".position",e,"pos",r),n(Da,i+".quaternion",e,"rot",r),n(Na,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ba(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Pa;case"vector":case"vector2":case"vector3":case"vector4":return Na;case"color":return ka;case"quaternion":return Da;case"bool":case"boolean":return Ra;case"string":return Ia}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Aa.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Fa={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class za{constructor(e,t,n){const r=this;let i=!1,o=0,a=0,s=void 0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const Ha=new za;class Ua{constructor(e){this.manager=void 0!==e?e:Ha,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Va={};class Ga extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0!==Va[e])return void Va[e].push({onLoad:t,onProgress:n,onError:r});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let n=0;n<s.length;n++)e[n]=s.charCodeAt(n);r="blob"===o?new Blob([e.buffer],{type:n}):e.buffer;break;case"document":const t=new DOMParser;r=t.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){t&&t(r),i.manager.itemEnd(e)}),0)}catch(l){setTimeout((function(){r&&r(l),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{Va[e]=[],Va[e].push({onLoad:t,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",e,!0),s.addEventListener("load",(function(t){const n=this.response,r=Va[e];if(delete Va[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Fa.add(e,n);for(let e=0,t=r.length;e<t;e++){const t=r[e];t.onLoad&&t.onLoad(n)}i.manager.itemEnd(e)}else{for(let e=0,n=r.length;e<n;e++){const n=r[e];n.onError&&n.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),s.addEventListener("progress",(function(t){const n=Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onProgress&&r.onProgress(t)}}),!1),s.addEventListener("error",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),s.addEventListener("abort",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const e in this.requestHeader)s.setRequestHeader(e,this.requestHeader[e]);s.send(null)}return i.manager.itemStart(e),s}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Wa extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Fa.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class qa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new Ut,o=new Wa(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let l=0;l<e.length;++l)s(l);return i}}class Xa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new A,o=new Wa(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:l,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Ya extends go{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ro(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=t){const e=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-e/o;return i.getPointAt(a)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Do[n.type]).fromJSON(n))}return this}}class Ka extends Ya{constructor(e){super(),this.type="Path",this.currentPoint=new b,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ro(this.currentPoint.clone(),new b(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new ko(this.currentPoint.clone(),new b(e,t),new b(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new Co(this.currentPoint.clone(),new b(e,t),new b(n,r),new b(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Lo(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const l=new vo(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Qa extends Ka{constructor(e){super(e),this.uuid=f(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Ka).fromJSON(n))}return this}}class Za extends Pe{constructor(e,t=1){super(),this.type="Light",this.color=new Je(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}Za.prototype.isLight=!0;class Ja extends Za{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.groundColor=new Je(t)}copy(e){return Za.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Ja.prototype.isHemisphereLight=!0;const $a=new se,es=new R,ts=new R;class ns{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new b(512,512),this.map=null,this.mapPass=null,this.matrix=new se,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Qt,this._frameExtents=new b(1,1),this._viewportCount=1,this._viewports=[new M(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;es.setFromMatrixPosition(e.matrixWorld),t.position.copy(es),ts.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ts),t.updateMatrixWorld(),$a.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix($a),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class rs extends ns{constructor(){super(new zt(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*d*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}rs.prototype.isSpotLightShadow=!0;class is extends Za{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new rs}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}is.prototype.isSpotLight=!0;const os=new se,as=new R,ss=new R;class ls extends ns{constructor(){super(new zt(90,1,.5,500)),this._frameExtents=new b(4,2),this._viewportCount=6,this._viewports=[new M(2,1,1,1),new M(0,1,1,1),new M(3,1,1,1),new M(1,1,1,1),new M(3,0,1,1),new M(1,0,1,1)],this._cubeDirections=[new R(1,0,0),new R(-1,0,0),new R(0,0,1),new R(0,0,-1),new R(0,1,0),new R(0,-1,0)],this._cubeUps=[new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,0,1),new R(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),as.setFromMatrixPosition(e.matrixWorld),n.position.copy(as),ss.copy(n.position),ss.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ss),n.updateMatrixWorld(),r.makeTranslation(-as.x,-as.y,-as.z),os.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(os)}}ls.prototype.isPointLightShadow=!0;class cs extends Za{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new ls}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}cs.prototype.isPointLight=!0;class us extends Ft{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}us.prototype.isOrthographicCamera=!0;class hs extends ns{constructor(){super(new us(-5,5,5,-5,.5,500))}}hs.prototype.isDirectionalLightShadow=!0;class ds extends Za{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.shadow=new hs}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}ds.prototype.isDirectionalLight=!0;class fs extends Za{constructor(e,t){super(e,t),this.type="AmbientLight"}}fs.prototype.isAmbientLight=!0;class ps extends Za{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}ps.prototype.isRectAreaLight=!0;class ms{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new R)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}ms.prototype.isSphericalHarmonics3=!0;class gs extends Za{constructor(e=new ms,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}gs.prototype.isLightProbe=!0;class vs{static decodeText(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);let n="";for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);try{return decodeURIComponent(escape(n))}catch(e){return n}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}class ys extends pt{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}ys.prototype.isInstancedBufferGeometry=!0;class bs extends nt{constructor(e,t,n,r=1){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}bs.prototype.isInstancedBufferAttribute=!0;(class extends Ua{constructor(e){super(e),"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Fa.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}).prototype.isImageBitmapLoader=!0;class ws{constructor(){this.type="ShapePath",this.color=new Je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ka,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new Qa;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,l=a.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],s=-s,a=t[i],l=-l),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=aa.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,l;const c=[];if(1===o.length)return s=o[0],l=new Qa,l.curves=s.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const h=[],d=[];let f,p,m=[],g=0;d[g]=void 0,m[g]=[];for(let v=0,y=o.length;v<y;v++)s=o[v],f=s.getPoints(),a=i(f),a=e?!a:a,a?(!u&&d[g]&&g++,d[g]={s:new Qa,p:f},d[g].s.curves=s.curves,u&&g++,m[g]=[]):m[g].push({h:s,p:f[0]});if(!d[0])return n(o);if(d.length>1){let e=!1;const t=[];for(let n=0,r=d.length;n<r;n++)h[n]=[];for(let n=0,i=d.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<d.length;i++)r(a.p,d[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,h[i].push(a)):e=!0);s&&h[n].push(a)}}t.length>0&&(e||(m=h))}for(let v=0,y=d.length;v<y;v++){l=d[v].s,c.push(l),p=m[v];for(let e=0,t=p.length;e<t;e++)l.holes.push(p[e].h)}return c}}class xs{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,l=0;for(let c=0;c<r.length;c++){const e=r[c];if("\n"===e)s=0,l-=o;else{const t=_s(e,i,s,l,n);s+=t.offsetX,a.push(t.path)}}return a}(e,t,this.data);for(let i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}function _s(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new ws;let s,l,c,u,h,d,f,p;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;){switch(e[i++]){case"m":s=e[i++]*t+n,l=e[i++]*t+r,a.moveTo(s,l);break;case"l":s=e[i++]*t+n,l=e[i++]*t+r,a.lineTo(s,l);break;case"q":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,a.quadraticCurveTo(h,d,c,u);break;case"b":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,f=e[i++]*t+n,p=e[i++]*t+r,a.bezierCurveTo(h,d,f,p,c,u)}}}return{offsetX:o.ha*t,path:a}}xs.prototype.isFont=!0;let Es;const As=function(){return void 0===Es&&(Es=new(window.AudioContext||window.webkitAudioContext)),Es};class Ss extends Ua{constructor(e){super(e)}load(t,n,r,i){const o=this,a=new Ga(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{const e=r.slice(0);As().decodeAudioData(e,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}(class extends gs{constructor(e,t,n=1){super(void 0,n);const r=(new Je).set(e),i=(new Je).set(t),o=new R(r.r,r.g,r.b),a=new R(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}}).prototype.isHemisphereLightProbe=!0;(class extends gs{constructor(e,t=1){super(void 0,t);const n=(new Je).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class Ms{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ts(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=Ts();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Ts(){return("undefined"===typeof performance?Date:performance).now()}class Cs extends Pe{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}class Os{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let o=0;o!==i;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){O.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;O.multiplyQuaternionsFlat(e,o,e,t,e,n),O.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const Rs=new RegExp("[\\[\\]\\.:\\/]","g"),ks="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ps=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ls=/(WCOD+)?/.source.replace("WCOD",ks),Ds=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Is=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ns=new RegExp("^"+Ps+Ls+Ds+Is+"$"),js=["material","materials","bones"];class Bs{constructor(e,t,n){this.path=t,this.parsedPath=n||Bs.parseTrackName(t),this.node=Bs.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Bs.Composite(e,t,n):new Bs(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Rs,"")}static parseTrackName(e){const t=Ns.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==js.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Bs.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Bs.Composite=class{constructor(e,t,n){const r=n||Bs.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Bs.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Bs.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Bs.prototype.GetterByBindingType=[Bs.prototype._getValue_direct,Bs.prototype._getValue_array,Bs.prototype._getValue_arrayElement,Bs.prototype._getValue_toArray],Bs.prototype.SetterByBindingTypeAndVersioning=[[Bs.prototype._setValue_direct,Bs.prototype._setValue_direct_setNeedsUpdate,Bs.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_array,Bs.prototype._setValue_array_setNeedsUpdate,Bs.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_arrayElement,Bs.prototype._setValue_arrayElement_setNeedsUpdate,Bs.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_fromArray,Bs.prototype._setValue_fromArray_setNeedsUpdate,Bs.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];(class{constructor(){this.uuid=f(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a=void 0,s=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],h=u.uuid;let d=t[h];if(void 0===d){d=s++,t[h]=d,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new Bs(u,n[e],r[e]))}else if(d<l){a=e[d];const s=--l,c=e[s];t[c.uuid]=d,e[d]=c,t[h]=s,e[s]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[s];let a=t[d];t[d]=o,void 0===a&&(a=new Bs(u,n[e],r[e])),t[s]=a}}else e[d]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,l=t[s];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[s]=o,e[o]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,l=t[s];if(void 0!==l)if(delete t[s],l<i){const a=--i,s=e[a],c=--o,u=e[c];t[s.uuid]=l,e[l]=s,t[u.uuid]=a,e[a]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[c];t[l]=r,t[a]=i,t.pop()}}else{const i=--o,a=e[i];i>0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(let h=c,d=s.length;h!==d;++h){const n=s[h];u[h]=new Bs(n,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}).prototype.isAnimationObjectGroup=!0;class Fs{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400};for(let l=0;l!==o;++l){const e=i[l].createInterpolant(null);a[l]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case 2501:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);break;case 2500:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1===(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}(class extends c{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let u=0;u!==i;++u){const e=r[u],i=e.name;let l=c[i];if(void 0!==l)o[u]=l;else{if(l=o[u],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,i));continue}const r=t&&t._propertyBindings[u].binding.parsedPath;l=new Os(Bs.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,i),o[u]=l}a[u].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const e=t[n];0===--e.referenceCount&&this._removeInactiveBinding(e)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new Ta(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"===typeof e?ja.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Fs(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,a,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"===typeof e?ja.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let l=0;l!==s;++l)a[l].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const i in n){const e=n[i].actionByRoot[t];void 0!==e&&(this._deactivateAction(e),this._removeInactiveAction(e))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const i in r){const e=r[i];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class zs{constructor(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new zs(void 0===this.value.clone?this.value:this.value.clone())}}(class extends gi{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}).prototype.isInstancedInterleavedBuffer=!0;(class{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}).prototype.isGLBufferAttribute=!0;class Hs{constructor(e,t,n=0,r=1/0){this.ray=new ae(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new ye,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return Vs(e,this,n,t),n.sort(Us),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)Vs(e[r],this,n,t);return n.sort(Us),n}}function Us(e,t){return e.distance-t.distance}function Vs(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Vs(r[e],t,n,!0)}}class Gs{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(p(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const Ws=new b;class qs{constructor(e=new b(1/0,1/0),t=new b(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ws.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ws.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}qs.prototype.isBox2=!0;const Xs=new R,Ys=new R;(class extends Pe{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}).prototype.isImmediateRenderObject=!0;const Ks=new R,Qs=new se,Zs=new se;const Js=new Float32Array(1);new Int32Array(Js.buffer);Math.pow(2,8);const $s=[.125,.215,.35,.446,.526,.582],el=5+$s.length,tl=new $e({side:a,depthWrite:!1,depthTest:!1}),{_lodPlanes:nl,_sizeLods:rl,_sigmas:il}=(new Pt(new Dt,tl),ol());Math.sqrt(5);function ol(){const e=[],t=[],n=[];let r=8;for(let i=0;i<el;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=$s[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,d=6,f=3,p=2,m=1,g=new Float32Array(f*d*h),v=new Float32Array(p*d*h),y=new Float32Array(m*d*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(r,f*d*e),v.set(u,p*d*e);const i=[e,e,e,e,e,e];y.set(i,m*d*e)}const b=new pt;b.setAttribute("position",new nt(g,f)),b.setAttribute("uv",new nt(v,p)),b.setAttribute("faceIndex",new nt(y,m)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}go.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(go.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Ka.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},class extends ro{constructor(e=10,t=10,n=4473924,r=8947848){n=new Je(n),r=new Je(r);const i=t/2,o=e/t,a=e/2,s=[],l=[];for(let u=0,h=0,d=-a;u<=t;u++,d+=o){s.push(-a,0,d,a,0,d),s.push(d,0,-a,d,0,a);const e=u===i?n:r;e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3}const c=new pt;c.setAttribute("position",new ot(s,3)),c.setAttribute("color",new ot(l,3));super(c,new Yi({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends ro{constructor(e){const t=function e(t){const n=[];t&&t.isBone&&n.push(t);for(let r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(e),n=new pt,r=[],i=[],o=new Je(0,0,1),a=new Je(0,1,0);for(let s=0;s<t.length;s++){const e=t[s];e.parent&&e.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.setAttribute("position",new ot(r,3)),n.setAttribute("color",new ot(i,3));super(n,new Yi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Zs.copy(this.root.matrixWorld).invert();for(let i=0,o=0;i<t.length;i++){const e=t[i];e.parent&&e.parent.isBone&&(Qs.multiplyMatrices(Zs,e.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o,Ks.x,Ks.y,Ks.z),Qs.multiplyMatrices(Zs,e.parent.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o+1,Ks.x,Ks.y,Ks.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Ua.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),vs.extractUrlBase(e)},Ua.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},qs.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},qs.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qs.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},qs.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},L.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},L.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},L.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},L.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},L.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},J.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Qt.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},class{constructor(e=new R,t=new R){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Xs.subVectors(e,this.start),Ys.subVectors(this.end,this.start);const n=Ys.dot(Ys);let r=Ys.dot(Xs)/n;return t&&(r=p(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},w.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},w.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},w.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},w.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},se.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},se.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},se.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new R).setFromMatrixColumn(this,3)},se.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},se.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},se.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},se.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},se.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},se.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},se.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},se.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},se.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},se.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},se.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},se.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Xt.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},O.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},O.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},ae.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ae.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},ae.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Ve.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Ve.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},Ve.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},Ve.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},Ve.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},Ve.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ve.getBarycoord(e,t,n,r,i)},Ve.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ve.getNormal(e,t,n,r)},Qa.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Qa.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new ca(this,e)},Qa.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new ha(this,e)},b.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},b.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},b.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},R.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},R.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},R.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},R.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},R.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},R.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},R.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},R.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},R.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},M.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},M.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Pe.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Pe.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Pe.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Pe.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Pe.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Pe.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Pt.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Pt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),zi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},zt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Za.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(nt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),nt.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},nt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},nt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},pt.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},pt.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new nt(arguments[1],arguments[2])))},pt.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},pt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},pt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},pt.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},pt.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(pt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),gi.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},gi.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},ca.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},ca.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},ca.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},mi.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},zs.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(We.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Bt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),di.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},di.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},di.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},di.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},di.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},di.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},di.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},di.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},di.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},di.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},di.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},di.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},di.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},di.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},di.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},di.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},di.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},di.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},di.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},di.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},di.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},di.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},di.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},di.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},di.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ni.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(T.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Cs.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new Ss).load(e,(function(e){t.setBuffer(e)})),this},class{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ht.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Ht.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},_.crossOrigin=void 0,_.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Xa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new qa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},_.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"130"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="130")},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=n(28),s=n(73),l=n(89),c=n(37),u=n(74),h=n(95),d=n(5),f=n(81);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,onScroll:!0,onWheel:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.hrefAttrs,o=e.onLayout,a=e.onMoveShouldSetResponder,p=e.onMoveShouldSetResponderCapture,m=e.onResponderEnd,g=e.onResponderGrant,y=e.onResponderMove,x=e.onResponderReject,_=e.onResponderRelease,E=e.onResponderStart,A=e.onResponderTerminate,S=e.onResponderTerminationRequest,M=e.onScrollShouldSetResponder,T=e.onScrollShouldSetResponderCapture,C=e.onSelectionChangeShouldSetResponder,O=e.onSelectionChangeShouldSetResponderCapture,R=e.onStartShouldSetResponder,k=e.onStartShouldSetResponderCapture;var P=r.useContext(f.a),L=r.useRef(null);Object(l.a)(L,o),Object(h.a)(L,{onMoveShouldSetResponder:a,onMoveShouldSetResponderCapture:p,onResponderEnd:m,onResponderGrant:g,onResponderMove:y,onResponderReject:x,onResponderRelease:_,onResponderStart:E,onResponderTerminate:A,onResponderTerminationRequest:S,onScrollShouldSetResponder:M,onScrollShouldSetResponderCapture:T,onSelectionChangeShouldSetResponder:C,onSelectionChangeShouldSetResponderCapture:O,onStartShouldSetResponder:R,onStartShouldSetResponderCapture:k});var D=d.a.compose(P&&w.inline,e.style),I=function(e){return Object(s.a)(e,v)}(e);if(I.classList=b,I.style=D,null!=e.href&&null!=n){var N=n.download,j=n.rel,B=n.target;null!=N&&(I.download=N),null!=j&&(I.rel=j),"string"===typeof B&&(I.target="_"!==B.charAt(0)?"_"+B:B)}var F=Object(u.a)(I),z=Object(c.a)(L,F,t);return I.ref=z,Object(i.a)("div",I)}));y.displayName="View";var b=[o.a.create({view:{alignItems:"stretch",border:"0 solid black",boxSizing:"border-box",display:"flex",flexBasis:"auto",flexDirection:"column",flexShrink:0,margin:0,minHeight:0,minWidth:0,padding:0,position:"relative",zIndex:0}}).view],w=d.a.create({inline:{display:"inline-flex"}});t.a=y},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(t.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(13),i=n(105),o=n(82),a={position:"absolute",left:0,right:0,top:0,bottom:0},s={absoluteFill:i.a.register(a),absoluteFillObject:a,compose:function(e,t){return e&&t?[e,t]:e||t},create:function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n]&&i.a.register(e[n]);t[n]=r})),t},flatten:o.a,hairlineWidth:1};r.canUseDOM&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=s.flatten);t.a=s},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(295)},function(e,t,n){var r=n(292),i=n(293),o=n(178),a=n(294);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r={OS:"web",select:function(e){return"web"in e?e.web:e.default},get isTesting(){return!1}};t.a=r},function(t,n,r){"use strict";(function(t){r.d(n,"a",(function(){return kn})),r.d(n,"b",(function(){return pt})),r.d(n,"c",(function(){return Mt})),r.d(n,"d",(function(){return er})),r.d(n,"e",(function(){return at})),r.d(n,"f",(function(){return Gt})),r.d(n,"g",(function(){return At})),r.d(n,"h",(function(){return Me})),r.d(n,"i",(function(){return Dt})),r.d(n,"j",(function(){return q})),r.d(n,"k",(function(){return $t})),r.d(n,"l",(function(){return $n})),r.d(n,"m",(function(){return Nt})),r.d(n,"n",(function(){return Wt})),r.d(n,"o",(function(){return Xt})),r.d(n,"p",(function(){return Mn})),r.d(n,"q",(function(){return Qt})),r.d(n,"r",(function(){return fn})),r.d(n,"s",(function(){return Ee})),r.d(n,"t",(function(){return tn})),r.d(n,"u",(function(){return kt})),r.d(n,"v",(function(){return Mt})),r.d(n,"w",(function(){return en})),r.d(n,"x",(function(){return Jt}));function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"===typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var o={};function a(){return"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:o}var s=Object.assign,l=Object.getOwnPropertyDescriptor,c=Object.defineProperty,u=Object.prototype,h=[];Object.freeze(h);var d={};Object.freeze(d);var f="undefined"!==typeof Proxy,p=Object.toString();function m(){f||i("Proxy not available")}function g(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function y(e){return"function"===typeof e}function b(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function w(e){return null!==e&&"object"===typeof e}function x(e){var t;if(!w(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===p}function _(e,t,n){c(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function E(e,t,n){c(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function A(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return w(e)&&!0===e[n]}}function S(e){return e instanceof Map}function M(e){return e instanceof Set}var T="undefined"!==typeof Object.getOwnPropertySymbols;function C(e){var t=Object.keys(e);if(!T)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return u.propertyIsEnumerable.call(e,t)}))):t}var O="undefined"!==typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:T?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function R(e){return null===e?null:"object"===typeof e?""+e:e}function k(e,t){return u.hasOwnProperty.call(e,t)}var P=Object.getOwnPropertyDescriptors||function(e){var t={};return O(e).forEach((function(n){t[n]=l(e,n)})),t};function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var z=Symbol("mobx-stored-annotations");function H(e){return Object.assign((function(t,n){U(t,n,e)}),e)}function U(e,t,n){k(e,z)||_(e,z,I({},e[z])),function(e){return"override"===e.annotationType_}(n)||(e[z][t]=n)}var V=Symbol("mobx administration"),G=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return dt(this)},t.reportChanged=function(){ut(),ft(this),ht()},t.toString=function(){return this.name_},e}(),W=A("Atom",G);function q(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new G(e);return t!==v&&Lt("onBO",i,t,r),n!==v&&Pt(i,n),i}var X={identity:function(e,t){return e===t},structural:function(e,t){return rr(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return rr(e,t,1)}};function Y(e,t,n){return Kt(e)?e:Array.isArray(e)?Ee.array(e,{name:n}):x(e)?Ee.object(e,void 0,{name:n}):S(e)?Ee.map(e,{name:n}):M(e)?Ee.set(e,{name:n}):e}function K(e){return e}function Q(e,t){return{annotationType_:e,options_:t,make_:Z,extend_:J}}function Z(e,t){for(var n,r,o,a=!1,s=e.target_,h=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;s&&s!==u;){var d=l(s,t);if(d){if(s===e.target_||h){var f=$(e,this,t,d);if(!e.defineProperty_(t,f))return;if(a=!0,h)break}if(s!==e.target_){if(Tt(d.value)){a=!0;break}var p=$(e,this,t,d,!1);c(s,t,p),a=!0}}s=Object.getPrototypeOf(s)}a?Vn(e,this,t):(null==(o=e.target_[z])?void 0:o[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function J(e,t,n,r){var i=$(e,this,t,n);return e.defineProperty_(t,i,r)}function $(e,t,n,r,i){var o,a,s,l,c,u;void 0===i&&(i=ot.safeDescriptors),u=r,t.annotationType_,u.value;var h,d=r.value;(null==(o=t.options_)?void 0:o.bound)&&(d=d.bind(null!=(h=e.proxy_)?h:e.target_));return{value:Pe(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),d,null!=(l=null==(c=t.options_)?void 0:c.autoAction)&&l),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ee(e,t){return{annotationType_:e,options_:t,make_:te,extend_:ne}}function te(e,t){for(var n,r=!1,o=e.target_;o&&o!==u;){var a=l(o,t);if(a){if(o!==e.target_){if(Vt(a.value)){r=!0;break}var s=re(e,this,t,a,!1);c(o,t,s)}else{var h=re(e,this,t,a);if(!e.defineProperty_(t,h))return}r=!0}o=Object.getPrototypeOf(o)}r?Vn(e,this,t):(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ne(e,t,n,r){var i=re(e,this,t,n);return e.defineProperty_(t,i,r)}function re(e,t,n,r,i){var o;return void 0===i&&(i=ot.safeDescriptors),o=r,t.annotationType_,o.value,{value:Ht(r.value),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ie(e,t){return{annotationType_:e,options_:t,make_:oe,extend_:ae}}function oe(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){if(se(e,this,t,o),!e.defineComputedProperty_(t,I({},this.options_,{get:o.get,set:o.set})))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ae(e,t,n,r){return se(e,this,t,n),e.defineComputedProperty_(t,I({},this.options_,{get:n.get,set:n.set}),r)}function se(e,t,n,r){t.annotationType_,r.get}function le(e,t){return{annotationType_:e,options_:t,make_:ce,extend_:ue}}function ce(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){var a,s;if(he(e,this,t,o),!e.defineObservableProperty_(t,o.value,null!=(a=null==(s=this.options_)?void 0:s.enhancer)?a:Y))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ue(e,t,n,r){var i,o;return he(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:Y,r)}function he(e,t,n,r){t.annotationType_}var de={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function fe(e){return e||de}Object.freeze(de);var pe=le("observable"),me=le("observable.ref",{enhancer:K}),ge=le("observable.shallow",{enhancer:function(e,t,n){return void 0===e||null===e||Un(e)||Mn(e)||Pn(e)||In(e)?e:Array.isArray(e)?Ee.array(e,{name:n,deep:!1}):x(e)?Ee.object(e,void 0,{name:n,deep:!1}):S(e)?Ee.map(e,{name:n,deep:!1}):M(e)?Ee.set(e,{name:n,deep:!1}):void 0}}),ve=le("observable.struct",{enhancer:function(e,t){return rr(e,t)?t:e}}),ye=H(pe);function be(e){return!0===e.deep?Y:!1===e.deep?K:function(e){var t,n;return e&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:Y}(e.defaultDecorator)}function we(e,t,n){if(!b(t))return Kt(e)?e:x(e)?Ee.object(e,t,n):Array.isArray(e)?Ee.array(e,t):S(e)?Ee.map(e,t):M(e)?Ee.set(e,t):"object"===typeof e&&null!==e?e:Ee.box(e,t);U(e,t,pe)}Object.assign(we,ye);var xe,_e,Ee=s(we,{box:function(e,t){var n=fe(t);return new Be(e,be(n),n.name,!0,n.equals)},array:function(e,t){var n=fe(t);return(!1===ot.useProxies||!1===n.proxy?Jn:vn)(e,be(n),n.name)},map:function(e,t){var n=fe(t);return new kn(e,be(n),n.name)},set:function(e,t){var n=fe(t);return new Dn(e,be(n),n.name)},object:function(e,t,n){return It(!1===ot.useProxies||!1===(null==n?void 0:n.proxy)?Fn({},n):function(e,t){var n,r;return m(),e=Fn(e,t),null!=(r=(n=e[V]).proxy_)?r:n.proxy_=new Proxy(e,an)}({},n),e,t)},ref:H(me),shallow:H(ge),deep:ye,struct:H(ve)}),Ae=ie("computed"),Se=ie("computed.struct",{equals:X.structural}),Me=function(e,t){if(b(t))return U(e,t,Ae);if(x(e))return H(ie("computed",e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Ue(n)};Object.assign(Me,Ae),Me.struct=H(Se);var Te,Ce=0,Oe=1,Re=null!=(xe=null==(_e=l((function(){}),"name"))?void 0:_e.configurable)&&xe,ke={value:"action",configurable:!0,writable:!1,enumerable:!1};function Pe(e,t,n,r){function i(){return Le(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,Re&&(ke.value=e,Object.defineProperty(i,"name",ke)),i}function Le(e,t,n,r,o){var a=function(e,t,n,r){0;var i=ot.trackingDerivation,o=!t||!i;ut();var a=ot.allowStateChanges;o&&(Ze(),a=Ie(!0));var s=$e(!0),l={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:s,notifySpy_:!1,startTime_:0,actionId_:Oe++,parentActionId_:Ce};return Ce=l.actionId_,l}(0,t);try{return n.apply(r,o)}catch(s){throw a.error_=s,s}finally{!function(e){Ce!==e.actionId_&&i(30);Ce=e.parentActionId_,void 0!==e.error_&&(ot.suppressReactionErrors=!0);Ne(e.prevAllowStateChanges_),et(e.prevAllowStateReads_),ht(),e.runAsAction_&&Je(e.prevDerivation_);0;ot.suppressReactionErrors=!1}(a)}}function De(e,t){var n=Ie(e);try{return t()}finally{Ne(n)}}function Ie(e){var t=ot.allowStateChanges;return ot.allowStateChanges=e,t}function Ne(e){ot.allowStateChanges=e}Te=Symbol.toPrimitive;var je,Be=function(e){function t(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=X.default),(a=e.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=o,a.value_=n(t,void 0,r),a}N(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==ot.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(Xe(this),sn(this)){var t=cn(this,{object:this,type:pn,newValue:e});if(!t)return ot.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ot.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),un(this)&&dn(this,{type:pn,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return ln(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:pn,newValue:this.value_,oldValue:void 0}),hn(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return R(this.get())},n[Te]=function(){return this.valueOf()},t}(G),Fe=A("ObservableValue",Be);je=Symbol.toPrimitive;var ze,He,Ue=function(){function t(e){this.dependenciesState_=ze.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ge(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=He.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||i(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Pe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?X.structural:X.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var n=t.prototype;return n.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==ze.UP_TO_DATE_)return;e.lowestObserverState_=ze.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&(e.dependenciesState_=ze.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},n.get=function(){if(this.isComputing_&&i(32,this.name_,this.derivation),0!==ot.inBatch||0!==this.observers_.size||this.keepAlive_){if(dt(this),qe(this)){var e=ot.trackingContext;this.keepAlive_&&!e&&(ot.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===ze.STALE_)return;e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===ze.POSSIBLY_STALE_?t.dependenciesState_=ze.STALE_:t.dependenciesState_===ze.UP_TO_DATE_&&(e.lowestObserverState_=ze.UP_TO_DATE_)}))}(this),ot.trackingContext=e}}else qe(this)&&(this.warnAboutUntrackedRead_(),ut(),this.value_=this.computeValue_(!1),ht());var t=this.value_;if(We(t))throw t.cause;return t},n.set=function(e){if(this.setter_){this.isRunningSetter_&&i(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else i(34,this.name_)},n.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===ze.NOT_TRACKING_,n=this.computeValue_(!0);var r=t||We(e)||We(n)||!this.equals_(e,n);return r&&(this.value_=n),r},n.computeValue_=function(t){this.isComputing_=!0;var n,r=Ie(!1);if(t)n=Ye(this,this.derivation,this.scope_);else if(!0===ot.disableErrorBoundaries)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new Ge(e)}return Ne(r),this.isComputing_=!1,n},n.suspend_=function(){this.keepAlive_||(Ke(this),this.value_=void 0)},n.observe_=function(e,t){var n=this,r=!0,i=void 0;return Ct((function(){var o=n.get();if(!r||t){var a=Ze();e({observableKind:"computed",debugObjectName:n.name_,type:pn,object:n,newValue:o,oldValue:i}),Je(a)}r=!1,i=o}))},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return R(this.get())},n[je]=function(){return this.valueOf()},t}(),Ve=A("ComputedValue",Ue);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(ze||(ze={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(He||(He={}));var Ge=function(e){this.cause=void 0,this.cause=e};function We(e){return e instanceof Ge}function qe(t){switch(t.dependenciesState_){case ze.UP_TO_DATE_:return!1;case ze.NOT_TRACKING_:case ze.STALE_:return!0;case ze.POSSIBLY_STALE_:for(var n=$e(!0),r=Ze(),i=t.observing_,o=i.length,a=0;a<o;a++){var s=i[a];if(Ve(s)){if(ot.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return Je(r),et(n),!0}if(t.dependenciesState_===ze.STALE_)return Je(r),et(n),!0}}return tt(t),Je(r),et(n),!1}}function Xe(e){}function Ye(t,n,r){var i=$e(!0);tt(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++ot.runId;var o,a=ot.trackingDerivation;if(ot.trackingDerivation=t,ot.inBatch++,!0===ot.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new Ge(e)}return ot.inBatch--,ot.trackingDerivation=a,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=ze.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue_&&(s.diffValue_=1,i!==a&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue_&<(l,e),l.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,st(c,e))}r!==ze.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(t),et(i),o}function Ke(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)lt(t[n],e);e.dependenciesState_=ze.NOT_TRACKING_}function Qe(e){var t=Ze();try{return e()}finally{Je(t)}}function Ze(){var e=ot.trackingDerivation;return ot.trackingDerivation=null,e}function Je(e){ot.trackingDerivation=e}function $e(e){var t=ot.allowStateReads;return ot.allowStateReads=e,t}function et(e){ot.allowStateReads=e}function tt(e){if(e.dependenciesState_!==ze.UP_TO_DATE_){e.dependenciesState_=ze.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=ze.UP_TO_DATE_}}var nt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},rt=!0,it=!1,ot=function(){var e=a();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(rt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new nt).version&&(rt=!1),rt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new nt):(setTimeout((function(){it||i(35)}),1),new nt)}();function at(){return ot}function st(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lt(e,t){e.observers_.delete(t),0===e.observers_.size&&ct(e)}function ct(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,ot.pendingUnobservations.push(e))}function ut(){ot.inBatch++}function ht(){if(0===--ot.inBatch){gt();for(var e=ot.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Ue&&n.suspend_())}ot.pendingUnobservations=[]}}function dt(e){var t=ot.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&ot.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&ot.inBatch>0&&ct(e),!1)}function ft(e){e.lowestObserverState_!==ze.STALE_&&(e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=ze.STALE_})))}var pt=function(){function t(e,t,n,r){void 0===e&&(e="Reaction"),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ze.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=He.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var n=t.prototype;return n.onBecomeStale_=function(){this.schedule_()},n.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ot.pendingReactions.push(this),gt())},n.isScheduled=function(){return this.isScheduled_},n.runReaction_=function(){if(!this.isDisposed_){ut(),this.isScheduled_=!1;var t=ot.trackingContext;if(ot.trackingContext=this,qe(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}ot.trackingContext=t,ht()}},n.track=function(e){if(!this.isDisposed_){ut();0,this.isRunning_=!0;var t=ot.trackingContext;ot.trackingContext=this;var n=Ye(this,e,void 0);ot.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Ke(this),We(n)&&this.reportExceptionInDerivation_(n.cause),ht()}},n.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ot.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";ot.suppressReactionErrors||console.error(n,e),ot.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},n.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ut(),Ke(this),ht()))},n.getDisposer_=function(){var e=this.dispose.bind(this);return e[V]=this,e},n.toString=function(){return"Reaction["+this.name_+"]"},n.trace=function(e){void 0===e&&(e=!1),function(){i("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"===typeof n[n.length-1]&&(e=n.pop());var o=nn(n);if(!o)return i("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===He.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?He.BREAK:He.LOG}(this,e)},t}();var mt=function(e){return e()};function gt(){ot.inBatch>0||ot.isRunningReactions||mt(vt)}function vt(){ot.isRunningReactions=!0;for(var e=ot.pendingReactions,t=0;e.length>0;){100===++t&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}ot.isRunningReactions=!1}var yt=A("Reaction",pt);var bt=Q("action"),wt=Q("action.bound",{bound:!0}),xt=Q("autoAction",{autoAction:!0}),_t=Q("autoAction.bound",{autoAction:!0,bound:!0});function Et(e){return function(t,n){return y(t)?Pe(t.name||"<unnamed action>",t,e):y(n)?Pe(t,n,e):b(n)?U(t,n,e?xt:bt):b(t)?H(Q(e?"autoAction":"action",{name:t,autoAction:e})):void 0}}var At=Et(!1);Object.assign(At,bt);var St=Et(!0);function Mt(e){return Le(e.name,!1,e,this,void 0)}function Tt(e){return y(e)&&!0===e.isMobxAction}function Ct(e,t){var n,r;void 0===t&&(t=d);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)i=new pt(o,(function(){this.track(l)}),t.onError,t.requiresObservable);else{var a=Rt(t),s=!1;i=new pt(o,(function(){s||(s=!0,a((function(){s=!1,i.isDisposed_||i.track(l)})))}),t.onError,t.requiresObservable)}function l(){e(i)}return i.schedule_(),i.getDisposer_()}Object.assign(St,xt),At.bound=H(wt),St.bound=H(_t);var Ot=function(e){return e()};function Rt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ot}function kt(t,n,r){var i;void 0===r&&(r=d);var o,a,s,l=null!=(i=r.name)?i:"Reaction",c=At(l,r.onError?(o=r.onError,a=n,function(){try{return a.apply(this,arguments)}catch(e){o.call(this,e)}}):n),u=!r.scheduler&&!r.delay,h=Rt(r),f=!0,p=!1,m=void 0,g=r.compareStructural?X.structural:r.equals||X.default,v=new pt(l,(function(){f||u?y():p||(p=!0,h(y))}),r.onError,r.requiresObservable);function y(){if(p=!1,!v.isDisposed_){var e=!1;v.track((function(){var n=De(!1,(function(){return t(v)}));e=f||!g(s,n),m=s,s=n})),(f&&r.fireImmediately||!f&&e)&&c(s,m,v),f=!1}}return v.schedule_(),v.getDisposer_()}function Pt(e,t,n){return Lt("onBUO",e,t,n)}function Lt(e,t,n,r){var i="function"===typeof r?$n(t,n):$n(t),o=y(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Dt(e){!0===e.isolateGlobalState&&function(){if((ot.pendingReactions.length||ot.inBatch||ot.isRunningReactions)&&i(36),it=!0,rt){var e=a();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),ot=new nt}}();var t=e.useProxies,n=e.enforceActions;if(void 0!==t&&(ot.useProxies="always"===t||"never"!==t&&"undefined"!==typeof Proxy),"ifavailable"===t&&(ot.verifyProxies=!0),void 0!==n){var r="always"===n?"always":"observed"===n;ot.enforceActions=r,ot.allowStateChanges=!0!==r&&"always"!==r}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(ot[t]=!!e[t])})),ot.allowStateReads=!ot.observableRequiresReaction,e.reactionScheduler&&function(e){var t=mt;mt=function(n){return e((function(){return t(n)}))}}(e.reactionScheduler)}function It(e,t,n,r){var i=P(t),o=Fn(e,r)[V];ut();try{O(i).forEach((function(e){o.extend_(e,i[e],!n||(!(e in n)||n[e]))}))}finally{ht()}return e}function Nt(e,t){return jt($n(e,t))}function jt(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(jt)),n}var Bt=0;function Ft(){this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var zt=ee("flow"),Ht=Object.assign((function(t,n){if(b(n))return U(t,n,zt);var r=t,i=r.name||"<unnamed flow>",o=function(){var t,n=this,o=arguments,a=++Bt,s=At(i+" - runid: "+a+" - init",r).apply(n,o),l=void 0,c=new Promise((function(n,r){var o=0;function c(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.next).call(s,t)}catch(e){return r(e)}h(n)}function u(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.throw).call(s,t)}catch(e){return r(e)}h(n)}function h(e){if(!y(null==e?void 0:e.then))return e.done?n(e.value):(l=Promise.resolve(e.value)).then(c,u);e.then(h,r)}t=r,c(void 0)}));return c.cancel=At(i+" - runid: "+a+" - cancel",(function(){try{l&&Ut(l);var n=s.return(void 0),r=Promise.resolve(n.value);r.then(v,v),Ut(r),t(new Ft)}catch(e){t(e)}})),c};return o.isMobXFlow=!0,o}),zt);function Ut(e){y(e.cancel)&&e.cancel()}function Vt(e){return!0===(null==e?void 0:e.isMobXFlow)}function Gt(e,t,n){var r;return Pn(e)||Mn(e)||Fe(e)?r=er(e):Un(e)&&(r=er(e,t)),r.dehancer="function"===typeof t?t:n,function(){r.dehancer=void 0}}function Wt(e,t,n){return y(n)?function(e,t,n){return er(e,t).intercept_(n)}(e,t,n):function(e,t){return er(e).intercept_(t)}(e,t)}function qt(e,t){if(void 0!==t){if(!1===Un(e))return!1;if(!e[V].values_.has(t))return!1;var n=$n(e,t);return Ve(n)}return Ve(e)}function Xt(e,t){return qt(e,t)}function Yt(e,t){return!!e&&(void 0!==t?!!Un(e)&&e[V].values_.has(t):Un(e)||!!e[V]||W(e)||yt(e)||Ve(e))}function Kt(e){return Yt(e)}function Qt(e,t){return Yt(e,t)}function Zt(e){return Un(e)?e[V].keys_():Pn(e)||In(e)?Array.from(e.keys()):Mn(e)?e.map((function(e,t){return t})):void i(5)}function Jt(e){return Un(e)?Zt(e).map((function(t){return e[t]})):Pn(e)?Zt(e).map((function(t){return e.get(t)})):In(e)?Array.from(e.values()):Mn(e)?e.slice():void i(6)}function $t(e){return Un(e)?Zt(e).map((function(t){return[t,e[t]]})):Pn(e)?Zt(e).map((function(t){return[t,e.get(t)]})):In(e)?Array.from(e.entries()):Mn(e)?e.map((function(e,t){return[t,e]})):void i(7)}function en(e,t,n){if(2!==arguments.length||In(e))Un(e)?e[V].set_(t,n):Pn(e)?e.set(t,n):In(e)?e.add(t):Mn(e)?("number"!==typeof t&&(t=parseInt(t,10)),t<0&&i("Invalid index: '"+t+"'"),ut(),t>=e.length&&(e.length=t+1),e[t]=n,ht()):i(8);else{ut();var r=t;try{for(var o in r)en(e,o,r[o])}finally{ht()}}}function tn(e,t,n,r){return y(n)?function(e,t,n,r){return er(e,t).observe_(n,r)}(e,t,n,r):function(e,t,n){return er(e).observe_(t,n)}(e,t,n)}function nn(e){switch(e.length){case 0:return ot.trackingDerivation;case 1:return $n(e[0]);case 2:return $n(e[0],e[1])}}function rn(e,t){void 0===t&&(t=void 0),ut();try{return e.apply(t)}finally{ht()}}function on(e){return e[V]}var an={has:function(e,t){return on(e).has_(t)},get:function(e,t){return on(e).get_(t)},set:function(e,t,n){var r;return!!b(t)&&(null==(r=on(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!b(t)&&(null==(n=on(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=on(e).defineProperty_(t,n))||r},ownKeys:function(e){return on(e).ownKeys_()},preventExtensions:function(e){i(13)}};function sn(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function ln(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function cn(e,t){var n=Ze();try{for(var r=[].concat(e.interceptors_||[]),o=0,a=r.length;o<a&&((t=r[o](t))&&!t.type&&i(14),t);o++);return t}finally{Je(n)}}function un(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function hn(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function dn(e,t){var n=Ze(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Je(n)}}function fn(e,t,n){var r=Fn(e,n)[V];ut();try{null!=t||(t=function(e){return k(e,z)||_(e,z,I({},e[z])),e[z]}(e)),O(t).forEach((function(e){return r.make_(e,t[e])}))}finally{ht()}return e}var pn="update",mn={get:function(e,t){var n=e[V];return t===V?n:"length"===t?n.getArrayLength_():"string"!==typeof t||isNaN(t)?k(yn,t)?yn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[V];return"length"===t&&r.setArrayLength_(n),"symbol"===typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){i(15)}},gn=function(){function e(e,t,n,r){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new G(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return ln(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),hn(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!==typeof e||e<0)&&i("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&i(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=h),sn(this)){var o=cn(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!o)return h;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,type:pn,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){this.atom_;var r=n[e];if(sn(this)){var o=cn(this,{type:pn,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):i(17,e,n.length)},e}();function vn(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),m();var i=new gn(n,t,r,!1);E(i.values_,V,i);var o=new Proxy(i.values_,mn);if(i.proxy_=o,e&&e.length){var a=Ie(!0);i.spliceWithArray_(0,0,e),Ne(a)}return o}var yn={clear:function(){return this.splice(0)},replace:function(e){var t=this[V];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[V];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[V].spliceWithArray_(e,t,n)},push:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[V].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ot.trackingDerivation&&i(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ot.trackingDerivation&&i(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[V],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function bn(e,t){"function"===typeof Array.prototype[e]&&(yn[e]=t(e))}function wn(e){return function(){var t=this[V];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function xn(e){return function(t,n){var r=this,i=this[V];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(n,e,i,r)}))}}function _n(e){return function(){var t=this,n=this[V];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}bn("concat",wn),bn("flat",wn),bn("includes",wn),bn("indexOf",wn),bn("join",wn),bn("lastIndexOf",wn),bn("slice",wn),bn("toString",wn),bn("toLocaleString",wn),bn("every",xn),bn("filter",xn),bn("find",xn),bn("findIndex",xn),bn("flatMap",xn),bn("forEach",xn),bn("map",xn),bn("some",xn),bn("reduce",_n),bn("reduceRight",_n);var En,An,Sn=A("ObservableArrayAdministration",gn);function Mn(e){return w(e)&&Sn(e[V])}var Tn={},Cn="add";En=Symbol.iterator,An=Symbol.toStringTag;var On,Rn,kn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[V]=Tn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,y(Map)||i(18),this.keysAtom_=q("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ot.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Be(this.has_(e),K,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Pt(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(sn(this)){var r=cn(this,{type:n?pn:Cn,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,sn(this))&&!cn(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=un(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return rn((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:pn,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&dn(this,i)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,rn((function(){var r=new Be(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:Cn,object:this,name:e,newValue:t}:null;r&&dn(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[En]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return Pn(e)&&(e=new Map(e)),rn((function(){x(e)?C(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):S(e)?(e.constructor!==Map&&i(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!==e&&void 0!==e&&i(20,e)})),this},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return rn((function(){for(var n,r=function(e){if(S(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return i(21,e)}(e),o=new Map,a=!1,s=F(t.data_.keys());!(n=s()).done;){var l=n.value;if(!r.has(l))if(t.delete(l))a=!0;else{var c=t.data_.get(l);o.set(l,c)}}for(var u,h=F(r.entries());!(u=h()).done;){var d=u.value,f=d[0],p=d[1],m=t.data_.has(f);if(t.set(f,p),t.data_.has(f)){var g=t.data_.get(f);o.set(f,g),m||(a=!0)}}if(!a)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var v=t.data_.keys(),y=o.keys(),b=v.next(),w=y.next();!b.done;){if(b.value!==w.value){t.keysAtom_.reportChanged();break}b=v.next(),w=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},D(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:An,get:function(){return"Map"}}]),e}(),Pn=A("ObservableMap",kn);var Ln={};On=Symbol.iterator,Rn=Symbol.toStringTag;var Dn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[V]=Ln,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,y(Set)||i(22),this.atom_=q(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((this.atom_,sn(this))&&!cn(this,{type:Cn,object:this,newValue:e}))return this;if(!this.has(e)){rn((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:Cn,object:this,newValue:e}:null;0,n&&dn(this,r)}return this},t.delete=function(e){var t=this;if(sn(this)&&!cn(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return rn((function(){t.atom_.reportChanged(),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return or({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return or({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return In(e)&&(e=new Set(e)),rn((function(){Array.isArray(e)||M(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!==e&&void 0!==e&&i("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[On]=function(){return this.values()},D(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Rn,get:function(){return"Set"}}]),e}(),In=A("ObservableSet",Dn),Nn=Symbol("mobx-inferred-annotations"),jn=Object.create(null),Bn=function(){function e(e,t,n,r,i){void 0===t&&(t=new Map),void 0===r&&(r=Ee),void 0===i&&(i=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=i,this.keysAtom_=new G("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Ue)return n.set(t),!0;if(sn(this)){var r=cn(this,{type:pn,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var i=un(this),o=i?{type:pn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&dn(this,o)}return!0},t.get_=function(e){return ot.trackingDerivation&&!k(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),k(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ot.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Be(e in this.target_,K,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Gn(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=sr(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Gn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Vn(this,n,e),i},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Nn])?void 0:t.get(e);if(n)return n;for(var r=this.target_;r&&r!==u;){var o=l(r,e);if(o){n=sr(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&i(1,"true",e),!this.isPlainObject_){var a=Object.getPrototypeOf(this.target_);k(a,Nn)||_(a,Nn,new Map),a[Nn].set(e,n)}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=I({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else c(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ht()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{ut();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t});if(!o)return null;t=o.newValue}var a=Hn(e),s={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else c(this.target_,e,s);var l=new Be(t,n,"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{ht()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Hn(e),o={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else c(this.target_,e,o);this.values_.set(e,new Ue(t)),this.notifyPropertyAddition_(e,void 0)}finally{ht()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!k(this.target_,e))return!0;if(sn(this)&&!cn(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;ut();var i,o=un(this),a=this.values_.get(e),s=void 0;if(!a&&o)s=null==(i=l(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof Be&&(s=a.value_),ft(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var c={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};0,o&&dn(this,c)}}finally{ht()}return!0},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,i=un(this);if(i){var o=i?{type:Cn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,i&&dn(this,o)}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),O(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Fn(e,t){var n;if(k(e,V))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Bn(e,new Map,String(r),function(e){return e?!0===e.deep?pe:!1===e.deep?me:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return _(e,V,i),e}var zn=A("ObservableObjectAdministration",Bn);function Hn(e){return jn[e]||(jn[e]={get:function(){return this[V].getObservablePropValue_(e)},set:function(t){return this[V].setObservablePropValue_(e,t)}})}function Un(e){return!!w(e)&&zn(e[V])}function Vn(e,t,n){var r;null==(r=e.target_[z])||delete r[n]}function Gn(e,t,n){}var Wn,qn,Xn=0,Yn=function(){};Wn=Yn,qn=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Wn.prototype,qn):void 0!==Wn.prototype.__proto__?Wn.prototype.__proto__=qn:Wn.prototype=qn;var Kn=function(e){function t(t,n,r,i){var o;void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this;var a=new gn(r,n,i,!0);if(a.proxy_=j(o),E(j(o),V,a),t&&t.length){var s=Ie(!0);o.spliceWithArray(0,0,t),Ne(s)}return o}N(t,e);var n=t.prototype;return n.concat=function(){this[V].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return Mn(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return or({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},D(t,[{key:"length",get:function(){return this[V].getArrayLength_()},set:function(e){this[V].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Yn);function Qn(e){c(Kn.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[V].get_(e)},set:function(t){this[V].set_(e,t)}}}(e))}function Zn(e){if(e>Xn){for(var t=Xn;t<e+100;t++)Qn(t);Xn=e}}function Jn(e,t,n){return new Kn(e,t,n)}function $n(e,t){if("object"===typeof e&&null!==e){if(Mn(e))return void 0!==t&&i(23),e[V].atom_;if(In(e))return e[V];if(Pn(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||i(25,t,tr(e)),n}if(Un(e)){if(!t)return i(26);var r=e[V].values_.get(t);return r||i(27,t,tr(e)),r}if(W(e)||Ve(e)||yt(e))return e}else if(y(e)&&yt(e[V]))return e[V];i(28)}function er(e,t){return e||i(29),void 0!==t?er($n(e,t)):W(e)||Ve(e)||yt(e)||Pn(e)||In(e)?e:e[V]?e[V]:void i(24,e)}function tr(e,t){var n;if(void 0!==t)n=$n(e,t);else{if(Tt(e))return e.name;n=Un(e)||Pn(e)||In(e)?er(e):$n(e)}return n.name_}Object.entries(yn).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&_(Kn.prototype,t,n)})),Zn(1e3);var nr=u.toString;function rr(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,i,o){if(t===n)return 0!==t||1/t===1/n;if(null==t||null==n)return!1;if(t!==t)return n!==n;var a=typeof t;if(!y(a)&&"object"!==a&&"object"!=typeof n)return!1;var s=nr.call(t);if(s!==nr.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t===""+n;case"[object Number]":return+t!==+t?+n!==+n:0===+t?1/+t===1/n:+t===+n;case"[object Date]":case"[object Boolean]":return+t===+n;case"[object Symbol]":return"undefined"!==typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}t=ir(t),n=ir(n);var l="[object Array]"===s;if(!l){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,u=n.constructor;if(c!==u&&!(y(c)&&c instanceof c&&y(u)&&u instanceof u)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);o=o||[];var h=(i=i||[]).length;for(;h--;)if(i[h]===t)return o[h]===n;if(i.push(t),o.push(n),l){if((h=t.length)!==n.length)return!1;for(;h--;)if(!e(t[h],n[h],r-1,i,o))return!1}else{var d,f=Object.keys(t);if(h=f.length,Object.keys(n).length!==h)return!1;for(;h--;)if(d=f[h],!k(n,d)||!e(t[d],n[d],r-1,i,o))return!1}return i.pop(),o.pop(),!0}(e,t,n)}function ir(e){return Mn(e)?e.slice():S(e)||Pn(e)||M(e)||In(e)?Array.from(e.entries()):e}function or(e){return e[Symbol.iterator]=ar,e}function ar(){return this}function sr(e,t,n){return e.get?Me:!e.set&&(y(e.value)?function(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}(e.value)?!Vt(e.value)&&Ht:!Tt(e.value)&&(n?St.bound:St):t)}["Symbol","Map","Set","Symbol"].forEach((function(e){"undefined"===typeof a()[e]&&i("MobX requires global '"+e+"' to be available or polyfilled")})),"object"===typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:tr},$mobx:V})}).call(this,r(46))},function(e,t,n){"use strict";n.r(t);t.default=function(e){return e instanceof Function?e:"string"===typeof e?function(t){return t[e]}:function(t){return e}}},function(e,t,n){"use strict";var r=n(9),i=n(0),o=n(72),a=n(26),s=n(15),l=n(49),c=n(4),u=n.n(c);function h(e,t,n){var r=[];u()(n[0]&&n[0].nativeEvent,"Native driven events only support animated values contained inside `nativeEvent`."),function e(t,n){if(t instanceof a.a)t.__makeNative(),r.push({nativeEventPath:n,animatedValueTag:t.__getNativeTag()});else if("object"===typeof t)for(var i in t)e(t[i],n.concat(i))}(n[0].nativeEvent,[]);var i=Object(l.a)(e);return null!=i&&r.forEach((function(e){s.a.API.addAnimatedEventToView(i,t,e)})),{detach:function(){null!=i&&r.forEach((function(e){s.a.API.removeAnimatedEventFromView(i,t,e.animatedValueTag)}))}}}var d=function(){function e(e,t){this._listeners=[],this._argMapping=e,null==t&&(console.warn("Animated.event now requires a second argument for options"),t={useNativeDriver:!1}),t.listener&&this.__addListener(t.listener),this._callListeners=this._callListeners.bind(this),this._attachedEvent=null,this.__isNative=Object(s.c)(t)}var t=e.prototype;return t.__addListener=function(e){this._listeners.push(e)},t.__removeListener=function(e){this._listeners=this._listeners.filter((function(t){return t!==e}))},t.__attach=function(e,t){u()(this.__isNative,"Only native driven events need to be attached."),this._attachedEvent=h(e,t,this._argMapping)},t.__detach=function(e,t){u()(this.__isNative,"Only native driven events need to be detached."),this._attachedEvent&&this._attachedEvent.detach()},t.__getHandler=function(){var e=this;if(this.__isNative)return this._callListeners;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=function e(t,n,r){if(t instanceof a.a)"number"===typeof n&&t.setValue(n);else if("object"===typeof t)for(var i in t)e(t[i],n[i],i)};e._argMapping.forEach((function(e,t){i(e,n[t],"arg"+t)})),e._callListeners.apply(e,n)}},t._callListeners=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._listeners.forEach((function(e){return e.apply(void 0,t)}))},e}(),f=n(22),p=n(33);function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._transforms=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var i=r.prototype;return i.__makeNative=function(){this._transforms.forEach((function(e){for(var t in e){var n=e[t];n instanceof f.a&&n.__makeNative()}})),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getValue():t[n]=r}return t}))},i.__getAnimatedValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():t[n]=r}return t}))},i.__attach=function(){var e=this;this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a&&r.__addChild(e)}}))},i.__detach=function(){var t=this;this._transforms.forEach((function(e){for(var n in e){var r=e[n];r instanceof f.a&&r.__removeChild(t)}})),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){var e=[];return this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a?e.push({type:"animated",property:n,nodeTag:r.__getNativeTag()}):e.push({type:"static",property:n,value:s.a.transformDataType(r)})}})),s.a.validateTransform(e),{type:"transform",transforms:e}},r}(p.a),v=n(82);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(t){var n;return n=e.call(this)||this,(t=Object(v.a)(t)||{}).transform&&(t=b(b({},t),{},{transform:new g(t.transform)})),n._style=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var i=r.prototype;return i._walkStyleAndGetValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?r.__isNative||(t[n]=r.__getValue()):r&&!Array.isArray(r)&&"object"===typeof r?t[n]=this._walkStyleAndGetValues(r):t[n]=r}return t},i.__getValue=function(){return this._walkStyleAndGetValues(this._style)},i._walkStyleAndGetAnimatedValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():r&&!Array.isArray(r)&&"object"===typeof r&&(t[n]=this._walkStyleAndGetAnimatedValues(r))}return t},i.__getAnimatedValue=function(){return this._walkStyleAndGetAnimatedValues(this._style)},i.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.__makeNative=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__makeNative()}e.prototype.__makeNative.call(this)},i.__getNativeConfig=function(){var e={};for(var t in this._style)if(this._style[t]instanceof f.a){var n=this._style[t];n.__makeNative(),e[t]=n.__getNativeTag()}return s.a.validateStyles(e),{type:"style",style:e}},r}(p.a);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(t,n){var r;return r=e.call(this)||this,t.style&&(t=A(A({},t),{},{style:new _(t.style)})),r._props=t,r._callback=n,r.__attach(),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var i=r.prototype;return i.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a?(!n.__isNative||n instanceof _)&&(e[t]=n.__getValue()):e[t]=n instanceof d?n.__getHandler():n}return e},i.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(e[t]=n.__getAnimatedValue())}return e},i.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this.__isNative&&this._animatedView&&this.__disconnectAnimatedView(),this._props){var n=this._props[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.update=function(){this._callback()},i.__makeNative=function(){if(!this.__isNative){for(var e in this.__isNative=!0,this._props){var t=this._props[e];t instanceof f.a&&t.__makeNative()}this._animatedView&&this.__connectAnimatedView()}},i.setNativeView=function(e){this._animatedView!==e&&(this._animatedView=e,this.__isNative&&this.__connectAnimatedView())},i.__connectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.connectAnimatedNodeToView(this.__getNativeTag(),e)},i.__disconnectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.disconnectAnimatedNodeFromView(this.__getNativeTag(),e)},i.__restoreDefaultValues=function(){this.__isNative&&s.a.API.restoreDefaultValues(this.__getNativeTag())},i.__getNativeConfig=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(n.__makeNative(),e[t]=n.__getNativeTag())}return{type:"props",props:e}},r}(f.a);var C=function(e){var t=e.getForwardedRef,n=e.setLocalRef;return function(e){var r=t();n(e),"function"===typeof r?r(e):"object"===typeof r&&null!=r&&(r.current=e)}};function O(){return(O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=1;var N=function(e,t){u()("function"!==typeof e||e.prototype&&e.prototype.isReactComponent,"`createAnimatedComponent` does not support stateless functional components; use a class component instead.");var n=function(n){var r,o;function a(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))||this)._invokeAnimatedPropsCallbackOnMount=!1,e._eventDetachers=[],e._animatedComponentId=I+++":animatedComponent",e._isFabric=function(){var t,n,r,i,o,a;return null!=e._component&&(null!=(null==(t=e._component._internalInstanceHandle)||null==(n=t.stateNode)?void 0:n.canonical)||null!=e._component.getNativeScrollRef&&null!=e._component.getNativeScrollRef()&&null!=(null==(r=e._component.getNativeScrollRef()._internalInstanceHandle)||null==(i=r.stateNode)?void 0:i.canonical)||null!=e._component.getScrollResponder&&null!=e._component.getScrollResponder()&&null!=e._component.getScrollResponder().getNativeScrollRef&&null!=e._component.getScrollResponder().getNativeScrollRef()&&null!=(null==(o=e._component.getScrollResponder().getNativeScrollRef()._internalInstanceHandle)||null==(a=o.stateNode)?void 0:a.canonical))},e._waitForUpdate=function(){e._isFabric()&&s.a.API.setWaitingForIdentifier(e._animatedComponentId)},e._markUpdateComplete=function(){e._isFabric()&&s.a.API.unsetWaitingForIdentifier(e._animatedComponentId)},e._animatedPropsCallback=function(){if(null==e._component)e._invokeAnimatedPropsCallbackOnMount=!0;else if("function"!==typeof e._component.setNativeProps||e._isFabric())e.forceUpdate();else{if(e._propsAnimated.__isNative)throw new Error('Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation with `useNativeDriver: true`');e._component.setNativeProps(e._propsAnimated.__getAnimatedValue())}},e._setComponentRef=C({getForwardedRef:function(){return e.props.forwardedRef},setLocalRef:function(t){e._prevComponent=e._component,e._component=t,null!=t&&null==t.getNode&&(t.getNode=function(){var e;return console.warn("%s: Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.",null!==(e=t.constructor.name)&&void 0!==e?e:"<<anonymous>>"),t})}}),e}o=n,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,D(r,o);var l=a.prototype;return l._attachNativeEvents=function(){var e,t=this,n=null!=(e=this._component)&&e.getScrollableNode?this._component.getScrollableNode():this._component,r=function(e){var r=t.props[e];r instanceof d&&r.__isNative&&(r.__attach(n,e),t._eventDetachers.push((function(){return r.__detach(n,e)})))};for(var i in this.props)r(i)},l._detachNativeEvents=function(){this._eventDetachers.forEach((function(e){return e()})),this._eventDetachers=[]},l._attachProps=function(e){var t=this._propsAnimated;e!==t&&(this._propsAnimated=new T(e,this._animatedPropsCallback),t&&(t.__restoreDefaultValues(),t.__detach()))},l.render=function(){var n,r,o=this._propsAnimated.__getValue()||{},a=o.style,s=void 0===a?{}:a,l=L(o,["style"]),c=this.props.passthroughAnimatedPropExplicitValues||{},u=c.style,h=void 0===u?{}:u,d=L(c,["style"]),f=k(k({},s),h),p=null==this._component&&(!1===(null==t?void 0:t.collapsable)||!0!==l.collapsable)||this._isFabric(),m=(null!==(n=l.collapsable)&&void 0!==n?n:this._propsAnimated.__isNative||p||!1===(null==t?void 0:t.collapsable))?{nativeID:null!==(r=l.nativeID)&&void 0!==r?r:"animatedComponent",collapsable:!1}:{};return i.createElement(e,O({},l,d,m,{style:f,ref:this._setComponentRef}))},l.UNSAFE_componentWillMount=function(){this._waitForUpdate(),this._attachProps(this.props)},l.componentDidMount=function(){this._invokeAnimatedPropsCallbackOnMount&&(this._invokeAnimatedPropsCallbackOnMount=!1,this._animatedPropsCallback()),this._propsAnimated.setNativeView(this._component),this._attachNativeEvents(),this._markUpdateComplete()},l.UNSAFE_componentWillReceiveProps=function(e){this._waitForUpdate(),this._attachProps(e)},l.componentDidUpdate=function(e){this._component!==this._prevComponent&&this._propsAnimated.setNativeView(this._component),this._component===this._prevComponent&&e===this.props||(this._detachNativeEvents(),this._attachNativeEvents()),this._markUpdateComplete()},l.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach(),this._detachNativeEvents(),this._markUpdateComplete(),this._component=null,this._prevComponent=null},a}(i.Component);return i.forwardRef((function(e,t){return i.createElement(n,O({},e,null==t?null:{forwardedRef:t}))}))};function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var B=N(i.forwardRef((function(e,t){return i.createElement(o.a,j({scrollEventThrottle:1e-4},e,{ref:t}))}))),F=N(n(38).a,{collapsable:!1}),z=n(52);function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var U=N(i.forwardRef((function(e,t){return i.createElement(z.a,H({scrollEventThrottle:1e-4},e,{ref:t}))})),{collapsable:!1}),V=n(127);function G(){return(G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var W=N(i.forwardRef((function(e,t){return i.createElement(V.a,G({scrollEventThrottle:1e-4},e,{ref:t}))}))),q=N(n(57).a,{collapsable:!1}),X=N(n(3).a,{collapsable:!0}),Y=n(35);function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,K(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()+this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"addition",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var J=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this)||this)._a=t,i._min=n,i._max=r,i._value=i._lastValue=i._a.__getValue(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Z(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.interpolate=function(e){return new Y.a(this,e)},i.__getValue=function(){var e=this._a.__getValue(),t=e-this._lastValue;return this._lastValue=e,this._value=Math.min(Math.max(this._value+t,this._min),this._max),this._value},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"diffclamp",input:this._a.__getNativeTag(),min:this._min,max:this._max}},r}(p.a);function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ee=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._warnedAboutDivideByZero=!1,(0===n||n instanceof f.a&&0===n.__getValue())&&console.error("Detected potential division by zero in AnimatedDivision"),r._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,$(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){var e=this._a.__getValue(),t=this._b.__getValue();return 0===t?(this._warnedAboutDivideByZero||(console.error("Detected division by zero in AnimatedDivision"),this._warnedAboutDivideByZero=!0),0):(this._warnedAboutDivideByZero=!1,e/t)},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"division",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a=t,r._modulus=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,te(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"modulus",input:this._a.__getNativeTag(),modulus:this._modulus}},r}(p.a);function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ie=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,re(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()*this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"multiplication",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,oe(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()-this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"subtraction",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var he=function(e){var t,n;function r(t,n,r,i,o){var a;return(a=e.call(this)||this)._value=t,a._parent=n,a._animationClass=r,a._animationConfig=i,a._useNativeDriver=Object(s.c)(i),a._callback=o,a.__attach(),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ue(t,n);var i=r.prototype;return i.__makeNative=function(){this.__isNative=!0,this._parent.__makeNative(),e.prototype.__makeNative.call(this),this._value.__makeNative()},i.__getValue=function(){return this._parent.__getValue()},i.__attach=function(){this._parent.__addChild(this),this._useNativeDriver&&this.__makeNative()},i.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},i.update=function(){this._value.animate(new this._animationClass(le(le({},this._animationConfig),{},{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},i.__getNativeConfig=function(){var e=new this._animationClass(le(le({},this._animationConfig),{},{toValue:void 0})).__getNativeAnimationConfig();return{type:"tracking",animationId:Object(s.b)(),animationConfig:e,toValue:this._parent.__getNativeTag(),value:this._value.__getNativeTag()}},r}(f.a),de=n(79),fe=n(243),pe=n(164),me=n(166);function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e,t){return e&&t.onComplete?function(){t.onComplete&&t.onComplete.apply(t,arguments),e&&e.apply(void 0,arguments)}:e||t.onComplete},we=function(e,t,n){if(e instanceof de.a){var r=ve({},t),i=ve({},t);for(var o in t){var a=t[o],s=a.x,l=a.y;void 0!==s&&void 0!==l&&(r[o]=s,i[o]=l)}var c=n(e.x,r),u=n(e.y,i);return Ee([c,u],{stopTogether:!1})}return null},xe=function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,me.a,i,n)):r.animate(new me.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},_e=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start((function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)}))},stop:function(){t<e.length&&e[t].stop()},reset:function(){e.forEach((function(e,n){n<=t&&e.reset()})),t=0},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.sequence animations")},_isUsingNativeDriver:function(){return!1}}},Ee=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),o={start:function(t){n!==e.length?e.forEach((function(a,s){var l=function(a){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(a));!a.finished&&i&&o.stop()};a?a.start(l):l({finished:!0})})):t&&t({finished:!0})},stop:function(){e.forEach((function(e,t){!r[t]&&e.stop(),r[t]=!0}))},reset:function(){e.forEach((function(e,t){e.reset(),r[t]=!1,n=0}))},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.parallel animations")},_isUsingNativeDriver:function(){return!1}};return o},Ae=function(e){return xe(new a.a(0),{toValue:0,delay:e,duration:0,useNativeDriver:!1})};var Se={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),r.animate(new fe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},timing:xe,spring:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,pe.a,i,n)):r.animate(new pe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},add:function(e,t){return new Q(e,t)},subtract:function(e,t){return new ae(e,t)},divide:function(e,t){return new ee(e,t)},multiply:function(e,t){return new ie(e,t)},modulo:function(e,t){return new ne(e,t)},diffClamp:function(e,t,n){return new J(e,t,n)},delay:Ae,sequence:_e,parallel:Ee,stagger:function(e,t){return Ee(t.map((function(t,n){return _e([Ae(e*n),t])})))},loop:function(e,t){var n=void 0===t?{}:t,r=n.iterations,i=void 0===r?-1:r,o=n.resetBeforeIteration,a=void 0===o||o,s=!1,l=0;return{start:function(t){e&&0!==i?e._isUsingNativeDriver()?e._startNativeLoop(i):function n(r){void 0===r&&(r={finished:!0}),s||l===i||!1===r.finished?t&&t(r):(l++,a&&e.reset(),e.start(n))}():t&&t({finished:!0})},stop:function(){s=!0,e.stop()},reset:function(){l=0,s=!1,e.reset()},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.loop animations")},_isUsingNativeDriver:function(){return e._isUsingNativeDriver()}}},event:function(e,t){var n=new d(e,t);return n.__isNative?n:n.__getHandler()},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:function(e,t){return e?e instanceof d?(e.__addListener(t),e):function(){"function"===typeof e&&e.apply(void 0,arguments),t.apply(void 0,arguments)}:t},unforkEvent:function(e,t){e&&e instanceof d&&e.__removeListener(t)},Event:d,__PropsOnlyForTests:T};function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe={start:function(){},stop:function(){},reset:function(){},_startNativeLoop:function(){},_isUsingNativeDriver:function(){return!1}},Re={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function(e,t){return Oe},timing:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},spring:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},add:Se.add,subtract:Se.subtract,divide:Se.divide,multiply:Se.multiply,modulo:Se.modulo,diffClamp:Se.diffClamp,delay:function(e){return Oe},sequence:function(e){return Oe},parallel:function(e,t){return Oe},stagger:function(e,t){return Oe},loop:function(e,t){(void 0===t?{}:t).iterations;return Oe},event:function(e,t){return null},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:Se.forkEvent,unforkEvent:Se.unforkEvent,Event:d,__PropsOnlyForTests:T};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({FlatList:B,Image:F,ScrollView:U,SectionList:W,Text:q,View:X},r.a.isTesting?Re:Se);t.a=Le},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";var r,i="function"===typeof Float32Array;function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((o(t,n)*e+a(t,n))*e+s(t))*e}function c(e,t,n){return 3*o(t,n)*e*e+2*a(t,n)*e+s(t)}function u(e,t,n,r){if(!(e>=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var o=i?new Float32Array(11):new Array(11);if(e!==t||n!==r)for(var a=0;a<11;++a)o[a]=l(.1*a,e,n);function s(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=.1;--i;var a=r+.1*((t-o[i])/(o[i+1]-o[i])),s=c(a,e,n);return s>=.001?function(e,t,n,r){for(var i=t,o=0;o<4;++o){var a=c(i,n,r);if(0===a)return i;i-=(l(i,n,r)-e)/a}return i}(t,a,e,n):0===s?a:function(e,t,n,r,i){var o,a,s=0,c=t,u=n;do{(o=l(a=c+(u-c)/2,r,i)-e)>0?u=a:c=a}while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}return function(i){return e===t&&n===r?i:0===i?0:1===i?1:l(s(i),t,r)}}var h=function(){function e(){}return e.step0=function(e){return e>0?1:0},e.step1=function(e){return e>=1?1:0},e.linear=function(e){return e},e.ease=function(t){return r||(r=e.bezier(.42,0,1,1)),r(t)},e.quad=function(e){return e*e},e.cubic=function(e){return e*e*e},e.poly=function(e){return function(t){return Math.pow(t,e)}},e.sin=function(e){return 1-Math.cos(e*Math.PI/2)},e.circle=function(e){return 1-Math.sqrt(1-e*e)},e.exp=function(e){return Math.pow(2,10*(e-1))},e.elastic=function(e){void 0===e&&(e=1);var t=e*Math.PI;return function(e){return 1-Math.pow(Math.cos(e*Math.PI/2),3)*Math.cos(e*t)}},e.back=function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}},e.bounce=function(e){if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){var t=e-1.5/2.75;return 7.5625*t*t+.75}if(e<2.5/2.75){var n=e-2.25/2.75;return 7.5625*n*n+.9375}var r=e-2.625/2.75;return 7.5625*r*r+.984375},e.bezier=function(e,t,n,r){return u(e,t,n,r)},e.in=function(e){return e},e.out=function(e){return function(t){return 1-e(1-t)}},e.inOut=function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}},e}();t.a=h},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return _}));var r,i=n(242),o=n(241),a=n(134),s=n(9),l=n(4),c=n.n(l),u="ios"===s.a.OS&&e.RN$Bridgeless?o.a:i.a,h=1,d=1,f=new Set,p=!1,m=[],g={getValue:function(e,t){c()(u,"Native animated module is not available"),u.getValue&&u.getValue(e,t)},setWaitingForIdentifier:function(e){f.add(e),p=!0},unsetWaitingForIdentifier:function(e){f.delete(e),0===f.size&&(p=!1,g.disableQueue())},disableQueue:function(){c()(u,"Native animated module is not available"),"android"===s.a.OS&&u.startOperationBatch();for(var e=0,t=m.length;e<t;e++)m[e]();m.length=0,"android"===s.a.OS&&u.finishOperationBatch()},queueOperation:function(e){p?m.push(e):e()},createAnimatedNode:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.createAnimatedNode(e,t)}))},startListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startListeningToAnimatedNodeValue(e)}))},stopListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopListeningToAnimatedNodeValue(e)}))},connectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodes(e,t)}))},disconnectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodes(e,t)}))},startAnimatingNode:function(e,t,n,r){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startAnimatingNode(e,t,n,r)}))},stopAnimation:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopAnimation(e)}))},setAnimatedNodeValue:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeValue(e,t)}))},setAnimatedNodeOffset:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeOffset(e,t)}))},flattenAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.flattenAnimatedNodeOffset(e)}))},extractAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.extractAnimatedNodeOffset(e)}))},connectAnimatedNodeToView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodeToView(e,t)}))},disconnectAnimatedNodeFromView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodeFromView(e,t)}))},restoreDefaultValues:function(e){c()(u,"Native animated module is not available"),null!=u.restoreDefaultValues&&g.queueOperation((function(){return u.restoreDefaultValues(e)}))},dropAnimatedNode:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.dropAnimatedNode(e)}))},addAnimatedEventToView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.addAnimatedEventToView(e,t,n)}))},removeAnimatedEventFromView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.removeAnimatedEventFromView(e,t,n)}))}},v={opacity:!0,transform:!0,borderRadius:!0,borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,elevation:!0,zIndex:!0,shadowOpacity:!0,shadowRadius:!0,scaleX:!0,scaleY:!0,translateX:!0,translateY:!0},y={translateX:!0,translateY:!0,scale:!0,scaleX:!0,scaleY:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,perspective:!0},b={inputRange:!0,outputRange:!0,extrapolate:!0,extrapolateRight:!0,extrapolateLeft:!0};function w(){return d++}var x=!1;function _(e){return null==e.useNativeDriver&&console.warn("Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`"),!0!==e.useNativeDriver||u?e.useNativeDriver||!1:(x||(console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md"),x=!0),!1)}t.a={API:g,addWhitelistedStyleProp:function(e){v[e]=!0},addWhitelistedTransformProp:function(e){y[e]=!0},addWhitelistedInterpolationParam:function(e){b[e]=!0},validateStyles:function(e){for(var t in e)if(!v.hasOwnProperty(t))throw new Error("Style property '"+t+"' is not supported by native animated module")},validateTransform:function(e){e.forEach((function(e){if(!y.hasOwnProperty(e.property))throw new Error("Property '"+e.property+"' is not supported by native animated module")}))},validateInterpolation:function(e){for(var t in e)if(!b.hasOwnProperty(t))throw new Error("Interpolation property '"+t+"' is not supported by native animated module")},generateNewNodeTag:function(){return h++},generateNewAnimationId:w,assertNativeAnimatedModule:function(){c()(u,"Native animated module is not available")},shouldUseNativeDriver:_,transformDataType:function(e){return"string"!==typeof e?e:/deg$/.test(e)?(parseFloat(e)||0)*Math.PI/180:e},get nativeEventEmitter(){return r||(r=new a.a(u)),r}}}).call(this,n(46))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(296);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(315),i=n(316),o=n(178),a=n(317);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(15),i=n(4),o=n.n(i),a=r.a.API,s=1,l=function(){var e=t.prototype;function t(){this._listeners={}}return e.__attach=function(){},e.__detach=function(){this.__isNative&&null!=this.__nativeTag&&(r.a.API.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(e){},e.__removeChild=function(e){},e.__getChildren=function(){return[]},e.__makeNative=function(){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node');this.hasListeners()&&this._startListeningToNativeValueUpdates()},e.addListener=function(e){var t=String(s++);return this._listeners[t]=e,this.__isNative&&this._startListeningToNativeValueUpdates(),t},e.removeListener=function(e){delete this._listeners[e],this.__isNative&&!this.hasListeners()&&this._stopListeningForNativeValueUpdates()},e.removeAllListeners=function(){this._listeners={},this.__isNative&&this._stopListeningForNativeValueUpdates()},e.hasListeners=function(){return!!Object.keys(this._listeners).length},e._startListeningToNativeValueUpdates=function(){var e=this;this.__nativeAnimatedValueListener&&!this.__shouldUpdateListenersForNewNativeTag||(this.__shouldUpdateListenersForNewNativeTag&&(this.__shouldUpdateListenersForNewNativeTag=!1,this._stopListeningForNativeValueUpdates()),a.startListeningToAnimatedNodeValue(this.__getNativeTag()),this.__nativeAnimatedValueListener=r.a.nativeEventEmitter.addListener("onAnimatedValueUpdate",(function(t){t.tag===e.__getNativeTag()&&e._onAnimatedValueUpdateReceived(t.value)})))},e._onAnimatedValueUpdateReceived=function(e){this.__callListeners(e)},e.__callListeners=function(e){for(var t in this._listeners)this._listeners[t]({value:e})},e._stopListeningForNativeValueUpdates=function(){this.__nativeAnimatedValueListener&&(this.__nativeAnimatedValueListener.remove(),this.__nativeAnimatedValueListener=null,a.stopListeningToAnimatedNodeValue(this.__getNativeTag()))},e.__getNativeTag=function(){var e;r.a.assertNativeAnimatedModule(),o()(this.__isNative,'Attempt to get native tag from node not marked as "native"');var t=null!==(e=this.__nativeTag)&&void 0!==e?e:r.a.generateNewNodeTag();return null==this.__nativeTag&&(this.__nativeTag=t,r.a.API.createAnimatedNode(t,this.__getNativeConfig()),this.__shouldUpdateListenersForNewNativeTag=!0),t},e.__getNativeConfig=function(){throw new Error("This JS animated node type cannot be used as native animated node")},e.toJSON=function(){return this.__getValue()},t}();t.a=l},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(153);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(187).default,i=n(16);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(35),i=n(33),o=n(54);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(15).a.API;var l=function(e){var t,n;function i(t){var n;if(n=e.call(this)||this,"number"!==typeof t)throw new Error("AnimatedValue: Attempting to set value to undefined");return n._startingValue=n._value=t,n._offset=0,n._animation=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=i.prototype;return l.__detach=function(){var t=this;this.__isNative&&s.getValue(this.__getNativeTag(),(function(e){t._value=e})),this.stopAnimation(),e.prototype.__detach.call(this)},l.__getValue=function(){return this._value+this._offset},l.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e,!this.__isNative),this.__isNative&&s.setAnimatedNodeValue(this.__getNativeTag(),e)},l.setOffset=function(e){this._offset=e,this.__isNative&&s.setAnimatedNodeOffset(this.__getNativeTag(),e)},l.flattenOffset=function(){this._value+=this._offset,this._offset=0,this.__isNative&&s.flattenAnimatedNodeOffset(this.__getNativeTag())},l.extractOffset=function(){this._offset+=this._value,this._value=0,this.__isNative&&s.extractAnimatedNodeOffset(this.__getNativeTag())},l.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},l.resetAnimation=function(e){this.stopAnimation(e),this._value=this._startingValue},l._onAnimatedValueUpdateReceived=function(e){this._updateValue(e,!1)},l.interpolate=function(e){return new r.a(this,e)},l.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=o.a.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,(function(e){n._updateValue(e,!0)}),(function(e){n._animation=null,null!==r&&o.a.clearInteractionHandle(r),t&&t(e)}),i,this)},l.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},l.track=function(e){this.stopTracking(),this._tracking=e},l._updateValue=function(t,n){if(void 0===t)throw new Error("AnimatedValue: Attempting to set value to undefined");this._value=t,n&&function(e){var t=new Set;!function e(n){"function"===typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach((function(e){return e.update()}))}(this),e.prototype.__callListeners.call(this,this.__getValue())},l.__getNativeConfig=function(){return{type:"value",value:this._value,offset:this._offset}},i}(i.a);t.a=l},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"g",(function(){return u}));var r={children:!0,dataSet:!0,nativeID:!0,ref:!0,suppressHydrationWarning:!0,testID:!0},i={accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0,dir:!0,focusable:!0,accessible:!0,accessibilityState:!0,accessibilityValue:!0},o={onClick:!0,onClickCapture:!0,onContextMenu:!0},a={onBlur:!0,onFocus:!0},s={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},l={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},c={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},u={classList:!0,style:!0}},function(e,t,n){"use strict";var r=n(98),i=n(104);var o=function(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||i.a.hasOwnProperty(e)&&i.a[e]?(""+t).trim():t+"px"};var a=function(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=o(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}},s=function(e){var t=Object(r.a)(e),n=t.x,i=t.y,o=t.top,a=t.left;return{x:n,y:i,width:e.offsetWidth,height:e.offsetHeight,top:o,left:a}},l=function(e,t,n){var i=t||e&&e.parentNode;e&&i&&setTimeout((function(){var t=Object(r.a)(i),o=s(e),a=o.height,l=o.left,c=o.top,u=o.width,h=l-t.left,d=c-t.top;n(h,d,u,a,l,c)}),0)},c={A:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},u={blur:function(e){try{e.blur()}catch(t){}},focus:function(e){try{var t=e.nodeName;null==e.getAttribute("tabIndex")&&null==c[t]&&e.setAttribute("tabIndex","-1"),e.focus()}catch(n){}},measure:function(e,t){l(e,null,t)},measureInWindow:function(e,t){e&&setTimeout((function(){var n=s(e),r=n.height,i=n.left,o=n.top,a=n.width;t(i,o,a,r)}),0)},measureLayout:function(e,t,n,r){l(e,t,r)},updateView:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];switch(n){case"style":a(e,r);break;case"class":case"className":e.setAttribute("class",r);break;case"text":case"value":e.value=r;break;default:e.setAttribute(n,r)}}},configureNextLayoutAnimation:function(e,t){t()},setLayoutAnimationEnabledExperimental:function(){}};t.a=u},function(e,t,n){"use strict";var r=n(75);n.o(r,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return r.NavigationContext})),n.o(r,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return r.NavigationHelpersContext})),n.o(r,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return r.NavigationRouteContext})),n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter})),n.o(r,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return r.createNavigatorFactory})),n.o(r,"useNavigation")&&n.d(t,"useNavigation",(function(){return r.useNavigation})),n.o(r,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return r.useNavigationBuilder}));var i=n(204);n.o(i,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return i.NavigationContext})),n.o(i,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return i.NavigationHelpersContext})),n.o(i,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return i.NavigationRouteContext})),n.o(i,"StackActions")&&n.d(t,"StackActions",(function(){return i.StackActions})),n.o(i,"StackRouter")&&n.d(t,"StackRouter",(function(){return i.StackRouter})),n.o(i,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return i.createNavigatorFactory})),n.o(i,"useNavigation")&&n.d(t,"useNavigation",(function(){return i.useNavigation})),n.o(i,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return i.useNavigationBuilder}))},function(t,n,r){"use strict";(function(t,i){r.d(n,"a",(function(){return w})),r.d(n,"b",(function(){return b})),r.d(n,"c",(function(){return g})),r.d(n,"d",(function(){return Dt}));var o,a=r(10),s="warn";function l(){return s}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(o||(o={}));var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function u(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function m(e){return ne(e,1),re(e).type}function g(e,t){return ne(e,1),Oe(t,2),re(e).onSnapshot(t)}function v(e,t){ne(e,1),Ce(t,(function(e){return"object"===typeof e}),"object or array",2),re(e).applyPatches(ge(t))}function y(e,t){void 0===t&&(t=!0),ne(e,1);var n=re(e);return t?n.snapshot:we(n.type.getSnapshot(n,!1))}function b(e){return ne(e,1),re(e).root.storedValue}function w(e){ne(e,1);var t=re(e).root.environment;return t||ue}var x=function(){function e(e,t,n,r){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:K.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=r,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new Ee),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=Object(a.j)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?Le(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==K.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===K.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Object(a.j)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.state===K.CREATED){if(this.parent){if(this.parent.state!==K.FINALIZED)return;this.fireHook(o.afterAttach)}this.state=K.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=K.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(o.beforeDestroy)}}),e}(),_=function(t){function n(n,r,i,o,a){var s=t.call(this,n,r,i,o)||this;try{s.storedValue=n.createNewInstance(a)}catch(e){throw s.state=K.DEAD,e}return s.state=K.CREATED,s.finalizeCreation(),s}return u(n,t),Object.defineProperty(n.prototype,"root",{get:function(){if(!this.parent)throw de("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.parent!==e,r=this.subpath!==t;(n||r)&&(this.environment=void 0,this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return we(this.getSnapshot())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),n}(x);_.prototype.die=Object(a.g)(_.prototype.die);var E,A,S=1,M={onError:function(e){throw e}},T=function(t){function n(e,n,r,i,o){var s=t.call(this,e,n,r,i)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++S}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=Object(a.h)((function(){return we(s.getSnapshot())})),s.unbox=s.unbox.bind(s),s._initialSnapshot=we(o),s.identifierAttribute=e.identifierAttribute,n||(s.identifierCache=new Z),s._childNodes=e.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var l=s._initialSnapshot[s.identifierAttribute];if(void 0===l){var c=s._childNodes[s.identifierAttribute];c&&(l=c.value)}if("string"!==typeof l&&"number"!==typeof l)throw de("Instance identifier '"+s.identifierAttribute+"' for type '"+s.type.name+"' must be a string or a number");s.identifier=kt(l),s.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return u(n,t),Object.defineProperty(n.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(n.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(){0===this._observableInstanceState&&this.createObservableInstance()}}),Object.defineProperty(n.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t,n;this._observableInstanceState=1;for(var r=[],i=this.parent;i&&0===i._observableInstanceState;)r.unshift(i),i=i.parent;try{for(var a=d(r),s=a.next();!s.done;s=a.next()){s.value.createObservableInstanceIfNeeded()}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var l=this.type;try{this.storedValue=l.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,l.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=K.DEAD,e}finally{this._isRunningAction=!1}this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ue,this.state=K.CREATED,this.fireHook(o.afterCreate),this.finalizeCreation()}}),Object.defineProperty(n.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(o.beforeDetach);var e=this.state;this.state=K.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}}}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e!==this.parent,r=t!==this.subpath;(n||r)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(o.afterAttach)):r&&this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"===typeof this.storedValue&&this.storedValue[e];"function"===typeof n&&(a.c?Object(a.c)((function(){n.apply(t.storedValue)})):n.apply(this.storedValue))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(n.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(n.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(n.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=l();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw de(n);case"warn":Te(n)}}}}),Object.defineProperty(n.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&Le(e.subpath)||"",r=e.actionContext||N();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var i,o="";r&&null!=r.name&&(o=(r&&r.context&&(ne(i=r.context,1),re(i).path)||t)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(ue),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):se(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(n.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw de("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(n.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation((function(){var t,n;try{for(var r=d(e.getChildren()),i=r.next();!i.done;i=r.next()){i.value.finalizeCreation()}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(o.afterCreationFinalization)}))}}),Object.defineProperty(n.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw de("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(n.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=z(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){if(t.path){var n=Ne(t.path);ae(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)}else e.type.applySnapshot(e,t.value)}))})),this._applySnapshot=z(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),xe(this.storedValue,"$treenode",this),xe(this.storedValue,"toJSON",oe)}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(n.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(n.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(n.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=f(function(e){if(!("oldValue"in e))throw de("Patches without `oldValue` field cannot be inversed");return[ke(e),Pe(e)]}(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var i=t[r];for(var o in i)e[o]=i[o]}return e}({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),r=n[0],i=n[1];this._internalEventsEmit("patch",r,i)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(n.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(n.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw de("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(n.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw de("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(n.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(n.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(n.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=Object(a.u)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),M);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(n.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(n.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new Ee),this._internalEvents.register(e,t,n)}}),Object.defineProperty(n.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(t=this._internalEvents).emit.apply(t,p([e],n))}}),Object.defineProperty(n.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(n.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),n}(x);T.prototype.createObservableInstance=Object(a.g)(T.prototype.createObservableInstance),T.prototype.detach=Object(a.g)(T.prototype.detach),T.prototype.die=Object(a.g)(T.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(A||(A={}));var C=Symbol("$type"),O=function(){function e(e){Object.defineProperty(this,E,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Y(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw de("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(ie(e)){var n=m(e);return this.isAssignableFrom(n)?W():q(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw de("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw de("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw de("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw de("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();E=C,O.prototype.create=Object(a.g)(O.prototype.create);var R=function(e){function t(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return u(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.isDetaching&&(e.snapshot===t||(!(!te(t)||re(t)!==e)||!(e.type!==this||!ye(t)||te(t)||e.identifierAttribute&&e.identifier!==kt(t[e.identifierAttribute]))&&(e.applySnapshot(t),!0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.tryToReconcileNode(e,t))return e.setParent(n,r),e;if(e.die(),te(t)&&this.isAssignableFrom(m(t))){var i=re(t);return i.setParent(n,r),i}return this.instantiate(n,r,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);R.prototype.create=Object(a.g)(R.prototype.create);var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(n,r,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);function P(e){return"object"===typeof e&&e&&!0===e.isType}function L(e,t){Ce(e,P,"mobx-state-tree type",t)}new Map;!function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0})}();var D,I=1;function N(){return D}function j(){return I++}function B(e,t){var n=re(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var i=D;D=e;try{return function(e,t,n){var r=new H(e,n);if(r.isEmpty)return Object(a.g)(n).apply(null,t.args);var i=null;return function e(t){var s=r.getNextMiddleware(),l=s&&s.handler;return l?!s.includeHooks&&o[t.name]?e(t):(l(t,(function(t,n){!0,i=e(t),n&&(i=n(i))}),(function(e){!0,i=e})),i):Object(a.g)(n).apply(null,t.args)}(t)}(n,e,t)}finally{D=i,n._isRunningAction=r}}function F(e){if(e)return"action"===e.type?e:e.parentActionEvent}function z(e,t,n){var r=function(){var r=j(),i=D,o=F(i);return B({type:"action",name:t,id:r,args:Ae(arguments),context:e,tree:b(e),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?p(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}var H=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function U(t){return"function"===typeof t?"<function"+(t.name?" "+t.name:"")+">":te(t)?"<"+t+">":"`"+function(t){try{return JSON.stringify(t)}catch(e){return"<Unserializable: "+e+">"}}(t)+"`"}function V(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),i=r.length>0?'at path "/'+r+'" ':"",o=te(t)?"value of type "+re(t).type.name+":":be(t)?"value":"snapshot",a=n&&te(t)&&n.is(re(t).snapshot);return""+i+o+" "+U(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return P(e)&&(e.flags&(A.String|A.Number|A.Integer|A.Boolean|A.Date))>0}(n)||be(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function G(e,t,n){return e.concat([{path:t,type:n}])}function W(){return ce}function q(e,t,n){return[{context:e,value:t,message:n}]}function X(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function Y(e,n){"undefined"!==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}})&&"true"===Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}}).ENABLE_TYPE_CHECK&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw de(function(e,t,n){if(0===n.length)return;return"Error while converting "+(r=U(t),(r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+e.name+"`:\n\n "+n.map(V).join("\n ");var r}(e,t,n))}(e,n)}var K,Q=0,Z=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Q++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,a.s.array([],he));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw de("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;Object(a.x)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,r=new e,i=t.path;return Object(a.k)(this.cache).forEach((function(e){for(var t=f(e,2),o=t[0],a=t[1],s=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(i)&&(r.addNodeToCache(a[l],!1),a.splice(l,1),s=!0);s&&n.updateLastCacheModificationPerId(o)})),r}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);return!!n&&n.some((function(t){return e.isAssignableFrom(t.type)}))}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter((function(t){return e.isAssignableFrom(t.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw de("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map((function(e){return e.path})).join(", "))}}}),e}();function J(e,t,n,r,i){var o=ie(i);if(o){if(o.parent)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,n),o}return new T(e,t,n,r,i)}function $(e,t,n,r,i){return new _(e,t,n,r,i)}function ee(e){return e instanceof _||e instanceof T}function te(e){return!(!e||!e.$treenode)}function ne(e,t){Ce(e,te,"mobx-state-tree node",t)}function re(e){if(!te(e))throw de("Value "+e+" is no MST Node");return e.$treenode}function ie(e){return e&&e.$treenode||null}function oe(){return re(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(K||(K={}));function ae(t,n,r){void 0===r&&(r=!0);for(var i=t,o=0;o<n.length;o++){var a=n[o];if(".."===a){if(i=i.parent)continue}else{if("."===a)continue;if(i){if(i instanceof _)try{var s=i.value;te(s)&&(i=re(s))}catch(e){if(!r)return;throw e}if(i instanceof T)if(i.getChildType(a)&&(i=i.getChildNode(a)))continue}}if(r)throw de("Could not resolve '"+a+"' in path '"+(Ie(n.slice(0,o))||"/")+"' while resolving '"+Ie(n)+"'");return}return i}function se(e){if(!e)return ce;var t=Object.keys(e);if(!t.length)return ce;var n=new Array(t.length);return t.forEach((function(t,r){n[r]=e[t]})),n}var le=Object.toString(),ce=Object.freeze([]),ue=Object.freeze({}),he=Object(a.e)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function de(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function fe(e){return e}Object.freeze(he);var pe=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e};function me(e){return Array.isArray(e)||Object(a.p)(e)}function ge(e){return e?me(e)?e:[e]:ce}function ve(e){var t;if(null===e||"object"!==typeof e)return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===le}function ye(e){return null!==e&&"object"===typeof e&&!(e instanceof Date)&&!(e instanceof RegExp)}function be(e,t){return void 0===t&&(t=!0),null===e||void 0===e||!!("string"===typeof e||"number"===typeof e||"boolean"===typeof e||t&&e instanceof Date)}function we(e){return e}function xe(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}var _e=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.handlers.slice();n.forEach((function(t){return t.apply(void 0,p(e))}))}}),e}(),Ee=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[e];return r||(r=this.eventHandlers[e]=new _e),r.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,p(n))}}),e}();function Ae(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}function Se(e,t){return 0===e.indexOf(t)}var Me=function(e,t){};function Te(e){console.warn(new Error("[mobx-state-tree] "+e))}function Ce(e,t,n,r){0}function Oe(e,t){Ce()}function Re(e,t,n){void 0===n&&(n=!0),Ce(),n||Ce()}function ke(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Pe(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function Le(e){return!0===("number"===typeof e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function De(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ie(e){if(0===e.length)return"";var t=function(e){return e.map(Le).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function Ne(e){var t=e.split("/").map(De);if(!(""===e||"."===e||".."===e||Se(e,"/")||Se(e,"./")||Se(e,"../")))throw de("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}Me.ids={};var je=function(e){function t(t,n,r){var i=e.call(this,r||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;!function(e,t){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=d(i),s=a.next();!s.done;s=a.next()){var l=s.value;e[l]=t[l].bind(t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(e.type,this,"create");var n=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(n.call(e))}}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?r:this.preProcessSnapshot(r),o=this._subtype.instantiate(e,t,n,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this._subtype.reconcile(e,te(t)?t:this.preProcessSnapshot(t),n,r);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var n=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(n):n}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.preProcessSnapshot(e);return this._subtype.validate(n,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=P(e)?this._subtype:te(e)?y(e,!1):this.preProcessSnapshot(e);return 0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),t}(O);var Be,Fe="Map.put can only be used to store complex values that have an identifier type attribute";!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(Be||(Be={}));var ze=function(e){function t(t){return e.call(this,t,a.s.ref.enhancer)||this}return u(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw de("Map.put cannot be used to set empty values");if(te(e)){var t=re(e);if(null===t.identifier)throw de(Fe);return this.set(t.identifier,e),e}if(ye(e)){var n=re(this),r=n.type;if(r.identifierMode!==Be.YES)throw de(Fe);var i=e[r.mapIdentifierAttribute];if(!Pt(i)){var o=this.put(r.getChildType().create(e,n.environment));return this.put(y(o))}var a=kt(i);return this.set(a,e),this.get(a)}throw de("Map.put can only be used to store complex values")}}),t}(a.a),He=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Be.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._determineIdentifierMode(),J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Be.UNKNOWN){var e=[];if(function e(t,n){var r,i,o=t.getSubTypes();if("cannotDetermine"===o)return!1;if(o){var a=ge(o);try{for(var s=d(a),l=s.next();!l.done;l=s.next()){if(!e(l.value,n))return!1}}catch(c){r={error:c}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return t instanceof Ke&&n.push(t),!0}(this._subType,e)){var t=void 0;e.forEach((function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw de("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}})),t?(this.identifierMode=Be.YES,this.mapIdentifierAttribute=t):this.identifierMode=Be.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach((function(i){r[i]=n.instantiate(e,i,void 0,t[i])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new ze(e)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.f)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"Map<string, "+this._subType.describe()+">"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(a.x)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e.storedValue.get(""+t);if(!n)throw de("Not a child "+t);return n}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,i=r._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(n))return null;Y(i,o),e.newValue=i.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":Y(i,e.newValue),e.newValue=i.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===Be.YES&&t instanceof T){var n=t.identifier;if(n!==e)throw de("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:Le(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:Le(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:Le(e.name),oldValue:n},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach((function(e){r[e]=!1})),t)for(var i in t)n.set(i,t[i]),r[""+i]=!0;Object.keys(r).forEach((function(e){!1===r[e]&&n.delete(e)}))}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return ve(e)?X(Object.keys(e).map((function(r){return n._subType.validate(e[r],G(t,r,n._subType))}))):q(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(R);He.prototype.applySnapshot=Object(a.g)(He.prototype.applySnapshot);var Ue=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach((function(t,i){var o=""+i;r[o]=n.instantiate(e,o,void 0,t)})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.array(se(e),he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.d)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType.describe()+"[]"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=Number(t);if(n<e.storedValue.length)return e.storedValue[n];throw de("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);t.assertWritable({subpath:""+e.index});var n=t.type._subType,r=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=Ve(t,n,[r[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,s=e.added,l=Ve(t,n,r.slice(o,o+a),s,s.map((function(e,t){return o+t})));if(!l)return null;e.added=l;for(var c=o+a;c<r.length;c++)r[c].setParent(t,""+(c+s.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map((function(e){return e.snapshot}))}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push(e[n].getSnapshot())})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var n=e.removedCount-1;n>=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n<e.addedCount;n++)t.emitPatch({op:"add",path:""+(e.index+n),value:t.getChildNode(""+(e.index+n)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue,i="-"===t?r.length:Number(t);switch(n.op){case"replace":r[i]=n.value;break;case"add":r.splice(i,0,n.value);break;case"remove":r.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return me(e)?X(e.map((function(e,r){return n._subType.validate(e,G(t,""+r,n._subType))}))):q(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ce}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(R);function Ve(e,t,n,r,i){for(var o=!0,a=0;;a++){var s=a<=r.length-1,l=n[a],c=s?r[a]:void 0,u=""+i[a];if(ee(c)&&(c=c.storedValue),!l&&!s)break;if(s)if(l)if(We(l,c))n[a]=Ge(t,e,u,c,l);else{for(var h=void 0,d=a;d<n.length;d++)if(We(n[d],c)){h=n.splice(d,1)[0];break}o=!1;f=Ge(t,e,u,c,h);n.splice(a,0,f)}else{if(te(c)&&re(c).parent===e)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+u+"', but it lives already at '"+re(c).path+"'");o=!1;var f=Ge(t,e,u,c);n.splice(a,0,f)}else o=!1,n.splice(a,1),l instanceof T&&l.createObservableInstanceIfNeeded(),l.die(),a--}return o?null:n}function Ge(e,t,n,r,i){Y(e,r);var o=function(){if(te(r)){var o=re(r);if(o.assertAlive(ue),null!==o.parent&&o.parent===t)return o.setParent(t,n),o}return i?e.reconcile(i,r,t,n):e.instantiate(t,n,void 0,r)}();return i&&i!==o&&(i instanceof T&&i.createObservableInstanceIfNeeded(),i.die()),o}function We(e,t){if(!e.isAlive)return!1;if(te(t)){var n=re(t);return n.isAlive&&n===e}return e.snapshot===t||e instanceof T&&null!==e.identifier&&e.identifierAttribute&&ve(t)&&e.identifier===kt(t[e.identifierAttribute])&&e.type.is(t)}Ue.prototype.applySnapshot=Object(a.g)(Ue.prototype.applySnapshot);function qe(){return re(this).toString()}var Xe={name:"AnonymousModel",properties:{},initializers:ce};function Ye(e){return Object.keys(e).reduce((function(e,t){var n,r,i;if(t in o)throw de("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,t);if("get"in a)throw de("Getters are not supported as properties. Please use views instead");var s=a.value;if(null===s||void 0===s)throw de("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(be(s))return Object.assign({},e,((n={})[t]=dt(function(e){switch(typeof e){case"string":return Je;case"number":return $e;case"boolean":return tt;case"object":if(e instanceof Date)return ot}throw de("Cannot determine primitive type from value "+e)}(s),s),n));if(s instanceof He)return Object.assign({},e,((r={})[t]=dt(s,{}),r));if(s instanceof Ue)return Object.assign({},e,((i={})[t]=dt(s,[]),i));if(P(s))return e;throw de("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+s+"' ("+typeof s+")")}),e)}var Ke=function(e){function t(t){var n=e.call(this,t.name||Xe.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({name:e})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({properties:e})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.preProcessor;return t?n.cloneAndEnhance({preProcessor:function(n){return t(e(n))}}):n.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.postProcessor;return t?n.cloneAndEnhance({postProcessor:function(n){return e(t(n))}}):n.cloneAndEnhance({postProcessor:e})}}),Object.assign(n,Xe,t),n.properties=Ye(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return u(t,e),Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps((function(t,n){if(n.flags&A.Identifier){if(e)throw de("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}})),e}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateActions(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("actions initializer should return a plain object containing actions");Object.keys(t).forEach((function(n){if("preProcessSnapshot"===n)throw de("Cannot define action 'preProcessSnapshot', it should be defined using 'type.preProcessSnapshot(fn)' instead");if("postProcessSnapshot"===n)throw de("Cannot define action 'postProcessSnapshot', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=t[n],i=e[n];if(n in o&&i){var a=r;r=function(){i.apply(null,arguments),a.apply(null,arguments)}}var s=r.$mst_middleware,l=r.bind(t);l.$mst_middleware=s;var c=z(e,n,l);t[n]=c,xe(e,n,c)}))}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!==typeof e)throw de("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return t.instantiateVolatileState(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("volatile state initializer should return a plain object containing state");Object(a.w)(e,t)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){var r=e(n),i=r.actions,o=r.views,a=r.state,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(r,["actions","views","state"]);for(var l in s)throw de("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+l+"'");return a&&t.instantiateVolatileState(n,a),o&&t.instantiateViews(n,o),i&&t.instantiateActions(n,i),n}]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateViews(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("views initializer should return a plain object containing views");Object.keys(t).forEach((function(n){var r,i=Object.getOwnPropertyDescriptor(t,n);if("get"in i)if(Object(a.o)(e,n)){var o=Object(a.d)(e,n);o.derivation=i.get,o.scope=e,i.set&&(o.setter=Object(a.g)(o.name+"-setter",i.set))}else Object.defineProperty(e,n,i),Object(a.r)(e,((r={})[n]=a.h,r));else{if("function"!==typeof i.value)throw de("A view member should either be a function or getter based property");xe(e,n,i.value)}}))}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,te(r)?r:this.applySnapshotPreProcessor(r))}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type,r={};return n.forAllProps((function(n,i){r[n]=i.instantiate(e,n,void 0,t[n])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.object(e,ue,he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){xe(t,"toString",qe),this.forAllProps((function(n){Object(a.f)(t,n,e.unbox)})),this.initializers.reduce((function(e,t){return t(e)}),t),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object),r=t.name;n.assertWritable({subpath:r});var i=n.type.properties[r];return i&&(Y(i,t.newValue),t.newValue=i.reconcile(n.getChildNode(r),t.newValue,n,r)),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object);if(n.type.properties[t.name]){var r=t.oldValue?t.oldValue.snapshot:void 0;n.emitPatch({op:"replace",path:Le(t.name),value:t.newValue.snapshot,oldValue:r},n)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=[];return this.forAllProps((function(r){n.push(t.getChildNode(e,r))})),n}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(t in this.properties))throw de("Not a value property: "+t);var n=Object(a.d)(e.storedValue,t).raw();if(!n)throw de("Node not available for property "+t);return n}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={};return this.forAllProps((function(t,i){Object(a.l)(e.storedValue,t).reportObserved(),r[t]=n.getChildNode(e,t).snapshot})),t?this.applySnapshotPostProcessor(r):r}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){if("replace"!==n.op&&"add"!==n.op)throw de("object does not support operation "+n.op);e.storedValue[t]=n.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.applySnapshotPreProcessor(t);Y(this,n),this.forAllProps((function(t){e.storedValue[t]=n[t]}))}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Re(),this.properties[e]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.applySnapshotPreProcessor(e);return ve(r)?X(this.propertyNames.map((function(e){return n.properties[e].validate(r[e],G(t,e,n.properties[e]))}))):q(t,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach((function(n){return e(n,t.properties[n])}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map((function(t){return t+": "+e.properties[t].describe()})).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),t}(R);function Qe(e){return P(e)&&(e.flags&A.Object)>0}Ke.prototype.applySnapshot=Object(a.g)(Ke.prototype.applySnapshot);var Ze=function(e){function t(t,n,r,i){void 0===i&&(i=fe);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=n,o}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&this.checker(e)?W():q(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(k),Je=new Ze("string",A.String,(function(e){return"string"===typeof e})),$e=new Ze("number",A.Number,(function(e){return"number"===typeof e})),et=new Ze("integer",A.Integer,(function(e){return pe(e)})),tt=new Ze("boolean",A.Boolean,(function(e){return"boolean"===typeof e})),nt=new Ze("null",A.Null,(function(e){return null===e})),rt=new Ze("undefined",A.Undefined,(function(e){return void 0===e})),it=new Ze("Date",A.Date,(function(e){return"number"===typeof e||e instanceof Date}),(function(e){return e instanceof Date?e:new Date(e)}));it.getSnapshot=function(e){return e.storedValue.getTime()};var ot=it;var at=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Literal}),n.value=t,n}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&e===this.value?W():q(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(k);function st(e){return Ce(),new at(e)}var lt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=te(e)?re(e).snapshot:e;return this._predicate(r)?W():q(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);var ct=function(e){function t(t,n,r){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),r=h({eager:!0,dispatcher:void 0},r),i._dispatcher=r.dispatcher,r.eager||(i._eager=!1),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=A.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(r,void 0);if(!i)throw de("No matching type for union "+this.describe());return i.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(t,e.type);if(!i)throw de("No matching type for union "+this.describe());return i.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return W();r++}else n.push(o)}return 1===r?W():q(t,e,"No type is applicable for the union").concat(X(n))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(O);function ut(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=P(e)?void 0:e,i=P(e)?p([e],t):t,o="("+i.map((function(e){return e.name})).join(" | ")+")";return new ct(o,i,r)}var ht=function(e){function t(t,n,r){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.optionalValues.indexOf(r)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,i)}return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"===typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"===typeof this._defaultValue&&Y(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?W():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);function dt(e,t,n){return function(e,t){if("function"!==typeof t&&te(t))throw de("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");L(e,1)}(e,t),new ht(e,t,n||ft)}var ft=[void 0];var pt=dt(rt,void 0),mt=dt(nt,null);function gt(e){return L(e,1),ut(e,pt)}var vt=function(t){function n(e,n){var r=t.call(this,e)||this;return Object.defineProperty(r,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return u(n,t),Object.defineProperty(n.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|A.Late},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;n=void 0}if(t&&void 0===n)throw de("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(n.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)}}),Object.defineProperty(n.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)}}),Object.defineProperty(n.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(n.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):W()}}),Object.defineProperty(n.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(n.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e||"cannotDetermine"}}),n}(O);var yt=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Frozen}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return function(e){return"function"!==typeof e}(e)?this.subType?this.subType.validate(e,t):W():q(t,e,"Value is not serializable and cannot be frozen")}}),t}(k),bt=new yt;var wt=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Pt(e))this.identifier=e;else{if(!te(e))throw de("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=re(e);if(!n.identifierAttribute)throw de("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null===r||void 0===r)throw de("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=kt(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new xt("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:r}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),xt=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return u(t,e),t}(Error),_t=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(r,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Reference}),r}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Pt(e)?W():q(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){v(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Qe(i.type)?this.replaceRef(void 0):v(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.getValue(e);if(r){var i=re(r),a=function(r,a){var s=function(e){switch(e){case o.beforeDestroy:return"destroy";case o.beforeDetach:return"detach";default:return}}(a);s&&n.fireInvalidated(s,e,t,i)},s=i.registerHook(o.beforeDetach,a),l=i.registerHook(o.beforeDestroy,a);return function(){s(),l()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=this;if(this.onInvalidated){var i;e.registerHook(o.beforeDestroy,(function(){i&&i()}));var a=function(o){i&&i();var a=e.parent,s=a&&a.storedValue;if(a&&a.isAlive&&s){(n?!!n.get(t,s):e.root.identifierCache.has(r.targetType,kt(t)))?i=r.addTargetNodeWatcher(e,t):o||r.fireInvalidated("invalidSnapshotReference",e,t,null)}};e.state===K.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(o.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(o.afterAttach,(function(){a(!1)})))}}}),t}(k),Et=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i,o=te(r)?(ne(i=r,1),re(i).identifier):r,a=new wt(r,this.targetType),s=$(this,e,t,n,a);return a.node=s,this.watchTargetNodeForInvalidations(s,o,void 0),s}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this){var i=te(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a}}),t}(_t),At=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?this.options.set(r,e?e.storedValue:null):r,o=$(this,e,t,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(n,r),e;var o=this.instantiate(n,r,void 0,i);return e.die(),o}}),t}(_t);function St(e,t){L(e,1);var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new At(e,{get:n.get,set:n.set},r):new Et(e,r)}var Mt=function(e){function t(t,n){var r=e.call(this,t)||this;return Object.defineProperty(r,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),r}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e||!(e.type instanceof Ke))throw de("Identifier types can only be instantiated as direct child of a model type");return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(e.storedValue!==t)throw de("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?q(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):W()}}),t}(k),Tt=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),t}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Mt),Ct=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return u(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Mt),Ot=new Tt,Rt=new Ct;function kt(e){return""+e}function Pt(e){return"string"===typeof e||"number"===typeof e}var Lt=function(e){function t(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Custom}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return W();var n=this.options.getValidationMessage(e);return n?q(t,e,"Invalid value for type '"+this.name+"': "+n):W()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(n,r),e;var o=i?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,o);return e.die(),a}}),t}(k),Dt={enumeration:function(e,t){var n="string"===typeof e?t:e,r=ut.apply(void 0,p(n.map((function(e){return st(""+e)}))));return"string"===typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():"AnonymousModel",r=e.shift()||{};return new Ke({name:n,properties:r})},compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0],r=n?e[0]:"AnonymousModel";return n&&e.shift(),e.reduce((function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(n){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(n))},postProcessor:function(n){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(n))}})})).named(r)},custom:function(e){return new Lt(e)},reference:St,safeReference:function(e,t){var n=St(e,h(h({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?n:gt(n)},union:ut,optional:dt,literal:st,maybe:gt,maybeNull:function(e){return L(e,1),ut(e,mt)},refinement:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():P(e[0])?e[0].name:null,r=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return L(r,[1,2]),Re(),Oe(),Oe(),new lt(n,r,i,o)},string:Je,boolean:tt,number:$e,integer:et,Date:ot,map:function(e){return new He("map<string, "+e.name+">",e)},array:function(e){return L(e,1),new Ue(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?bt:P(e)?new yt(e):dt(bt,e)},identifier:Ot,identifierNumber:Rt,late:function(e,t){var n="string"===typeof e?e:"late("+e.toString()+")",r="string"===typeof e?t:e;return new vt(n,r)},undefined:rt,null:nt,snapshotProcessor:function(e,t,n){return L(e,1),new je(e,t,n)}}}).call(this,r(111),r(443).setImmediate)},function(e,t,n){"use strict";var r=n(96),i=n(129),o=n(0),a=n.n(o);t.a=function(e,t){var n;e&&e.constructor===String&&(n=r.a.propsToAccessibilityComponent(t));for(var o=n||e,s=Object(i.a)(o,t),l=arguments.length,c=new Array(l>2?l-2:0),u=2;u<l;u++)c[u-2]=arguments[u];return a.a.createElement.apply(a.a,[o,s].concat(c))}},function(e,t,n){"use strict";var r=n(22),i=n(15);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){var t;return(t=e.call(this)||this)._children=[],t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.__makeNative=function(){if(!this.__isNative){this.__isNative=!0;for(var t,n=o(this._children);!(t=n()).done;){var r=t.value;r.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),r.__getNativeTag())}}e.prototype.__makeNative.call(this)},a.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e),this.__isNative&&(e.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()))},a.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this.__isNative&&e.__isNative&&i.a.API.disconnectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()),this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},a.__getChildren=function(){return this._children},a.__callListeners=function(t){if(e.prototype.__callListeners.call(this,t),!this.__isNative)for(var n,r=o(this._children);!(n=r()).done;){var i=n.value;i.__getValue&&i.__callListeners(i.__getValue())}},r}(r.a);t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n(4),o=n.n(i),a={window:{fontScale:1,height:0,scale:1,width:0},screen:{fontScale:1,height:0,scale:1,width:0}},s={},l=function(){function e(){}return e.get=function(e){return o()(a[e],"No dimension set for key "+e),a[e]},e.set=function(e){e&&(r.canUseDOM?o()(!1,"Dimensions cannot be set in the browser"):(null!=e.screen&&(a.screen=e.screen),null!=e.window&&(a.window=e.window)))},e._update=function(){if(r.canUseDOM){var e=window,t=e.document.documentElement;a.window={fontScale:1,height:t.clientHeight,scale:e.devicePixelRatio||1,width:t.clientWidth},a.screen={fontScale:1,height:e.screen.height,scale:e.devicePixelRatio||1,width:e.screen.width},Array.isArray(s.change)&&s.change.forEach((function(e){return e(a)}))}},e.addEventListener=function(e,t){s[e]=s[e]||[],s[e].push(t)},e.removeEventListener=function(e,t){Array.isArray(s[e])&&(s[e]=s[e].filter((function(e){return e!==t})))},e}();r.canUseDOM&&(l._update(),window.addEventListener("resize",l._update,!1))},function(e,t,n){"use strict";var r=n(33),i=n(15),o=n(4),a=n.n(o),s=n(90),l=n.n(s);function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){return e};function p(e){if(e.outputRange&&"string"===typeof e.outputRange[0])return function(e){var t=e.outputRange;a()(t.length>=2,"Bad output range"),function(e){for(var t=e[0].replace(g,""),n=1;n<e.length;++n)a()(t===e[n].replace(g,""),"invalid pattern "+e[0]+" and "+e[n])}(t=t.map(m));var n=t[0].match(g).map((function(){return[]}));t.forEach((function(e){e.match(g).forEach((function(e,t){n[t].push(+e)}))}));var r=t[0].match(g).map((function(t,r){return p(h(h({},e),{},{outputRange:n[r]}))})),i=(o=t[0],"string"===typeof o&&o.startsWith("rgb"));var o;return function(e){var n=0;return t[0].replace(g,(function(){var t=+r[n++](e);return i&&(t=n<4?Math.round(t):Math.round(1e3*t)/1e3),String(t)}))}}(e);var t=e.outputRange;v("outputRange",t);var n=e.inputRange;v("inputRange",n),function(e){a()(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)a()(e[t]>=e[t-1],"inputRange must be monotonically non-decreasing "+e)}(n),a()(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||f,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var o="extend";return void 0!==e.extrapolateRight?o=e.extrapolateRight:void 0!==e.extrapolate&&(o=e.extrapolate),function(e){a()("number"===typeof e,"Cannot interpolation an input which is not a number");var s=function(e,t){var n;for(n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,n);return function(e,t,n,r,i,o,a,s){var l=e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r;return l}(e,n[s],n[s+1],t[s],t[s+1],r,i,o)}}function m(e){var t=l()(e);return null===t||"number"!==typeof t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var g=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;function v(e,t){a()(t.length>=2,e+" must have at least 2 elements"),a()(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var y=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._parent=t,r._config=n,r._interpolation=p(n),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.__makeNative=function(){this._parent.__makeNative(),e.prototype.__makeNative.call(this)},o.__getValue=function(){var e=this._parent.__getValue();return a()("number"===typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},o.interpolate=function(e){return new r(this,e)},o.__attach=function(){this._parent.__addChild(this)},o.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},o.__transformDataType=function(e){return e.map(i.a.transformDataType)},o.__getNativeConfig=function(){return{inputRange:this._config.inputRange,outputRange:this.__transformDataType(this._config.outputRange),extrapolateLeft:this._config.extrapolateLeft||this._config.extrapolate||"extend",extrapolateRight:this._config.extrapolateRight||this._config.extrapolate||"extend",type:"interpolation"}},r}(r.a);y.__createInterpolation=p,t.a=y},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=!0,a=!1,s=!0,l=!1,c=function(){return!!l||s&&a},u=function(){i.a.canUseDOM&&document.documentElement&&document.documentElement.setAttribute&&document.documentElement.setAttribute("dir",c()?"rtl":"ltr")},h={allowRTL:function(e){s=e,u()},forceRTL:function(e){l=e,u()},getConstants:function(){return{doLeftAndRightSwapInRTL:o,isRTL:c()}},setPreferredLanguageRTL:function(e){a=e,u()},swapLeftAndRightInRTL:function(e){o=e}};t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(131);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((function(){return i.a.apply(void 0,t)}),[].concat(t))}},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=[];function s(e){return a[e-1]}var l=n(130),c=/^data:/,u=function(){function e(){}return e.has=function(t){var n=e._entries;return c.test(t)||Boolean(n[t])},e.add=function(t){var n=e._entries,r=Date.now();n[t]?(n[t].lastUsedTimestamp=r,n[t].refCount+=1):n[t]={lastUsedTimestamp:r,refCount:1}},e.remove=function(t){var n=e._entries;n[t]&&(n[t].refCount-=1),e._cleanUpIfNeeded()},e._cleanUpIfNeeded=function(){var t,n,r=e._entries,i=Object.keys(r);i.length+1>e._maximumEntries&&(i.forEach((function(e){var i=r[e];(!n||i.lastUsedTimestamp<n.lastUsedTimestamp)&&0===i.refCount&&(t=e,n=i)})),t&&delete r[t])},e}();u._maximumEntries=256,u._entries={};var h=0,d={},f={abort:function(e){var t=d[""+e];t&&(t.onerror=null,t.onload=null,t=null,delete d[""+e])},getSize:function(e,t,n){var r=!1,i=setInterval(a,16),o=f.load(e,a,(function(){"function"===typeof n&&n();f.abort(o),clearInterval(i)}));function a(){var e=d[""+o];if(e){var n=e.naturalHeight,a=e.naturalWidth;n&&a&&(t(a,n),r=!0)}r&&(f.abort(o),clearInterval(i))}},has:function(e){return u.has(e)},load:function(e,t,n){h+=1;var r=new window.Image;return r.onerror=n,r.onload=function(e){var n=function(){return t({nativeEvent:e})};"function"===typeof r.decode?r.decode().then(n,n):setTimeout(n,0)},r.src=e,d[""+h]=r,h},prefetch:function(e){return new Promise((function(t,n){f.load(e,(function(){u.add(e),u.remove(e),t()}),n)}))},queryCache:function(e){var t={};return e.forEach((function(e){u.has(e)&&(t[e]="disk/memory")})),Promise.resolve(t)}},p=f,m=n(116),g=n(5),v=n(81),y=n(3);function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,A=/^(data:image\/svg\+xml;utf8,)(.*)/;function S(e){var t=null;if("number"===typeof e){var n=s(e),r=n.scales[0];if(n.scales.length>1){var i=m.a.get();r=n.scales.reduce((function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e}))}var o=1!==r?"@"+r+"x":"";t=n?n.httpServerLocation+"/"+n.name+o+"."+n.type:""}else"string"===typeof e?t=e:e&&"string"===typeof e.uri&&(t=e.uri);if(t){var a=t.match(A);if(a){var l=a[1],c=a[2];return""+l+encodeURIComponent(c)}}return t}var M=r.forwardRef((function(e,t){var n=e.accessibilityLabel,o=e.blurRadius,a=e.defaultSource,c=e.draggable,u=e.onError,h=e.onLayout,d=e.onLoad,f=e.onLoadEnd,m=e.onLoadStart,w=e.pointerEvents,_=e.source,A=e.style,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","blurRadius","defaultSource","draggable","onError","onLayout","onLoad","onLoadEnd","onLoadStart","pointerEvents","source","style"]);var T=r.useState((function(){var e=S(_);if(null!=e&&p.has(e))return"LOADED";return"IDLE"})),k=T[0],P=T[1],L=r.useState({}),D=L[0],I=L[1],N=r.useContext(v.a),j=r.useRef(null),B=r.useRef(E++),F=r.useRef(null),z="LOADED"===k||"LOADING"===k&&null==a,H=function(e,t,n){var r=x({},g.a.flatten(e)),i=r.filter,o=r.resizeMode,a=r.shadowOffset,s=r.tintColor,c=[],u=null;if(i&&c.push(i),t&&c.push("blur("+t+"px)"),a){var h=Object(l.a)(r);h&&c.push("drop-shadow("+h+")")}return s&&null!=n&&c.push("url(#tint-"+n+")"),c.length>0&&(u=c.join(" ")),delete r.blurRadius,delete r.shadowColor,delete r.shadowOpacity,delete r.shadowOffset,delete r.shadowRadius,delete r.tintColor,delete r.overlayColor,delete r.resizeMode,[r,o,u,s]}(A,o,B.current),U=H[0],V=H[1],G=H[2],W=H[3],q=e.resizeMode||V||"cover",X=z?_:a,Y=S(X),K=function(e){if("number"===typeof e){var t=s(e);return{height:t.height,width:t.width}}if(null!=e&&!Array.isArray(e)&&"object"===typeof e)return{height:e.height,width:e.width}}(X),Q=Y?'url("'+Y+'")':null,Z=function(){if(null!=j.current&&("center"===q||"repeat"===q)){var e=j.current,t=e.naturalHeight,n=e.naturalWidth,r=D.height,i=D.width;if(t&&n&&r&&i){var o=Math.min(1,i/n,r/t),a=Math.ceil(o*n),s=Math.ceil(o*t);return a+"px "+s+"px"}}}(),J=Y?Object(i.a)("img",{alt:n||"",classList:[C.accessibilityImage],draggable:c||!1,ref:j,src:Y}):null;var $=S(_);return r.useEffect((function(){function e(){null!=F.current&&(p.abort(F.current),F.current=null)}return e(),null!=$&&(P("LOADING"),m&&m(),F.current=p.load($,(function(e){P("LOADED"),d&&d(e),f&&f()}),(function(){P("ERRORED"),u&&u({nativeEvent:{error:"Failed to load resource "+$+" (404)"}}),f&&f()}))),e}),[$,F,P,u,d,f,m]),r.createElement(y.a,b({},M,{accessibilityLabel:n,onLayout:function(e){if("center"===q||"repeat"===q||h){var t=e.nativeEvent.layout;h&&h(e),I(t)}},pointerEvents:w,ref:t,style:[O.root,N&&O.inline,K,U]}),r.createElement(y.a,{style:[O.image,R[q],{backgroundImage:Q,filter:G},null!=Z&&{backgroundSize:Z}],suppressHydrationWarning:!0}),J,function(e,t){return e&&null!=t?r.createElement("svg",{style:{position:"absolute",height:0,visibility:"hidden",width:0}},r.createElement("defs",null,r.createElement("filter",{id:"tint-"+t,suppressHydrationWarning:!0},r.createElement("feFlood",{floodColor:""+e,key:e}),r.createElement("feComposite",{in2:"SourceAlpha",operator:"atop"})))):null}(W,B.current))}));M.displayName="Image";var T=M;T.getSize=function(e,t,n){p.getSize(e,t,n)},T.prefetch=function(e){return p.prefetch(e)},T.queryCache=function(e){return p.queryCache(e)};var C=o.a.create({accessibilityImage:x(x({},g.a.absoluteFillObject),{},{height:"100%",opacity:0,width:"100%",zIndex:-1})}),O=g.a.create({root:{flexBasis:"auto",overflow:"hidden",zIndex:0},inline:{display:"inline-flex"},image:x(x({},g.a.absoluteFillObject),{},{backgroundColor:"transparent",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",height:"100%",width:"100%",zIndex:-1})}),R=g.a.create({center:{backgroundSize:"auto"},contain:{backgroundSize:"contain"},cover:{backgroundSize:"cover"},none:{backgroundPosition:"0 0",backgroundSize:"auto"},repeat:{backgroundPosition:"0 0",backgroundRepeat:"repeat",backgroundSize:"auto"},stretch:{backgroundSize:"100% 100%"}});t.a=T},function(e,t,n){var r=n(56),i=n(112);e.exports=function(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return i(n)?t:r((function(t){return e(n,t)}));default:return i(n)&&i(o)?t:i(n)?r((function(t){return e(t,o)})):i(o)?r((function(t){return e(n,t)})):e(n,o)}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({onDispatchAction:function(){},onOptionsChange:function(){}});t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s}));var r="react-native-stylesheet",i={reset:0,modality:.1,classicReset:.5,classic:1,atomic:2.2,custom:{borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,marginHorizontal:2.1,marginVertical:2.1,paddingHorizontal:2.1,paddingVertical:2.1}},o={borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderStyle:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],margin:["marginTop","marginRight","marginBottom","marginLeft"],marginHorizontal:["marginRight","marginLeft"],marginVertical:["marginTop","marginBottom"],overflow:["overflowX","overflowY"],overscrollBehavior:["overscrollBehaviorX","overscrollBehaviorY"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"],paddingHorizontal:["paddingRight","paddingLeft"],paddingVertical:["paddingTop","paddingBottom"]},a="monospace,monospace",s='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif'},function(e,t,n){"use strict";var r=n(188);n.d(t,"CommonActions",(function(){return r}));var i=n(154);n.d(t,"StackRouter",(function(){return i.b})),n.d(t,"StackActions",(function(){return i.a}))},function(e,t,n){"use strict";t.a=function(e){return 1e-6*(e()-.5)}},function(e,t,n){"use strict";var r=n(185);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(19)),a=r(n(17)),s=r(n(0)),l=n(159),c=r(n(369)),u=s.default.forwardRef((function(e,t){var n=l.StyleSheet.compose(i.slider,e.style),r=e.onValueChange,u=e.onSlidingStart,h=e.onSlidingComplete,d=(0,a.default)(e,["onValueChange","onSlidingStart","onSlidingComplete"]),f=r?function(e){var t=!0;"android"===l.Platform.OS&&(t=null!=e.nativeEvent.fromUser&&e.nativeEvent.fromUser),t&&r(e.nativeEvent.value)}:null,p=f,m=u?function(e){u(e.nativeEvent.value)}:null,g=h?function(e){h(e.nativeEvent.value)}:null;return s.default.createElement(c.default,(0,o.default)({},d,{thumbImage:"web"===l.Platform.OS?e.thumbImage:l.Image.resolveAssetSource(e.thumbImage),ref:t,style:n,onChange:p,onRNCSliderSlidingStart:m,onRNCSliderSlidingComplete:g,onRNCSliderValueChange:f,enabled:!e.disabled,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1},__source:{fileName:"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/Slider.js",lineNumber:270}}))}));u.defaultProps={disabled:!1,value:0,minimumValue:0,maximumValue:1,step:0,inverted:!1},i="ios"===l.Platform.OS?l.StyleSheet.create({slider:{height:40}}):l.StyleSheet.create({slider:{}});var h=u;t.default=h},function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===typeof window&&(r=window)}t.exports=r},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(37),o=n(76),a=n(5),s=n(3);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=a.a.create({root:{transitionProperty:"opacity",transitionDuration:"0.15s",userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),u=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,a=e.delayPressIn,u=e.delayPressOut,h=e.delayLongPress,d=e.disabled,f=e.focusable,p=e.onLongPress,m=e.onPress,g=e.onPressIn,v=e.onPressOut,y=e.rejectResponderTermination,b=e.style,w=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","style"]),x=Object(r.useRef)(null),_=Object(i.a)(t,x),E=Object(r.useState)("0s"),A=E[0],S=E[1],M=Object(r.useState)(null),T=M[0],C=M[1],O=Object(r.useCallback)((function(e,t){C(e),S(t?t/1e3+"s":"0s")}),[C,S]),R=Object(r.useCallback)((function(e){O(null!==n&&void 0!==n?n:.2,e)}),[n,O]),k=Object(r.useCallback)((function(e){O(null,e)}),[O]),P=Object(r.useMemo)((function(){return{cancelable:!y,disabled:d,delayLongPress:h,delayPressStart:a,delayPressEnd:u,onLongPress:p,onPress:m,onPressStart:function(e){var t=null!=e.dispatchConfig?"onResponderGrant"===e.dispatchConfig.registrationName:"keydown"===e.type;R(t?0:150),null!=g&&g(e)},onPressEnd:function(e){k(250),null!=v&&v(e)}}}),[h,a,u,d,p,m,g,v,y,R,k]),L=Object(o.a)(x,P);return r.createElement(s.a,l({},w,L,{accessibilityDisabled:d,focusable:!d&&!1!==f,ref:_,style:[c.root,!d&&c.actionable,b,null!=T&&{opacity:T},{transitionDuration:A}]}))})));u.displayName="TouchableOpacity",t.a=u},function(t,n,r){"use strict";var i=r(63);n.a=function(t){var n;try{n=Object(i.findDOMNode)(t)}catch(e){}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(104),i=n(145),o={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function a(e,t){var n=e;return null!=t&&r.a[t]||"number"!==typeof e?null!=t&&o[t]&&(n=Object(i.a)(e)):n=e+"px",n}},function(e,t,n){"use strict";var r=n(208),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isPlainObject:l,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(240),i=n.n(r),o=n(132),a=n(4),s=n.n(a),l=n(131),c=n(34),u=n(49),h=n(9),d=n(61),f=n(29),p=n(161),m=n.n(p),g={},v={Mixin:{scrollResponderMixinGetInitialState:function(){return{isTouching:!1,lastMomentumScrollBeginTime:0,lastMomentumScrollEndTime:0,observedScrollSinceBecomingResponder:!1,becameResponderWhileAnimating:!1}},scrollResponderHandleScrollShouldSetResponder:function(){return this.state.isTouching},scrollResponderHandleStartShouldSetResponder:function(){return!1},scrollResponderHandleStartShouldSetResponderCapture:function(e){return this.scrollResponderIsAnimating()},scrollResponderHandleResponderReject:function(){m()(!1,"ScrollView doesn't take rejection well - scrolls anyway")},scrollResponderHandleTerminationRequest:function(){return!this.state.observedScrollSinceBecomingResponder},scrollResponderHandleTouchEnd:function(e){var t=e.nativeEvent;this.state.isTouching=0!==t.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},scrollResponderHandleResponderRelease:function(e){this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=d.a.currentlyFocusedField();this.props.keyboardShouldPersistTaps||null==t||e.target===t||this.state.observedScrollSinceBecomingResponder||this.state.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),d.a.blurTextInput(t))},scrollResponderHandleScroll:function(e){this.state.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},scrollResponderHandleResponderGrant:function(e){this.state.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},scrollResponderHandleScrollBeginDrag:function(e){this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},scrollResponderHandleScrollEndDrag:function(e){this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},scrollResponderHandleMomentumScrollBegin:function(e){this.state.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},scrollResponderHandleMomentumScrollEnd:function(e){this.state.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},scrollResponderHandleTouchStart:function(e){this.state.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},scrollResponderHandleTouchMove:function(e){this.props.onTouchMove&&this.props.onTouchMove(e)},scrollResponderIsAnimating:function(){return Date.now()-this.state.lastMomentumScrollEndTime<16||this.state.lastMomentumScrollEndTime<this.state.lastMomentumScrollBeginTime},scrollResponderGetScrollableNode:function(){return this.getScrollableNode?this.getScrollableNode():Object(u.a)(this)},scrollResponderScrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||g;e=r.x,t=r.y,n=r.animated}var i=this.scrollResponderGetScrollableNode(),o=e||0,a=t||0;"function"===typeof i.scroll?i.scroll({top:a,left:o,behavior:n?"smooth":"auto"}):(i.scrollLeft=o,i.scrollTop=a)},scrollResponderZoomTo:function(e,t){"ios"!==h.a.OS&&s()("zoomToRect is not implemented")},scrollResponderFlashScrollIndicators:function(){},scrollResponderScrollNativeHandleToKeyboard:function(e,t,n){this.additionalScrollOffset=t||0,this.preventNegativeScrollOffset=!!n,f.a.measureLayout(e,Object(u.a)(this.getInnerViewNode()),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},scrollResponderInputMeasureAndScrollToKeyboard:function(e,t,n,r){var i=c.a.get("window").height;this.keyboardWillOpenTo&&(i=this.keyboardWillOpenTo.endCoordinates.screenY);var o=t-i+r+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(o=Math.max(0,o)),this.scrollResponderScrollTo({x:0,y:o,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},scrollResponderTextInputFocusError:function(e){console.error("Error measuring text field: ",e)},UNSAFE_componentWillMount:function(){this.keyboardWillOpenTo=null,this.additionalScrollOffset=0},scrollResponderKeyboardWillShow:function(e){this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},scrollResponderKeyboardWillHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},scrollResponderKeyboardDidShow:function(e){e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},scrollResponderKeyboardDidHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)}}},y=n(0),b=n.n(y),w=n(5),x=n(3),_=n(37);function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft},get y(){return e.target.scrollTop}},contentSize:{get height(){return e.target.scrollHeight},get width(){return e.target.scrollWidth}},layoutMeasurement:{get height(){return e.target.offsetHeight},get width(){return e.target.offsetWidth}}},timeStamp:Date.now()}}var S=y.forwardRef((function(e,t){var n=e.onScroll,r=e.onTouchMove,i=e.onWheel,o=e.scrollEnabled,a=void 0===o||o,s=e.scrollEventThrottle,l=void 0===s?0:s,c=e.showsHorizontalScrollIndicator,u=e.showsVerticalScrollIndicator,h=e.style,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["onScroll","onTouchMove","onWheel","scrollEnabled","scrollEventThrottle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","style"]),f=y.useRef({isScrolling:!1,scrollLastTick:0}),p=y.useRef(null),m=y.useRef(null);function g(e){return function(t){a&&e&&e(t)}}function v(e){f.current.scrollLastTick=Date.now(),n&&n(A(e))}var b=!1===c||!1===u;return y.createElement(x.a,E({},d,{onScroll:function(e){e.stopPropagation(),e.target===m.current&&(e.persist(),null!=p.current&&clearTimeout(p.current),p.current=setTimeout((function(){!function(e){f.current.isScrolling=!1,n&&n(A(e))}(e)}),100),f.current.isScrolling?function(e,t){var n=Date.now()-e;return t>0&&n>=t}(f.current.scrollLastTick,l)&&v(e):function(e){f.current.isScrolling=!0,v(e)}(e))},onTouchMove:g(r),onWheel:g(i),ref:Object(_.a)(m,t),style:[h,!a&&M.scrollDisabled,b&&M.hideScrollbar]}))})),M=w.a.create({scrollDisabled:{overflowX:"hidden",overflowY:"hidden",touchAction:"none"},hideScrollbar:{scrollbarWidth:"none"}}),T=S;function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){return(k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var P={},L=i()({displayName:"ScrollView",mixins:[v.Mixin],getInitialState:function(){return this.scrollResponderMixinGetInitialState()},flashScrollIndicators:function(){this.scrollResponderFlashScrollIndicators()},getScrollResponder:function(){return this},getScrollableNode:function(){return this._scrollNodeRef},getInnerViewRef:function(){return this._innerViewRef},getInnerViewNode:function(){return this._innerViewRef},getNativeScrollRef:function(){return this._scrollNodeRef},scrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||P;t=r.x,e=r.y,n=r.animated}this.getScrollResponder().scrollResponderScrollTo({x:t||0,y:e||0,animated:!1!==n})},scrollToEnd:function(e){var t=!1!==(e&&e.animated),n=this.props.horizontal,r=this.getScrollResponder(),i=r.scrollResponderGetScrollableNode(),o=n?i.scrollWidth:0,a=n?0:i.scrollHeight;r.scrollResponderScrollTo({x:o,y:a,animated:t})},render:function(){var e=this.props,t=e.contentContainerStyle,n=e.horizontal,r=e.onContentSizeChange,i=e.refreshControl,o=e.stickyHeaderIndices,a=e.pagingEnabled,l=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll"])),c={};r&&(c={onLayout:this._handleContentOnLayout});var u=!n&&Array.isArray(o),h=u||a?b.a.Children.map(this.props.children,(function(e,t){var n=u&&o.indexOf(t)>-1;return null!=e&&(n||a)?b.a.createElement(x.a,{style:w.a.compose(n&&I.stickyHeader,a&&I.pagingEnabledChild)},e):e})):this.props.children,d=b.a.createElement(x.a,k({},c,{children:h,collapsable:!1,ref:this._setInnerViewRef,style:w.a.compose(n&&I.contentContainerHorizontal,t)})),f=n?I.baseHorizontal:I.baseVertical,p=n?I.pagingEnabledHorizontal:I.pagingEnabledVertical,m=O(O({},l),{},{style:[f,a&&p,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),g=T;s()(void 0!==g,"ScrollViewClass must not be undefined");var v=b.a.createElement(g,k({},m,{ref:this._setScrollNodeRef}),d);return i?b.a.cloneElement(i,{style:m.style},v):v},_handleContentOnLayout:function(e){var t=e.nativeEvent.layout,n=t.width,r=t.height;this.props.onContentSizeChange(n,r)},_handleScroll:function(e){"on-drag"===this.props.keyboardDismissMode&&Object(o.a)(),this.scrollResponderHandleScroll(e)},_setInnerViewRef:function(e){this._innerViewRef=e},_setScrollNodeRef:function(e){this._scrollNodeRef=e,null!=e&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),Object(l.a)(this.props.forwardedRef)(e)}}),D={flexGrow:1,flexShrink:1,transform:[{translateZ:0}],WebkitOverflowScrolling:"touch"},I=w.a.create({baseVertical:O(O({},D),{},{flexDirection:"column",overflowX:"hidden",overflowY:"auto"}),baseHorizontal:O(O({},D),{},{flexDirection:"row",overflowX:"auto",overflowY:"hidden"}),contentContainerHorizontal:{flexDirection:"row"},stickyHeader:{position:"sticky",top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:"x mandatory"},pagingEnabledVertical:{scrollSnapType:"y mandatory"},pagingEnabledChild:{scrollSnapAlign:"start"}}),N=b.a.forwardRef((function(e,t){return b.a.createElement(L,k({},e,{forwardedRef:t}))}));N.displayName="ScrollView";t.a=N},function(e,t,n){"use strict";var r=n(247),i=n.n(r);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function e(t,n){var r=n.default,i=void 0===r?null:r,o=n.triggerUpdate,a=void 0===o||o,s=n.onChange,l=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=i,this.triggerUpdate=a,this.onChange=l};t.a=function(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,a=void 0===r?{}:r,l=e.methods,c=void 0===l?{}:l,u=e.aliases,h=void 0===u?{}:u,d=e.init,f=void 0===d?function(){}:d,p=e.update,m=void 0===p?function(){}:p,g=Object.keys(a).map((function(e){return new s(e,a[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function a(t){return s(t,e),l(),a}var s=function(e,n){f.call(a,e,t,n),t.initialised=!0},l=i()((function(){t.initialised&&(m.call(a,t,r),r={})}),1);return g.forEach((function(e){a[e.name]=function(e){var n=e.name,i=e.triggerUpdate,o=void 0!==i&&i,s=e.onChange,c=void 0===s?function(e,t){}:s,u=e.defaultVal,h=void 0===u?null:u;return function(e){var i=t[n];if(!arguments.length)return i;var s=void 0===e?h:e;return t[n]=s,c.call(a,s,t,i),!r.hasOwnProperty(n)&&(r[n]=i),o&&l(),a}}(e)})),Object.keys(c).forEach((function(e){a[e]=function(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=c[e]).call.apply(n,[a,t].concat(i))}})),Object.entries(h).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];return a[n]=a[r]})),a.resetProps=function(){return g.forEach((function(e){a[e.name](e.defaultVal)})),a},a.resetProps(),t._rerender=l,a}}},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(13).canUseDOM&&"undefined"!==typeof window.requestIdleCallback,a=o?window.requestIdleCallback:function(e,t){return setTimeout((function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},s=o?window.cancelIdleCallback:function(e){clearTimeout(e)},l=a,c={Events:{interactionStart:"interactionStart",interactionComplete:"interactionComplete"},runAfterInteractions:function(e){var t,n=new Promise((function(n){t=l((function(){e?n(e()):n()}))}));return{then:n.then.bind(n),done:n.then.bind(n),cancel:function(){s(t)}}},createInteractionHandle:function(){return 1},clearInteractionHandle:function(e){i()(!!e,"Must provide a handle to clear.")},addListener:function(){}};t.a=c},,function(e,t,n){var r=n(112);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(65),a=n(28),s=n(73),l=n(89),c=n(37),u=n(74),h=n(95),d=n(5),f=n(81);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.dir,o=e.hrefAttrs,a=e.numberOfLines,d=e.onClick,p=e.onLayout,m=e.onPress,g=e.onMoveShouldSetResponder,y=e.onMoveShouldSetResponderCapture,x=e.onResponderEnd,_=e.onResponderGrant,E=e.onResponderMove,A=e.onResponderReject,S=e.onResponderRelease,M=e.onResponderStart,T=e.onResponderTerminate,C=e.onResponderTerminationRequest,O=e.onScrollShouldSetResponder,R=e.onScrollShouldSetResponderCapture,k=e.onSelectionChangeShouldSetResponder,P=e.onSelectionChangeShouldSetResponderCapture,L=e.onStartShouldSetResponder,D=e.onStartShouldSetResponderCapture,I=e.selectable,N=r.useContext(f.a),j=r.useRef(null),B=[b.text,!0===N&&b.textHasAncestor,1===a&&b.textOneLine,null!=a&&a>1&&b.textMultiLine],F=[e.style,null!=a&&a>1&&{WebkitLineClamp:a},!0===I&&w.selectable,!1===I&&w.notSelectable,m&&w.pressable];Object(l.a)(j,p),Object(h.a)(j,{onMoveShouldSetResponder:g,onMoveShouldSetResponderCapture:y,onResponderEnd:x,onResponderGrant:_,onResponderMove:E,onResponderReject:A,onResponderRelease:S,onResponderStart:M,onResponderTerminate:T,onResponderTerminationRequest:C,onScrollShouldSetResponder:O,onScrollShouldSetResponderCapture:R,onSelectionChangeShouldSetResponder:k,onSelectionChangeShouldSetResponderCapture:P,onStartShouldSetResponder:L,onStartShouldSetResponderCapture:D});var z=N?"span":"div",H=function(e){return Object(s.a)(e,v)}(e);if(H.classList=B,H.dir=n,N||(H.dir=null!=n?n:"auto"),H.onClick=function(e){null!=d&&d(e),null==d&&null!=m&&(e.stopPropagation(),m(e))},H.style=F,null!=e.href&&null!=o){var U=o.download,V=o.rel,G=o.target;null!=U&&(H.download=U),null!=V&&(H.rel=V),"string"===typeof G&&(H.target="_"!==G.charAt(0)?"_"+G:G)}var W=Object(u.a)(H),q=Object(c.a)(j,W,t);H.ref=q;var X=Object(i.a)(z,H);return N?X:r.createElement(f.a.Provider,{value:!0},X)}));y.displayName="Text";var b=o.a.create({text:{border:"0 solid black",boxSizing:"border-box",color:"black",display:"inline",font:"14px System",margin:0,padding:0,whiteSpace:"pre-wrap",wordWrap:"break-word"},textHasAncestor:{color:"inherit",font:"inherit",whiteSpace:"inherit"},textOneLine:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},textMultiLine:{display:"-webkit-box",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",WebkitBoxOrient:"vertical"}}),w=d.a.create({notSelectable:{userSelect:"none"},selectable:{userSelect:"text"},pressable:{cursor:"pointer"}});t.a=y},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(10),o=r(0),a=r.n(o);if(!o.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.r)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var s=r(63);function l(e){e()}var c=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=[];function h(e){return Object(i.m)(e)}var d="undefined"===typeof FinalizationRegistry?void 0:FinalizationRegistry;function f(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+p}}var p=1e4;var m=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var g=d?function(e){var t=new Map,n=1,r=new e((function(e){var n=t.get(e);n&&(n.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,i,o){var a=n++;return r.register(o,a,e),e.current=f(i),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){r.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(d):function(){var e,t=new Set;function n(){void 0===e&&(e=setTimeout(r,1e4))}function r(){e=void 0;var r=Date.now();t.forEach((function(e){var n=e.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&n()}return{addReactionToTrack:function(e,r,i){var o;return e.current=f(r),o=e,t.add(o),n(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),r())},resetCleanupScheduleForTests:function(){var n,r;if(t.size>0){try{for(var i=m(t),o=i.next();!o.done;o=i.next()){var a=o.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),v=g.addReactionToTrack,y=g.recordReactionAsCommitted,b=(g.resetCleanupScheduleForTests,g.forceCleanupTimerToRunNowForTests,!1);function w(){return b}var x=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function _(e){return"observer"+e}var E=function(){};function A(t,n){if(void 0===n&&(n="observed"),w())return t();var r=x(a.a.useState(new E),1)[0],s=function(){var e=c(Object(o.useState)(0),2)[1];return Object(o.useCallback)((function(){e((function(e){return e+1}))}),u)}(),l=a.a.useRef(null);if(!l.current)var d=new i.b(_(n),(function(){f.mounted?s():f.changedBeforeMount=!0})),f=v(l,d,r);var p,m,g=l.current.reaction;if(a.a.useDebugValue(g,h),a.a.useEffect((function(){return y(l),l.current?(l.current.mounted=!0,l.current.changedBeforeMount&&(l.current.changedBeforeMount=!1,s())):(l.current={reaction:new i.b(_(n),(function(){s()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},s()),function(){l.current.reaction.dispose(),l.current=null}}),[]),g.track((function(){try{p=t()}catch(e){m=e}})),m)throw m;return p}var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function M(e,t){if(w())return e;var n,r,i,a=S({forwardRef:!1},t),s=e.displayName||e.name,l=function(t,n){return A((function(){return e(t,n)}),s)};return l.displayName=s,n=a.forwardRef?Object(o.memo)(Object(o.forwardRef)(l)):Object(o.memo)(l),r=e,i=n,Object.keys(r).forEach((function(e){T[e]||Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})),n.displayName=s,n}var T={$$typeof:!0,render:!0,compare:!0,type:!0};var C;(C=s.unstable_batchedUpdates)||(C=l),Object(i.i)({reactionScheduler:C})},function(t,n,r){"use strict";var i=r(0),o=r(32),a=r(65),s=r(28),l=r(73),c=r(89),u=r(68),h=r(37),d=r(74),f=r(95),p=r(5),m=r(61);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=v(v(v(v(v(v(v(v(v({},s.c),s.a),s.b),s.d),s.e),s.f),s.h),s.g),{},{autoCapitalize:!0,autoComplete:!0,autoCorrect:!0,autoFocus:!0,defaultValue:!0,disabled:!0,lang:!0,maxLength:!0,onChange:!0,onScroll:!0,placeholder:!0,pointerEvents:!0,readOnly:!0,rows:!0,spellCheck:!0,value:!0,type:!0});var w=i.forwardRef((function(t,n){var r,a,s=t.autoCapitalize,g=void 0===s?"sentences":s,v=t.autoComplete,y=t.autoCompleteType,w=t.autoCorrect,_=void 0===w||w,E=t.blurOnSubmit,A=t.clearTextOnFocus,S=t.dir,M=t.editable,T=void 0===M||M,C=t.keyboardType,O=void 0===C?"default":C,R=t.multiline,k=void 0!==R&&R,P=t.numberOfLines,L=void 0===P?1:P,D=t.onBlur,I=t.onChange,N=t.onChangeText,j=t.onContentSizeChange,B=t.onFocus,F=t.onKeyPress,z=t.onLayout,H=t.onMoveShouldSetResponder,U=t.onMoveShouldSetResponderCapture,V=t.onResponderEnd,G=t.onResponderGrant,W=t.onResponderMove,q=t.onResponderReject,X=t.onResponderRelease,Y=t.onResponderStart,K=t.onResponderTerminate,Q=t.onResponderTerminationRequest,Z=t.onScrollShouldSetResponder,J=t.onScrollShouldSetResponderCapture,$=t.onSelectionChange,ee=t.onSelectionChangeShouldSetResponder,te=t.onSelectionChangeShouldSetResponderCapture,ne=t.onStartShouldSetResponder,re=t.onStartShouldSetResponderCapture,ie=t.onSubmitEditing,oe=t.placeholderTextColor,ae=t.returnKeyType,se=t.secureTextEntry,le=void 0!==se&&se,ce=t.selection,ue=t.selectTextOnFocus,he=t.spellCheck;switch(O){case"email-address":r="email";break;case"number-pad":case"numeric":a="numeric";break;case"decimal-pad":a="decimal";break;case"phone-pad":r="tel";break;case"search":case"web-search":r="search";break;case"url":r="url";break;default:r="text"}le&&(r="password");var de=i.useRef({height:null,width:null}),fe=i.useRef(null),pe=i.useCallback((function(e){if(k&&j&&null!=e){var t=e.scrollHeight,n=e.scrollWidth;t===de.current.height&&n===de.current.width||(de.current.height=t,de.current.width=n,j({nativeEvent:{contentSize:{height:de.current.height,width:de.current.width}}}))}}),[k,j]),me=i.useMemo((function(){return function(e){null!=e&&(e.clear=function(){null!=e&&(e.value="")},e.isFocused=function(){return null!=e&&m.a.currentlyFocusedField()===e},pe(e))}}),[pe]);Object(u.a)((function(){var t=fe.current;null!=t&&null!=ce&&function(t,n){if(function(e,t){var n=e.selectionEnd,r=e.selectionStart,i=t.start,o=t.end;return i!==r||o!==n}(t,n)){var r=n.start,i=n.end;try{t.setSelectionRange(r,i||r)}catch(e){}}}(t,ce),document.activeElement===t&&(m.a._currentlyFocusedNode=t)}),[fe,ce]);var ge=k?"textarea":"input",ve=[x.textinput],ye=p.a.compose(t.style,oe&&{placeholderTextColor:oe});Object(c.a)(fe,z),Object(f.a)(fe,{onMoveShouldSetResponder:H,onMoveShouldSetResponderCapture:U,onResponderEnd:V,onResponderGrant:G,onResponderMove:W,onResponderReject:q,onResponderRelease:X,onResponderStart:Y,onResponderTerminate:K,onResponderTerminationRequest:Q,onScrollShouldSetResponder:Z,onScrollShouldSetResponderCapture:J,onSelectionChangeShouldSetResponder:ee,onSelectionChangeShouldSetResponderCapture:te,onStartShouldSetResponder:ne,onStartShouldSetResponderCapture:re});var be=function(e){return Object(l.a)(e,b)}(t);be.autoCapitalize=g,be.autoComplete=v||y||"on",be.autoCorrect=_?"on":"off",be.classList=ve,be.dir=void 0!==S?S:"auto",be.enterKeyHint=ae,be.onBlur=function(e){m.a._currentlyFocusedNode=null,D&&(e.nativeEvent.text=e.target.value,D(e))},be.onChange=function(e){var t=e.target,n=t.value;e.nativeEvent.text=n,pe(t),I&&I(e),N&&N(n)},be.onFocus=function(e){var t=e.target;B&&(e.nativeEvent.text=t.value,B(e)),null!=t&&(m.a._currentlyFocusedNode=t,A&&(t.value=""),ue&&setTimeout((function(){t.select()}),0))},be.onKeyDown=function(e){var t=e.target;e.stopPropagation();var n=null==E?!k:E,r=e.nativeEvent,i=function(e){return e.isComposing||229===e.keyCode}(r);F&&F(e),"Enter"!==e.key||e.shiftKey||i||e.isDefaultPrevented()||(!E&&k||!ie||(e.preventDefault(),r.text=e.target.value,ie(e)),n&&null!=t&&t.blur())},be.onSelect=function(e){if($)try{var t=e.target,n=t.selectionStart,r=t.selectionEnd;e.nativeEvent.selection={start:n,end:r},e.nativeEvent.text=e.target.value,$(e)}catch(e){}},be.readOnly=!T,be.rows=k?L:void 0,be.spellCheck=null!=he?he:_,be.style=ye,be.type=k?void 0:r,be.inputMode=a;var we=Object(d.a)(be),xe=Object(h.a)(fe,we,me,n);return be.ref=xe,Object(o.a)(ge,be)}));w.displayName="TextInput",w.State=m.a;var x=a.a.create({textinput:{MozAppearance:"textfield",WebkitAppearance:"none",backgroundColor:"transparent",border:"0 solid black",borderRadius:0,boxSizing:"border-box",font:"14px System",margin:0,padding:0,resize:"none"}});n.a=w},function(e,t,n){"use strict";var r=n(29),i={_currentlyFocusedNode:null,currentlyFocusedField:function(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput:function(e){null!==e&&(this._currentlyFocusedNode=e,document.activeElement!==e&&r.a.focus(e))},blurTextInput:function(e){null!==e&&(this._currentlyFocusedNode=null,document.activeElement===e&&r.a.blur(e))}};t.a=i},function(e,t,n){"use strict";(function(e){var n={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-n.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*n.Bounce.In(2*e):.5*n.Bounce.Out(2*e-1)+.5}}},r="undefined"===typeof self&&"undefined"!==typeof e&&e.hrtime?function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!==typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=r()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]],a=!t;o&&!1===o.update(e,a)&&!t&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),o={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.Linear;return t<0?a(e[0],e[1],r):t>1?a(e[n],e[n-1],n-r):a(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=o.Utils.Bernstein,s=0;s<=r;s++)n+=i(1-t,r-s)*i(t,s)*e[s]*a(r,s);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=o.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}}},a=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),s=new i,l=function(){function e(e,t){void 0===t&&(t=s),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=n.Linear.None,this._interpolationFunction=o.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=a.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"===typeof e?r()+parseFloat(e):e:r(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var o=e[i],a=Array.isArray(o),s=a?"array":typeof o,l=!a&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(l){var c=n[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),n[i]=[o].concat(c)}if("object"!==s&&!a||!o||l)"undefined"===typeof t[i]&&(t[i]=o),a||(t[i]*=1),r[i]=l?n[i].slice().reverse():t[i]||0;else{for(var u in t[i]=a?[]:{},o)t[i][u]=o[u];r[i]=a?[]:{},this._setupProperties(o,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=r()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=r()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=r()),void 0===t&&(t=!0),this._isPaused)return!0;var n,i,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var a=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!==typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var i in n)if(void 0!==t[i]){var o=t[i]||0,a=n[i],s=Array.isArray(e[i]),l=Array.isArray(a);!s&&l?e[i]=this._interpolationFunction(a,r):"object"===typeof a&&a?this._updateProperties(e[i],o,a,r):"number"===typeof(a=this._handleRelativeValue(o,a))&&(e[i]=o+(a-o)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!==typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"===typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),c=a.nextId,u=s,h=u.getAll.bind(u),d=u.removeAll.bind(u),f=u.add.bind(u),p=u.remove.bind(u),m=u.update.bind(u),g={Easing:n,Group:i,Interpolation:o,now:r,Sequence:a,nextId:c,Tween:l,VERSION:"18.6.4",getAll:h,removeAll:d,add:f,remove:p,update:m};t.a=g}).call(this,n(111))},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(300)},function(e,t,n){"use strict";var r=n(0),i=n(32),o=n(99),a=n(5),s=n(3);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d={},f=r.forwardRef((function(e,t){var n=e.accessibilityLabel,l=e.activeThumbColor,c=void 0===l?"#009688":l,u=e.activeTrackColor,f=void 0===u?"#A3D3CF":u,m=e.disabled,g=void 0!==m&&m,v=e.onValueChange,y=e.style,b=void 0===y?d:y,w=e.thumbColor,x=void 0===w?"#FAFAFA":w,_=e.trackColor,E=void 0===_?"#939393":_,A=e.value,S=void 0!==A&&A,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","activeThumbColor","activeTrackColor","disabled","onValueChange","style","thumbColor","trackColor","value"]),T=r.useRef(null);function C(e){var t="focus"===e.nativeEvent.type?"0px 1px 3px rgba(0,0,0,0.5), 0 0 0 10px rgba(0,0,0,0.1)":"0px 1px 3px rgba(0,0,0,0.5)";null!=T.current&&(T.current.style.boxShadow=t)}var O=a.a.flatten(b),R=O.height,k=O.width,P=R||"20px",L=Object(o.a)(P,2),D=k>L?k:L,I=Object(o.a)(P,.5),N=!0===S?null!=E&&"object"===typeof E?E.true:f:null!=E&&"object"===typeof E?E.false:E,j=S?c:x,B=P,F=B,z=[p.root,b,g&&p.cursorDefault,{height:P,width:D}],H=[p.track,{backgroundColor:g?"#D5D5D5":N,borderRadius:I}],U=[p.thumb,S&&p.thumbActive,{backgroundColor:g?"#BDBDBD":j,height:B,marginStart:S?Object(o.a)(F,-1):0,width:F}],V=Object(i.a)("input",{accessibilityLabel:n,checked:S,disabled:g,onBlur:C,onChange:function(e){null!=v&&v(e.nativeEvent.target.checked)},onFocus:C,ref:t,style:[p.nativeControl,p.cursorInherit],type:"checkbox",role:"switch"});return r.createElement(s.a,h({},M,{style:z}),r.createElement(s.a,{style:H}),r.createElement(s.a,{ref:T,style:U}),V)}));f.displayName="Switch";var p=a.a.create({root:{cursor:"pointer",userSelect:"none"},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},track:c(c({},a.a.absoluteFillObject),{},{height:"70%",margin:"auto",transitionDuration:"0.1s",width:"100%"}),thumb:{alignSelf:"flex-start",borderRadius:"100%",boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",start:"0%",transform:[{translateZ:0}],transitionDuration:"0.1s"},thumbActive:{start:"100%"},nativeControl:c(c({},a.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})});t.a=f},function(e,t,n){"use strict";var r=n(94),i={create:function(e,t){return r.a.createCSS(e,t)}};t.a=i},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n.n(i);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var s=i.prototype;return s.setNativeProps=function(){},s.render=function(){return o.a.createElement(r.a,{style:[l,this.props.style]},this.props.children)},i}(o.a.Component),l={};t.a=s},function(e,t,n){"use strict";var r=n(21),i=n.n(r),o=n(23),a=n.n(o),s=n(224),l=n.n(s),c=function(e,t){return new Promise((function(n,r){try{var i=e();t&&t(null,i),n(i)}catch(o){t&&t(o),r(o)}}))},u=function(e,t,n){return Promise.all(e).then((function(e){var r=n?n(e):null;return t&&t(null,r),Promise.resolve(r)}),(function(e){return t&&t(e),Promise.reject(e)}))},h=function(){function e(){i()(this,e)}return a()(e,null,[{key:"getItem",value:function(e,t){return c((function(){return window.localStorage.getItem(e)}),t)}},{key:"setItem",value:function(e,t,n){return c((function(){window.localStorage.setItem(e,t)}),n)}},{key:"removeItem",value:function(e,t){return c((function(){return window.localStorage.removeItem(e)}),t)}},{key:"mergeItem",value:function(e,t,n){return c((function(){!function(e,t){var n=window.localStorage.getItem(e),r=JSON.parse(n),i=JSON.parse(t),o=JSON.stringify(l()({},r,i));window.localStorage.setItem(e,o)}(e,t)}),n)}},{key:"clear",value:function(e){return c((function(){window.localStorage.clear()}),e)}},{key:"getAllKeys",value:function(e){return c((function(){for(var e=window.localStorage.length,t=[],n=0;n<e;n+=1){var r=window.localStorage.key(n);t.push(r)}return t}),e)}},{key:"flushGetRequests",value:function(){}},{key:"multiGet",value:function(t,n){var r=t.map((function(t){return e.getItem(t)}));return u(r,n,(function(e){return e.map((function(e,n){return[t[n],e]}))}))}},{key:"multiSet",value:function(t,n){var r=t.map((function(t){return e.setItem(t[0],t[1])}));return u(r,n)}},{key:"multiRemove",value:function(t,n){var r=t.map((function(t){return e.removeItem(t)}));return u(r,n)}},{key:"multiMerge",value:function(t,n){var r=t.map((function(t){return e.mergeItem(t[0],t[1])}));return u(r,n)}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(13),i=n(0),o=r.canUseDOM?i.useLayoutEffect:i.useEffect;t.a=o},function(e,t,n){"use strict";var r=n(0),i="Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.";t.a=r.createContext({isDefault:!0,get getKey(){throw new Error(i)},get setKey(){throw new Error(i)},get getState(){throw new Error(i)},get setState(){throw new Error(i)},get getIsInitial(){throw new Error(i)}})},function(e,t,n){"use strict";var r=n(4),i=n.n(r);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,n;function r(t,n,r,i){var o;return(o=e.call(this,n)||this).emitter=t,o.listener=r,o.context=i,o}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r.prototype.remove=function(){this.emitter.removeSubscription(this)},r}(function(){function e(e){this.subscriber=e}return e.prototype.remove=function(){this.subscriber.removeSubscription(this)},e}()),s=function(){function e(){this._subscriptionsForType={}}var t=e.prototype;return t.addSubscription=function(e,t){i()(t.subscriber===this,"The subscriber of the subscription is incorrectly set."),this._subscriptionsForType[e]||(this._subscriptionsForType[e]=[]);var n=this._subscriptionsForType[e].length;return this._subscriptionsForType[e].push(t),t.eventType=e,t.key=n,t},t.removeAllSubscriptions=function(e){null==e?this._subscriptionsForType={}:delete this._subscriptionsForType[e]},t.removeSubscription=function(e){var t=e.eventType,n=e.key,r=this._subscriptionsForType[t];r&&delete r[n]},t.getSubscriptionsForType=function(e){return this._subscriptionsForType[e]},e}(),l=function(){return!0},c=function(){function e(e){this._subscriber=e||new s}var t=e.prototype;return t.addListener=function(e,t,n){return this._subscriber.addSubscription(e,new a(this,this._subscriber,t,n))},t.removeAllListeners=function(e){this._subscriber.removeAllSubscriptions(e)},t.removeSubscription=function(e){i()(e.emitter===this,"Subscription does not belong to this emitter."),this._subscriber.removeSubscription(e)},t.listenerCount=function(e){var t=this._subscriber.getSubscriptionsForType(e);return t?t.filter(l).length:0},t.emit=function(e){var t=this._subscriber.getSubscriptionsForType(e);if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0,a=t.length;o<a;o++){var s=t[o];s&&s.listener&&s.listener.apply(s.context,r)}}},t.removeListener=function(e,t){console.error("EventEmitter.removeListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.");var n=this._subscriber.getSubscriptionsForType(e);if(n)for(var r=0,i=n.length;r<i;r++){var o=n[r];o&&o.listener===t&&o.remove()}},e}();t.a=new c},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(58);function o(){var e=r.useContext(i.a);if(void 0===e)throw new Error("Couldn't find a navigation object. Is your component inside a screen in a navigator?");return e}},function(e,t,n){"use strict";var r=function e(t,n,r){if(void 0===r&&(r=-1),0===r)return!0;if(t===n)return!1;if("function"===typeof t&&"function"===typeof n)return!1;if("object"!==typeof t||null===t)return t!==n;if("object"!==typeof n||null===n)return!0;if(t.constructor!==n.constructor)return!0;if(Array.isArray(t)){var i=t.length;if(n.length!==i)return!0;for(var o=0;o<i;o++)if(e(t[o],n[o],r-1))return!0}else{for(var a in t)if(e(t[a],n[a],r-1))return!0;for(var s in n)if(void 0===t[s]&&void 0!==n[s])return!0}return!1},i=n(0),o=n(5),a=n(3),s=n(77),l=n(4),c=n.n(l);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=f(f({},s.a.defaultProps),{},{numColumns:1}),g=function(e){var t,n;n=e,(t=d).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var l=d.prototype;function d(t){var n;return(n=e.call(this,t)||this)._virtualizedListPairs=[],n._captureRef=function(e){n._listRef=e},n._getItem=function(e,t){var r=n.props.numColumns;if(r>1){for(var i=[],o=0;o<r;o++){var a=e[t*r+o];null!=a&&i.push(a)}return i}return e[t]},n._getItemCount=function(e){if(e){var t=n.props.numColumns;return t>1?Math.ceil(e.length/t):e.length}return 0},n._keyExtractor=function(e,t){var r=n.props,i=r.keyExtractor,o=r.numColumns;return o>1?(c()(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",o),e.map((function(e,n){return i(e,t*o+n)})).join(":")):i(e,t)},n._renderer=function(){var e,t=n.props,r=t.ListItemComponent,s=t.renderItem,l=t.numColumns,u=t.columnWrapperStyle,h=function(e){return r?i.createElement(r,e):s?s(e):null};return(e={})[r?"ListItemComponent":"renderItem"]=function(e){if(l>1){var t=e.item,n=e.index;return c()(Array.isArray(t),"Expected array of items with numColumns > 1"),i.createElement(a.a,{style:o.a.compose(v.row,u)},t.map((function(t,r){var o=h({item:t,index:n*l+r,separators:e.separators});return null!=o?i.createElement(i.Fragment,{key:r},o):null})))}return h(e)},e},n._checkProps(n.props),n.props.viewabilityConfigCallbackPairs?n._virtualizedListPairs=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(e.onViewableItemsChanged)}})):n.props.onViewableItemsChanged&&n._virtualizedListPairs.push({viewabilityConfig:n.props.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(n.props.onViewableItemsChanged)}),n}return l.scrollToEnd=function(e){this._listRef&&this._listRef.scrollToEnd(e)},l.scrollToIndex=function(e){this._listRef&&this._listRef.scrollToIndex(e)},l.scrollToItem=function(e){this._listRef&&this._listRef.scrollToItem(e)},l.scrollToOffset=function(e){this._listRef&&this._listRef.scrollToOffset(e)},l.recordInteraction=function(){this._listRef&&this._listRef.recordInteraction()},l.flashScrollIndicators=function(){this._listRef&&this._listRef.flashScrollIndicators()},l.getScrollResponder=function(){if(this._listRef)return this._listRef.getScrollResponder()},l.getNativeScrollRef=function(){if(this._listRef)return this._listRef.getScrollRef()},l.getScrollableNode=function(){if(this._listRef)return this._listRef.getScrollableNode()},l.setNativeProps=function(e){this._listRef&&this._listRef.setNativeProps(e)},l.componentDidUpdate=function(e){c()(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),c()(e.onViewableItemsChanged===this.props.onViewableItemsChanged,"Changing onViewableItemsChanged on the fly is not supported"),c()(!r(e.viewabilityConfig,this.props.viewabilityConfig),"Changing viewabilityConfig on the fly is not supported"),c()(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,"Changing viewabilityConfigCallbackPairs on the fly is not supported"),this._checkProps(this.props)},l._checkProps=function(e){var t=e.getItem,n=e.getItemCount,r=e.horizontal,i=e.numColumns,o=e.columnWrapperStyle,a=e.onViewableItemsChanged,s=e.viewabilityConfigCallbackPairs;c()(!t&&!n,"FlatList does not support custom data formats."),i>1?c()(!r,"numColumns does not support horizontal."):c()(!o,"columnWrapperStyle not supported for single column lists"),c()(!(a&&s),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")},l._pushMultiColumnViewable=function(e,t){var n=this.props,r=n.numColumns,i=n.keyExtractor;t.item.forEach((function(n,o){c()(null!=t.index,"Missing index!");var a=t.index*r+o;e.push(f(f({},t),{},{item:n,key:i(n,a),index:a}))}))},l._createOnViewableItemsChanged=function(e){var t=this;return function(n){var r=t.props.numColumns;if(e)if(r>1){var i=[],o=[];n.viewableItems.forEach((function(e){return t._pushMultiColumnViewable(o,e)})),n.changed.forEach((function(e){return t._pushMultiColumnViewable(i,e)})),e({viewableItems:o,changed:i})}else e(n)}},l.render=function(){var e=this.props,t=(e.numColumns,e.columnWrapperStyle,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["numColumns","columnWrapperStyle"]));return i.createElement(s.a,u({},t,{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs},this._renderer()))},d}(i.PureComponent);g.defaultProps=m;var v=o.a.create({row:{flexDirection:"row"}}),y=g;t.a=y},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(!0!==t[r]&&0!==r.indexOf("aria-")||(n[r]=e[r]));return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(29),i=n(129),o=n(106),a=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={};function h(e){var t=e.classList,n=e.pointerEvents,s=e.style,c=Object(a.useRef)(null),h=Object(a.useRef)(null);return h.current={classList:t,pointerEvents:n,style:s},Object(o.a)((function(){return function(e){null!=e&&(e.measure=function(t){return r.a.measure(e,t)},e.measureLayout=function(t,n,i){return r.a.measureLayout(e,t,i,n)},e.measureInWindow=function(t){return r.a.measureInWindow(e,t)},e.setNativeProps=function(t){var n=h.current||u,o=n.classList,a=n.style,s=n.pointerEvents;!function(e,t,n,o,a,s){if(null!=e&&t){var c=Object(i.a)(null,l(l({pointerEvents:o},t),{},{classList:[n,t.className],style:[a,t.style]})),u=c.style;if(null!=s.current)for(var h in null==c.style&&(c.style={}),s.current)null==c.style[h]&&(c.style[h]="");s.current=u,r.a.updateView(e,c)}}(e,t,o,s,a,c)})}}))}},function(e,t,n){"use strict";var r=n(43);n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter}));var i=n(189);n.d(t,"BaseNavigationContainer",(function(){return i.a}));var o=n(190);n.d(t,"createNavigatorFactory",(function(){return o.a}));var a=n(191);n.d(t,"NavigationHelpersContext",(function(){return a.a}));var s=n(58);n.d(t,"NavigationContext",(function(){return s.a}));var l=n(47);n.d(t,"NavigationRouteContext",(function(){return l.a}));n(124);var c=n(219);n.d(t,"useNavigationBuilder",(function(){return c.a}));var u=n(71);n.d(t,"useNavigation",(function(){return u.a}));n(192),n(193),n(194),n(195);var h=n(196);n.d(t,"getStateFromPath",(function(){return h.a}));var d=n(201);n.d(t,"getPathFromState",(function(){return d.a}));var f=n(202);n.d(t,"getActionFromState",(function(){return f.a}));n(203),n(87)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r="ERROR",i=Object.freeze({NOT_RESPONDER:{DELAY:r,RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:r,RESPONDER_TERMINATED:r,LONG_PRESS_DETECTED:r},RESPONDER_INACTIVE_PRESS_START:{DELAY:"RESPONDER_ACTIVE_PRESS_START",RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:r},RESPONDER_ACTIVE_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},RESPONDER_ACTIVE_LONG_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},ERROR:{DELAY:"NOT_RESPONDER",RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"NOT_RESPONDER"}}),o=function(e){return"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},a=function(e){return"button"===e.getAttribute("role")},s=function(e){return"RESPONDER_INACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},l=function(){function e(e){this._eventHandlers=null,this._isPointerTouch=!1,this._longPressDelayTimeout=null,this._longPressDispatched=!1,this._pressDelayTimeout=null,this._pressOutDelayTimeout=null,this._touchState="NOT_RESPONDER",this.configure(e)}var t=e.prototype;return t.configure=function(e){this._config=e},t.reset=function(){this._cancelLongPressDelayTimeout(),this._cancelPressDelayTimeout(),this._cancelPressOutDelayTimeout()},t.getEventHandlers=function(){return null==this._eventHandlers&&(this._eventHandlers=this._createEventHandlers()),this._eventHandlers},t._createEventHandlers=function(){var e=this,t=function(t,n){t.persist(),e._cancelPressOutDelayTimeout(),e._longPressDispatched=!1,e._selectionTerminated=!1,e._touchState="NOT_RESPONDER",e._isPointerTouch="touchstart"===t.nativeEvent.type,e._receiveSignal("RESPONDER_GRANT",t);var r=c(e._config.delayPressStart,0,50);!1!==n&&r>0?e._pressDelayTimeout=setTimeout((function(){e._receiveSignal("DELAY",t)}),r):e._receiveSignal("DELAY",t);var i=c(e._config.delayLongPress,10,450);e._longPressDelayTimeout=setTimeout((function(){e._handleLongPress(t)}),i+r)},n=function(t){e._receiveSignal("RESPONDER_RELEASE",t)},r=function t(r){"NOT_RESPONDER"!==e._touchState&&(n(r),document.removeEventListener("keyup",t))};return{onStartShouldSetResponder:function(t){var n=e._config.disabled;return n&&a(t.currentTarget)&&t.stopPropagation(),null==n||!n},onKeyDown:function(n){(function(e){var t=e.key,n=e.currentTarget.getAttribute("role"),r=" "===t||"Spacebar"===t;return!e.repeat&&("Enter"===t||r&&("button"===n||"menuitem"===n))})(n)&&("NOT_RESPONDER"===e._touchState&&(t(n,!1),document.addEventListener("keyup",r)),n.stopPropagation())},onResponderGrant:function(e){return t(e)},onResponderMove:function(t){null!=e._config.onPressMove&&e._config.onPressMove(t);var n=u(t);if(null!=e._touchActivatePosition){var r=e._touchActivatePosition.pageX-n.pageX,i=e._touchActivatePosition.pageY-n.pageY;Math.hypot(r,i)>10&&e._cancelLongPressDelayTimeout()}},onResponderRelease:function(e){return n(e)},onResponderTerminate:function(t){"selectionchange"===t.nativeEvent.type&&(e._selectionTerminated=!0),e._receiveSignal("RESPONDER_TERMINATED",t)},onResponderTerminationRequest:function(t){var n=e._config,r=n.cancelable,i=n.disabled,o=n.onLongPress;return!(!i&&null!=o&&e._isPointerTouch&&"contextmenu"===t.nativeEvent.type)&&(null==r||r)},onClick:function(t){var n=e._config,r=n.disabled,i=n.onPress;r?a(t.currentTarget)&&t.stopPropagation():(t.stopPropagation(),e._longPressDispatched||e._selectionTerminated?t.preventDefault():null!=i&&!1===t.altKey&&i(t))},onContextMenu:function(t){var n=e._config,r=n.disabled,i=n.onLongPress;r?a(t.currentTarget)&&t.stopPropagation():null!=i&&e._isPointerTouch&&!t.defaultPrevented&&(t.preventDefault(),t.stopPropagation())}}},t._receiveSignal=function(e,t){var n=this._touchState,o=null;null!=i[n]&&(o=i[n][e]),"NOT_RESPONDER"===this._touchState&&"RESPONDER_RELEASE"===e||(null==o||o===r?console.error("PressResponder: Invalid signal "+e+" for state "+n+" on responder"):n!==o&&(this._performTransitionSideEffects(n,o,e,t),this._touchState=o))},t._performTransitionSideEffects=function(e,t,n,r){if(function(e){return"RESPONDER_TERMINATED"===e||"RESPONDER_RELEASE"===e}(n)&&(this._isPointerTouch=!1,this._touchActivatePosition=null,this._cancelLongPressDelayTimeout()),s(e)&&"LONG_PRESS_DETECTED"===n){var i=this._config.onLongPress;null!=i&&null==r.nativeEvent.key&&(i(r),this._longPressDispatched=!0)}var a=o(e),l=o(t);if(!a&&l?this._activate(r):a&&!l&&this._deactivate(r),s(e)&&"RESPONDER_RELEASE"===n){var c=this._config,u=c.onLongPress;if(null!=c.onPress)null!=u&&"RESPONDER_ACTIVE_LONG_PRESS_START"===e||l||a||(this._activate(r),this._deactivate(r))}this._cancelPressDelayTimeout()},t._activate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressStart,i=u(e);this._touchActivatePosition={pageX:i.pageX,pageY:i.pageY},null!=r&&r(e),null!=n&&n(!0)},t._deactivate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressEnd;function i(){null!=r&&r(e),null!=n&&n(!1)}var o=c(this._config.delayPressEnd);o>0?this._pressOutDelayTimeout=setTimeout((function(){i()}),o):i()},t._handleLongPress=function(e){"RESPONDER_ACTIVE_PRESS_START"!==this._touchState&&"RESPONDER_ACTIVE_LONG_PRESS_START"!==this._touchState||this._receiveSignal("LONG_PRESS_DETECTED",e)},t._cancelLongPressDelayTimeout=function(){null!=this._longPressDelayTimeout&&(clearTimeout(this._longPressDelayTimeout),this._longPressDelayTimeout=null)},t._cancelPressDelayTimeout=function(){null!=this._pressDelayTimeout&&(clearTimeout(this._pressDelayTimeout),this._pressDelayTimeout=null)},t._cancelPressOutDelayTimeout=function(){null!=this._pressOutDelayTimeout&&(clearTimeout(this._pressOutDelayTimeout),this._pressOutDelayTimeout=null)},e}();function c(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Math.max(t,null!==e&&void 0!==e?e:n)}function u(e){var t=e.nativeEvent,n=t.changedTouches,r=t.touches;return null!=r&&r.length>0?r[0]:null!=n&&n.length>0?n[0]:e.nativeEvent}var h=n(0);function d(e,t){var n=Object(h.useRef)(null);null==n.current&&(n.current=new l(t));var r=n.current;return Object(h.useEffect)((function(){r.configure(t)}),[t,r]),Object(h.useEffect)((function(){return function(){r.reset()}}),[r]),Object(h.useDebugValue)(t),r.getEventHandlers()}},function(e,t,n){"use strict";var r=n(54),i=function(){function e(e,t){this._delay=t,this._callback=e}var t=e.prototype;return t.dispose=function(e){void 0===e&&(e={abort:!1}),this._taskHandle&&(this._taskHandle.cancel(),e.abort||this._callback(),this._taskHandle=null)},t.schedule=function(){var e=this;if(!this._taskHandle){var t=setTimeout((function(){e._taskHandle=r.a.runAfterInteractions((function(){e._taskHandle=null,e._callback()}))}),this._delay);this._taskHandle={cancel:function(){return clearTimeout(t)}}}},e}(),o=n(244),a=(n(1),n(0)),s=n(117),l=n(52),c=n(5),u=n(3),h=n(4),d=n.n(h);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,i,o){if(function(e,t,n){return e>=0&&t<=n&&t>e}(n,r,i))return!0;var a=function(e,t,n){var r=Math.min(t,n)-Math.max(e,0);return Math.max(0,r)}(n,r,i);return 100*(e?a/i:a/o)>=t}var b=function(){function e(e){void 0===e&&(e={viewAreaCoveragePercentThreshold:0}),this._hasInteracted=!1,this._timers=new Set,this._viewableIndices=[],this._viewableItems=new Map,this._config=e}var t=e.prototype;return t.dispose=function(){this._timers.forEach(clearTimeout)},t.computeViewableItems=function(e,t,n,r,i){var o=this._config,a=o.itemVisiblePercentThreshold,s=o.viewAreaCoveragePercentThreshold,l=null!=s,c=l?s:a;d()(null!=c&&null!=a!==(null!=s),"Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold");var u=[];if(0===e)return u;var h=-1,f=i||{first:0,last:e-1},p=f.first,m=f.last;if(m>=e)return console.warn("Invalid render range computing viewability "+JSON.stringify({renderRange:i,itemCount:e})),[];for(var g=p;g<=m;g++){var v=r(g);if(v){var b=v.offset-t,w=b+v.length;if(b<n&&w>0)h=g,y(l,c,b,w,n,v.length)&&u.push(g);else if(h>=0)break}}return u},t.onUpdate=function(e,t,n,r,i,o,a){var s=this;if((!this._config.waitForInteraction||this._hasInteracted)&&0!==e&&r(0)){var l=[];if(e&&(l=this.computeViewableItems(e,t,n,r,a)),this._viewableIndices.length!==l.length||!this._viewableIndices.every((function(e,t){return e===l[t]})))if(this._viewableIndices=l,this._config.minimumViewTime){var c=setTimeout((function(){s._timers.delete(c),s._onUpdateSync(l,o,i)}),this._config.minimumViewTime);this._timers.add(c)}else this._onUpdateSync(l,o,i)}},t.resetViewableIndices=function(){this._viewableIndices=[]},t.recordInteraction=function(){this._hasInteracted=!0},t._onUpdateSync=function(e,t,n){var r=this;e=e.filter((function(e){return r._viewableIndices.includes(e)}));for(var i,o=this._viewableItems,a=new Map(e.map((function(e){var t=n(e,!0);return[t.key,t]}))),s=[],l=g(a);!(i=l()).done;){var c=i.value,u=c[0],h=c[1];o.has(u)||s.push(h)}for(var d,f=g(o);!(d=f()).done;){var m=d.value,v=m[0],y=m[1];a.has(v)||s.push(p(p({},y),{},{isViewable:!1}))}s.length>0&&(this._viewableItems=a,t({viewableItems:Array.from(a.values()),changed:s,viewabilityConfig:this._config}))},e}(),w=n(49);var x=function(){var e;return(e=console).log.apply(e,arguments)};n(161);function _(e,t,n){for(var r=[],i=0,o=0;o<t;o++)for(var a=n(o),s=a.offset+a.length,l=0;l<e.length;l++)if(null==r[l]&&s>=e[l]&&(r[l]=o,i++,l===e.length-1))return d()(i===e.length,"bad offsets input, should be in increasing order: %s",JSON.stringify(e)),r;return r}function E(e,t){return t.last-t.first+1-Math.max(0,1+Math.min(t.last,e.last)-Math.max(t.first,e.first))}function A(e,t,n,r){var i=e.data,o=e.getItemCount,a=e.maxToRenderPerBatch,s=e.windowSize,l=o(i);if(0===l)return t;var c=r.offset,u=r.velocity,h=r.visibleLength,d=Math.max(0,c),f=d+h,p=(s-1)*h,m=u>1?"after":u<-1?"before":"none",g=Math.max(0,d-.5*p),v=Math.max(0,f+.5*p);if(n(l-1).offset<g)return{first:Math.max(0,l-1-a),last:l-1};var y=_([g,d,f,v],e.getItemCount(e.data),n),b=y[0],w=y[1],x=y[2],A=y[3];b=null==b?0:b,A=null==A?l-1:A;for(var S={first:w=null==w?Math.max(0,b):w,last:x=null==x?Math.min(A,w+a-1):x},M=E(t,S);!(w<=b&&x>=A);){var T=M>=a,C=w<=t.first||w>t.last,O=w>b&&(!T||!C),R=x>=t.last||x<t.first,k=x<A&&(!T||!R);if(T&&!O&&!k)break;!O||"after"===m&&k&&R||(C&&M++,w--),!k||"before"===m&&O&&C||(R&&M++,x++)}if(!(x>=w&&w>=0&&x<l&&w>=b&&x<=A&&w<=S.first&&x>=S.last))throw new Error("Bad window calculation "+JSON.stringify({first:w,last:x,itemCount:l,overscanFirst:b,overscanLast:A,visible:S}));return{first:w,last:x}}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=a.createContext(null);function O(e){var t=e.children,n=e.value,r=Object(a.useMemo)((function(){return{cellKey:null,getScrollMetrics:n.getScrollMetrics,horizontal:n.horizontal,getOutermostParentListRef:n.getOutermostParentListRef,getNestedChildState:n.getNestedChildState,registerAsNestedChild:n.registerAsNestedChild,unregisterAsNestedChild:n.unregisterAsNestedChild,debugInfo:{cellKey:n.debugInfo.cellKey,horizontal:n.debugInfo.horizontal,listKey:n.debugInfo.listKey,parent:n.debugInfo.parent}}}),[n.getScrollMetrics,n.horizontal,n.getOutermostParentListRef,n.getNestedChildState,n.registerAsNestedChild,n.unregisterAsNestedChild,n.debugInfo.cellKey,n.debugInfo.horizontal,n.debugInfo.listKey,n.debugInfo.parent]);return a.createElement(C.Provider,{value:r},t)}function R(e){var t=e.cellKey,n=e.children,r=Object(a.useContext)(C);return a.createElement(C.Provider,{value:null==r?null:M(M({},r),{},{cellKey:t})},n)}function k(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}c.a.flatten;var F=!1,z="",H=function(e){j(n,e);var t=n.prototype;function n(t){var n;if((n=e.call(this,t)||this)._getScrollMetrics=function(){return n._scrollMetrics},n._getOutermostParentListRef=function(){return n._isNestedWithSameOrientation()?n.context.getOutermostParentListRef():function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)},n._getNestedChildState=function(e){var t=n._nestedChildLists.get(e);return t&&t.state},n._registerAsNestedChild=function(e){var t=n._cellKeysToChildListKeys.get(e.cellKey)||new Set;t.add(e.key),n._cellKeysToChildListKeys.set(e.cellKey,t);var r=n._nestedChildLists.get(e.key);r&&null!==r.ref&&console.error("A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list.\n\n"+function(e){var t="VirtualizedList trace:\n Child ("+(e.horizontal?"horizontal":"vertical")+"):\n listKey: "+e.key+"\n cellKey: "+e.cellKey,n=e.parentDebugInfo;for(;n;)t+="\n Parent ("+(n.horizontal?"horizontal":"vertical")+"):\n listKey: "+n.listKey+"\n cellKey: "+n.cellKey,n=n.parent;return t}(I(I({},e),{},{horizontal:!!e.ref.props.horizontal}))),n._nestedChildLists.set(e.key,{ref:e.ref,state:null}),n._hasInteracted&&e.ref.recordInteraction()},n._unregisterAsNestedChild=function(e){n._nestedChildLists.set(e.key,{ref:null,state:e.state})},n._onUpdateSeparators=function(e,t){e.forEach((function(e){var r=null!=e&&n._cellRefs[e];r&&r.updateSeparatorProps(t)}))},n._averageCellLength=0,n._cellKeysToChildListKeys=new Map,n._cellRefs={},n._frames={},n._footerLength=0,n._hasDoneInitialScroll=!1,n._hasInteracted=!1,n._hasMore=!1,n._hasWarned={},n._headerLength=0,n._hiPriInProgress=!1,n._highestMeasuredFrameIndex=0,n._indicesToKeys=new Map,n._nestedChildLists=new Map,n._offsetFromParentVirtualizedList=0,n._prevParentOffset=0,n._scrollMetrics={contentLength:0,dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0},n._scrollRef=null,n._sentEndForContentLength=0,n._totalCellLength=0,n._totalCellsMeasured=0,n._viewabilityTuples=[],n._captureScrollRef=function(e){n._scrollRef=e},n._defaultRenderScrollComponent=function(e){var t=e.onRefresh;return n._isNestedWithSameOrientation()?a.createElement(u.a,e):t?(d()("boolean"===typeof e.refreshing,"`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `"+JSON.stringify(e.refreshing)+"`"),a.createElement(l.a,L({},e,{refreshControl:null==e.refreshControl?a.createElement(s.a,{refreshing:e.refreshing,onRefresh:t,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):a.createElement(l.a,e)},n._onCellUnmount=function(e){var t=n._frames[e];t&&(n._frames[e]=I(I({},t),{},{inLayout:!1}))},n._onLayout=function(e){n._isNestedWithSameOrientation()?n.measureLayoutRelativeToContainingList():n._scrollMetrics.visibleLength=n._selectLength(e.nativeEvent.layout),n.props.onLayout&&n.props.onLayout(e),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._onLayoutEmpty=function(e){n.props.onLayout&&n.props.onLayout(e)},n._onLayoutFooter=function(e){n._triggerRemeasureForChildListsInCell(n._getFooterCellKey()),n._footerLength=n._selectLength(e.nativeEvent.layout)},n._onLayoutHeader=function(e){n._headerLength=n._selectLength(e.nativeEvent.layout)},n._onContentSizeChange=function(e,t){e>0&&t>0&&null!=n.props.initialScrollIndex&&n.props.initialScrollIndex>0&&!n._hasDoneInitialScroll&&(n._hasDoneInitialScroll=!0),n.props.onContentSizeChange&&n.props.onContentSizeChange(e,t),n._scrollMetrics.contentLength=n._selectLength({height:t,width:e}),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._convertParentScrollMetrics=function(e){var t=e.offset-n._offsetFromParentVirtualizedList,r=e.visibleLength,i=t-n._scrollMetrics.offset;return{visibleLength:r,contentLength:n._scrollMetrics.contentLength,offset:t,dOffset:i}},n._onScroll=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScroll(e)})),n.props.onScroll&&n.props.onScroll(e);var t=e.timeStamp,r=n._selectLength(e.nativeEvent.layoutMeasurement),i=n._selectLength(e.nativeEvent.contentSize),o=n._selectOffset(e.nativeEvent.contentOffset),a=o-n._scrollMetrics.offset;if(n._isNestedWithSameOrientation()){if(0===n._scrollMetrics.contentLength)return;var s=n._convertParentScrollMetrics({visibleLength:r,offset:o});r=s.visibleLength,i=s.contentLength,o=s.offset,a=s.dOffset}var l=n._scrollMetrics.timestamp?Math.max(1,t-n._scrollMetrics.timestamp):1,c=a/l;l>500&&n._scrollMetrics.dt>500&&i>5*r&&!n._hasWarned.perf&&(x("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:l,prevDt:n._scrollMetrics.dt,contentLength:i}),n._hasWarned.perf=!0),n._scrollMetrics={contentLength:i,dt:l,dOffset:a,offset:o,timestamp:t,velocity:c,visibleLength:r},n._updateViewableItems(n.props.data),n.props&&(n._maybeCallOnEndReached(),0!==c&&n._fillRateHelper.activate(),n._computeBlankness(),n._scheduleCellsToRenderUpdate())},n._onScrollBeginDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollBeginDrag(e)})),n._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),n._hasInteracted=!0,n.props.onScrollBeginDrag&&n.props.onScrollBeginDrag(e)},n._onScrollEndDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(n._scrollMetrics.velocity=n._selectOffset(t)),n._computeBlankness(),n.props.onScrollEndDrag&&n.props.onScrollEndDrag(e)},n._onMomentumScrollBegin=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollBegin(e)})),n.props.onMomentumScrollBegin&&n.props.onMomentumScrollBegin(e)},n._onMomentumScrollEnd=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollEnd(e)})),n._scrollMetrics.velocity=0,n._computeBlankness(),n.props.onMomentumScrollEnd&&n.props.onMomentumScrollEnd(e)},n._updateCellsToRender=function(){var e=n.props,t=e.data,r=e.getItemCount,i=e.onEndReachedThreshold,o=n._isVirtualizationDisabled();n._updateViewableItems(t),t&&n.setState((function(e){var a,s=n._scrollMetrics,l=s.contentLength,c=s.offset,u=s.visibleLength;if(o){var h=l-u-c<i*u?n.props.maxToRenderPerBatch:0;a={first:0,last:Math.min(e.last+h,r(t)-1)}}else u>0&&l>0&&(n.props.initialScrollIndex&&!n._scrollMetrics.offset||(a=A(n.props,e,n._getFrameMetricsApprox,n._scrollMetrics)));if(a&&n._nestedChildLists.size>0)for(var d=a.first,f=a.last,p=d;p<=f;p++){var m=n._indicesToKeys.get(p),g=m&&n._cellKeysToChildListKeys.get(m);if(g){for(var v,y=!1,b=k(g);!(v=b()).done;){var w=v.value,x=n._nestedChildLists.get(w);if(x&&x.ref&&x.ref.hasMore()){y=!0;break}}if(y&&a){a.last=p;break}}}return null!=a&&a.first===e.first&&a.last===e.last&&(a=null),a}))},n._createViewToken=function(e,t){var r=n.props,i=r.data,o=r.getItem,a=r.keyExtractor,s=o(i,e);return{index:e,item:s,key:a(s,e),isViewable:t}},n._getFrameMetricsApprox=function(e){var t=n._getFrameMetrics(e);if(t&&t.index===e)return t;var r=n.props.getItemLayout;return d()(!r,"Should not have to estimate frames when a measurement metrics function is provided"),{length:n._averageCellLength,offset:n._averageCellLength*e}},n._getFrameMetrics=function(e){var t=n.props,r=t.data,i=t.getItem,o=t.getItemCount,a=t.getItemLayout,s=t.keyExtractor;d()(o(r)>e,"Tried to get frame for out of range index "+e);var l=i(r,e),c=l&&n._frames[s(l,e)];return c&&c.index===e||a&&(c=a(r,e)),c},d()(!t.onScroll||!t.onScroll.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),d()(t.windowSize>0,"VirtualizedList: The windowSize prop must be present and set to a value greater than 0."),n._fillRateHelper=new o.a(n._getFrameMetrics),n._updateCellsToRenderBatcher=new i(n._updateCellsToRender,n.props.updateCellsBatchingPeriod),n.props.viewabilityConfigCallbackPairs)n._viewabilityTuples=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new b(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else if(n.props.onViewableItemsChanged){var r=n.props.onViewableItemsChanged;n._viewabilityTuples.push({viewabilityHelper:new b(n.props.viewabilityConfig),onViewableItemsChanged:r})}var c={first:n.props.initialScrollIndex||0,last:Math.min(n.props.getItemCount(n.props.data),(n.props.initialScrollIndex||0)+n.props.initialNumToRender)-1};if(n._isNestedWithSameOrientation()){var h=n.context.getNestedChildState(n._getListKey());h&&(c=h,n.state=h,n._frames=h.frames)}return n.state=c,n}return t.scrollToEnd=function(e){var t=!e||e.animated,n=this.props.getItemCount(this.props.data)-1,r=this._getFrameMetricsApprox(n),i=Math.max(0,r.offset+r.length+this._footerLength-this._scrollMetrics.visibleLength);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:i,animated:t}:{y:i,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToIndex=function(e){var t=this.props,n=t.data,r=t.horizontal,i=t.getItemCount,o=t.getItemLayout,a=t.onScrollToIndexFailed,s=e.animated,l=e.index,c=e.viewOffset,u=e.viewPosition;if(d()(l>=0,"scrollToIndex out of range: requested index "+l+" but minimum is 0"),d()(i(n)>=1,"scrollToIndex out of range: item length "+i(n)+" but minimum is 1"),d()(l<i(n),"scrollToIndex out of range: requested index "+l+" is out of 0 to "+(i(n)-1)),!o&&l>this._highestMeasuredFrameIndex)return d()(!!a,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void a({averageItemLength:this._averageCellLength,highestMeasuredFrameIndex:this._highestMeasuredFrameIndex,index:l});var h=this._getFrameMetricsApprox(l),f=Math.max(0,h.offset-(u||0)*(this._scrollMetrics.visibleLength-h.length))-(c||0);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(r?{x:f,animated:s}:{y:f,animated:s}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToItem=function(e){for(var t=e.item,n=this.props,r=n.data,i=n.getItem,o=(0,n.getItemCount)(r),a=0;a<o;a++)if(i(r,a)===t){this.scrollToIndex(I(I({},e),{},{index:a}));break}},t.scrollToOffset=function(e){var t=e.animated,n=e.offset;null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:n,animated:t}:{y:n,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.recordInteraction=function(){this._nestedChildLists.forEach((function(e){e.ref&&e.ref.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props.data)},t.flashScrollIndicators=function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()},t.getScrollResponder=function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()},t.getScrollableNode=function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():Object(w.a)(this._scrollRef)},t.getScrollRef=function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef},t.setNativeProps=function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)},t._getCellKey=function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||"rootList"},t._getListKey=function(){return this.props.listKey||this._getCellKey()},t._getDebugInfo=function(){var e;return{listKey:this._getListKey(),cellKey:this._getCellKey(),horizontal:!!this.props.horizontal,parent:null==(e=this.context)?void 0:e.debugInfo}},t.hasMore=function(){return this._hasMore},t.componentDidMount=function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({cellKey:this._getCellKey(),key:this._getListKey(),ref:this,parentDebugInfo:this.context.debugInfo})},t.componentWillUnmount=function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({key:this._getListKey(),state:{first:this.state.first,last:this.state.last,frames:this._frames}}),this._updateViewableItems(null),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()},n.getDerivedStateFromProps=function(e,t){var n=e.data,r=e.getItemCount,i=e.maxToRenderPerBatch;return{first:Math.max(0,Math.min(t.first,r(n)-1-i)),last:Math.max(0,Math.min(t.last,r(n)-1))}},t._pushCells=function(e,t,n,r,i,o){var s,l=this,c=this.props,u=c.CellRendererComponent,h=c.ItemSeparatorComponent,d=c.data,f=c.getItem,p=c.getItemCount,m=c.horizontal,g=c.keyExtractor,v=this.props.ListHeaderComponent?1:0,y=p(d)-1;i=Math.min(y,i);for(var b=function(r){var i=f(d,r),c=g(i,r);l._indicesToKeys.set(r,c),n.has(r+v)&&t.push(e.length),e.push(a.createElement(U,{CellRendererComponent:u,ItemSeparatorComponent:r<y?h:void 0,cellKey:c,fillRateHelper:l._fillRateHelper,horizontal:m,index:r,inversionStyle:o,item:i,key:c,prevCellKey:s,onUpdateSeparators:l._onUpdateSeparators,onLayout:function(e){return l._onCellLayout(e,c,r)},onUnmount:l._onCellUnmount,parentProps:l.props,ref:function(e){l._cellRefs[c]=e}})),s=c},w=r;w<=i;w++)b(w)},t._isVirtualizationDisabled=function(){return this.props.disableVirtualization||!1},t._isNestedWithSameOrientation=function(){var e=this.context;return!(!e||!!e.horizontal!==!!this.props.horizontal)},t.render=function(){var e=this,t=this.props,n=t.ListEmptyComponent,r=t.ListFooterComponent,i=t.ListHeaderComponent,o=this.props,s=o.data,l=o.horizontal,h=this._isVirtualizationDisabled(),d=this.props.inverted?this.props.horizontal?V.horizontallyInverted:V.verticallyInverted:null,f=[],p=new Set(this.props.stickyHeaderIndices),m=[];if(i){p.has(0)&&m.push(0);var g=a.isValidElement(i)?i:a.createElement(i,null);f.push(a.createElement(R,{cellKey:this._getCellKey()+"-header",key:"$header"},a.createElement(u.a,{onLayout:this._onLayoutHeader,style:c.a.compose(d,this.props.ListHeaderComponentStyle)},g)))}var v=this.props.getItemCount(s);if(v>0){F=!1,z="";var y=l?"width":"height",b=this.props.initialScrollIndex?-1:this.props.initialNumToRender-1,w=this.state,x=w.first,_=w.last;this._pushCells(f,m,p,0,b,d);var E=Math.max(b+1,x);if(!h&&x>b+1){var A=!1;if(p.size>0)for(var S=i?1:0,M=E-1;M>b;M--)if(p.has(M+S)){var T,C,k=this._getFrameMetricsApprox(b),P=this._getFrameMetricsApprox(M),L=P.offset-k.offset-(this.props.initialScrollIndex?0:k.length);f.push(a.createElement(u.a,{key:"$sticky_lead",style:(T={},T[y]=L,T)})),this._pushCells(f,m,p,M,M,d);var D=this._getFrameMetricsApprox(x).offset-(P.offset+P.length);f.push(a.createElement(u.a,{key:"$sticky_trail",style:(C={},C[y]=D,C)})),A=!0;break}if(!A){var N,j=this._getFrameMetricsApprox(b),B=this._getFrameMetricsApprox(x).offset-(j.offset+j.length);f.push(a.createElement(u.a,{key:"$lead_spacer",style:(N={},N[y]=B,N)}))}}if(this._pushCells(f,m,p,E,_,d),!this._hasWarned.keys&&F&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",z),this._hasWarned.keys=!0),!h&&_<v-1){var H,U=this._getFrameMetricsApprox(_),G=this.props.getItemLayout?v-1:Math.min(v-1,this._highestMeasuredFrameIndex),W=this._getFrameMetricsApprox(G),q=W.offset+W.length-(U.offset+U.length);f.push(a.createElement(u.a,{key:"$tail_spacer",style:(H={},H[y]=q,H)}))}}else if(n){var X=a.isValidElement(n)?n:a.createElement(n,null);f.push(a.cloneElement(X,{key:"$empty",onLayout:function(t){e._onLayoutEmpty(t),X.props.onLayout&&X.props.onLayout(t)},style:c.a.compose(d,X.props.style)}))}if(r){var Y=a.isValidElement(r)?r:a.createElement(r,null);f.push(a.createElement(R,{cellKey:this._getFooterCellKey(),key:"$footer"},a.createElement(u.a,{onLayout:this._onLayoutFooter,style:c.a.compose(d,this.props.ListFooterComponentStyle)},Y)))}var K=I(I({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:this.props.scrollEventThrottle,stickyHeaderIndices:m,style:d?[d,this.props.style]:this.props.style});this._hasMore=this.state.last<this.props.getItemCount(this.props.data)-1;var Q=a.createElement(O,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:this.props.horizontal,getOutermostParentListRef:this._getOutermostParentListRef,getNestedChildState:this._getNestedChildState,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild,debugInfo:this._getDebugInfo()}},a.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(K),{ref:this._captureScrollRef},f));return this.props.debug?a.createElement(u.a,{style:V.debug},Q,this._renderDebugOverlay()):Q},t.componentDidUpdate=function(e){var t=this.props,n=t.data,r=t.extraData;n===e.data&&r===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var i=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),i&&(this._hiPriInProgress=!1)},t._computeBlankness=function(){this._fillRateHelper.computeBlankness(this.props,this.state,this._scrollMetrics)},t._onCellLayout=function(e,t,n){var r=e.nativeEvent.layout,i={offset:this._selectOffset(r),length:this._selectLength(r),index:n,inLayout:!0},o=this._frames[t];o&&i.offset===o.offset&&i.length===o.length&&n===o.index?this._frames[t].inLayout=!0:(this._totalCellLength+=i.length-(o?o.length:0),this._totalCellsMeasured+=o?0:1,this._averageCellLength=this._totalCellLength/this._totalCellsMeasured,this._frames[t]=i,this._highestMeasuredFrameIndex=Math.max(this._highestMeasuredFrameIndex,n),this._scheduleCellsToRenderUpdate()),this._triggerRemeasureForChildListsInCell(t),this._computeBlankness(),this._updateViewableItems(this.props.data)},t._triggerRemeasureForChildListsInCell=function(e){var t=this._cellKeysToChildListKeys.get(e);if(t)for(var n,r=k(t);!(n=r()).done;){var i=n.value,o=this._nestedChildLists.get(i);o&&o.ref&&o.ref.measureLayoutRelativeToContainingList()}},t.measureLayoutRelativeToContainingList=function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,n,r,i){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:n}),e._scrollMetrics.contentLength=e._selectLength({width:r,height:i});var o=e._convertParentScrollMetrics(e.context.getScrollMetrics());e._scrollMetrics.visibleLength=o.visibleLength,e._scrollMetrics.offset=o.offset}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(t){console.warn("measureLayoutRelativeToContainingList threw an error",t.stack)}},t._getFooterCellKey=function(){return this._getCellKey()+"-footer"},t._renderDebugOverlay=function(){for(var e=this._scrollMetrics.visibleLength/(this._scrollMetrics.contentLength||1),t=[],n=this.props.getItemCount(this.props.data),r=0;r<n;r++){var i=this._getFrameMetricsApprox(r);i.inLayout&&t.push(i)}var o=this._getFrameMetricsApprox(this.state.first).offset,s=this._getFrameMetricsApprox(this.state.last),l=s.offset+s.length-o,c=this._scrollMetrics.offset,h=this._scrollMetrics.visibleLength;return a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlay]},t.map((function(t,n){return a.createElement(u.a,{key:"f"+n,style:[V.debugOverlayBase,V.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]})})),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameLast,{top:o*e,height:l*e}]}),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameVis,{top:c*e,height:h*e}]}))},t._selectLength=function(e){return this.props.horizontal?e.width:e.height},t._selectOffset=function(e){return this.props.horizontal?e.x:e.y},t._maybeCallOnEndReached=function(){var e=this.props,t=e.data,n=e.getItemCount,r=e.onEndReached,i=e.onEndReachedThreshold,o=this._scrollMetrics,a=o.contentLength,s=o.visibleLength,l=a-s-o.offset,c=i?i*s:2;r&&this.state.last===n(t)-1&&l<c&&this._scrollMetrics.contentLength!==this._sentEndForContentLength?(this._sentEndForContentLength=this._scrollMetrics.contentLength,r({distanceFromEnd:l})):l>c&&(this._sentEndForContentLength=0)},t._scheduleCellsToRenderUpdate=function(){var e=this.state,t=e.first,n=e.last,r=this._scrollMetrics,i=r.offset,o=r.visibleLength,a=r.velocity,s=this.props.getItemCount(this.props.data),l=!1,c=this.props.onEndReachedThreshold*o/2;if(t>0){var u=i-this._getFrameMetricsApprox(t).offset;l=l||u<0||a<-2&&u<c}if(n<s-1){var h=this._getFrameMetricsApprox(n).offset-(i+o);l=l||h<0||a>2&&h<c}if(l&&(this._averageCellLength||this.props.getItemLayout)&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()},t._updateViewableItems=function(e){var t=this,n=this.props.getItemCount;this._viewabilityTuples.forEach((function(r){r.viewabilityHelper.onUpdate(n(e),t._scrollMetrics.offset,t._scrollMetrics.visibleLength,t._getFrameMetrics,t._createViewToken,r.onViewableItemsChanged,t.state)}))},n}(a.PureComponent);H.contextType=C,H.defaultProps={disableVirtualization:!1,horizontal:!1,initialNumToRender:10,keyExtractor:function(e,t){return null!=e.key?e.key:null!=e.id?e.id:(F=!0,e.type&&e.type.displayName&&(z=e.type.displayName),String(t))},maxToRenderPerBatch:10,onEndReachedThreshold:2,scrollEventThrottle:50,updateCellsBatchingPeriod:50,windowSize:21};var U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item}},t._separators={highlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!0})},unhighlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!1})},updateProps:function(e,n){var r=t.props,i=r.cellKey,o=r.prevCellKey;t.props.onUpdateSeparators(["leading"===e?o:i],n)}},t}j(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:I(I({},t.separatorProps),{},{leadingItem:e.item})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:I(I({},t.separatorProps),e)}}))},n.componentWillUnmount=function(){this.props.onUnmount(this.props.cellKey)},n._renderElement=function(e,t,n,r){return e&&t&&console.warn("VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take precedence over renderItem."),t?a.createElement(t,{item:n,index:r,separators:this._separators}):e?e({item:n,index:r,separators:this._separators}):void d()(!1,"VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.")},n.render=function(){var e=this.props,t=e.CellRendererComponent,n=e.ItemSeparatorComponent,r=e.fillRateHelper,i=e.horizontal,o=e.item,s=e.index,l=e.inversionStyle,c=e.parentProps,h=c.renderItem,d=c.getItemLayout,f=c.ListItemComponent,p=this._renderElement(h,f,o,s),m=!d||c.debug||r.enabled()?this.props.onLayout:void 0,g=n&&a.createElement(n,this.state.separatorProps),v=l?i?[V.rowReverse,l]:[V.columnReverse,l]:i?[V.row,l]:l,y=t?a.createElement(t,L({},this.props,{style:v,onLayout:m}),p,g):a.createElement(u.a,{style:v,onLayout:m},p,g);return a.createElement(R,{cellKey:this.props.cellKey},y)},t}(a.Component);var V=c.a.create({verticallyInverted:{transform:[{scaleY:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},row:{flexDirection:"row"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"},debug:{flex:1},debugOverlayBase:{position:"absolute",top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:"blue",borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:"orange"},debugOverlayFrameLast:{left:0,borderColor:"green",borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:"red",borderWidth:2}});t.a=H},function(e,t,n){"use strict";var r=function(){};function i(){return null}i.setBackgroundColor=r,i.setBarStyle=r,i.setHidden=r,i.setNetworkActivityIndicatorVisible=r,i.setTranslucent=r,t.a=i},function(e,t,n){"use strict";var r=n(26),i=n(33),o=n(4),a=n.n(o);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=1,c=function(e){var t,n;function i(t){var n;n=e.call(this)||this;var i=t||{x:0,y:0};return"number"===typeof i.x&&"number"===typeof i.y?(n.x=new r.a(i.x),n.y=new r.a(i.y)):(a()(i.x instanceof r.a&&i.y instanceof r.a,"AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."),n.x=i.x,n.y=i.y),n._listeners={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var o=i.prototype;return o.setValue=function(e){this.x.setValue(e.x),this.y.setValue(e.y)},o.setOffset=function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)},o.flattenOffset=function(){this.x.flattenOffset(),this.y.flattenOffset()},o.extractOffset=function(){this.x.extractOffset(),this.y.extractOffset()},o.__getValue=function(){return{x:this.x.__getValue(),y:this.y.__getValue()}},o.resetAnimation=function(e){this.x.resetAnimation(),this.y.resetAnimation(),e&&e(this.__getValue())},o.stopAnimation=function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())},o.addListener=function(e){var t=this,n=String(l++),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n},o.removeListener=function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]},o.removeAllListeners=function(){this.x.removeAllListeners(),this.y.removeAllListeners(),this._listeners={}},o.getLayout=function(){return{left:this.x,top:this.y}},o.getTranslateTransform=function(){return[{translateX:this.x},{translateY:this.y}]},i}(i.a);t.a=c},function(e,t,n){"use strict";function r(){}var i={exitApp:r,addEventListener:function(){return{remove:r}},removeEventListener:r};t.a=i},function(e,t,n){"use strict";var r=n(0),i=Object(r.createContext)(!1);t.a=i},function(e,t,n){"use strict";var r=n(105);n(4);t.a=function e(t){if(t){if(!Array.isArray(t))return function(e){return"number"===typeof e?r.a.getByID(e):e}(t);for(var n={},i=0,o=t.length;i<o;++i){var a=e(t[i]);if(a)for(var s in a){var l=a[s];n[s]=l}}return n}}},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(463),i=n(248);const o=4294967296;function a(e){return e.x}function s(e){return e.y}function l(e){return e.z}var c=Math.PI*(3-Math.sqrt(5)),u=20*Math.PI/(9+Math.sqrt(221));t.a=function(e,t){t=t||2;var n,a=Math.min(3,Math.max(1,Math.round(t))),s=1,l=.001,h=1-Math.pow(l,1/300),d=0,f=.6,p=new Map,m=Object(i.c)(y),g=Object(r.a)("tick","end"),v=function(){let e=1;return()=>(e=(1664525*e+1013904223)%o)/o}();function y(){b(),g.call("tick",n),s<l&&(m.stop(),g.call("end",n))}function b(t){var r,i,o=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(s+=(d-s)*h,p.forEach((function(e){e(s)})),r=0;r<o;++r)null==(i=e[r]).fx?i.x+=i.vx*=f:(i.x=i.fx,i.vx=0),a>1&&(null==i.fy?i.y+=i.vy*=f:(i.y=i.fy,i.vy=0)),a>2&&(null==i.fz?i.z+=i.vz*=f:(i.z=i.fz,i.vz=0));return n}function w(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),null!=t.fz&&(t.z=t.fz),isNaN(t.x)||a>1&&isNaN(t.y)||a>2&&isNaN(t.z)){var i=10*(a>2?Math.cbrt(.5+n):a>1?Math.sqrt(.5+n):n),o=n*c,s=n*u;1===a?t.x=i:2===a?(t.x=i*Math.cos(o),t.y=i*Math.sin(o)):(t.x=i*Math.sin(o)*Math.cos(s),t.y=i*Math.cos(o),t.z=i*Math.sin(o)*Math.sin(s))}(isNaN(t.vx)||a>1&&isNaN(t.vy)||a>2&&isNaN(t.vz))&&(t.vx=0,a>1&&(t.vy=0),a>2&&(t.vz=0))}}function x(t){return t.initialize&&t.initialize(e,v,a),t}return null==e&&(e=[]),w(),n={tick:b,restart:function(){return m.restart(y),n},stop:function(){return m.stop(),n},numDimensions:function(e){return arguments.length?(a=Math.min(3,Math.max(1,Math.round(e))),p.forEach(x),n):a},nodes:function(t){return arguments.length?(e=t,w(),p.forEach(x),n):e},alpha:function(e){return arguments.length?(s=+e,n):s},alphaMin:function(e){return arguments.length?(l=+e,n):l},alphaDecay:function(e){return arguments.length?(h=+e,n):+h},alphaTarget:function(e){return arguments.length?(d=+e,n):d},velocityDecay:function(e){return arguments.length?(f=1-e,n):1-f},randomSource:function(e){return arguments.length?(v=e,p.forEach(x),n):v},force:function(e,t){return arguments.length>1?(null==t?p.delete(e):p.set(e,x(t)),n):p.get(e)},find:function(){var t,n,r,i,o,s,l=Array.prototype.slice.call(arguments),c=l.shift()||0,u=(a>1?l.shift():null)||0,h=(a>2?l.shift():null)||0,d=l.shift()||1/0,f=0,p=e.length;for(d*=d,f=0;f<p;++f)(i=(t=c-(o=e[f]).x)*t+(n=u-(o.y||0))*n+(r=h-(o.z||0))*r)<d&&(s=o,d=i);return s},on:function(e,t){return arguments.length>1?(g.on(e,t),n):g.on(e)}}}},function(e,t,n){const r=n(184);e.exports=function(e){return function(t,n){let i=n&&n.indent||0,o=n&&void 0!==n.join?n.join:"\n",a=Array(i+1).join(" "),s=[];for(let l=0;l<e;++l){let e=r(l),n=0===l?"":a;s.push(n+t.replace(/{var}/g,e))}return s.join(o)}}},function(e,t){e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,s,l){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,s,l,c,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(21),i=n.n(r);var o=function e(){i()(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"",void 0)}},function(e,t,n){"use strict";t.a={dark:!1,colors:{primary:"rgb(0, 122, 255)",background:"rgb(242, 242, 242)",card:"rgb(255, 255, 255)",text:"rgb(28, 28, 30)",border:"rgb(216, 216, 216)",notification:"rgb(255, 59, 48)"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n(68),o=n(29),a=(r.canUseDOM,null);function s(e,t){var n=(r.canUseDOM&&"undefined"!==typeof window.ResizeObserver&&null==a&&(a=new window.ResizeObserver((function(e){e.forEach((function(e){var t=e.target,n=t.__reactLayoutHandler;"function"===typeof n&&o.a.measure(t,(function(t,r,i,o,a,s){var l={nativeEvent:{layout:{x:t,y:r,width:i,height:o,left:a,top:s}},timeStamp:Date.now()};Object.defineProperty(l.nativeEvent,"target",{enumerable:!0,get:function(){return e.target}}),n(l)}))}))}))),a);Object(i.a)((function(){var n=e.current;null!=n&&(n.__reactLayoutHandler=t)}),[e,t]),Object(i.a)((function(){var t=e.current;return null!=t&&null!=n&&("function"===typeof t.__reactLayoutHandler?n.observe(t):n.unobserve(t)),function(){null!=t&&null!=n&&n.unobserve(t)}}),[e,n])}},function(e,t){function n(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=l.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:f.hasOwnProperty(e)?f[e]:(t=l.rgb.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|255)>>>0:(t=l.rgba.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|h(t[4]))>>>0:(t=l.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=l.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=l.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=l.hsl.exec(e))?(255|i(u(t[1]),d(t[2]),d(t[3])))>>>0:(t=l.hsla.exec(e))?(i(u(t[1]),d(t[2]),d(t[3]))|h(t[4]))>>>0:null}function r(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function i(e,t,n){var i=n<.5?n*(1+t):n+t-n*t,o=2*n-i,a=r(o,i,e+1/3),s=r(o,i,e),l=r(o,i,e-1/3);return Math.round(255*a)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}var o="[-+]?\\d*\\.?\\d+";function a(e){return Array.prototype.slice.call(e,0)}function s(){return"\\(\\s*("+a(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var l={rgb:new RegExp("rgb"+s(o,o,o)),rgba:new RegExp("rgba"+s(o,o,o,o)),hsl:new RegExp("hsl"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function c(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function u(e){return(parseFloat(e)%360+360)%360/360}function h(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function d(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var f={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};n.rgba=function(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}},e.exports=n},function(t,n,r){"use strict";var i=r(15),o=1,a=function(){function t(){}var n=t.prototype;return n.start=function(e,t,n,r,i){},n.stop=function(){this.__nativeId&&i.a.API.stopAnimation(this.__nativeId)},n.__getNativeAnimationConfig=function(){throw new Error("This animation type cannot be offloaded to native")},n.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},n.__startNativeAnimation=function(t){var n=o+":startAnimation";o+=1,i.a.API.setWaitingForIdentifier(n);try{t.__makeNative(),this.__nativeId=i.a.generateNewAnimationId(),i.a.API.startAnimatingNode(this.__nativeId,t.__getNativeTag(),this.__getNativeAnimationConfig(),this.__debouncedOnEnd.bind(this))}catch(e){throw e}finally{i.a.API.unsetWaitingForIdentifier(n)}},t}();n.a=a},function(e,t,n){"use strict";var r=n(66);t.a=r.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext(void 0);function o(e){var t=e.children,n=r.useRef(),o=r.useMemo((function(){return{register:function(e){var t=n.current;if(void 0!==t&&e!==t)throw new Error('Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.');n.current=e},unregister:function(e){e===n.current&&(n.current=void 0)}}}),[]);return r.createElement(i.Provider,{value:o},t)}},function(t,n,r){"use strict";var i=r(13);var o=r(50),a=r(130);var s={height:0,width:0};var l=function(e){var t=e.shadowColor,n=e.shadowOffset,r=e.shadowOpacity,i=e.shadowRadius,l=e.textShadowColor,c=e.textShadowOffset,u=e.textShadowRadius,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["shadowColor","shadowOffset","shadowOpacity","shadowRadius","textShadowColor","textShadowOffset","textShadowRadius"]);return null==t&&null==n&&null==r&&null==i||function(e,t){var n=t.boxShadow,r=Object(a.a)(t);null!=r&&(e.boxShadow=n?n+", "+r:r)}(h,e),null==l&&null==c&&null==u||function(e,t){var n=t.textShadowColor,r=t.textShadowOffset,i=t.textShadowRadius,a=r||s,l=a.height,c=a.width,u=i||0,h=Object(o.a)(c),d=Object(o.a)(l),f=Object(o.a)(u),p=Object(o.a)(n,"textShadowColor");!p||0===l&&0===c&&0===u||null==h||null==d||null==f||(e.textShadow=h+" "+d+" "+f+" "+p)}(h,e),h},c=Array.prototype.slice;function u(t){var n,r={},i={};null!=t&&c.call(t.cssRules).forEach((function(e,t){var o=e.cssText;if(o.indexOf("stylesheet-group")>-1)n=function(e){return Number(e.selectorText.split(/["']/)[1])}(e),r[n]={start:t,rules:[o]};else{var a=f(o);null!=a&&(i[a]=!0,r[n].rules.push(o))}}));function o(t,n,i){var o=h(r),a=o.indexOf(n)+1,s=o[a],l=null!=s&&null!=r[s].start?r[s].start:t.cssRules.length,c=function(t,n,r){try{return t.insertRule(n,r),!0}catch(e){return!1}}(t,i,l);if(c){null==r[n].start&&(r[n].start=l);for(var u=a;u<o.length;u+=1){var d=o[u],f=r[d].start||0;r[d].start=f+1}}return c}return{getTextContent:function(){return h(r).map((function(e){return r[e].rules.join("\n")})).join("\n")},insert:function(e,n){var a=Number(n);if(null==r[a]){var s=function(e){return'[stylesheet-group="'+e+'"]{}'}(a);r[a]={start:null,rules:[s]},null!=t&&o(t,a,s)}var l=f(e);null!=l&&null==i[l]&&(i[l]=!0,r[a].rules.push(e),null!=t&&(o(t,a,e)||r[a].rules.pop()))}}}function h(e){return Object.keys(e).map(Number).sort((function(e,t){return e>t?1:-1}))}var d=/\s*([,])\s*/g;function f(e){var t=e.split("{")[0].trim();return""!==t?t.replace(d,"$1"):null}var p=function(e){return function e(t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?e(i,n):null!=i&&!1!==i&&n.push(i)}return n}(e,[])},m=r(82),g=r(36),v=r(99),y={},b={borderTopLeftRadius:"borderTopRightRadius",borderTopRightRadius:"borderTopLeftRadius",borderBottomLeftRadius:"borderBottomRightRadius",borderBottomRightRadius:"borderBottomLeftRadius",borderLeftColor:"borderRightColor",borderLeftStyle:"borderRightStyle",borderLeftWidth:"borderRightWidth",borderRightColor:"borderLeftColor",borderRightStyle:"borderLeftStyle",borderRightWidth:"borderLeftWidth",left:"right",marginLeft:"marginRight",marginRight:"marginLeft",paddingLeft:"paddingRight",paddingRight:"paddingLeft",right:"left"},w={borderTopStartRadius:"borderTopLeftRadius",borderTopEndRadius:"borderTopRightRadius",borderBottomStartRadius:"borderBottomLeftRadius",borderBottomEndRadius:"borderBottomRightRadius",borderStartColor:"borderLeftColor",borderStartStyle:"borderLeftStyle",borderStartWidth:"borderLeftWidth",borderEndColor:"borderRightColor",borderEndStyle:"borderRightStyle",borderEndWidth:"borderRightWidth",end:"right",marginStart:"marginLeft",marginEnd:"marginRight",paddingStart:"paddingLeft",paddingEnd:"paddingRight",start:"left"},x={clear:!0,float:!0,textAlign:!0},_=function(e){return Object(v.a)(e,-1)},E=function(e){var t=g.a.getConstants(),n=t.doLeftAndRightSwapInRTL,r=t.isRTL,i=e||y,o={},a={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s],c=s,u=l;if(w.hasOwnProperty(s)){var h=w[s];c=r?b[h]:h}else r&&n&&b[s]&&(c=b[s]);if(x.hasOwnProperty(s)&&("start"===l?u=r?"right":"left":"end"===l?u=r?"left":"right":r&&n&&("left"===l?u="right":"right"===l&&(u="left"))),"transitionProperty"===c)if(w.hasOwnProperty(u)){var d=w[l];u=r?b[d]:d}else if(r&&n){var f=b[l];null!=f&&(u=f)}if(r&&"textShadowOffset"===c){var p=_(u.width);u.width=p,a[c]=u}else o[c]||(a[c]=u);w[s]&&(o[c]=!0)}return a},A=r(42),S={},M=!i.canUseDOM||null!=window.CSS&&null!=window.CSS.supports&&(window.CSS.supports("text-decoration-line","none")||window.CSS.supports("-webkit-text-decoration-line","none")),T=function(e){var t=Object.keys(e)[0],n=e[t];return"matrix"===t||"matrix3d"===t?t+"("+n.join(",")+")":t+"("+Object(o.a)(n,t)+")"},C=function(e){if(!e)return S;var t={};return Object.keys(e).sort().forEach((function(n){var r=Object(o.a)(e[n],n);if(null!=r)switch(n){case"elevation":case"overlayColor":case"resizeMode":case"tintColor":break;case"aspectRatio":t[n]=r.toString();break;case"backgroundClip":"text"===r&&(t.backgroundClip=r,t.WebkitBackgroundClip=r);break;case"flex":-1===r?(t.flexGrow=0,t.flexShrink=1,t.flexBasis="auto"):t.flex=r;break;case"font":t[n]=r.replace("System",A.e);break;case"fontFamily":if(r.indexOf("System")>-1){var i=r.split(/,\s*/);i[i.indexOf("System")]=A.e,t[n]=i.join(",")}else t[n]="monospace"===r?A.a:r;break;case"fontVariant":Array.isArray(r)&&r.length>0&&(t.fontVariant=r.join(" "));break;case"textAlignVertical":t.verticalAlign="center"===r?"middle":r;break;case"textDecorationLine":M?t.textDecorationLine=r:t.textDecoration=r;break;case"transform":case"transformMatrix":!function(e,t){var n=t.transform;Array.isArray(t.transform)&&(n=t.transform.map(T).join(" ")),e.transform=n}(t,e);break;case"writingDirection":t.direction=r;break;default:var a=A.d[n];a?a.forEach((function(n,i){"undefined"===typeof e[n]&&(t[n]=r)})):t[n]=Array.isArray(r)?r.join(","):r}})),t};var O=function(e){return function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}(e,1).toString(36)},R=r(160),k=r(225),P=r.n(k),L=r(226),D=r.n(L),I=r(227),N=r.n(I),j=r(228),B=r.n(j),F=r(229),z=r.n(F),H=r(230),U=r.n(H),V=r(231),G=r.n(V),W=r(232),q=r.n(W),X=r(233),Y=r.n(X),K=r(234),Q=r.n(K),Z=r(235),J=r.n(Z),$=r(236),ee=r.n($),te=r(237),ne=r.n(te),re=r(238),ie=r.n(re),oe=r(239),ae=r.n(oe),se=["Webkit"],le=["Moz"],ce=["ms"],ue=["Webkit","Moz"],he=["Webkit","ms"],de=["Webkit","Moz","ms"],fe={plugins:[D.a,N.a,B.a,z.a,U.a,G.a,q.a,Y.a,Q.a,J.a,ee.a,ne.a,ie.a,ae.a],prefixMap:{animation:se,animationDelay:se,animationDirection:se,animationFillMode:se,animationDuration:se,animationIterationCount:se,animationName:se,animationPlayState:se,animationTimingFunction:se,appearance:ue,userSelect:de,textEmphasisPosition:se,textEmphasis:se,textEmphasisStyle:se,textEmphasisColor:se,boxDecorationBreak:se,clipPath:se,maskImage:se,maskMode:se,maskRepeat:se,maskPosition:se,maskClip:se,maskOrigin:se,maskSize:se,maskComposite:se,mask:se,maskBorderSource:se,maskBorderMode:se,maskBorderSlice:se,maskBorderWidth:se,maskBorderOutset:se,maskBorderRepeat:se,maskBorder:se,maskType:se,textDecorationStyle:se,textDecorationSkip:se,textDecorationLine:se,textDecorationColor:se,filter:se,fontFeatureSettings:se,breakAfter:de,breakBefore:de,breakInside:de,columnCount:ue,columnFill:ue,columnGap:ue,columnRule:ue,columnRuleColor:ue,columnRuleStyle:ue,columnRuleWidth:ue,columns:ue,columnSpan:ue,columnWidth:ue,writingMode:he,flex:he,flexBasis:se,flexDirection:he,flexGrow:se,flexFlow:he,flexShrink:se,flexWrap:he,alignContent:se,alignItems:se,alignSelf:se,justifyContent:se,order:se,transform:se,transformOrigin:se,transformOriginX:se,transformOriginY:se,backfaceVisibility:se,perspective:se,perspectiveOrigin:se,transformStyle:se,transformOriginZ:se,backdropFilter:se,fontKerning:se,scrollSnapType:he,scrollSnapPointsX:he,scrollSnapPointsY:he,scrollSnapDestination:he,scrollSnapCoordinate:he,shapeImageThreshold:se,shapeImageMargin:se,shapeImageOutside:se,hyphens:de,flowInto:he,flowFrom:he,regionFragment:he,textOrientation:se,textAlignLast:le,tabSize:le,wrapFlow:ce,wrapThrough:ce,wrapMargin:ce,touchAction:ce,textSizeAdjust:["ms","Webkit"],borderImage:se,borderImageOutset:se,borderImageRepeat:se,borderImageSlice:se,borderImageSource:se,borderImageWidth:se,transitionDelay:se,transitionDuration:se,transitionProperty:se,transitionTimingFunction:se}},pe=P()(fe),me=pe;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be={get:function(e,t){if(null!=be[e]&&be[e].hasOwnProperty(t)&&null!=be[e][t])return be[e][t]},set:function(e,t,n){return null==be[e]&&(be[e]={}),be[e][t]=n}};function we(e){return Object.keys(e).sort().reduce((function(t,n){var r=e[n];if(null!=r){var i=Ee(r,n),o=be.get(n,i);if(null!=o){t[o.identifier]=o}else{var a=Se("r",n,r),s=function(e,t,n){var r=[],i="."+e;switch(t){case"animationKeyframes":var o=Me(n),a=o.animationNames,s=o.rules,l=Ae({animationName:a.join(",")});r.push.apply(r,[""+i+l].concat(s));break;case"placeholderTextColor":var c=Ae({color:n,opacity:1});r.push(i+"::-webkit-input-placeholder"+c,i+"::-moz-placeholder"+c,i+":-ms-input-placeholder"+c,i+"::placeholder"+c);break;case"pointerEvents":var u=n;if("auto"===n||"box-only"===n){if(u="auto!important","box-only"===n){var h=Ae({pointerEvents:"none"});r.push(i+">*"+h)}}else if(("none"===n||"box-none"===n)&&(u="none!important","box-none"===n)){var d=Ae({pointerEvents:"auto"});r.push(i+">*"+d)}var f=Ae({pointerEvents:u});r.push(""+i+f);break;case"scrollbarWidth":"none"===n&&r.push(i+"::-webkit-scrollbar{display:none}");var p=Ae({scrollbarWidth:n});r.push(""+i+p);break;default:var m,g=Ae(((m={})[t]=n,m));r.push(""+i+g)}return r}(a,n,r),l=be.set(n,i,{property:n,value:Ee(r,n),identifier:a,rules:s});t[a]=l}}return t}),{})}function xe(e,t){var n,r,i=Se("css",t,e),o=e.animationKeyframes,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animationKeyframes"]),s=[],l="."+i;if(null!=o){var c=Me(o),u=c.animationNames,h=c.rules;r=u.join(","),s.push.apply(s,h)}var d=Ae(ve(ve({},a),{},{animationName:r}));return s.push(""+l+d),(n={})[i]={identifier:i,rules:s},n}function _e(e){return function(e){var t=pe(e);return Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)&&(t[e]=n[n.length-1])})),t}(C(e))}function Ee(e,t){var n=Object(o.a)(e,t);return"string"!==typeof n?JSON.stringify(n||""):n}function Ae(e){var t=me(C(e));return"{"+Object.keys(t).map((function(e){var n=t[e],r=Object(R.default)(e);return Array.isArray(n)?n.map((function(e){return r+":"+e})).join(";"):r+":"+n})).sort().join(";")+";}"}function Se(e,t,n){return e+"-"+O(t+Ee(n,t))}function Me(e){if("number"===typeof e)throw new Error("Invalid CSS keyframes type: "+typeof e);var t=[],n=[];return(Array.isArray(e)?e:[e]).forEach((function(e){if("string"===typeof e)t.push(e);else{var r=function(e){var t=Se("r","animation",e),n="{"+Object.keys(e).map((function(t){return""+t+Ae(e[t])})).join("")+"}",r=["-webkit-",""].map((function(e){return"@"+e+"keyframes "+t+n}));return{identifier:t,rules:r}}(e),i=r.identifier,o=r.rules;t.push(i),n.push.apply(n,o)}})),{animationNames:t,rules:n}}var Te=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"],Ce=function(e){if(e(":focus:not([data-focusvisible-polyfill]){outline: none;}"),i.canUseDOM){var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",(function(e){"Tab"!==e.key&&(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)||(a(document.activeElement)&&s(document.activeElement),t=!0)}),!0),document.addEventListener("mousedown",c,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("touchstart",c,!0),document.addEventListener("focus",(function(e){a(e.target)&&(t||function(e){var t=e.type,n=e.tagName,r=e.readOnly;return!("INPUT"!==n||!o[t]||r)||("TEXTAREA"===n&&!r||!!e.isContentEditable)}(e.target))&&s(e.target)}),!0),document.addEventListener("blur",(function(e){a(e.target)&&e.target.hasAttribute("data-focusvisible-polyfill")&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1,window.clearTimeout(r)}),100),l(e.target))}),!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),u())}),!0),u()}function a(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.hasAttribute("data-focusvisible-polyfill")||e.setAttribute("data-focusvisible-polyfill",!0)}function l(e){e.removeAttribute("data-focusvisible-polyfill")}function c(e){!0===t&&function(){for(var e=document.querySelectorAll("[data-focusvisible-polyfill]"),t=0;t<e.length;t+=1)l(e[t])}(),t=!1}function u(){document.addEventListener("mousemove",h),document.addEventListener("mousedown",h),document.addEventListener("mouseup",h),document.addEventListener("pointermove",h),document.addEventListener("pointerdown",h),document.addEventListener("pointerup",h),document.addEventListener("touchmove",h),document.addEventListener("touchstart",h),document.addEventListener("touchend",h)}function h(e){"HTML"!==e.target.nodeName&&(t=!1,document.removeEventListener("mousemove",h),document.removeEventListener("mousedown",h),document.removeEventListener("mouseup",h),document.removeEventListener("pointermove",h),document.removeEventListener("pointerdown",h),document.removeEventListener("pointerup",h),document.removeEventListener("touchmove",h),document.removeEventListener("touchstart",h),document.removeEventListener("touchend",h))}};var Oe=function(e){return"rn-"+e},Re=function(e){return e.join(" ").trim()},ke=function(){var e,t,n,r={css:{},ltr:{},rtl:{},rtlNoSwap:{}},o=function(){e={css:{},ltr:{},rtl:{},rtlNoSwap:{}},t=u(function(e){if(i.canUseDOM){var t=document.getElementById(e);if(null!=t)return t.sheet;var n=document.createElement("style");n.setAttribute("id",e);var r=document.head;return r&&r.insertBefore(n,r.firstChild),n.sheet}return null}(A.b)),n={},Ce((function(e){return t.insert(e,A.c.modality)})),Te.forEach((function(e){t.insert(e,A.c.reset)}))};function a(r){var i=g.a.getConstants(),o=i.doLeftAndRightSwapInRTL,a=i.isRTL?o?"rtl":"rtlNoSwap":"ltr";if(!e[a][r]){var s=we(l(E(Object(m.a)(r))));Object.keys(s).forEach((function(e){var r=s[e],i=r.identifier,o=r.property,a=r.rules,l=r.value;!function(e,t,r){n[t]||(n[t]={}),n[t][r]=e}(i,o,l),a.forEach((function(e){var n=A.c.custom[o]||A.c.atomic;t.insert(e,n)}))})),e[a][r]=!0}}function s(e,i){var o=g.a.getConstants(),a=o.doLeftAndRightSwapInRTL,s=o.isRTL?a?"rtl":"rtlNoSwap":"ltr";if(null!=i&&null!=r[s][i])return r[s][i];var c=Object(m.a)(e),u=l(E(c)),h=Object.keys(u).sort().reduce((function(e,r){var i=u[r];if(null!=i){var o=function(e,t){var r=Ee(t,e);return n[e]&&n[e].hasOwnProperty(r)&&n[e][r]}(r,i);if(o)e.classList.push(o);else if("animationKeyframes"===r||"placeholderTextColor"===r||"pointerEvents"===r||"scrollbarWidth"===r){var a,s=we(((a={})[r]=i,a));Object.keys(s).forEach((function(n){var r=s[n],i=r.identifier,o=r.rules;e.classList.push(i),o.forEach((function(e){t.insert(e,A.c.atomic)}))}))}else e.style||(e.style={}),e.style[r]=i}return e}),{classList:[]});return h.style&&(h.style=_e(h.style)),null!=i&&(r[s][i]=h),h}return o(),{getStyleSheet:function(){var e=t.getTextContent();return i.canUseDOM||o(),{id:A.b,textContent:e}},createCSS:function(e,t){var n={};return Object.keys(e).forEach((function(i){var o=xe(e[i],i);Object.keys(o).forEach((function(e){var a=o[e],s=a.identifier,l=a.rules;r.css[s]={group:t||A.c.classic,rules:l},n[i]=s}))})),n},resolve:function(n,i){var o=[],l={};if(!n&&!i)return l;if(Array.isArray(i)&&p(i).forEach((function(n){if(n){if(null==e.css[n]&&null!=r.css[n]){var i=r.css[n];i.rules.forEach((function(e){t.insert(e,i.group)})),e.css[n]=!0}o.push(n)}})),"number"===typeof n)a(n),l=s(n,Oe(n));else if(Array.isArray(n)){for(var c=p(n),u=!0,h="",d=0;d<c.length;d++){var f=c[d];"number"!==typeof f?u=!1:(u&&(h+=f+"-"),a(f))}l=s(c,u?Oe(h):null)}else l=s(n);o.push.apply(o,l.classList);var m={className:Re(o),classList:o};return l.style&&(m.style=l.style),m},get sheet(){return t}}}();n.a=ke},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(0),i=n(13),o=n(98);function a(e){return"touchstart"===e||"mousedown"===e}function s(e){return"touchmove"===e||"mousemove"===e}function l(e){return"touchend"===e||"mouseup"===e||c(e)}function c(e){return"touchcancel"===e||"dragstart"===e}var u=[],h={touchBank:u,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function d(e){return e.timeStamp||e.timestamp}function f(e){var t=e.identifier;return null==t&&console.error("Touch object is missing identifier."),t}function p(e){var t=f(e),n=u[t];n?function(e,t){e.touchActive=!0,e.startPageX=t.pageX,e.startPageY=t.pageY,e.startTimeStamp=d(t),e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=d(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=d(t)}(n,e):u[t]=function(e){return{touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:d(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:d(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:d(e)}}(e),h.mostRecentTimeStamp=d(e)}function m(e){var t=u[f(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch move without a touch start.\n","Touch Move: "+v(e)+"\n","Touch Bank: "+y())}function g(e){var t=u[f(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch end without a touch start.\n","Touch End: "+v(e)+"\n","Touch Bank: "+y())}function v(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:d(e)})}function y(){var e=JSON.stringify(u.slice(0,20));return u.length>20&&(e+=" (original size: "+u.length+")"),e}var b={recordTouchTrack:function(e,t){if(s(e))t.changedTouches.forEach(m);else if(a(e))t.changedTouches.forEach(p),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches&&(h.indexOfSingleActiveTouch=t.touches[0].identifier);else if(l(e)){if(t.changedTouches.forEach(g),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches)for(var n=0;n<u.length;n++){var r=u[n];if(null!=r&&r.touchActive){h.indexOfSingleActiveTouch=n;break}}}},touchHistory:h},w=function(){},x={},_=[];function E(e){return e>20?e%20:e}function A(e){var t,n,r,i=!1,a=e.changedTouches,s=e.type,l=!0===e.metaKey,c=!0===e.shiftKey,u=a&&a[0].force||0,h=E(a&&a[0].identifier||0),d=a&&a[0].clientX||e.clientX,f=a&&a[0].clientY||e.clientY,p=a&&a[0].pageX||e.pageX,m=a&&a[0].pageY||e.pageY,g="function"===typeof e.preventDefault?e.preventDefault.bind(e):w,v=e.timeStamp;function y(e){return Array.prototype.slice.call(e).map((function(e){return{force:e.force,identifier:E(e.identifier),get locationX(){return M(e.clientX)},get locationY(){return T(e.clientY)},pageX:e.pageX,pageY:e.pageY,target:e.target,timestamp:v}}))}if(null!=a)n=y(a),r=y(e.touches);else{var A=[{force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v}];n=A,r="mouseup"===s||"dragstart"===s?_:A}var S={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:x,eventPhase:e.eventPhase,isDefaultPrevented:function(){return e.defaultPrevented},isPropagationStopped:function(){return i},isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:l,shiftKey:c,changedTouches:n,force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v,touches:r,type:s},persist:w,preventDefault:g,stopPropagation:function(){i=!0},target:e.target,timeStamp:v,touchHistory:b.touchHistory};function M(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.left}function T(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.top}return S}function S(e){for(var t=[];null!=e&&e!==document.body;)t.push(e),e=e.parentNode;return t}function M(e){return null!=e?e.__reactResponderId:null}function T(e){for(var t=[],n=[],r=function(e){return"selectionchange"===e.type?S(window.getSelection().anchorNode):null!=e.composedPath?e.composedPath():S(e.target)}(e),i=0;i<r.length;i++){var o=r[i],a=M(o);null!=a&&(t.push(a),n.push(o))}return{idPath:t,nodePath:n}}function C(e){return"selectionchange"===e.type?function(){var e=window.getSelection(),t=e.toString(),n=e.anchorNode,r=e.focusNode,i=n&&n.nodeType===window.Node.TEXT_NODE||r&&r.nodeType===window.Node.TEXT_NODE;return t.length>=1&&"\n"!==t&&i}():"select"===e.type}var O={},R=["onStartShouldSetResponderCapture","onStartShouldSetResponder",{bubbles:!0}],k=["onMoveShouldSetResponderCapture","onMoveShouldSetResponder",{bubbles:!0}],P={touchstart:R,mousedown:R,touchmove:k,mousemove:k,scroll:["onScrollShouldSetResponderCapture","onScrollShouldSetResponder",{bubbles:!1}]},L={id:null,idPath:null,node:null},D=new Map,I=!1,N=0,j={id:null,node:null,idPath:null};function B(e){j=e}function F(e){var t=D.get(e);return null!=t?t:O}function z(e){var t=e.type,n=e.target;if("touchstart"===t&&(I=!0),("touchmove"===t||N>1)&&(I=!1),!("mousedown"===t&&I||"mousemove"===t&&I||"mousemove"===t&&N<1))if(I&&"mouseup"===t)0===N&&(I=!1);else{var r=a(t)&&function(e){var t=e.altKey,n=e.button,r=e.buttons,i=e.ctrlKey,o=e.type,a=!1===t&&!1===i;return!!("touchstart"===o||"touchmove"===o||"mousedown"===o&&(0===n||1===r)&&a||"mousemove"===o&&1===r&&a)}(e),i=s(t),o=l(t),u=function(e){return"scroll"===e}(t),h=function(e){return"select"===e||"selectionchange"===e}(t),d=A(e);(r||i||o)&&(e.touches?N=e.touches.length:r?N=1:o&&(N=0),b.recordTouchTrack(t,d.nativeEvent));var f,p=T(e),m=!1;if(r||i||u&&N>0){var g=j.idPath,v=p.idPath;if(null!=g&&null!=v){var y=function(e,t){var n=e.length,r=t.length;if(0===n||0===r||e[n-1]!==t[r-1])return null;var i=e[0],o=0,a=t[0],s=0;n-r>0&&(i=e[o=n-r],n=r),r-n>0&&(a=t[s=r-n],r=n);for(var l=n;l--;){if(i===a)return i;i=e[o++],a=t[s++]}return null}(g,v);if(null!=y){var w=v.indexOf(y)+(y===j.id?1:0);p={idPath:v.slice(w),nodePath:p.nodePath.slice(w)}}else p=null}null!=p&&null!=(f=function(e,t,n){var r=P[t.type];if(null!=r){for(var i=e.idPath,o=e.nodePath,a=r[0],s=r[1],l=r[2].bubbles,c=function(e,t,r){var o=F(e)[r];if(null!=o&&(n.currentTarget=t,!0===o(n)))return{id:e,node:t,idPath:i.slice(i.indexOf(e))}},u=i.length-1;u>=0;u--){var h=i[u],d=o[u],f=c(h,d,a);if(null!=f)return f;if(!0===n.isPropagationStopped())return}if(l)for(var p=0;p<i.length;p++){var m=i[p],g=o[p],v=c(m,g,s);if(null!=v)return v;if(!0===n.isPropagationStopped())return}else{var y=i[0],b=o[0];if(t.target===b)return c(y,b,s)}}}(p,e,d))&&(!function(e,t){var n=j,r=n.id,i=n.node,o=t.id,a=t.node,s=F(o),l=s.onResponderGrant,c=s.onResponderReject;if(e.bubbles=!1,e.cancelable=!1,e.currentTarget=a,null==r)null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t);else{var u=F(r),h=u.onResponderTerminate,d=u.onResponderTerminationRequest,f=!0;null!=d&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminationRequest",!1===d(e)&&(f=!1)),f?(null!=h&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminate",h(e)),null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t)):null!=c&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderReject",c(e))}}(d,f),m=!0)}if(null!=j.id&&null!=j.node){var x=j,_=x.id,E=x.node,S=F(_),M=S.onResponderStart,O=S.onResponderMove,R=S.onResponderEnd,k=S.onResponderRelease,D=S.onResponderTerminate,z=S.onResponderTerminationRequest;if(d.bubbles=!1,d.cancelable=!1,d.currentTarget=E,r)null!=M&&(d.dispatchConfig.registrationName="onResponderStart",M(d));else if(i)null!=O&&(d.dispatchConfig.registrationName="onResponderMove",O(d));else{var H=c(t)||"contextmenu"===t||"blur"===t&&n===window||"blur"===t&&n.contains(E)&&e.relatedTarget!==E||u&&0===N||u&&n.contains(E)&&n!==E||h&&C(e),U=o&&!H&&!function(e,t){if(!t||0===t.length)return!1;for(var n=0;n<t.length;n++){var r=t[n].target;if(null!=r&&e.contains(r))return!0}return!1}(E,e.touches);if(o&&null!=R&&(d.dispatchConfig.registrationName="onResponderEnd",R(d)),U&&(null!=k&&(d.dispatchConfig.registrationName="onResponderRelease",k(d)),B(L)),H){var V=!0;"contextmenu"!==t&&"scroll"!==t&&"selectionchange"!==t||(m?V=!1:null!=z&&(d.dispatchConfig.registrationName="onResponderTerminationRequest",!1===z(d)&&(V=!1))),V&&(null!=D&&(d.dispatchConfig.registrationName="onResponderTerminate",D(d)),B(L),I=!1,N=0)}}}}}var H=["blur","scroll"],U=["mousedown","mousemove","mouseup","dragstart","touchstart","touchmove","touchend","touchcancel","contextmenu","select","selectionchange"];function V(e){j.id===e&&function(){var e=j,t=e.id,n=e.node;if(null!=t&&null!=n){var r=F(t).onResponderTerminate;if(null!=r){var i=A({});i.currentTarget=n,r(i)}B(L)}I=!1,N=0}(),D.has(e)&&D.delete(e)}var G={},W=0;function q(e,t){void 0===t&&(t=G);var n=function(e){var t=r.useRef(null);return null==t.current&&(t.current=e()),t.current}((function(){return W++})),o=r.useRef(!1);r.useEffect((function(){return i.canUseDOM&&null==window.__reactResponderSystemActive&&(window.addEventListener("blur",z),U.forEach((function(e){document.addEventListener(e,z)})),H.forEach((function(e){document.addEventListener(e,z,!0)})),window.__reactResponderSystemActive=!0),function(){V(n)}}),[n]),r.useEffect((function(){var r=t,i=r.onMoveShouldSetResponder,a=r.onMoveShouldSetResponderCapture,s=r.onScrollShouldSetResponder,l=r.onScrollShouldSetResponderCapture,c=r.onSelectionChangeShouldSetResponder,u=r.onSelectionChangeShouldSetResponderCapture,h=r.onStartShouldSetResponder,d=r.onStartShouldSetResponderCapture,f=null!=i||null!=a||null!=s||null!=l||null!=c||null!=u||null!=h||null!=d,p=e.current;f?(!function(e,t,n){!function(e,t){null!=e&&(e.__reactResponderId=t)}(t,e),D.set(e,n)}(n,p,t),o.current=!0):o.current&&(V(n),o.current=!1)}),[t,e,n]),r.useDebugValue({isResponder:e.current===j.node}),r.useDebugValue(t)}},function(e,t,n){"use strict";var r={adjustable:"slider",button:"button",header:"heading",image:"img",imagebutton:null,keyboardkey:null,label:null,link:"link",none:"presentation",search:"search",summary:"region",text:null},i=function(e){var t=e.accessibilityRole;if(t){var n=r[t];if(null!==n)return n||t}},o={article:"article",banner:"header",blockquote:"blockquote",code:"code",complementary:"aside",contentinfo:"footer",deletion:"del",emphasis:"em",figure:"figure",insertion:"ins",form:"form",link:"a",list:"ul",listitem:"li",main:"main",navigation:"nav",region:"section",strong:"strong"},a={},s={buttonLikeRoles:{button:!0,menuitem:!0},isDisabled:function(e){return e.disabled||Array.isArray(e.accessibilityStates)&&e.accessibilityStates.indexOf("disabled")>-1},propsToAccessibilityComponent:function(e){if(void 0===e&&(e=a),"label"===e.accessibilityRole)return"label";if(null!=e.href)return"a";var t=i(e);if(t){if("heading"===t){var n=e.accessibilityLevel||e["aria-level"];return null!=n?"h"+n:"h1"}return o[t]}},propsToAriaRole:i};t.a=s},function(e,t,n){var r,i;i=this,void 0===(r=function(){return function(e){"use strict";var t=e&&e.I18n||{},n=Array.prototype.slice,r=function(e){return("0"+e.toString()).substr(-2)},i=function(e){var t=typeof e;return"function"===t||"object"===t},o=function(e){return"function"===typeof e},a=function(e){return"undefined"!==typeof e&&null!==e},s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},l=function(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)},c=function(e){return!0===e||!1===e},u=function(e){return null===e},h=function(e,t,n){return"undefined"===typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!==typeof n||n%1!==0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},d=function(e,t){return o(e)?e(t):e},f=function(e,t){var n,r,i;for(n in t)t.hasOwnProperty(n)&&(r=t[n],"string"===typeof(i=r)||"[object String]"===Object.prototype.toString.call(i)||l(r)||c(r)||s(r)||u(r)?e[n]=r:(null==e[n]&&(e[n]={}),f(e[n],r)));return e},p={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},m={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},g={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},v={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},y=[null,"kb","mb","gb","tb"],b={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return t.reset=function(){var e;for(e in b)this[e]=b[e]},t.initializeOptions=function(){var e;for(e in b)a(this[e])||(this[e]=b[e])},t.initializeOptions(),t.locales={},t.locales.get=function(e){var n=this[e]||this[t.locale]||this.default;return o(n)&&(n=n(e)),!1===s(n)&&(n=[n]),n},t.locales.default=function(e){var n=[],r=[];return e&&n.push(e),!e&&t.locale&&n.push(t.locale),t.fallbacks&&t.defaultLocale&&n.push(t.defaultLocale),n.forEach((function(e){var n=e.split("-"),i=null,o=null;3===n.length?(i=[n[0],n[1]].join("-"),o=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(e)&&r.push(e),t.fallbacks&&[i,o].forEach((function(t){"undefined"!==typeof t&&null!==t&&t!==e&&-1===r.indexOf(t)&&r.push(t)}))})),n.length||n.push("en"),r},t.pluralization={},t.pluralization.get=function(e){return this[e]||this[t.locale]||this.default},t.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},t.currentLocale=function(){return this.locale||this.defaultLocale},t.isSet=a,t.lookup=function(e,t){t=t||{};var n,r,i,o,s=this.locales.get(t.locale).slice();for(i=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=i.split(t.separator||this.defaultSeparator),o=this.translations[n]){for(;r.length&&void 0!==(o=o[r.shift()])&&null!==o;);if(void 0!==o&&null!==o)return o}if(a(t.defaultValue))return d(t.defaultValue,e)},t.pluralizationLookupWithoutFallback=function(e,t,n){var r,o,s=this.pluralization.get(t)(e);if(i(n))for(;s.length;)if(r=s.shift(),a(n[r])){o=n[r];break}return o},t.pluralizationLookup=function(e,t,n){n=n||{};var r,o,s,l,c=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);c.length;)if(r=c.shift(),o=t.split(n.separator||this.defaultSeparator),s=this.translations[r]){for(;o.length&&(s=s[o.shift()],i(s));)0===o.length&&(l=this.pluralizationLookupWithoutFallback(e,r,s));if("undefined"!==typeof l&&null!==l)break}return"undefined"!==typeof l&&null!==l||a(n.defaultValue)&&(l=i(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,s=n.defaultValue),{message:l,translations:s}},t.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:p.meridian},t.prepareOptions=function(){for(var e,t=n.call(arguments),r={};t.length;)if("object"==typeof(e=t.shift()))for(var i in e)e.hasOwnProperty(i)&&(a(r[i])||(r[i]=e[i]));return r},t.createTranslationOptions=function(e,t){var n=[{scope:e}];return a(t.defaults)&&(n=n.concat(t.defaults)),a(t.defaultValue)&&n.push({message:t.defaultValue}),n},t.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),o=e,l=this.prepareOptions(t);return delete l.defaultValue,r.some((function(t){if(a(t.scope)?(o=t.scope,n=this.lookup(o,l)):a(t.message)&&(n=d(t.message,e)),void 0!==n&&null!==n)return!0}),this)?("string"===typeof n?n=this.interpolate(n,t):s(n)?n=n.map((function(e){return"string"===typeof e?this.interpolate(e,t):e}),this):i(n)&&a(t.count)&&(n=this.pluralize(t.count,o,t)),n):this.missingTranslation(e,t)},t.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,i,o,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)i=(n=s.shift()).replace(this.placeholder,"$1"),r=a(t[i])?t[i].toString().replace(/\$/gm,"_#$#_"):i in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),o=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(o,r);return e.replace(/_#\$#_/g,"$")},t.pluralize=function(e,t,n){var r,i;return n=this.prepareOptions({count:String(e)},n),"undefined"===typeof(i=this.pluralizationLookup(e,t,n)).translations||null==i.translations?this.missingTranslation(t,n):"undefined"!==typeof i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},t.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()}))}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},t.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},t.nullPlaceholder=function(){return t.missingPlaceholder.apply(t,arguments)},t.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),m);var n,r,i=e<0,o=function(e,t){return h("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString().split("."),a=[],s=t.format||"%n",l=i?"-":"";for(e=o[0],n=o[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(s=t.sign_first?"%s"+s:s.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",l)},t.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),g),this.toNumber(e,t)},t.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},t.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"===typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)t[i]=parseInt(t[i],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},t.strftime=function(e,n,i){i=this.lookup("date",i);var o=t.meridian();if(i||(i={}),i=this.prepareOptions(i,p),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var a=e.getDay(),s=e.getDate(),l=e.getFullYear(),c=e.getMonth()+1,u=e.getHours(),h=u,d=u>11?1:0,f=e.getSeconds(),m=e.getMinutes(),g=e.getTimezoneOffset(),v=Math.floor(Math.abs(g/60)),y=Math.abs(g)-60*v,b=(g>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(y.toString().length<2?"0"+y:y);return h>12?h-=12:0===h&&(h=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[a])).replace("%A",i.day_names[a])).replace("%b",i.abbr_month_names[c])).replace("%B",i.month_names[c])).replace("%d",r(s))).replace("%e",s)).replace("%-d",s)).replace("%H",r(u))).replace("%-H",u)).replace("%k",u)).replace("%I",r(h))).replace("%-I",h)).replace("%l",h)).replace("%m",r(c))).replace("%-m",c)).replace("%M",r(m))).replace("%-M",m)).replace("%p",o[d])).replace("%P",o[d].toLowerCase())).replace("%S",r(f))).replace("%-S",f)).replace("%w",a)).replace("%y",r(l))).replace("%-y",r(l).replace(/^0+/,""))).replace("%Y",l)).replace("%z",b)).replace("%Z",b)},t.toTime=function(e,t,n){var r=this.parseDate(t),i=this.lookup(e,n);if(null==r)return r;var o=r.toString();return o.match(/invalid/i)?o:i?this.strftime(r,i,n):o},t.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),v),this.toNumber(e,t)},t.toHumanSize=function(e,t){for(var n,r,i,o=e,a=0;o>=1024&&a<4;)o/=1024,a+=1;return 0===a?(i=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(i,{count:o}),r=0):(i=this.getFullScope("number.human.storage_units.units."+y[a],t),n=this.t(i),r=o-Math.floor(o)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(o,t)},t.getFullScope=function(e,t){return t=t||{},s(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},t.extend=function(e,t){return"undefined"===typeof e&&"undefined"===typeof t?{}:f(e,t)},t.t=t.translate.bind(t),t.l=t.localize.bind(t),t.p=t.pluralize.bind(t),t}(i)}.call(t,n,t,e))||(e.exports=r)},function(e,t,n){"use strict";t.a=function(e){if(null!=e&&(1===e.nodeType&&"function"===typeof e.getBoundingClientRect))return e.getBoundingClientRect()}},function(e,t,n){"use strict";var r=/^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/;t.a=function(e,t){var n;return"string"===typeof e?""+parseFloat(e)*t+e.match(r)[1]:(n=e,!isNaN(parseFloat(n))&&isFinite(n)?e*t:void 0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t,n){"use strict";var r=n(0),i=n(3);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).frame=null,t.onLayout=function(e){t.frame=e.nativeEvent.layout},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=s.prototype;return l.relativeKeyboardHeight=function(e){var t=this.frame;if(!t||!e)return 0;var n=e.screenY-(this.props.keyboardVerticalOffset||0);return Math.max(t.y+t.height-n,0)},l.onKeyboardChange=function(e){},l.render=function(){var e=this.props,t=(e.behavior,e.contentContainerStyle,e.keyboardVerticalOffset,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["behavior","contentContainerStyle","keyboardVerticalOffset"]));return r.createElement(i.a,o({onLayout:this.onLayout},t))},s}(r.Component);t.a=s},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(41);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={getStateForAction:function(e,t){switch(t.type){case"SET_PARAMS":var n=t.source?e.routes.findIndex((function(e){return e.key===t.source})):e.index;return-1===n?null:s(s({},e),{},{routes:e.routes.map((function(e,r){return r===n?s(s({},e),{},{params:s(s({},e.params),t.payload.params)}):e}))});case"RESET":var r=t.payload;return 0===r.routes.length||r.routes.some((function(t){return!e.routeNames.includes(t.name)}))?null:!1===r.stale?e.routeNames.length!==r.routeNames.length||r.routeNames.some((function(t){return!e.routeNames.includes(t)}))?null:s(s({},r),{},{routes:r.routes.map((function(e){return e.key?e:s(s({},e),{},{key:"".concat(e.name,"-").concat(Object(o.a)())})}))}):r;default:return null}},shouldActionChangeFocus:function(e){return"NAVIGATE"===e.type}};t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(4),i=n.n(r),o=n(120),a=n(0),s=n.n(a),l=n(5),c=n(3),u=a.createContext(null);function h(e){var t=e.children,n=e.WrapperComponent,r=a.createElement(c.a,{children:t,key:1,pointerEvents:"box-none",style:d.appContainer});return n&&(r=a.createElement(n,null,r)),a.createElement(u.Provider,{value:e.rootTag},a.createElement(c.a,{pointerEvents:"box-none",style:d.appContainer},r))}var d=l.a.create({appContainer:{flex:1}}),f=n(63),p=n(119),m=n(94);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v,y={},b={},w=function(e){return e()},x=function(){function e(){}return e.getAppKeys=function(){return Object.keys(b)},e.getApplication=function(e,t){return i()(b[e]&&b[e].getApplication,"Application "+e+" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent."),b[e].getApplication(t)},e.registerComponent=function(e,t){return b[e]={getApplication:function(e){return n=w(t),r=e?e.initialProps:y,i=v&&v(e),{element:s.a.createElement(h,{WrapperComponent:i,rootTag:{}},s.a.createElement(n,r)),getStyleElement:function(e){var t=m.a.getStyleSheet();return s.a.createElement("style",g({},e,{dangerouslySetInnerHTML:{__html:t.textContent},id:t.id}))}};var n,r,i},run:function(e){return function(e,t,n,r){var o=r.hydrate,a=r.initialProps,l=r.rootTag,c=o?f.hydrate:p.a;i()(l,"Expect to have a valid rootTag, instead got ",l),c(s.a.createElement(h,{WrapperComponent:t,rootTag:l},s.a.createElement(e,a)),l,n)}(w(t),v&&v(e),e.callback,{hydrate:e.hydrate||!1,initialProps:e.initialProps||y,rootTag:e.rootTag})}},e},e.registerConfig=function(t){t.forEach((function(t){var n=t.appKey,r=t.component,o=t.run;o?e.registerRunnable(n,o):(i()(r,"No component provider passed in"),e.registerComponent(n,r))}))},e.registerRunnable=function(e,t){return b[e]={run:t},e},e.runApplication=function(e,t){i()(b[e]&&b[e].run,'Application "'+e+'" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.'),b[e].run(t)},e.setComponentProviderInstrumentationHook=function(e){w=e},e.setWrapperComponentProvider=function(e){v=e},e.unmountApplicationComponentAtRootTag=function(e){Object(o.a)(e)},e}()},function(e,t,n){"use strict";var r={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},i=["ms","Moz","O","Webkit"];Object.keys(r).forEach((function(e){i.forEach((function(t){r[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=r[e]}))})),t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r={},i={},o=1,a=function(e){return"r-"+e},s=function(){function e(){}return e.register=function(e){var t=o++;var n=a(t);return i[n]=e,t},e.getByID=function(e){if(!e)return r;var t=a(e),n=i[t];return n||(console.warn("Invalid style with id `"+e+"`. Skipping ..."),r)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol():Object.freeze({});function o(e){var t=r.useRef(i);return t.current===i&&(t.current=e()),t.current}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),c=e.reduce((function(e,t){var i=e,o=t;return s.forEach((function(e,t){var a,c=e.keyAccessor;if(e.isProp){var u=o,h=u[c],d=r(u,[c].map(l));a=h,o=d}else a=c(o,t);t+1<s.length?(i.hasOwnProperty(a)||(i[a]={}),i=i[a]):n?(i.hasOwnProperty(a)||(i[a]=[]),i[a].push(o)):i[a]=o})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===s.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(c);var u=c;return a&&(u=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===s.length?u.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=i(t,2),a=r[0],s=r[1];return e(s,[].concat(o(n),[a]))}))}(c),t instanceof Array&&0===t.length&&1===u.length&&(u[0].keys=[])),u}},function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(R[e])e=R[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=z.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=z.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=z.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=z.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=z.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=z.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=z.hex8.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=z.hex6.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:n?"name":"hex"};if(t=z.hex4.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=z.hex3.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(H(e.r)&&H(e.g)&&H(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*L(f,255),g:255*L(p,255),b:255*L(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):H(e.h)&&H(e.s)&&H(e.v)?(r=j(e.s),s=j(e.v),t=function(e,t,n){e=6*L(e,360),t=L(t,100),n=L(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):H(e.h)&&H(e.s)&&H(e.l)&&(r=j(e.s),l=j(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=L(e,360),t=L(t,100),n=L(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=P(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function p(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function m(e,t,n,r){var i=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,n,r){return[N(B(r)),N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=D(n.s),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=D(n.s),d(n)}function b(e){return d(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=D(n.l),d(n)}function x(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=u(0,c(255,n.r-l(-t/100*255))),n.g=u(0,c(255,n.g-l(-t/100*255))),n.b=u(0,c(255,n.b-l(-t/100*255))),d(n)}function _(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=D(n.l),d(n)}function E(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function A(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function S(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function M(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function T(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function C(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),i=360/n,o=[d(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function O(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16)),N(B(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*L(this._r,255))+"%",g:l(100*L(this._g,255))+"%",b:l(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%)":"rgba("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:j(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=d.readability(e,t[c]))>l&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(R);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return c(1,u(0,e))}function I(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function j(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return I(e)/255}var z=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function H(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));n(6);var r=n(0);var i={value:!1};function o(e){r.useMemo((function(){return{current:new Map}}),[]);return e}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,i=n||r||Function("return this")();function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var s=Object.prototype,l=s.hasOwnProperty,c=s.toString,u=i.Symbol,h=s.propertyIsEnumerable,d=u?u.isConcatSpreadable:void 0,f=Math.max;function p(e){return g(e)||function(e){return function(e){return v(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&l.call(e,"callee")&&(!h.call(e,"callee")||"[object Arguments]"==c.call(e))}(e)||!!(d&&e&&e[d])}function m(e){if("string"==typeof e||function(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==c.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var g=Array.isArray;function v(e){return!!e&&"object"==typeof e}var y,b,w=(y=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(function e(t,n,r,i,o){var s=-1,l=t.length;for(r||(r=p),o||(o=[]);++s<l;){var c=t[s];n>0&&r(c)?n>1?e(c,n-1,r,i,o):a(o,c):i||(o[o.length]=c)}return o}(t,1),m))},b=f(void 0===b?y.length-1:b,0),function(){for(var e=arguments,t=-1,n=f(e.length-b,0),r=Array(n);++t<n;)r[t]=e[b+t];t=-1;for(var i=Array(b+1);++t<b;)i[t]=e[t];return i[b]=r,o(y,this,i)});e.exports=w}).call(this,n(46))},function(t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"===typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var t=l(f);h=!0;for(var n=u.length;n;){for(c=u,u=[];++d<n;)c&&c[d].run();d=-1,n=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}},function(e,t,n){var r=n(86),i=n(56),o=n(39),a=n(382),s=o((function(e,t){return 1===e?i(t):r(e,a(e,[],t))}));e.exports=s},function(e,t){e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},function(e,t,n){"use strict";var r=n(90),i=n.n(r);t.a=function(e){if(void 0===e||null===e)return e;var t=i()(e);return void 0!==t&&null!==t?t=(t<<24|t>>>8)>>>0:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(34),i=function(){function e(){}return e.get=function(){return r.a.get("window").scale},e.getFontScale=function(){return r.a.get("window").fontScale||e.get()},e.getPixelSizeForLayoutSize=function(t){return Math.round(t*e.get())},e.roundToNearestPixel=function(t){var n=e.get();return Math.round(t*n)/n},e}()},function(e,t,n){"use strict";var r=n(3),i=n(0),o=n.n(i);t.a=function(e){e.colors,e.enabled,e.onRefresh,e.progressBackgroundColor,e.progressViewOffset,e.refreshing,e.size,e.tintColor,e.title,e.titleColor;var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["colors","enabled","onRefresh","progressBackgroundColor","progressViewOffset","refreshing","size","tintColor","title","titleColor"]);return o.a.createElement(r.a,t)}},function(e,t,n){"use strict";var r=n(19),i=n.n(r),o=n(0),a=n(73),s=n(37),l=n(76),c={accessibilityDisabled:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityState:!0,accessibilityValue:!0,children:!0,disabled:!0,focusable:!0,nativeID:!0,onBlur:!0,onFocus:!0,onLayout:!0,testID:!0};var u=o.memo(o.forwardRef((function(e,t){var n=e.delayPressIn,r=e.delayPressOut,u=e.delayLongPress,h=e.disabled,d=e.focusable,f=e.onLongPress,p=e.onPress,m=e.onPressIn,g=e.onPressOut,v=e.rejectResponderTermination,y=Object(o.useRef)(null),b=Object(o.useMemo)((function(){return{cancelable:!v,disabled:h,delayLongPress:u,delayPressStart:n,delayPressEnd:r,onLongPress:f,onPress:p,onPressStart:m,onPressEnd:g}}),[h,n,r,u,f,p,m,g,v]),w=Object(l.a)(y,b),x=o.Children.only(e.children),_=[x.props.children],E=function(e){return Object(a.a)(e,c)}(e);E.accessibilityDisabled=h,E.focusable=!h&&!1!==d,E.ref=Object(s.a)(t,y,x.ref);var A=i()(E,w);return o.cloneElement.apply(o,[x,A].concat(_))})));u.displayName="TouchableWithoutFeedback",t.a=u},function(e,t,n){"use strict";var r=n(63);t.a=r.render},function(e,t,n){"use strict";var r=n(63);t.a=r.unmountComponentAtNode},function(e,t,n){"use strict";var r=n(132),i={addListener:function(){return{remove:function(){}}},dismiss:function(){Object(r.a)()},removeAllListeners:function(){},removeListener:function(){}};t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(13),o=n(5),a=n(3);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=i.canUseDOM&&window.CSS&&window.CSS.supports&&window.CSS.supports("top: constant(safe-area-inset-top)")?"constant":"env",c=r.forwardRef((function(e,t){var n=e.style,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["style"]);return r.createElement(a.a,s({},i,{ref:t,style:o.a.compose(u.root,n)}))}));c.displayName="SafeAreaView";var u=o.a.create({root:{paddingTop:l+"(safe-area-inset-top)",paddingRight:l+"(safe-area-inset-right)",paddingBottom:l+"(safe-area-inset-bottom)",paddingLeft:l+"(safe-area-inset-left)"}});t.a=c},function(e,t,n){"use strict";var r=n(0),i=n(37),o=n(76),a=n(5),s=n(3);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){return{child:{opacity:null!==e&&void 0!==e?e:.85},underlay:{backgroundColor:void 0===t?"black":t}}}function u(e){return null!=e.onPress||null!=e.onPressIn||null!=e.onPressOut||null!=e.onLongPress}var h=a.a.create({root:{userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),d=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,d=e.children,f=e.delayPressIn,p=e.delayPressOut,m=e.delayLongPress,g=e.disabled,v=e.focusable,y=e.onHideUnderlay,b=e.onLongPress,w=e.onPress,x=e.onPressIn,_=e.onPressOut,E=e.onShowUnderlay,A=e.rejectResponderTermination,S=e.style,M=e.testOnly_pressed,T=e.underlayColor,C=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","children","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onHideUnderlay","onLongPress","onPress","onPressIn","onPressOut","onShowUnderlay","rejectResponderTermination","style","testOnly_pressed","underlayColor"]),O=Object(r.useRef)(null),R=Object(i.a)(t,O),k=Object(r.useState)(!0===M?c(n,T):null),P=k[0],L=k[1],D=Object(r.useCallback)((function(){u(e)&&(L(c(n,T)),null!=E&&E())}),[n,E,e,T]),I=Object(r.useCallback)((function(){!0!==M&&u(e)&&(L(null),null!=y&&y())}),[y,e,M]),N=Object(r.useMemo)((function(){return{cancelable:!A,disabled:g,delayLongPress:m,delayPressStart:f,delayPressEnd:p,onLongPress:b,onPress:w,onPressStart:function(e){D(),null!=x&&x(e)},onPressEnd:function(e){I(),null!=_&&_(e)}}}),[m,f,p,g,b,w,x,_,A,D,I]),j=Object(o.a)(O,N),B=r.Children.only(d);return r.createElement(s.a,l({},C,j,{accessibilityDisabled:g,focusable:!g&&!1!==v,ref:R,style:[h.root,S,!g&&h.actionable,P&&P.underlay]}),r.cloneElement(B,{style:a.a.compose(B.props.style,P&&P.child)}))})));d.displayName="TouchableHighlight",t.a=d},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(80);function o(e){r.useEffect((function(){var t=i.a.addEventListener("hardwareBackPress",(function(){var t=e.current;return null!=t&&(!!t.canGoBack()&&(t.goBack(),!0))}));return function(){return t.remove()}}),[e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(e){var t=e.value,n=e.children;return r.createElement(i.a.Provider,{value:t},n)}},function(e,t,n){"use strict";var r=n(9),i=n(0),o=n(3),a=n(77),s=n(4),l=n.n(s);function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._getItem=function(e,t,n){if(!t)return null;for(var r=n-1,i=0;i<t.length;i++){var o=t[i],a=o.data,s=e.getItemCount(a);if(-1===r||r===s)return o;if(r<s)return e.getItem(a,r);r-=s+2}return null},t._keyExtractor=function(e,n){var r=t._subExtractor(n);return r&&r.key||String(n)},t._convertViewable=function(e){l()(null!=e.index,"Received a broken ViewToken");var n=t._subExtractor(e.index);if(!n)return null;var r=n.section.keyExtractor||t.props.keyExtractor;return f(f({},e),{},{index:n.index,key:r(e.item,n.index),section:n.section})},t._onViewableItemsChanged=function(e){var n=e.viewableItems,r=e.changed,i=t.props.onViewableItemsChanged;null!=i&&i({viewableItems:n.map(t._convertViewable,m(t)).filter(Boolean),changed:r.map(t._convertViewable,m(t)).filter(Boolean)})},t._renderItem=function(e){return function(n){var r=n.item,o=n.index,a=t._subExtractor(o);if(!a)return null;var s=a.index;if(null==s){var c=a.section;if(!0===a.header){var u=t.props.renderSectionHeader;return u?u({section:c}):null}var h=t.props.renderSectionFooter;return h?h({section:c}):null}var d=a.section.renderItem||t.props.renderItem,f=t._getSeparatorComponent(o,a,e);return l()(d,"no renderItem!"),i.createElement(b,{SeparatorComponent:f,LeadingSeparatorComponent:0===s?t.props.SectionSeparatorComponent:void 0,cellKey:a.key,index:s,item:r,leadingItem:a.leadingItem,leadingSection:a.leadingSection,onUpdateSeparator:t._onUpdateSeparator,prevCellKey:(t._subExtractor(o-1)||{}).key,ref:function(e){t._cellRefs[a.key]=e},renderItem:d,section:a.section,trailingItem:a.trailingItem,trailingSection:a.trailingSection,inverted:!!t.props.inverted})}},t._onUpdateSeparator=function(e,n){var r=t._cellRefs[e];r&&r.updateSeparatorProps(n)},t._cellRefs={},t._captureRef=function(e){t._listRef=e},t}g(t,e);var n=t.prototype;return n.scrollToLocation=function(e){for(var t=e.itemIndex,n=0;n<e.sectionIndex;n++)t+=this.props.getItemCount(this.props.sections[n].data)+2;var r=e.viewOffset||0;if(null!=this._listRef){if(e.itemIndex>0&&this.props.stickySectionHeadersEnabled)r+=this._listRef._getFrameMetricsApprox(t-e.itemIndex).length;var i=f(f({},e),{},{viewOffset:r,index:t});this._listRef.scrollToIndex(i)}},n.getListRef=function(){return this._listRef},n.render=function(){for(var e,t=this,n=this.props,r=(n.ItemSeparatorComponent,n.SectionSeparatorComponent,n.renderItem,n.renderSectionFooter,n.renderSectionHeader,n.sections,n.stickySectionHeadersEnabled,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["ItemSeparatorComponent","SectionSeparatorComponent","renderItem","renderSectionFooter","renderSectionHeader","sections","stickySectionHeadersEnabled"])),o=this.props.ListHeaderComponent?1:0,s=this.props.stickySectionHeadersEnabled?[]:void 0,l=0,h=u(this.props.sections);!(e=h()).done;){var d=e.value;null!=s&&s.push(l+o),l+=2,l+=this.props.getItemCount(d.data)}var f=this._renderItem(l);return i.createElement(a.a,c({},r,{keyExtractor:this._keyExtractor,stickyHeaderIndices:s,renderItem:f,data:this.props.sections,getItem:function(e,n){return t._getItem(t.props,e,n)},getItemCount:function(){return l},onViewableItemsChanged:this.props.onViewableItemsChanged?this._onViewableItemsChanged:void 0,ref:this._captureRef}))},n._subExtractor=function(e){for(var t=e,n=this.props,r=n.getItem,i=n.getItemCount,o=n.keyExtractor,a=n.sections,s=0;s<a.length;s++){var l=a[s],c=l.data,u=l.key||String(s);if(!((t-=1)>=i(c)+1))return-1===t?{section:l,key:u+":header",index:null,header:!0,trailingSection:a[s+1]}:t===i(c)?{section:l,key:u+":footer",index:null,header:!1,trailingSection:a[s+1]}:{section:l,key:u+":"+(l.keyExtractor||o)(r(c,t),t),index:t,leadingItem:r(c,t-1),leadingSection:a[s-1],trailingItem:r(c,t+1),trailingSection:a[s+1]};t-=i(c)+1}},n._getSeparatorComponent=function(e,t,n){if(!(t=t||this._subExtractor(e)))return null;var r=t.section.ItemSeparatorComponent||this.props.ItemSeparatorComponent,i=this.props.SectionSeparatorComponent,o=e===n-1,a=t.index===this.props.getItemCount(t.section.data)-1;return i&&a?i:!r||a||o?null:r},t}(i.PureComponent);y.defaultProps=f(f({},a.a.defaultProps),{},{data:[]});var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.trailingItem,trailingSection:t.props.trailingSection},leadingSeparatorProps:{highlighted:!1,leadingItem:t.props.leadingItem,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.item,trailingSection:t.props.trailingSection}},t._separators={highlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!0})}))},unhighlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!1})}))},updateProps:function(e,n){var r=t.props,i=r.LeadingSeparatorComponent,o=r.cellKey,a=r.prevCellKey;"leading"===e&&null!=i?t.setState((function(e){return{leadingSeparatorProps:f(f({},e.leadingSeparatorProps),n)}})):t.props.onUpdateSeparator("leading"===e&&a||o,n)}},t}g(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:f(f({},t.separatorProps),{},{leadingItem:e.item,leadingSection:e.leadingSection,section:e.section,trailingItem:e.trailingItem,trailingSection:e.trailingSection}),leadingSeparatorProps:f(f({},t.leadingSeparatorProps),{},{leadingItem:e.leadingItem,leadingSection:e.leadingSection,section:e.section,trailingItem:e.item,trailingSection:e.trailingSection})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:f(f({},t.separatorProps),e)}}))},n.render=function(){var e=this.props,t=e.LeadingSeparatorComponent,n=e.SeparatorComponent,r=e.item,a=e.index,s=e.section,l=e.inverted,c=this.props.renderItem({item:r,index:a,section:s,separators:this._separators}),u=null!=t&&i.createElement(t,this.state.leadingSeparatorProps),h=null!=n&&i.createElement(n,this.state.separatorProps);return u||h?i.createElement(o.a,null,!1===l?u:h,c,!1===l?h:u):c},t}(i.Component),w=y;function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=A(A({},w.defaultProps),{},{stickySectionHeadersEnabled:"ios"===r.a.OS}),T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._captureRef=function(e){t._wrapperListRef=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var o=r.prototype;return o.scrollToLocation=function(e){null!=this._wrapperListRef&&this._wrapperListRef.scrollToLocation(e)},o.recordInteraction=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.recordInteraction()},o.flashScrollIndicators=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.flashScrollIndicators()},o.getScrollResponder=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollResponder()},o.getScrollableNode=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollableNode()},o.setNativeProps=function(e){var t=this._wrapperListRef&&this._wrapperListRef.getListRef();t&&t.setNativeProps(e)},o.render=function(){return i.createElement(w,x({},this.props,{ref:this._captureRef,getItemCount:function(e){return e.length},getItem:function(e,t){return e[t]}}))},r}(i.PureComponent);T.defaultProps=M;var C=T;t.a=C},function(t,n,r){"use strict";r.d(n,"a",(function(){return m}));var i=r(8),o=r.n(i),a=r(7),s=r.n(a),l=r(0),c=r(75),u=r(41),h=l.createContext(void 0),d=function(){var e=0,t=[],n=[],r=function(){n.forEach((function(e){var t=e.cb;e.cb=function(){return t(!0)}}))};return{get index(){var e,n=null===(e=window.history.state)||void 0===e?void 0:e.id;if(n){var r=t.findIndex((function(e){return e.id===n}));return r>-1?r:0}return 0},get:function(e){return t[e]},backIndex:function(n){for(var r=n.path,i=e-1;i>=0;i--){if(t[i].path===r)return i}return-1},push:function(n){var i=n.path,o=n.state;r();var a=Object(u.a)();(t=t.slice(0,e+1)).push({path:i,state:o,id:a}),e=t.length-1,window.history.pushState({id:a},"",i)},replace:function(n){var i,o,a=n.path,s=n.state;r();var l=null!==(i=null===(o=window.history.state)||void 0===o?void 0:o.id)&&void 0!==i?i:Object(u.a)();t.length?t[e]={path:a,state:s,id:l}:t.push({path:a,state:s,id:l}),window.history.replaceState({id:l},"",a)},go:function(i){if(r(),i>0?i=Math.min(i,t.length-1):i<0&&(i=e+i<0?-e:i),0!==i)return e+=i,new Promise((function(e,t){var r=function(n){if(clearTimeout(o),n)t(new Error("History was changed during navigation."));else{var r=window.document.title;window.document.title="",window.document.title=r,e()}};n.push({ref:r,cb:r});var o=setTimeout((function(){var e=n.findIndex((function(e){return e.ref===r}));e>-1&&(n[e].cb(),n.splice(e,1))}),100);window.addEventListener("popstate",(function e(){var t=n.pop();window.removeEventListener("popstate",e),null===t||void 0===t||t.cb()})),window.history.go(i)}))},listen:function(e){var t=function(){n.length||e()};return window.addEventListener("popstate",t),function(){return window.removeEventListener("popstate",t)}}}},f=function e(t,n){if(void 0===t||void 0===n||t.key!==n.key)return[void 0,void 0];var r=t.history?t.history.length:t.routes.length,i=n.history?n.history.length:n.routes.length,o=t.routes[t.index],a=n.routes[n.index],s=o.state,l=a.state;return r!==i||o.key!==a.key||void 0===s||void 0===l||s.key!==l.key?[t,n]:e(s,l)},p=!1;function m(t,n){var r=n.enabled,i=void 0===r||r,a=n.config,u=n.getStateFromPath,m=void 0===u?c.getStateFromPath:u,g=n.getPathFromState,v=void 0===g?c.getPathFromState:g,y=n.getActionFromState,b=void 0===y?c.getActionFromState:y;l.useEffect((function(){if(!1!==i&&p)throw new Error(["Looks like you have configured linking in multiple places. This is likely an error since URL integration should only be handled in one place to avoid conflicts. Make sure that:","- You are not using both 'linking' prop and 'useLinking'","- You don't have 'useLinking' in multiple components"].join("\n").trim());return p=!1!==i,function(){p=!1}}));var w=l.useState(d),x=o()(w,1)[0],_=l.useRef(i),E=l.useRef(a),A=l.useRef(m),S=l.useRef(b),M=l.useRef(v);l.useEffect((function(){_.current=i,E.current=a,A.current=m,S.current=b,M.current=v}));var T=l.useContext(h),C=l.useCallback((function(){var e;if(_.current){var t,n=null!==(t=null===T||void 0===T?void 0:T.location)&&void 0!==t?t:"undefined"!==typeof window?window.location:void 0,r=n?n.pathname+n.search:void 0;r&&(e=A.current(r,E.current))}var i={then:function(t){return Promise.resolve(t?t(e):e)},catch:function(){return i}};return i}),[]),O=l.useRef(void 0),R=l.useRef(void 0),k=l.useRef(void 0);return l.useEffect((function(){return O.current=x.index,x.listen((function(){var n,r=t.current;if(r&&i){var o=location.pathname+location.search,a=x.index,s=null!==(n=O.current)&&void 0!==n?n:0;O.current=a,k.current=o;var l=x.get(a);if((null===l||void 0===l?void 0:l.path)===o&&null!==l&&void 0!==l&&l.state)r.resetRoot(l.state);else{var c=A.current(o,E.current);if(c){var u=r.getRootState();if(c.routes.some((function(e){return!(null!==u&&void 0!==u&&u.routeNames.includes(e.name))})))return void console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.");if(a>s){var h=S.current(c,E.current);if(void 0!==h)try{r.dispatch(h)}catch(e){console.warn("An error occurred when trying to handle the link '".concat(o,"': ").concat(e.message))}else r.resetRoot(c)}else r.resetRoot(c)}else r.resetRoot(c)}}}))}),[i,x,t]),l.useEffect((function(){var e;if(i){if(t.current){var n=t.current.getRootState();if(n){var r=M.current(n,E.current);void 0===R.current&&(R.current=n),x.replace({path:r,state:n})}}return null===(e=t.current)||void 0===e?void 0:e.addListener("state",function(e){var t=!1,n=[];return function r(){var i;return s.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!t){o.next=4;break}return n.unshift(r),o.abrupt("return");case 4:return t=!0,o.next=7,s.a.awrap(e());case 7:return o.prev=7,t=!1,n.length&&(null===(i=n.pop())||void 0===i||i()),o.finish(7);case 11:case"end":return o.stop()}}),null,null,[[0,,7,11]],Promise)}}((function(){var e,n,r,a,l,c,u,h,d,p,m,g;return s.a.async((function(v){for(;;)switch(v.prev=v.next){case 0:if((e=t.current)&&i){v.next=3;break}return v.abrupt("return");case 3:if(n=R.current,r=e.getRootState(),a=k.current,l=M.current(r,E.current),R.current=r,k.current=void 0,c=f(n,r),u=o()(c,2),h=u[0],d=u[1],!h||!d||l===a){v.next=37;break}if(!((p=(d.history?d.history.length:d.routes.length)-(h.history?h.history.length:h.routes.length))>0)){v.next=16;break}x.push({path:l,state:r}),v.next=35;break;case 16:if(!(p<0)){v.next=34;break}if(m=x.backIndex({path:l}),g=x.index,v.prev=19,!(-1!==m&&m<g)){v.next=25;break}return v.next=23,s.a.awrap(x.go(m-g));case 23:v.next=27;break;case 25:return v.next=27,s.a.awrap(x.go(p));case 27:x.replace({path:l,state:r}),v.next=32;break;case 30:v.prev=30,v.t0=v.catch(19);case 32:v.next=35;break;case 34:x.replace({path:l,state:r});case 35:v.next=38;break;case 37:x.replace({path:l,state:r});case 38:case"end":return v.stop()}}),null,null,[[19,30]],Promise)})))}})),{getInitialState:C}}},function(e,t,n){"use strict";var r=n(96),i=n(65),o=n(5),a=n(94),s=n(42);var l={},c=Object.prototype.hasOwnProperty,u=Array.isArray,h=/[A-Z]/g;function d(e){return"-"+e.toLowerCase()}function f(e){return u(e)?e.join(" "):e}var p=i.a.create({reset:{backgroundColor:"transparent",color:"inherit",font:"inherit",listStyle:"none",margin:0,textAlign:"inherit",textDecoration:"none"},cursor:{cursor:"pointer"}},s.c.classicReset),m=o.a.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}});t.a=function(e,t){t||(t=l);var n=t,i=n.accessibilityActiveDescendant,s=n.accessibilityAtomic,u=n.accessibilityAutoComplete,g=n.accessibilityBusy,v=n.accessibilityChecked,y=n.accessibilityColumnCount,b=n.accessibilityColumnIndex,w=n.accessibilityColumnSpan,x=n.accessibilityControls,_=n.accessibilityCurrent,E=n.accessibilityDescribedBy,A=n.accessibilityDetails,S=n.accessibilityDisabled,M=n.accessibilityErrorMessage,T=n.accessibilityExpanded,C=n.accessibilityFlowTo,O=n.accessibilityHasPopup,R=n.accessibilityHidden,k=n.accessibilityInvalid,P=n.accessibilityKeyShortcuts,L=n.accessibilityLabel,D=n.accessibilityLabelledBy,I=n.accessibilityLevel,N=n.accessibilityLiveRegion,j=n.accessibilityModal,B=n.accessibilityMultiline,F=n.accessibilityMultiSelectable,z=n.accessibilityOrientation,H=n.accessibilityOwns,U=n.accessibilityPlaceholder,V=n.accessibilityPosInSet,G=n.accessibilityPressed,W=n.accessibilityReadOnly,q=n.accessibilityRequired,X=(n.accessibilityRole,n.accessibilityRoleDescription),Y=n.accessibilityRowCount,K=n.accessibilityRowIndex,Q=n.accessibilityRowSpan,Z=n.accessibilitySelected,J=n.accessibilitySetSize,$=n.accessibilitySort,ee=n.accessibilityValueMax,te=n.accessibilityValueMin,ne=n.accessibilityValueNow,re=n.accessibilityValueText,ie=n.classList,oe=n.dataSet,ae=n.focusable,se=n.nativeID,le=n.pointerEvents,ce=n.style,ue=n.testID,he=n.accessible,de=n.accessibilityState,fe=n.accessibilityValue,pe=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","classList","dataSet","focusable","nativeID","pointerEvents","style","testID","accessible","accessibilityState","accessibilityValue"]),me=null!=de&&!0===de.disabled||S,ge=r.a.propsToAriaRole(t),ve="link"===ge||"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e||null!=pe.contentEditable;if(null!=de)for(var ye in de){var be=de[ye];null!=be&&("disabled"===ye||"hidden"===ye?!0===be&&(pe["aria-"+ye]=be,pe[ye]=be):pe["aria-"+ye]=be)}if(null!=fe)for(var we in fe){var xe=fe[we];null!=xe&&(pe["aria-value"+we]=xe)}if(null!=i&&(pe["aria-activedescendant"]=i),null!=s&&(pe["aria-atomic"]=s),null!=u&&(pe["aria-autocomplete"]=u),null!=g&&(pe["aria-busy"]=g),null!=v&&(pe["aria-checked"]=v),null!=y&&(pe["aria-colcount"]=y),null!=b&&(pe["aria-colindex"]=b),null!=w&&(pe["aria-colspan"]=w),null!=x&&(pe["aria-controls"]=f(x)),null!=_&&(pe["aria-current"]=_),null!=E&&(pe["aria-describedby"]=f(E)),null!=A&&(pe["aria-details"]=A),!0===me&&(pe["aria-disabled"]=!0,"button"!==e&&"form"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e||(pe.disabled=!0)),null!=M&&(pe["aria-errormessage"]=M),null!=T&&(pe["aria-expanded"]=T),null!=C&&(pe["aria-flowto"]=f(C)),null!=O&&(pe["aria-haspopup"]=O),!0===R&&(pe["aria-hidden"]=R),null!=k&&(pe["aria-invalid"]=k),null!=P&&Array.isArray(P)&&(pe["aria-keyshortcuts"]=P.join(" ")),null!=L&&(pe["aria-label"]=L),null!=D&&(pe["aria-labelledby"]=f(D)),null!=I&&(pe["aria-level"]=I),null!=N&&(pe["aria-live"]="none"===N?"off":N),null!=j&&(pe["aria-modal"]=j),null!=B&&(pe["aria-multiline"]=B),null!=F&&(pe["aria-multiselectable"]=F),null!=z&&(pe["aria-orientation"]=z),null!=H&&(pe["aria-owns"]=f(H)),null!=U&&(pe["aria-placeholder"]=U),null!=V&&(pe["aria-posinset"]=V),null!=G&&(pe["aria-pressed"]=G),null!=W&&(pe["aria-readonly"]=W,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.readOnly=!0)),null!=q&&(pe["aria-required"]=q,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.required=!0)),null!=ge&&(pe.role="none"===ge?"presentation":ge),null!=X&&(pe["aria-roledescription"]=X),null!=Y&&(pe["aria-rowcount"]=Y),null!=K&&(pe["aria-rowindex"]=K),null!=Q&&(pe["aria-rowspan"]=Q),null!=Z&&(pe["aria-selected"]=Z),null!=J&&(pe["aria-setsize"]=J),null!=$&&(pe["aria-sort"]=$),null!=ee&&(pe["aria-valuemax"]=ee),null!=te&&(pe["aria-valuemin"]=te),null!=ne&&(pe["aria-valuenow"]=ne),null!=re&&(pe["aria-valuetext"]=re),null!=oe)for(var _e in oe)if(c.call(oe,_e)){var Ee=_e.replace(h,d),Ae=oe[_e];null!=Ae&&(pe["data-"+Ee]=Ae)}var Se=null!=ae?ae:he;!1===Se&&(pe.tabIndex="-1"),"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e?!1!==Se&&!0!==S||(pe.tabIndex="-1"):"button"===ge||"checkbox"===ge||"link"===ge||"menuitem"===ge||"radio"===ge||"textbox"===ge||"switch"===ge?!1!==Se&&(pe.tabIndex="0"):!0===Se&&(pe.tabIndex="0");var Me=o.a.compose(le&&m[le],ce),Te=("button"===ge||"link"===ge)&&!me,Ce=[("a"===e||"button"===e||"li"===e||"ul"===e||"heading"===ge)&&p.reset,Te&&p.cursor,ie],Oe=a.a.resolve(Me,Ce),Re=Oe.className,ke=Oe.style;if(null!=Re&&""!==Re&&(pe.className=Re),ke&&(pe.style=ke),null!=se&&(pe.id=se),null!=ue&&(pe["data-testid"]=ue),ve||"button"===ge||"menuitem"===ge||!0===Se&&!me){var Pe=pe.onClick;if(null!=Pe)if(me)pe.onClick=function(e){e.stopPropagation()};else if(!ve){var Le=pe.onKeyDown;pe.onKeyDown=function(e){var t=e.key,n=e.repeat,r=" "===t||"Spacebar"===t,i="button"===ge||"menuitem"===ge;null!=Le&&Le(e),n||"Enter"!==t?r&&i&&(n||Pe(e),e.preventDefault()):Pe(e)}}}return pe}},function(e,t,n){"use strict";var r=n(145),i=n(50),o={height:0,width:0};t.a=function(e){var t=e.shadowColor,n=e.shadowOffset,a=e.shadowOpacity,s=e.shadowRadius,l=n||o,c=l.height,u=l.width,h=Object(i.a)(u),d=Object(i.a)(c),f=Object(i.a)(s||0),p=Object(r.a)(t||"black",a);if(null!=p&&null!=h&&null!=d&&null!=f)return h+" "+d+" "+f+" "+p}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(0);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){null!=t&&("function"!==typeof t?"object"!==typeof t?console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(t)):t.current=e:t(e))}))}}},function(e,t,n){"use strict";var r=n(61);t.a=function(){r.a.blurTextInput(r.a.currentlyFocusedField())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(4);function r(e){return null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(9),i=n(70),o=n(4),a=n.n(o),s=function(){function e(e){"ios"===r.a.OS&&(a()(null!=e,"`new NativeEventEmitter()` requires a non-null argument."),this._nativeModule=e)}var t=e.prototype;return t.addListener=function(e,t,n){var r,o=this;null==(r=this._nativeModule)||r.addListener(e);var a=i.a.addListener(e,t,n);return{remove:function(){var e;null!=a&&(null==(e=o._nativeModule)||e.removeListeners(1),a.remove(),a=null)}}},t.removeListener=function(e,t){var n;null==(n=this._nativeModule)||n.removeListeners(1),i.a.removeListener(e,t)},t.emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.a.emit.apply(i.a,[e].concat(n))},t.removeAllListeners=function(e){var t;a()(null!=e,"`NativeEventEmitter.removeAllListener()` requires a non-null argument."),null==(t=this._nativeModule)||t.removeListeners(this.listenerCount(e)),i.a.removeAllListeners(e)},t.listenerCount=function(e){return i.a.listenerCount(e)},e}()},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext({scheduleUpdate:function(){throw new Error("Couldn't find a schedule context.")},flushUpdates:function(){throw new Error("Couldn't find a schedule context.")}});function o(e){var t=r.useContext(i),n=t.scheduleUpdate,o=t.flushUpdates;n(e),r.useEffect(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({action:[],focus:[]}).current,t=r.useCallback((function(t,n){return e[t].push(n),function(){var r=e[t].indexOf(n);e[t].splice(r,1)}}),[e]);return{listeners:e,addListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({getState:{},beforeRemove:{}}).current,t=r.useCallback((function(t,n,r){return e[t][n]=r,function(){e[t][n]=void 0}}),[e]);return{keyedListeners:e,addKeyedListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(69),o=n(40);function a(e){var t=e.key,n=e.options,a=e.navigation,s=r.useRef(n),l=r.useRef({}),c=r.useContext(o.a).onOptionsChange,u=r.useContext(i.a).addOptionsGetter,h=r.useCallback((function(){var e,t,n=null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e,r=Object.keys(l.current).length;n&&!r&&c(null!==(t=s.current)&&void 0!==t?t:{})}),[a,c]);r.useEffect((function(){return s.current=n,h(),null===a||void 0===a?void 0:a.addListener("focus",h)}),[a,n,h]);var d=r.useCallback((function(){for(var e in l.current)if(l.current.hasOwnProperty(e)){var t,n,r=null===(t=(n=l.current)[e])||void 0===t?void 0:t.call(n);if(null!==r)return r}return null}),[]),f=r.useCallback((function(){var e;if(!(null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e))return null;var t=d();return null!==t?t:s.current}),[a,d]);return r.useEffect((function(){return null===u||void 0===u?void 0:u(t,f)}),[f,u,t]),{addOptionsGetter:r.useCallback((function(e,t){return l.current[e]=t,h(),function(){delete l.current[e],h()}}),[h]),getCurrentOptions:f}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(20),i=n.n(r),o=n(0);function a(e){var t=o.useRef(e);o.useEffect((function(){t.current=e}));var n=o.useRef({}),r=o.useCallback((function(e){var t=function(t,r){var i=n.current[t]?n.current[t][e]:void 0;if(i){var o=i.indexOf(r);i.splice(o,1)}};return{addListener:function(r,i){return n.current[r]=n.current[r]||{},n.current[r][e]=n.current[r][e]||[],n.current[r][e].push(i),function(){return t(r,i)}},removeListener:t}}),[]),a=o.useCallback((function(e){var r,o,a,s=e.type,l=e.data,c=e.target,u=e.canPreventDefault,h=n.current[s]||{},d=void 0!==c?null===(o=h[c])||void 0===o?void 0:o.slice():(r=[]).concat.apply(r,i()(Object.keys(h).map((function(e){return h[e]})))).filter((function(e,t,n){return n.lastIndexOf(e)===t})),f={get type(){return s}};if(void 0!==c&&Object.defineProperty(f,"target",{enumerable:!0,get:function(){return c}}),void 0!==l&&Object.defineProperty(f,"data",{enumerable:!0,get:function(){return l}}),u){var p=!1;Object.defineProperties(f,{defaultPrevented:{enumerable:!0,get:function(){return p}},preventDefault:{enumerable:!0,value:function(){p=!0}}})}return null===(a=t.current)||void 0===a||a.call(t,f),null===d||void 0===d||d.forEach((function(e){return e(f)})),f}),[]);return o.useMemo((function(){return{create:r,emit:a}}),[r,a])}},function(e,t,n){"use strict";function r(e){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(8),i=n(19),o=n(20);function a(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=n(197),c=n(198),u=n(199),h=n(200);function d(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?l(e):encodeURIComponent(e):e}function p(e,t){return t.decode?c(e):e}function m(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){var t=(e=m(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function v(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function y(e,t){d((t=i({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&p(n,e).includes(e.arrayFormatSeparator);n=o?p(n,e):n;var a=i||o?n.split(e.arrayFormatSeparator).map((function(t){return p(t,e)})):null===n?n:p(n,e);r[t]=a};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),o=Object.create(null);if("string"!==typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;for(var s,l=a(e.split("&"));!(s=l()).done;){var c=s.value;if(""!==c){var h=u(t.decode?c.replace(/\+/g," "):c,"="),f=r(h,2),m=f[0],g=f[1];g=void 0===g?null:["comma","separator"].includes(t.arrayFormat)?g:p(g,t),n(p(m,t),g,o)}}for(var y=0,b=Object.keys(o);y<b.length;y++){var w=b[y],x=o[w];if("object"===typeof x&&null!==x)for(var _=0,E=Object.keys(x);_<E.length;_++){var A=E[_];x[A]=v(x[A],t)}else o[w]=v(x,t)}return!1===t.sort?o:(!0===t.sort?Object.keys(o).sort():Object.keys(o).sort(t.sort)).reduce((function(e,t){var n=o[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))}t.extract=g,t.parse=y,t.stringify=function(e,t){if(!e)return"";d((t=i({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);for(var n=function(n){return t.skipNull&&function(e){return null===e||void 0===e}(e[n])||t.skipEmptyString&&""===e[n]},r=function(e){switch(e.arrayFormat){case"index":return function(t){return function(n,r){var i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[",i,"]"].join("")]:[[f(t,e),"[",f(i,e),"]=",f(r,e)].join("")])}};case"bracket":return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[]"].join("")]:[[f(t,e),"[]=",f(r,e)].join("")])}};case"comma":case"separator":return function(t){return function(n,r){return null===r||void 0===r||0===r.length?n:0===n.length?[[f(t,e),"=",f(r,e)].join("")]:[[n,f(r,e)].join(e.arrayFormatSeparator)]}};default:return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[f(t,e)]:[[f(t,e),"=",f(r,e)].join("")])}}}}(t),a={},s=0,l=Object.keys(e);s<l.length;s++){var c=l[s];n(c)||(a[c]=e[c])}var u=Object.keys(a);return!1!==t.sort&&u.sort(t.sort),u.map((function(n){var i=e[n];return void 0===i?"":null===i?f(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):f(n,t)+"="+f(i,t)})).filter((function(e){return e.length>0})).join("&")},t.parseUrl=function(e,t){t=i({decode:!0},t);var n=u(e,"#"),o=r(n,2),a=o[0],s=o[1];return i({url:a.split("?")[0]||"",query:y(g(e),t)},t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:p(s,t)}:{})},t.stringifyUrl=function(e,n){n=i({encode:!0,strict:!0},n);var r=m(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),s=i(a,e.query),l=t.stringify(s,n);l&&(l="?"+l);var c=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+f(e.fragmentIdentifier,n)),""+r+l+c},t.pick=function(e,n,r){r=i({parseFragmentIdentifier:!0},r);var o=t.parseUrl(e,r),a=o.url,s=o.query,l=o.fragmentIdentifier;return t.stringifyUrl({url:a,query:h(s,n),fragmentIdentifier:l},r)},t.exclude=function(e,n,r){var i=Array.isArray(n)?function(e){return!n.includes(e)}:function(e,t){return!n(e,t)};return t.pick(e,i,r)}},function(e,t,n){"use strict";function r(e){var t=!1;if(e&&(t=Object.keys(e).some((function(e){return"screens"!==e&&"initialRouteName"!==e})))&&(e.hasOwnProperty("screens")||e.hasOwnProperty("initialRouteName")))throw new Error("Found invalid keys in the configuration object. See https://reactnavigation.org/docs/configuring-links/ for more details on the shape of the configuration object.");return t?[t,{screens:e}]:[t,e]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(88),o=r.createContext(i.a);o.displayName="ThemeContext",t.a=o},function(e,t,n){"use strict";var r=function(e){return"currentcolor"===e||"currentColor"===e||"inherit"===e||0===e.indexOf("var(")},i=n(115);t.a=function(e,t){if(void 0===t&&(t=1),null!=e){if("string"===typeof e&&r(e))return e;var n=Object(i.a)(e);if(null!=n)return"rgba("+(n>>16&255)+","+(n>>8&255)+","+(255&n)+","+((n>>24&255)/255*t).toFixed(2)+")"}}},function(t,n,r){"use strict";r.r(n);var i=r(2),o=r(84),a=r(464),s=r(465),l=r(466),c=r(467),u=r(245),h=r.n(u),d=r(246),f=r.n(d),p=r(53),m=r(11),g=r(461),v=r(462),y=r(107);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){if(e){if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,o=n.dataBindAttr,a=void 0===o?"__data":o,s=n.idAccessor,l=n.purge,c=void 0!==l&&l,u=function(e){return e.hasOwnProperty(a)},h=t.filter((function(e){return!u(e)})),d=t.filter(u).map((function(e){return e[a]})),f=c?{enter:e,exit:d,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=Object(y.a)(e,n,!1),o=Object(y.a)(t,n,!1),a=Object.assign({},i,o);Object.entries(a).forEach((function(e){var t=_(e,2),n=t[0],a=t[1],s=i.hasOwnProperty(n)?o.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],o[n]]:a)}))}else{var s=new Set(e),l=new Set(t);new Set([].concat(E(s),E(l))).forEach((function(e){var t=s.has(e)?l.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(d,e,s);return f.update=f.update.map((function(e){var t=_(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][a]=r),r})),f.exit=f.exit.concat(h.map((function(e){return w({},i,e)}))),f}var T=function(e,t,n,r,i){var o=i.createObj,a=void 0===o?function(e){return{}}:o,s=i.updateObj,l=void 0===s?function(e,t){}:s,c=i.exitObj,u=void 0===c?function(e){}:c,h=i.objBindAttr,d=void 0===h?"__obj":h,f=i.dataBindAttr,p=void 0===f?"__data":f,m=x(i,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),g=M(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:d,dataBindAttr:p},m)),v=g.enter,y=g.update;g.exit.forEach((function(e){var t=e[d];delete e[d],u(t),r(t)}));var _=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[p]=e,e[d]=n,t.push(n))})),t}(v);!function(e){e.forEach((function(e){var t=e[d];t&&(t[p]=e,l(t,e))}))}([].concat(E(v),E(y))),_.forEach(n)},C=r(475),O=r(477),R=r(108),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return(D="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function H(e,t,n){return(H=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&F(i,n.prototype),i}).apply(null,arguments)}function U(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?V(e):t}function W(e){var t=z();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return G(this,n)}}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"===typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q=function e(t){t.geometry&&t.geometry.dispose(),t.material&&function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())}(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},Z=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Q(t)}},J=["objFilter"];function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,i=void 0===r?function(){return!0}:r,o=U(n,J);return T(e,t.children.filter(i),(function(e){return t.add(e)}),(function(e){t.remove(e),Z(e)}),L({objBindAttr:"__threeObj"},o))}var ee=function(e){return isNaN(e)?parseInt(k()(e).toHex(),16):e},te=function(e){return isNaN(e)?k()(e).getAlpha():1},ne=Object(C.a)(O.a);function re(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=ne(t(e))}))}var ie=window.THREE?window.THREE:{Group:i.n,Mesh:i.t,MeshLambertMaterial:i.v,Color:i.g,BufferGeometry:i.e,BufferAttribute:i.d,Matrix4:i.s,Vector3:i.Q,SphereBufferGeometry:i.F,CylinderBufferGeometry:i.j,TubeBufferGeometry:i.N,ConeBufferGeometry:i.h,Line:i.o,LineBasicMaterial:i.p,QuadraticBezierCurve3:i.z,CubicBezierCurve3:i.i,Box3:i.c},oe={graph:h.a,forcelayout:f.a},ae=(new ie.BufferGeometry).setAttribute?"setAttribute":"addAttribute",se=(new ie.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix";var le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){j(i,t);var r=W(i);function i(){var t;I(this,i);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e().apply(void 0,[].concat(X(n?[V(t)]:[]),a)),t}return i}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(Object(p.a)({props:{jsonUrl:{onChange:function(e,t){var n=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then((function(e){return e.json()})).then((function(e){t.fetchingJson=!1,t.onFinishLoading(e),n.graphData(e)})))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var n=t.d3ForceLayout.force("charge");function r(e,t){e.forEach((function(e){delete e[t],delete e["v".concat(t)]}))}n&&n.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());e.graphData.nodes.forEach((function(n){var r=n.__threeObj;if(r){var i=t?n:e.layout.getNodePosition(n[e.nodeId]);r.position.x=i.x,r.position.y=i.y||0,r.position.z=i.z||0}}));var n=Object(m.default)(e.linkWidth),r=Object(m.default)(e.linkCurvature),i=Object(m.default)(e.linkCurveRotation),o=Object(m.default)(e.linkThreeObjectExtend);e.graphData.links.forEach((function(a){var s=a.__lineObj;if(s){var l=t?a:e.layout.getLinkPosition(e.layout.graph.getLink(a.source,a.target).id),c=l[t?"source":"from"],u=l[t?"target":"to"];if(c&&u&&c.hasOwnProperty("x")&&u.hasOwnProperty("x")){!function(n){var o=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),a=o[t?"source":"from"],s=o[t?"target":"to"];if(a&&s&&a.hasOwnProperty("x")&&s.hasOwnProperty("x")){var l=r(n);if(l){var c,u=new ie.Vector3(a.x,a.y||0,a.z||0),h=new ie.Vector3(s.x,s.y||0,s.z||0),d=u.distanceTo(h),f=i(n);if(d>0){var p=s.x-a.x,m=s.y-a.y||0,g=(new ie.Vector3).subVectors(h,u),v=g.clone().multiplyScalar(l).cross(0!==p||0!==m?new ie.Vector3(0,0,1):new ie.Vector3(0,1,0)).applyAxisAngle(g.normalize(),f).add((new ie.Vector3).addVectors(u,h).divideScalar(2));c=new ie.QuadraticBezierCurve3(u,v,h)}else{var y=70*l,b=-f,w=b+Math.PI/2;c=new ie.CubicBezierCurve3(u,new ie.Vector3(y*Math.cos(w),y*Math.sin(w),0).add(u),new ie.Vector3(y*Math.cos(b),y*Math.sin(b),0).add(u),h)}n.__curve=c}else n.__curve=null}}(a);var h=o(a);if(!e.linkPositionUpdate||!e.linkPositionUpdate(h?s.children[1]:s,{start:{x:c.x,y:c.y,z:c.z},end:{x:u.x,y:u.y,z:u.z}},a)||h){var d=a.__curve,f=s.children.length?s.children[0]:s;if("Line"===f.type){if(d)f.geometry.setFromPoints(d.getPoints(30));else{var p=f.geometry.getAttribute("position");p&&p.array&&6===p.array.length||f.geometry[ae]("position",p=new ie.BufferAttribute(new Float32Array(6),3)),p.array[0]=c.x,p.array[1]=c.y||0,p.array[2]=c.z||0,p.array[3]=u.x,p.array[4]=u.y||0,p.array[5]=u.z||0,p.needsUpdate=!0}f.geometry.computeBoundingSphere()}else if("Mesh"===f.type)if(d){f.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(f.position.set(0,0,0),f.rotation.set(0,0,0),f.scale.set(1,1,1));var m=Math.ceil(10*n(a))/10/2,g=new ie.TubeBufferGeometry(d,30,m,e.linkResolution,!1);f.geometry.dispose(),f.geometry=g}else{if(!f.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var v=Math.ceil(10*n(a))/10/2,y=new ie.CylinderBufferGeometry(v,v,1,e.linkResolution,1,!1);y[se]((new ie.Matrix4).makeTranslation(0,.5,0)),y[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),f.geometry.dispose(),f.geometry=y}var b=new ie.Vector3(c.x,c.y||0,c.z||0),w=new ie.Vector3(u.x,u.y||0,u.z||0),x=b.distanceTo(w);f.position.x=b.x,f.position.y=b.y,f.position.z=b.z,f.scale.z=x,f.parent.localToWorld(w),f.lookAt(w)}}}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalArrowRelPos),r=Object(m.default)(e.linkDirectionalArrowLength),i=Object(m.default)(e.nodeVal);e.graphData.links.forEach((function(o){var a=o.__arrowObj;if(a){var s=t?o:e.layout.getLinkPosition(e.layout.graph.getLink(o.source,o.target).id),l=s[t?"source":"from"],c=s[t?"target":"to"];if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,i(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,i(c)||1))*e.nodeRelSize,d=r(o),f=n(o),p=o.__curve?function(e){return o.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",l,c,e),y:t("y",l,c,e),z:t("z",l,c,e)}},m=o.__curve?o.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((c[e]||0)-(l[e]||0),2)})).reduce((function(e,t){return e+t}),0)),g=u+d+(m-u-h-d)*f,v=p(g/m),y=p((g-d)/m);["x","y","z"].forEach((function(e){return a.position[e]=y[e]}));var b=H(ie.Vector3,X(["x","y","z"].map((function(e){return v[e]}))));a.parent.localToWorld(b),a.lookAt(b)}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalParticleSpeed);e.graphData.links.forEach((function(r){var i=r.__photonsObj&&r.__photonsObj.children,o=r.__singleHopPhotonsObj&&r.__singleHopPhotonsObj.children;if(o&&o.length||i&&i.length){var a=t?r:e.layout.getLinkPosition(e.layout.graph.getLink(r.source,r.target).id),s=a[t?"source":"from"],l=a[t?"target":"to"];if(s&&l&&s.hasOwnProperty("x")&&l.hasOwnProperty("x")){var c=n(r),u=r.__curve?function(e){return r.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,l,e),y:t("y",s,l,e),z:t("z",s,l,e)}};[].concat(X(i||[]),X(o||[])).forEach((function(e,t){var n="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=n?0:t/i.length),e.__progressRatio+=c,e.__progressRatio>=1){if(n)return e.parent.remove(e),void Z(e);e.__progressRatio=e.__progressRatio%1}var r=e.__progressRatio,o=u(r);["x","y","z"].forEach((function(t){return e.position[t]=o[t]}))}))}}}))}(),this},emitParticle:function(e,t){if(t){if(!t.__singleHopPhotonsObj){var n=new ie.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=Object(m.default)(e.linkDirectionalParticleWidth),i=Math.ceil(10*r(t))/10/2,o=e.linkDirectionalParticleResolution,a=new ie.SphereBufferGeometry(i,o,o),s=Object(m.default)(e.linkColor),l=Object(m.default)(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",c=new ie.Color(ee(l)),u=3*e.linkOpacity,h=new ie.MeshLambertMaterial({color:c,transparent:!0,opacity:u});t.__singleHopPhotonsObj.add(new ie.Mesh(a,h))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var i=new ie.Box3;i.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(i)}return r.concat.apply(r,X((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,X(["x","y","z"].map((function(e){return N({},e,[Object(g.a)(n,(function(t){return t.min[e]})),Object(v.a)(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:Object(o.a)().force("link",Object(a.a)()).force("charge",Object(s.a)()).force("center",Object(l.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&re(e.graphData.nodes,Object(m.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&re(e.graphData.links,Object(m.default)(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=Object(m.default)(e.nodeThreeObject),i=Object(m.default)(e.nodeThreeObjectExtend),o=Object(m.default)(e.nodeVal),a=Object(m.default)(e.nodeColor),s=Object(m.default)(e.nodeVisibility),l={},u={};$(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,o=r(t),a=i(t);return o&&e.nodeThreeObject===o&&(o=o.clone()),o&&!a?n=o:((n=new ie.Mesh).__graphDefaultObj=!0,o&&a&&n.add(o)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=o(n)||1,i=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===i&&t.geometry.parameters.widthSegments===s||(l.hasOwnProperty(r)||(l[r]=new ie.SphereBufferGeometry(i,s,s)),t.geometry.dispose(),t.geometry=l[r]);var c=a(n),h=new ie.Color(ee(c||"#ffffaa")),d=e.nodeOpacity*te(c);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(h)&&t.material.opacity===d||(u.hasOwnProperty(c)||(u[c]=new ie.MeshLambertMaterial({color:h,transparent:!0,opacity:d})),t.material.dispose(),t.material=u[c])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var h=Object(m.default)(e.linkThreeObject),d=Object(m.default)(e.linkThreeObjectExtend),f=Object(m.default)(e.linkMaterial),p=Object(m.default)(e.linkVisibility),g=Object(m.default)(e.linkColor),v=Object(m.default)(e.linkWidth),y={},b={},w={},x=e.graphData.links.filter(p);if($(x,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},createObj:function(t){var n,r,i=h(t),o=d(t);if(i&&e.linkThreeObject===i&&(i=i.clone()),!i||o)if(!!v(t))n=new ie.Mesh;else{var a=new ie.BufferGeometry;a[ae]("position",new ie.BufferAttribute(new Float32Array(6),3)),n=new ie.Line(a)}return i?o?((r=new ie.Group).__graphDefaultObj=!0,r.add(n),r.add(i)):r=i:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,i=Math.ceil(10*v(n))/10,o=!!i;if(o){var a=i/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==a||r.geometry.parameters.radialSegments!==s){if(!y.hasOwnProperty(i)){var l=new ie.CylinderBufferGeometry(a,a,1,s,1,!1);l[se]((new ie.Matrix4).makeTranslation(0,.5,0)),l[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),y[i]=l}r.geometry.dispose(),r.geometry=y[i]}}var c=f(n);if(c)r.material=c;else{var u=g(n),h=new ie.Color(ee(u||"#f0f0f0")),d=e.linkOpacity*te(u),p=o?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==p||!r.material.color.equals(h)||r.material.opacity!==d){var m=o?b:w;m.hasOwnProperty(u)||(m[u]=new ie[p]({color:h,transparent:d<1,opacity:d,depthWrite:d>=1})),r.material.dispose(),r.material=m[u]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var _=Object(m.default)(e.linkDirectionalArrowLength),E=Object(m.default)(e.linkDirectionalArrowColor);$(x.filter(_),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new ie.Mesh(void 0,new ie.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=_(n),i=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==i){var o=new ie.ConeBufferGeometry(.25*r,r,i);o.translate(0,r/2,0),o.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=o}t.material.color=new ie.Color(E(n)||g(n)||"#f0f0f0"),t.material.opacity=3*e.linkOpacity}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var A=Object(m.default)(e.linkDirectionalParticles),S=Object(m.default)(e.linkDirectionalParticleWidth),M=Object(m.default)(e.linkDirectionalParticleColor),T={},C={};$(x.filter(A),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new ie.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,i=Math.round(Math.abs(A(n))),o=!!t.children.length&&t.children[0],a=Math.ceil(10*S(n))/10/2,s=e.linkDirectionalParticleResolution;o&&o.geometry.parameters.radius===a&&o.geometry.parameters.widthSegments===s?r=o.geometry:(C.hasOwnProperty(a)||(C[a]=new ie.SphereBufferGeometry(a,s,s)),r=C[a],o&&o.geometry.dispose());var l,c=M(n)||g(n)||"#f0f0f0",u=new ie.Color(ee(c)),h=3*e.linkOpacity;o&&o.material.color.equals(u)&&o.material.opacity===h?l=o.material:(T.hasOwnProperty(c)||(T[c]=new ie.MeshLambertMaterial({color:u,transparent:!0,opacity:h})),l=T[c],o&&o.material.dispose()),$(X(new Array(i)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new ie.Mesh(r,l)},updateObj:function(e){e.geometry=r,e.material=l}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var O,R="ngraph"!==e.forceEngine;if(R){(O=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var k=e.d3ForceLayout.force("link");k&&k.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var P=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===D(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(X(Object.entries(c).filter((function(e){return!q(e,2)[1].skip})).map((function(e){var t=q(e,2);return N({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(X(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(X(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),I=Math.max.apply(Math,X(Object.values(P||[]))),j=e.dagLevelDistance||e.graphData.nodes.length/(I||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var B=function(t,n){return function(r){return t?(P[r[e.nodeId]]-I/2)*j*(n?-1:1):void 0}},F=B(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),z=B(-1!==["td","bu"].indexOf(e.dagMode),"td"===e.dagMode),H=B(-1!==["zin","zout"].indexOf(e.dagMode),"zout"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=F(e),e.fy=z(e),e.fz=H(e)}))}e.d3ForceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(c.a)((function(t){var n=P[t[e.nodeId]]||-1;return("radialin"===e.dagMode?I-n:n)*j})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var U=oe.graph();e.graphData.nodes.forEach((function(t){U.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){U.addLink(e.source,e.target)})),(O=oe.forcelayout(U,L({dimensions:e.numDimensions},e.ngraphPhysics))).graph=U}for(var V=0;V<e.warmupTicks&&!(R&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);V++)O[R?"tick":"step"]();e.layout=O,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}}),(window.THREE?window.THREE:{Group:i.n}).Group,!0);n.default=le},,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},function(e,t){e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);var t=function(e){var t=Object.create(null);return{on:function(n,r,i){if("function"!==typeof r)throw new Error("callback is expected to be a function");var o=t[n];return o||(o=t[n]=[]),o.push({callback:r,ctx:i}),e},off:function(n,r){if("undefined"===typeof n)return t=Object.create(null),e;if(t[n])if("function"!==typeof r)delete t[n];else for(var i=t[n],o=0;o<i.length;++o)i[o].callback===r&&i.splice(o,1);return e},fire:function(n){var r,i=t[n];if(!i)return e;arguments.length>1&&(r=Array.prototype.splice.call(arguments,1));for(var o=0;o<i.length;++o){var a=i[o];a.callback.apply(a.ctx,r)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d}));var r=n(20),i=n.n(r),o=n(6),a=n.n(o),s=n(41),l=n(102);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={replace:function(e,t){return{type:"REPLACE",payload:{name:e,params:t}}},push:function(e,t){return{type:"PUSH",payload:{name:e,params:t}}},pop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{type:"POP",payload:{count:e}}},popToTop:function(){return{type:"POP_TO_TOP"}}};function d(e){var t=u(u({},l.a),{},{type:"stack",getInitialState:function(t){var n=t.routeNames,r=t.routeParamList,i=void 0!==e.initialRouteName&&n.includes(e.initialRouteName)?e.initialRouteName:n[0];return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:0,routeNames:n,routes:[{key:"".concat(i,"-").concat(Object(s.a)()),name:i,params:r[i]}]}},getRehydratedState:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t;if(!1===o.stale)return o;var a=o.routes.filter((function(e){return r.includes(e.name)})).map((function(e){return u(u({},e),{},{key:e.key||"".concat(e.name,"-").concat(Object(s.a)()),params:void 0!==i[e.name]?u(u({},i[e.name]),e.params):e.params})}));if(0===a.length){var l=void 0!==e.initialRouteName?e.initialRouteName:r[0];a.push({key:"".concat(l,"-").concat(Object(s.a)()),name:l,params:i[l]})}return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:a.length-1,routeNames:r,routes:a}},getStateForRouteNamesChange:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t.routes.filter((function(e){return r.includes(e.name)}));if(0===o.length){var a=void 0!==e.initialRouteName&&r.includes(e.initialRouteName)?e.initialRouteName:r[0];o.push({key:"".concat(a,"-").concat(Object(s.a)()),name:a,params:i[a]})}return u(u({},t),{},{routeNames:r,routes:o,index:Math.min(t.index,o.length-1)})},getStateForRouteFocus:function(e,t){var n=e.routes.findIndex((function(e){return e.key===t}));return-1===n||n===e.index?e:u(u({},e),{},{index:n,routes:e.routes.slice(0,n+1)})},getStateForAction:function(e,n,r){var o=r.routeParamList;switch(n.type){case"REPLACE":var a=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(-1===a)return null;var c=n.payload,h=c.name,d=c.key,f=c.params;return e.routeNames.includes(h)?u(u({},e),{},{routes:e.routes.map((function(e,t){return t===a?{key:void 0!==d?d:"".concat(h,"-").concat(Object(s.a)()),name:h,params:void 0!==o[h]?u(u({},o[h]),f):f}:e}))}):null;case"PUSH":if(e.routeNames.includes(n.payload.name)){var p,m,g=r.routeGetIdList[n.payload.name],v=null===g||void 0===g?void 0:g({params:n.payload.params}),y=n.payload.name&&n.payload.key?e.routes.find((function(e){return e.name===n.payload.name&&e.key===n.payload.key})):v?e.routes.find((function(e){return e.name===n.payload.name&&v===(null===g||void 0===g?void 0:g({params:e.params}))})):void 0;if(y)(p=e.routes.filter((function(e){return e.key!==y.key}))).push(u(u({},y),{},{params:void 0!==n.payload.params?u(u({},y.params),n.payload.params):y.params}));else p=[].concat(i()(e.routes),[{key:null!==(m=n.payload.key)&&void 0!==m?m:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{index:p.length-1,routes:p})}return null;case"POP":var b=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(b>0){var w=Math.max(b-n.payload.count+1,1),x=e.routes.slice(0,w).concat(e.routes.slice(b+1));return u(u({},e),{},{index:x.length-1,routes:x})}return null;case"POP_TO_TOP":return t.getStateForAction(e,{type:"POP",payload:{count:e.routes.length-1}},r);case"NAVIGATE":if(void 0!==n.payload.name&&!e.routeNames.includes(n.payload.name))return null;if(n.payload.key||n.payload.name){var _=-1,E=void 0===n.payload.key&&void 0!==n.payload.name?r.routeGetIdList[n.payload.name]:void 0,A=null===E||void 0===E?void 0:E({params:n.payload.params});if(A)_=e.routes.findIndex((function(e){return e.name===n.payload.name&&A===(null===E||void 0===E?void 0:E({params:e.params}))}));else if(e.routes[e.index].name===n.payload.name&&void 0===n.payload.key||e.routes[e.index].key===n.payload.key)_=e.index;else for(var S=e.routes.length-1;S>=0;S--)if(e.routes[S].name===n.payload.name&&void 0===n.payload.key||e.routes[S].key===n.payload.key){_=S;break}if(-1===_&&n.payload.key&&void 0===n.payload.name)return null;if(-1===_&&void 0!==n.payload.name){var M,T=[].concat(i()(e.routes),[{key:null!==(M=n.payload.key)&&void 0!==M?M:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{routes:T,index:T.length-1})}var C,O=e.routes[_];return C=!1===n.payload.merge?void 0!==o[O.name]?u(u({},o[O.name]),n.payload.params):n.payload.params:n.payload.params?u(u({},O.params),n.payload.params):O.params,u(u({},e),{},{index:_,routes:[].concat(i()(e.routes.slice(0,_)),[C!==O.params?u(u({},O),{},{params:C}):e.routes[_]])})}return null;case"GO_BACK":return e.index>0?t.getStateForAction(e,{type:"POP",payload:{count:1},target:n.target,source:n.source},r):null;default:return l.a.getStateForAction(e,n)}},actionCreators:h});return t}},function(e,t,n){var r=n(56),i=n(39),o=n(112);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return o(n)?t:i((function(t,r){return e(n,t,r)}));case 2:return o(n)&&o(a)?t:o(n)?i((function(t,n){return e(t,a,n)})):o(a)?i((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return o(n)&&o(a)&&o(s)?t:o(n)&&o(a)?i((function(t,n){return e(t,n,s)})):o(n)&&o(s)?i((function(t,n){return e(t,a,n)})):o(a)&&o(s)?i((function(t,r){return e(n,t,r)})):o(n)?r((function(t){return e(t,a,s)})):o(a)?r((function(t){return e(n,t,s)})):o(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},function(e,t){e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){var r=n(156);e.exports=function(e,t){return function(){var n=arguments.length;if(0===n)return t();var i=arguments[n-1];return r(i)||"function"!==typeof i[e]?t.apply(this,arguments):i[e].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},function(e,t,n){var r=n(56),i=n(114),o=n(391),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],l=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},u=r("function"!==typeof Object.keys||l?function(e){if(Object(e)!==e)return[];var t,n,r=[],u=l&&o(e);for(t in e)!i(t,e)||u&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)i(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r}:function(e){return Object(e)!==e?[]:Object.keys(e)});e.exports=u},function(t,n,r){"use strict";r.r(n),r.d(n,"unstable_createElement",(function(){return i.a})),r.d(n,"findNodeHandle",(function(){return o.a})),r.d(n,"processColor",(function(){return a.a})),r.d(n,"render",(function(){return s.a})),r.d(n,"unmountComponentAtNode",(function(){return l.a})),r.d(n,"NativeModules",(function(){return c.a})),r.d(n,"AccessibilityInfo",(function(){return m})),r.d(n,"Alert",(function(){return g})),r.d(n,"Animated",(function(){return v.a})),r.d(n,"Appearance",(function(){return w})),r.d(n,"AppRegistry",(function(){return x.a})),r.d(n,"AppState",(function(){return D})),r.d(n,"BackHandler",(function(){return N.a})),r.d(n,"Clipboard",(function(){return j})),r.d(n,"DeviceInfo",(function(){return F})),r.d(n,"Dimensions",(function(){return B.a})),r.d(n,"Easing",(function(){return z.a})),r.d(n,"I18nManager",(function(){return H.a})),r.d(n,"Keyboard",(function(){return U.a})),r.d(n,"InteractionManager",(function(){return V.a})),r.d(n,"LayoutAnimation",(function(){return K})),r.d(n,"Linking",(function(){return $})),r.d(n,"NativeEventEmitter",(function(){return ee})),r.d(n,"PanResponder",(function(){return de})),r.d(n,"PixelRatio",(function(){return fe.a})),r.d(n,"Platform",(function(){return G.a})),r.d(n,"Share",(function(){return me})),r.d(n,"StyleSheet",(function(){return ge.a})),r.d(n,"UIManager",(function(){return W.a})),r.d(n,"Vibration",(function(){return ye})),r.d(n,"ActivityIndicator",(function(){return Ce})),r.d(n,"Button",(function(){return Le})),r.d(n,"CheckBox",(function(){return ze})),r.d(n,"FlatList",(function(){return He.a})),r.d(n,"Image",(function(){return Ue.a})),r.d(n,"ImageBackground",(function(){return qe})),r.d(n,"KeyboardAvoidingView",(function(){return Xe.a})),r.d(n,"Modal",(function(){return gt})),r.d(n,"Picker",(function(){return Et})),r.d(n,"Pressable",(function(){return mn})),r.d(n,"ProgressBar",(function(){return bn})),r.d(n,"RefreshControl",(function(){return wn.a})),r.d(n,"SafeAreaView",(function(){return xn.a})),r.d(n,"ScrollView",(function(){return _n.a})),r.d(n,"SectionList",(function(){return En.a})),r.d(n,"StatusBar",(function(){return An.a})),r.d(n,"Switch",(function(){return Sn.a})),r.d(n,"Text",(function(){return Re.a})),r.d(n,"TextInput",(function(){return Mn.a})),r.d(n,"Touchable",(function(){return fr})),r.d(n,"TouchableHighlight",(function(){return pr.a})),r.d(n,"TouchableNativeFeedback",(function(){return mr.a})),r.d(n,"TouchableOpacity",(function(){return Oe.a})),r.d(n,"TouchableWithoutFeedback",(function(){return gr.a})),r.d(n,"View",(function(){return xe.a})),r.d(n,"VirtualizedList",(function(){return vr})),r.d(n,"YellowBox",(function(){return wr})),r.d(n,"LogBox",(function(){return xr.a})),r.d(n,"DrawerLayoutAndroid",(function(){return _r})),r.d(n,"InputAccessoryView",(function(){return Er})),r.d(n,"ToastAndroid",(function(){return Ar})),r.d(n,"PermissionsAndroid",(function(){return Mr})),r.d(n,"Settings",(function(){return Tr})),r.d(n,"Systrace",(function(){return Cr})),r.d(n,"TVEventHandler",(function(){return Or})),r.d(n,"DeviceEventEmitter",(function(){return Rr})),r.d(n,"useColorScheme",(function(){return kr})),r.d(n,"useWindowDimensions",(function(){return Pr}));var i=r(32),o=r(49),a=r(115),s=r(119),l=r(120),c=r(186),u=r(13);function h(){return new Promise((function(e,t){e(!0)}))}var d=u.canUseDOM&&"function"===typeof window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null;var f={},p={isScreenReaderEnabled:h,isReduceMotionEnabled:function(){return new Promise((function(e,t){e(!d||d.matches)}))},fetch:h,addEventListener:function(e,t){if("reduceMotionChanged"===e){if(!d)return;var n=function(e){t(e.matches)};r=n,null!=d&&(null!=d.addEventListener?d.addEventListener("change",r):d.addListener(r)),f[t]=n}var r;return{remove:function(){return p.removeEventListener(e,t)}}},setAccessibilityFocus:function(e){},announceForAccessibility:function(e){},removeEventListener:function(e,t){if("reduceMotionChanged"===e){var n=f[t];if(!n||!d)return;r=n,null!=d&&(null!=d.removeEventListener?d.removeEventListener("change",r):d.removeListener(r))}var r}},m=p,g=function(){function e(){}return e.alert=function(){},e}(),v=r(12);var y=u.canUseDOM&&null!=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null,b=new WeakMap,w={getColorScheme:function(){return y&&y.matches?"dark":"light"},addChangeListener:function(e){var t=b.get(e);t||(t=function(t){var n=t.matches;e({colorScheme:n?"dark":"light"})},b.set(e,t)),y&&y.addListener(t)},removeChangeListener:function(e){var t=b.get(e);t&&(y&&y.removeListener(t),b.delete(e))}},x=r(103),_=r(251),E=r.n(_),A=r(4),S=r.n(A);function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T=u.canUseDOM&&!document.hasOwnProperty("hidden")&&document.hasOwnProperty("webkitHidden"),C=["change","memoryWarning"],O=T?"webkitvisibilitychange":"visibilitychange",R=T?"webkitVisibilityState":"visibilityState",k="background",P="active",L=[],D=function(){function e(){}var t,n,r;return e.addEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to subscribe to unknown event: "%s"',t),"change"===t)){var r=function(){return n(e.currentState)};L.push([n,r]),document.addEventListener(O,r,!1)}},e.removeEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to remove listener for unknown event: "%s"',t),"change"===t)){var r=E()(L,(function(e){return e[0]===n}));S()(-1!==r,"Trying to remove AppState listener for unregistered handler");var i=L[r][1];document.removeEventListener(O,i,!1),L.splice(r,1)}},t=e,r=[{key:"currentState",get:function(){if(!e.isAvailable)return P;switch(document[R]){case"hidden":case"prerender":case"unloaded":return k;default:return P}}}],(n=null)&&M(t.prototype,n),r&&M(t,r),e}();D.isAvailable=u.canUseDOM&&document[R];var I,N=r(80),j=function(){function t(){}return t.isAvailable=function(){return void 0===I&&(I="function"===typeof document.queryCommandSupported&&document.queryCommandSupported("copy")),I},t.getString=function(){return Promise.resolve("")},t.setString=function(t){var n=!1,r=document.body;if(r){var i=document.createElement("span");i.textContent=t,i.style.opacity="0",i.style.position="absolute",i.style.whiteSpace="pre-wrap",i.style.userSelect="auto",r.appendChild(i);var o=window.getSelection();o.removeAllRanges();var a=document.createRange();a.selectNodeContents(i),o.addRange(a);try{document.execCommand("copy"),n=!0}catch(e){}o.removeAllRanges(),r.removeChild(i)}return n},t}(),B=r(34),F={Dimensions:{get windowPhysicalPixels(){var e=B.a.get("window"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}},get screenPhysicalPixels(){var e=B.a.get("screen"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}}},get locale(){if(u.canUseDOM)return navigator.languages?navigator.languages[0]:navigator.language},get totalMemory(){return u.canUseDOM?navigator.deviceMemory:void 0},get userAgent(){return u.canUseDOM?navigator.userAgent:""}},z=r(14),H=r(36),U=r(121),V=r(54),G=r(9),W=r(29);function q(e,t){G.a.isTesting||W.a.configureNextLayoutAnimation(e,null!==t&&void 0!==t?t:function(){},(function(){}))}function X(e,t,n){return{duration:e,create:{type:t,property:n},update:{type:t},delete:{type:t,property:n}}}var Y={easeInEaseOut:X(300,"easeInEaseOut","opacity"),linear:X(500,"linear","opacity"),spring:{duration:700,create:{type:"linear",property:"opacity"},update:{type:"spring",springDamping:.4},delete:{type:"linear",property:"opacity"}}},K={configureNext:q,create:X,Types:Object.freeze({spring:"spring",linear:"linear",easeInEaseOut:"easeInEaseOut",easeIn:"easeIn",easeOut:"easeOut",keyboard:"keyboard"}),Properties:Object.freeze({opacity:"opacity",scaleX:"scaleX",scaleY:"scaleY",scaleXY:"scaleXY"}),checkConfig:function(){console.error("LayoutAnimation.checkConfig(...) has been disabled.")},Presets:Y,easeInEaseOut:q.bind(null,Y.easeInEaseOut),linear:q.bind(null,Y.linear),spring:q.bind(null,Y.spring)},Q=u.canUseDOM?window.location.href:"",Z=function(){function t(){var e=this;this._eventCallbacks={},this.addEventListener=function(t,n){e._eventCallbacks[t]?e._eventCallbacks[t].push(n):e._eventCallbacks[t]=[n]},this.removeEventListener=function(t,n){var r=e._eventCallbacks[t].filter((function(e){return e.toString()!==n.toString()}));e._eventCallbacks[t]=r}}var n=t.prototype;return n._dispatchEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this._eventCallbacks[e];null!=i&&Array.isArray(i)&&i.map((function(e){e.apply(void 0,n)}))},n.canOpenURL=function(){return Promise.resolve(!0)},n.getInitialURL=function(){return Promise.resolve(Q)},n.openURL=function(t){try{return J(t),this._dispatchEvent("onOpen",t),Promise.resolve()}catch(e){return Promise.reject(e)}},n._validateURL=function(e){S()("string"===typeof e,"Invalid URL: should be a string. Was: "+e),S()(e,"Invalid URL: cannot be empty")},t}(),J=function(e){if(u.canUseDOM){var t=new URL(e,window.location).toString();window.open(t,"_blank","noopener")}},$=new Z,ee=r(134).a,te={centroidDimension:function(e,t,n,r){var i=e.touchBank,o=0,a=0,s=1===e.numberActiveTouches?e.touchBank[e.indexOfSingleActiveTouch]:null;if(null!==s)s.touchActive&&s.currentTimeStamp>t&&(o+=r&&n?s.currentPageX:r&&!n?s.currentPageY:!r&&n?s.previousPageX:s.previousPageY,a=1);else for(var l=0;l<i.length;l++){var c=i[l];if(null!==c&&void 0!==c&&c.touchActive&&c.currentTimeStamp>=t){o+=r&&n?c.currentPageX:r&&!n?c.currentPageY:!r&&n?c.previousPageX:c.previousPageY,a++}}return a>0?o/a:te.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!1)},currentCentroidX:function(e){return te.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return te.centroidDimension(e,0,!1,!0)},noCentroid:-1},ne=te,re=ne.currentCentroidXOfTouchesChangedAfter,ie=ne.currentCentroidYOfTouchesChangedAfter,oe=ne.previousCentroidXOfTouchesChangedAfter,ae=ne.previousCentroidYOfTouchesChangedAfter,se=ne.currentCentroidX,le=ne.currentCentroidY,ce={_initializeGestureState:function(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove:function(e,t){e.numberActiveTouches=t.numberActiveTouches,e.moveX=re(t,e._accountsForMovesUpTo),e.moveY=ie(t,e._accountsForMovesUpTo);var n=e._accountsForMovesUpTo,r=oe(t,n),i=re(t,n),o=ae(t,n),a=ie(t,n),s=e.dx+(i-r),l=e.dy+(a-o),c=t.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(s-e.dx)/c,e.vy=(l-e.dy)/c,e.dx=s,e.dy=l,e._accountsForMovesUpTo=t.mostRecentTimeStamp},create:function(e){var t={handle:null,shouldCancelClick:!1,timeout:null},n={stateID:Math.random(),moveX:0,moveY:0,x0:0,y0:0,dx:0,dy:0,vx:0,vy:0,numberActiveTouches:0,_accountsForMovesUpTo:0};return{panHandlers:{onStartShouldSetResponder:function(t){return null!=e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(t,n)},onMoveShouldSetResponder:function(t){return null!=e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(t,n)},onStartShouldSetResponderCapture:function(t){return 1===t.nativeEvent.touches.length&&ce._initializeGestureState(n),n.numberActiveTouches=t.touchHistory.numberActiveTouches,null!=e.onStartShouldSetPanResponderCapture&&e.onStartShouldSetPanResponderCapture(t,n)},onMoveShouldSetResponderCapture:function(t){var r=t.touchHistory;return n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(t,n))},onResponderGrant:function(r){return t.handle||(t.handle=V.a.createInteractionHandle()),t.timeout&&function(e){clearTimeout(e.timeout)}(t),t.shouldCancelClick=!0,n.x0=se(r.touchHistory),n.y0=le(r.touchHistory),n.dx=0,n.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(r,n),null==e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder(r,n)},onResponderReject:function(r){ue(t,e.onPanResponderReject,r,n)},onResponderRelease:function(r){ue(t,e.onPanResponderRelease,r,n),he(t),ce._initializeGestureState(n)},onResponderStart:function(t){var r=t.touchHistory;n.numberActiveTouches=r.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(t,n)},onResponderMove:function(t){var r=t.touchHistory;n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),e.onPanResponderMove&&e.onPanResponderMove(t,n))},onResponderEnd:function(r){var i=r.touchHistory;n.numberActiveTouches=i.numberActiveTouches,ue(t,e.onPanResponderEnd,r,n)},onResponderTerminate:function(r){ue(t,e.onPanResponderTerminate,r,n),he(t),ce._initializeGestureState(n)},onResponderTerminationRequest:function(t){return null==e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(t,n)},onClickCapture:function(e){!0===t.shouldCancelClick&&(e.stopPropagation(),e.preventDefault())}},getInteractionHandle:function(){return t.handle}}}};function ue(e,t,n,r){e.handle&&(V.a.clearInteractionHandle(e.handle),e.handle=null),t&&t(n,r)}function he(e){e.timeout=setTimeout((function(){e.shouldCancelClick=!1}),250)}var de=ce,fe=r(116);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var me=function(){function e(){}var t,n,r;return e.share=function(e,t){return void 0===t&&(t={}),S()("object"===typeof e&&null!==e,"Content to share must be a valid object"),S()("string"===typeof e.url||"string"===typeof e.message,"At least one of URL and message is required"),S()("object"===typeof t&&null!==t,"Options must be a valid object"),S()(!e.title||"string"===typeof e.title,"Invalid title: title should be a string."),void 0!==window.navigator.share?window.navigator.share({title:e.title,text:e.message,url:e.url}):Promise.reject(new Error("Share is not supported in this browser"))},t=e,r=[{key:"sharedAction",get:function(){return"sharedAction"}},{key:"dismissedAction",get:function(){return"dismissedAction"}}],(n=null)&&pe(t.prototype,n),r&&pe(t,r),e}(),ge=r(5),ve=function(e){"vibrate"in window.navigator&&window.navigator.vibrate(e)},ye={cancel:function(){ve(0)},vibrate:function(e){void 0===e&&(e=400),ve(e)}},be=r(0),we=r.n(be),xe=r(3);function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee={max:1,min:0},Ae=function(e){return be.createElement("circle",{cx:"16",cy:"16",fill:"none",r:"14",strokeWidth:"4",style:e})},Se=be.forwardRef((function(e,t){var n=e.animating,r=void 0===n||n,i=e.color,o=void 0===i?"#1976D2":i,a=e.hidesWhenStopped,s=void 0===a||a,l=e.size,c=void 0===l?"small":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animating","color","hidesWhenStopped","size","style"]),d=be.createElement("svg",{height:"100%",viewBox:"0 0 32 32",width:"100%"},Ae({stroke:o,opacity:.2}),Ae({stroke:o,strokeDasharray:80,strokeDashoffset:60}));return be.createElement(xe.a,_e({},h,{accessibilityRole:"progressbar",accessibilityValue:Ee,ref:t,style:[Me.container,u]}),be.createElement(xe.a,{children:d,style:["number"===typeof c?{height:c,width:c}:Te[c],Me.animation,!r&&Me.animationPause,!r&&s&&Me.hidesWhenStopped]}))}));Se.displayName="ActivityIndicator";var Me=ge.a.create({container:{alignItems:"center",justifyContent:"center"},hidesWhenStopped:{visibility:"hidden"},animation:{animationDuration:"0.75s",animationKeyframes:[{"0%":{transform:[{rotate:"0deg"}]},"100%":{transform:[{rotate:"360deg"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"},animationPause:{animationPlayState:"paused"}}),Te=ge.a.create({small:{width:20,height:20},large:{width:36,height:36}}),Ce=Se,Oe=r(48),Re=r(57),ke=be.forwardRef((function(e,t){var n=e.accessibilityLabel,r=e.color,i=e.disabled,o=e.onPress,a=e.testID,s=e.title;return be.createElement(Oe.a,{accessibilityLabel:n,accessibilityRole:"button",disabled:i,focusable:!i,onPress:o,ref:t,style:[Pe.button,r&&{backgroundColor:r},i&&Pe.buttonDisabled],testID:a},be.createElement(Re.a,{style:[Pe.text,i&&Pe.textDisabled]},s))}));ke.displayName="Button";var Pe=ge.a.create({button:{backgroundColor:"#2196F3",borderRadius:2},text:{color:"#fff",fontWeight:"500",padding:8,textAlign:"center",textTransform:"uppercase"},buttonDisabled:{backgroundColor:"#dfdfdf"},textDisabled:{color:"#a1a1a1"}}),Le=ke;function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Be=be.forwardRef((function(e,t){var n=e.color,r=e.disabled,o=e.onChange,a=e.onValueChange,s=e.style,l=e.value,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","disabled","onChange","onValueChange","style","value"]);var u=be.createElement(xe.a,{style:[Fe.fakeControl,l&&Fe.fakeControlChecked,l&&n&&{backgroundColor:n,borderColor:n},r&&Fe.fakeControlDisabled,l&&r&&Fe.fakeControlCheckedAndDisabled]}),h=Object(i.a)("input",{checked:l,disabled:r,onChange:function(e){var t=e.nativeEvent.target.checked;e.nativeEvent.value=t,o&&o(e),a&&a(t)},ref:t,style:[Fe.nativeControl,Fe.cursorInherit],type:"checkbox"});return be.createElement(xe.a,je({},c,{accessibilityDisabled:r,style:[Fe.root,s,r&&Fe.cursorDefault]}),u,h)}));Be.displayName="CheckBox";var Fe=ge.a.create({root:{cursor:"pointer",height:16,userSelect:"none",width:16},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},fakeControl:{alignItems:"center",backgroundColor:"#fff",borderColor:"#657786",borderRadius:2,borderStyle:"solid",borderWidth:2,height:"100%",justifyContent:"center",width:"100%"},fakeControlChecked:{backgroundColor:"#009688",backgroundImage:'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")',backgroundRepeat:"no-repeat",borderColor:"#009688"},fakeControlDisabled:{borderColor:"#CCD6DD"},fakeControlCheckedAndDisabled:{backgroundColor:"#AAB8C2",borderColor:"#AAB8C2"},nativeControl:Ie(Ie({},ge.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})}),ze=Be,He=r(72),Ue=r(38);function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ge={},We=Object(be.forwardRef)((function(e,t){var n=e.children,r=e.style,i=void 0===r?Ge:r,o=e.imageStyle,a=e.imageRef,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","style","imageStyle","imageRef"]),l=ge.a.flatten(i),c=l.height,u=l.width;return be.createElement(xe.a,{ref:t,style:i},be.createElement(Ue.a,Ve({},s,{ref:a,style:[ge.a.absoluteFill,{width:u,height:c,zIndex:-1},o]})),n)}));We.displayName="ImageBackground";var qe=We,Xe=r(101),Ye=r(63),Ke=r.n(Ye);var Qe=function(e){var t=e.children,n=be.useRef(null);if(u.canUseDOM&&!n.current){var r=document.createElement("div");r&&document.body&&(document.body.appendChild(r),n.current=r)}return be.useEffect((function(){if(u.canUseDOM)return function(){document.body&&n.current&&(document.body.removeChild(n.current),n.current=null)}}),[]),n.current&&u.canUseDOM?Ke.a.createPortal(t,n.current):null};function Ze(e,t){return"slide"===e?t?$e:et:"fade"===e?t?tt:nt:t?Je.container:Je.hidden}var Je=ge.a.create({container:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999},animatedIn:{animationDuration:"300ms",animationTimingFunction:"ease-in"},animatedOut:{pointerEvents:"none",animationDuration:"300ms",animationTimingFunction:"ease-out"},fadeIn:{opacity:1,animationKeyframes:{"0%":{opacity:0},"100%":{opacity:1}}},fadeOut:{opacity:0,animationKeyframes:{"0%":{opacity:1},"100%":{opacity:0}}},slideIn:{transform:[{translateY:"0%"}],animationKeyframes:{"0%":{transform:[{translateY:"100%"}]},"100%":{transform:[{translateY:"0%"}]}}},slideOut:{transform:[{translateY:"100%"}],animationKeyframes:{"0%":{transform:[{translateY:"0%"}]},"100%":{transform:[{translateY:"100%"}]}}},hidden:{opacity:0}}),$e=[Je.container,Je.animatedIn,Je.slideIn],et=[Je.container,Je.animatedOut,Je.slideOut],tt=[Je.container,Je.animatedIn,Je.fadeIn],nt=[Je.container,Je.animatedOut,Je.fadeOut],rt=function(e){var t=e.animationType,n=e.children,r=e.onDismiss,o=e.onShow,a=e.visible,s=be.useState(!1),l=s[0],c=s[1],u=be.useRef(!1),h=t&&"none"!==t,d=be.useCallback((function(e){e&&e.currentTarget!==e.target||(a?o&&o():(c(!1),r&&r()))}),[r,o,a]);return be.useEffect((function(){a&&c(!0),a===u.current||h||d(),u.current=a}),[h,a,d]),l||a?Object(i.a)("div",{style:l?Ze(t,a):Je.hidden,onAnimationEnd:d,children:n}):null},it=be.forwardRef((function(e,t){var n=e.active,r=e.children,i=e.onRequestClose,o=e.transparent;be.useEffect((function(){if(u.canUseDOM){var e=function(e){n&&"Escape"===e.key&&(e.stopPropagation(),i&&i())};return document.addEventListener("keyup",e,!1),function(){return document.removeEventListener("keyup",e,!1)}}}),[n,i]);var a=be.useMemo((function(){return[ot.modal,o?ot.modalTransparent:ot.modalOpaque]}),[o]);return be.createElement(xe.a,{accessibilityRole:n?"dialog":null,"aria-modal":!0,ref:t,style:a},be.createElement(xe.a,{style:ot.container},r))})),ot=ge.a.create({modal:{position:"fixed",top:0,right:0,bottom:0,left:0},modalTransparent:{backgroundColor:"transparent"},modalOpaque:{backgroundColor:"white"},container:{top:0,flex:1}}),at=it,st=function(){return Object(i.a)("div",{accessibilityRole:"none",tabIndex:0,style:ut.focusBracket})};function lt(t){if(!u.canUseDOM)return!1;try{t.focus()}catch(e){}return document.activeElement===t}var ct=function(e){var t=e.active,n=e.children,r=be.useRef(),i=be.useRef({trapFocusInProgress:!1,lastFocusedElement:null});return be.useEffect((function(){if(u.canUseDOM){var e=function(){if(null!=r.current&&!i.current.trapFocusInProgress&&t){try{if(i.current.trapFocusInProgress=!0,document.activeElement instanceof Node&&!r.current.contains(document.activeElement)){var e=function e(t){for(var n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current);i.current.lastFocusedElement===document.activeElement&&(e=function e(t){for(var n=t.childNodes.length-1;n>=0;n--){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current)),!e&&null!=r.current&&document.activeElement&&W.a.focus(r.current)}}finally{i.current.trapFocusInProgress=!1}i.current.lastFocusedElement=document.activeElement}};return e(),document.addEventListener("focus",e,!0),function(){return document.removeEventListener("focus",e,!0)}}}),[t]),be.useEffect((function(){if(u.canUseDOM){var e=document.activeElement;return function(){e&&document.contains(e)&&W.a.focus(e)}}}),[]),be.createElement(be.Fragment,null,be.createElement(st,null),be.createElement(xe.a,{ref:r},n),be.createElement(st,null))},ut=ge.a.create({focusBracket:{outlineStyle:"none"}}),ht=0,dt=[],ft={};function pt(){if(0!==dt.length){var e=dt[dt.length-1];dt.forEach((function(t){t in ft&&ft[t](t===e)}))}}function mt(e){e in ft&&(ft[e](!1),delete ft[e]);var t=dt.indexOf(e);-1!==t&&(dt.splice(t,1),pt())}var gt=be.forwardRef((function(e,t){var n=e.animationType,r=e.children,i=e.onDismiss,o=e.onRequestClose,a=e.onShow,s=e.transparent,l=e.visible,c=void 0===l||l,u=be.useMemo((function(){return ht++}),[]),h=be.useState(!1),d=h[0],f=h[1],p=be.useCallback((function(){mt(u),i&&i()}),[u,i]),m=be.useCallback((function(){!function(e,t){mt(e),dt.push(e),ft[e]=t,pt()}(u,f),a&&a()}),[u,a]);return be.useEffect((function(){return function(){return mt(u)}}),[u]),be.createElement(Qe,null,be.createElement(rt,{animationType:n,onDismiss:p,onShow:m,visible:c},be.createElement(ct,{active:d},be.createElement(at,{active:d,onRequestClose:o,ref:t,transparent:s},r))))})),vt=r(37),yt=r(74);function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=be.forwardRef((function(e,t){var n=e.children,r=e.enabled,o=e.onValueChange,a=e.selectedValue,s=e.style,l=e.testID,c=(e.itemStyle,e.mode,e.prompt,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","enabled","onValueChange","selectedValue","style","testID","itemStyle","mode","prompt"])),u=be.useRef(null);var h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({children:n,disabled:!1===r||void 0,onChange:function(e){var t=e.target,n=t.selectedIndex,r=t.value;o&&o(r,n)},style:[_t.initial,s],testID:l,value:a},c),d=Object(yt.a)(h),f=Object(vt.a)(u,d,t);return h.ref=f,Object(i.a)("select",h)}));xt.Item=function(e){var t=e.color,n=e.label,r=e.testID,o=e.value,a={color:t};return Object(i.a)("option",{style:a,testID:r,value:o},n)};var _t=ge.a.create({initial:{fontFamily:"System",fontSize:"inherit",margin:0}}),Et=xt,At=function(){};var St=function(){var t=!1;if(u.canUseDOM)try{var n={};Object.defineProperty(n,"passive",{get:function(){return t=!0,!1}}),window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){}return t}();function Mt(){return this.cancelBubble}function Tt(){return this.defaultPrevented}function Ct(e,t){var n=function(e){return null!=e&&(St?e:Boolean(e.capture))}(t);return function(t,r){if(null==t||"function"!==typeof t.addEventListener)throw new Error("createEventHandle: called on an invalid target.");var i=t;if(null!=r){var o=function(e){return r(((t=e).nativeEvent=t,t.persist=At,t.isDefaultPrevented=Tt,t.isPropagationStopped=Mt,t));var t};return i.addEventListener(e,o,n),function(){null!=i&&i.removeEventListener(e,o,n)}}return At}}var Ot,Rt,kt="keyboard",Pt="keyboard",Lt=!1,Dt=new Set,It={passive:!0},Nt={capture:!0,passive:!0},jt=Ct("blur",It),Bt=Ct("focus",It),Ft=Ct("visibilitychange",Nt),zt=Ct("keydown",Nt),Ht=Ct("pointerdown",Nt),Ut=Ct("pointermove",Nt),Vt=Ct("contextmenu",Nt),Gt=Ct("mousedown",Nt),Wt=Ct("mousemove",Nt),qt=Ct("mouseup",Nt),Xt=Ct("scroll",Nt),Yt=Ct("selectionchange",Nt),Kt=Ct("touchcancel",Nt),Qt=Ct("touchmove",Nt),Zt=Ct("touchstart",Nt);function Jt(){null==Ot&&null==Rt||(null!=Ot&&(Pt=Ot,Ot=null),null!=Rt&&(kt=Rt,Rt=null),en())}function $t(e){var t=e.type;if("undefined"!==typeof window&&null!=window.PointerEvent){if("pointerdown"===t)return void(kt!==e.pointerType&&(Pt=e.pointerType,kt=e.pointerType,en()));if("pointermove"===t)return void(Pt!==e.pointerType&&(Pt=e.pointerType,en()))}else{if(Lt||("mousedown"===t&&"mouse"!==kt&&(Pt="mouse",kt="mouse",en()),"mousemove"===t&&"mouse"!==Pt&&(Pt="mouse",en())),"touchstart"===t)return Lt=!0,e.touches&&e.touches.length>1&&(Lt=!1),void("touch"!==kt&&(Pt="touch",kt="touch",en()));"contextmenu"!==t&&"mouseup"!==t&&"selectionchange"!==t&&"scroll"!==t&&"touchcancel"!==t&&"touchmove"!==t||(Lt=!1)}}function en(){var e={activeModality:kt,modality:Pt};Dt.forEach((function(t){t(e)}))}u.canUseDOM&&(jt(window,(function(){Ot=Pt,Rt=kt,kt="keyboard",Pt="keyboard",en(),Lt=!1})),Bt(window,(function(){Jt()})),zt(document,(function(e){e.metaKey||e.altKey||e.ctrlKey||"keyboard"!==Pt&&(Pt="keyboard",kt="keyboard",en())})),Ht(document,$t),Ut(document,$t),Ft(document,(function(){"hidden"!==document.visibilityState&&Jt()})),Vt(document,$t),Gt(document,$t),Wt(document,$t),qt(document,$t),Kt(document,$t),Qt(document,$t),Zt(document,$t),Yt(document,$t),Xt(document,$t));var tn=r(68),nn=r(106);function rn(e,t){var n=Object(nn.a)((function(){return new Map})),r=Object(nn.a)((function(){var r=Ct(e,t);return function(e,t){var i=n.get(e);null!=i&&i(),null==t&&n.delete(e);var o=r(e,t);return n.set(e,o),o}}));return Object(tn.a)((function(){return function(){n.forEach((function(e){e()})),n.clear()}}),[]),r}var on={},an={passive:!0};function sn(e,t,n){var r=document.createEvent("CustomEvent"),i=n||on,o=i.bubbles,a=void 0===o||o,s=i.cancelable,l=void 0===s||s,c=i.detail;r.initCustomEvent(t,a,l,c),e.dispatchEvent(r)}function ln(e){var t=e.pointerType;return null!=t?t:Pt}function cn(e,t){var n=t.contain,r=t.disabled,i=t.onHoverStart,o=t.onHoverChange,a=t.onHoverUpdate,s=t.onHoverEnd,l=!("undefined"===typeof window||null==window.PointerEvent),c=rn(l?"pointermove":"mousemove",an),u=rn(l?"pointerenter":"mouseenter",an),h=rn(l?"pointerleave":"mouseleave",an),d=rn("react-gui:hover:lock",an),f=rn("react-gui:hover:unlock",an);Object(tn.a)((function(){var t=e.current;if(null!==t){var l=function(e){null!=s&&s(e),null!=o&&o(!1),c(t,null),h(t,null)},p=function(t){var r=e.current;null!=r&&"touch"!==ln(t)&&(n&&sn(r,"react-gui:hover:unlock"),l(t))},m=function(e){"touch"!==ln(e)&&null!=a&&(null==e.x&&(e.x=e.clientX),null==e.y&&(e.y=e.clientY),a(e))},g=function(e){null!=i&&i(e),null!=o&&o(!0),null!=a&&c(t,r?null:m),h(t,r?null:p)};u(t,r?null:function(t){var i=e.current;if(null!=i&&"touch"!==ln(t)){n&&sn(i,"react-gui:hover:lock"),g(t);d(i,r?null:function(e){e.target!==i&&l(t)}),f(i,r?null:function(e){e.target!==i&&g(t)})}})}}),[u,c,h,d,f,n,r,i,o,a,s,e])}var un=r(76);function hn(){return(hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dn(e){var t=Object(be.useState)(!1);return[t[0]||e,t[1]]}var fn=ge.a.create({root:{cursor:"pointer",touchAction:"manipulation"}}),pn=Object(be.memo)(Object(be.forwardRef)((function(e,t){var n=e.children,r=e.delayLongPress,i=e.delayPressIn,o=e.delayPressOut,a=e.disabled,s=e.focusable,l=e.onBlur,c=e.onContextMenu,u=e.onFocus,h=e.onHoverIn,d=e.onHoverOut,f=e.onKeyDown,p=e.onLongPress,m=e.onPress,g=e.onPressMove,v=e.onPressIn,y=e.onPressOut,b=e.style,w=e.testOnly_hovered,x=e.testOnly_pressed,_=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","delayLongPress","delayPressIn","delayPressOut","disabled","focusable","onBlur","onContextMenu","onFocus","onHoverIn","onHoverOut","onKeyDown","onLongPress","onPress","onPressMove","onPressIn","onPressOut","style","testOnly_hovered","testOnly_pressed"]),E=dn(!0===w),A=E[0],S=E[1],M=dn(!1),T=M[0],C=M[1],O=dn(!0===x),R=O[0],k=O[1],P=Object(be.useRef)(null),L=Object(vt.a)(t,P),D=Object(be.useMemo)((function(){return{delayLongPress:r,delayPressStart:i,delayPressEnd:o,disabled:a,onLongPress:p,onPress:m,onPressChange:k,onPressStart:v,onPressMove:g,onPressEnd:y}}),[r,i,o,a,p,m,v,g,y,k]),I=Object(un.a)(P,D),N=I.onContextMenu,j=I.onKeyDown;cn(P,{contain:!0,disabled:a,onHoverChange:S,onHoverStart:h,onHoverEnd:d});var B={hovered:A,focused:T,pressed:R},F=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!1),null!=l&&l(e))}),[P,C,l]),z=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!0),null!=u&&u(e))}),[P,C,u]),H=be.useCallback((function(e){null!=N&&N(e),null!=c&&c(e)}),[c,N]),U=be.useCallback((function(e){null!=j&&j(e),null!=f&&f(e)}),[f,j]);return be.createElement(xe.a,hn({},_,I,{accessibilityDisabled:a,focusable:!a&&!1!==s,onBlur:F,onContextMenu:H,onFocus:z,onKeyDown:U,ref:L,style:[!a&&fn.root,"function"===typeof b?b(B):b]}),"function"===typeof n?n(B):n)})));pn.displayName="Pressable";var mn=pn;function gn(){return(gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vn=be.forwardRef((function(e,t){var n=e.color,r=void 0===n?"#1976D2":n,i=e.indeterminate,o=void 0!==i&&i,a=e.progress,s=void 0===a?0:a,l=e.trackColor,c=void 0===l?"transparent":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","indeterminate","progress","trackColor","style"]),d=100*s,f=be.useRef(null);return be.useEffect((function(){var e=o?"25%":d+"%";null!=f.current&&f.current.setNativeProps({style:{width:e}})}),[o,d,f]),be.createElement(xe.a,gn({},h,{accessibilityRole:"progressbar",accessibilityValue:{max:100,min:0,now:o?null:d},ref:t,style:[yn.track,u,{backgroundColor:c}]}),be.createElement(xe.a,{ref:f,style:[yn.progress,o&&yn.animation,{backgroundColor:r}]}))}));vn.displayName="ProgressBar";var yn=ge.a.create({track:{height:5,overflow:"hidden",userSelect:"none",zIndex:0},progress:{height:"100%",zIndex:-1},animation:{animationDuration:"1s",animationKeyframes:[{"0%":{transform:[{translateX:"-100%"}]},"100%":{transform:[{translateX:"400%"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"}}),bn=vn,wn=r(117),xn=r(122),_n=r(52),En=r(127),An=r(78),Sn=r(64),Mn=r(60),Tn=r(96),Cn=function(e,t){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t),n}return new this(e,t)},On=function(e){e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},Rn=Cn,kn={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||Rn,n.poolSize||(n.poolSize=10),n.release=On,n},twoArgumentPooler:Cn},Pn=kn.twoArgumentPooler;function Ln(e,t){this.width=e,this.height=t}Ln.prototype.destructor=function(){this.width=null,this.height=null},Ln.getPooledFromElement=function(e){return Ln.getPooled(e.offsetWidth,e.offsetHeight)},kn.addPoolingTo(Ln,Pn);var Dn=Ln,In=r(90),Nn=r.n(In),jn=kn.twoArgumentPooler;function Bn(e,t){this.left=e,this.top=t}Bn.prototype.destructor=function(){this.left=null,this.top=null},kn.addPoolingTo(Bn,jn);var Fn=Bn;function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){Un(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vn=function(e){var t=e.touches,n=e.changedTouches,r=t&&t.length>0,i=n&&n.length>0;return!r&&i?n[0]:r?t[0]:e},Gn="NOT_RESPONDER",Wn="RESPONDER_INACTIVE_PRESS_IN",qn="RESPONDER_INACTIVE_PRESS_OUT",Xn="RESPONDER_ACTIVE_PRESS_IN",Yn="RESPONDER_ACTIVE_PRESS_OUT",Kn="RESPONDER_ACTIVE_LONG_PRESS_IN",Qn="RESPONDER_ACTIVE_LONG_PRESS_OUT",Zn="ERROR",Jn={NOT_RESPONDER:!1,RESPONDER_INACTIVE_PRESS_IN:!1,RESPONDER_INACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_PRESS_IN:!1,RESPONDER_ACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_LONG_PRESS_IN:!1,RESPONDER_ACTIVE_LONG_PRESS_OUT:!1,ERROR:!1},$n=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0}),er=Hn(Hn({},Jn),{},{RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),tr=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),nr="DELAY",rr="RESPONDER_GRANT",ir="RESPONDER_RELEASE",or="RESPONDER_TERMINATED",ar="ENTER_PRESS_RECT",sr="LEAVE_PRESS_RECT",lr="LONG_PRESS_DETECTED",cr={NOT_RESPONDER:{DELAY:Zn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Zn,RESPONDER_TERMINATED:Zn,ENTER_PRESS_RECT:Zn,LEAVE_PRESS_RECT:Zn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_IN:{DELAY:Xn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:Yn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Zn},error:{DELAY:Gn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Gn,LEAVE_PRESS_RECT:Gn,LONG_PRESS_DETECTED:Gn}},ur={componentDidMount:function(){var e=this;this._touchableNode=Object(o.a)(this),this._touchableNode&&this._touchableNode.addEventListener&&(this._touchableBlurListener=function(t){e._isTouchableKeyboardActive&&(e.state.touchable.touchState&&e.state.touchable.touchState!==Gn&&e.touchableHandleResponderTerminate({nativeEvent:t}),e._isTouchableKeyboardActive=!1)},this._touchableNode.addEventListener("blur",this._touchableBlurListener))},componentWillUnmount:function(){this._touchableNode&&this._touchableNode.addEventListener&&this._touchableNode.removeEventListener("blur",this._touchableBlurListener),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressInLocation=null,this.state.touchable.responderID=null,this._touchableNode=null},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(e){var t=e.currentTarget;e.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=Gn,this.state.touchable.responderID=t,this._receiveSignal(rr,e);var n=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;0!==(n=isNaN(n)?130:n)?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,e),n):this._handleDelay(e);var r=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;r=isNaN(r)?370:r,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,e),r+n)},touchableHandleResponderRelease:function(e){this.pressInLocation=null,this._receiveSignal(ir,e)},touchableHandleResponderTerminate:function(e){this.pressInLocation=null,this._receiveSignal(or,e)},touchableHandleResponderMove:function(e){if(this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,n=this.state.touchable.dimensionsOnActivate,r=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},i=r.left,o=r.top,a=r.right,s=r.bottom,l=this.touchableGetHitSlop?this.touchableGetHitSlop():null;l&&(i+=l.left||0,o+=l.top||0,a+=l.right||0,s+=l.bottom||0);var c=Vn(e.nativeEvent),u=c&&c.pageX,h=c&&c.pageY;if(this.pressInLocation)this._getDistanceBetweenPoints(u,h,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout();if(u>t.left-i&&h>t.top-o&&u<t.left+n.width+a&&h<t.top+n.height+s){var d=this.state.touchable.touchState;this._receiveSignal(ar,e),this.state.touchable.touchState===Wn&&d!==Wn&&this._cancelLongPressDelayTimeout()}else this._cancelLongPressDelayTimeout(),this._receiveSignal(sr,e)}},touchableHandleFocus:function(e){this.props.onFocus&&this.props.onFocus(e)},touchableHandleBlur:function(e){this.props.onBlur&&this.props.onBlur(e)},_remeasureMetricsOnActivation:function(){var e=this.state.touchable.responderID;null!=e&&W.a.measure(e,this._handleQueryLayout)},_handleQueryLayout:function(e,t,n,r,i,o){(e||t||n||r||i||o)&&(this.state.touchable.positionOnActivate&&Fn.release(this.state.touchable.positionOnActivate),this.state.touchable.dimensionsOnActivate&&Dn.release(this.state.touchable.dimensionsOnActivate),this.state.touchable.positionOnActivate=Fn.getPooled(i,o),this.state.touchable.dimensionsOnActivate=Dn.getPooled(n,r))},_handleDelay:function(e){this.touchableDelayTimeout=null,this._receiveSignal(nr,e)},_handleLongDelay:function(e){this.longPressDelayTimeout=null;var t=this.state.touchable.touchState;t!==Xn&&t!==Kn?console.error("Attempted to transition from state `"+t+"` to `"+Kn+"`, which is not supported. This is most likely due to `Touchable.longPressDelayTimeout` not being cancelled."):this._receiveSignal(lr,e)},_receiveSignal:function(e,t){var n=this.state.touchable.responderID,r=this.state.touchable.touchState,i=cr[r]&&cr[r][e];if(n||e!==ir){if(!i)throw new Error("Unrecognized signal `"+e+"` or state `"+r+"` for Touchable responder `"+n+"`");if(i===Zn)throw new Error("Touchable cannot transition from `"+r+"` to `"+e+"` for responder `"+n+"`");r!==i&&(this._performSideEffectsForTransition(r,i,e,t),this.state.touchable.touchState=i)}},_cancelLongPressDelayTimeout:function(){this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.longPressDelayTimeout=null},_isHighlight:function(e){return e===Xn||e===Kn},_savePressInLocation:function(e){var t=Vn(e.nativeEvent),n=t&&t.pageX,r=t&&t.pageY,i=t&&t.locationX,o=t&&t.locationY;this.pressInLocation={pageX:n,pageY:r,locationX:i,locationY:o}},_getDistanceBetweenPoints:function(e,t,n,r){var i=e-n,o=t-r;return Math.sqrt(i*i+o*o)},_performSideEffectsForTransition:function(e,t,n,r){var i=this._isHighlight(e),o=this._isHighlight(t);(n===or||n===ir)&&this._cancelLongPressDelayTimeout();var a=e===Gn&&t===Wn,s=!$n[e]&&$n[t];if((a||s)&&this._remeasureMetricsOnActivation(),er[e]&&n===lr&&this.touchableHandleLongPress&&this.touchableHandleLongPress(r),o&&!i?this._startHighlight(r):!o&&i&&this._endHighlight(r),er[e]&&n===ir){var l=!!this.props.onLongPress,c=tr[e]&&(!l||!this.touchableLongPressCancelsPress());(!tr[e]||c)&&this.touchableHandlePress&&(o||i||(this._startHighlight(r),this._endHighlight(r)),this.touchableHandlePress(r))}this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.touchableDelayTimeout=null},_playTouchSound:function(){W.a.playTouchSound()},_startHighlight:function(e){this._savePressInLocation(e),this.touchableHandleActivePressIn&&this.touchableHandleActivePressIn(e)},_endHighlight:function(e){var t=this;this.touchableHandleActivePressOut&&(this.touchableGetPressOutDelayMS&&this.touchableGetPressOutDelayMS()?this.pressOutDelayTimeout=setTimeout((function(){t.touchableHandleActivePressOut(e)}),this.touchableGetPressOutDelayMS()):this.touchableHandleActivePressOut(e))},touchableHandleKeyEvent:function(e){var t=e.type,n=e.key;"Enter"!==n&&" "!==n||("keydown"===t?this._isTouchableKeyboardActive||this.state.touchable.touchState&&this.state.touchable.touchState!==Gn||(this.touchableHandleResponderGrant(e),this._isTouchableKeyboardActive=!0):"keyup"===t&&this._isTouchableKeyboardActive&&this.state.touchable.touchState&&this.state.touchable.touchState!==Gn&&(this.touchableHandleResponderRelease(e),this._isTouchableKeyboardActive=!1),e.stopPropagation(),"Enter"===n&&"link"===Tn.a.propsToAriaRole(this.props)||e.preventDefault())},withoutDefaultFocusAndBlur:{}},hr=(ur.touchableHandleFocus,ur.touchableHandleBlur,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(ur,["touchableHandleFocus","touchableHandleBlur"]));ur.withoutDefaultFocusAndBlur=hr;var dr={Mixin:ur,TOUCH_TARGET_DEBUG:!1,renderDebugView:function(e){var t=e.color,n=e.hitSlop;if(!dr.TOUCH_TARGET_DEBUG)return null;var r={};for(var i in n=n||{top:0,bottom:0,left:0,right:0})r[i]=-n[i];var o=Nn()(t);if("number"!==typeof o)return null;var a="#"+("00000000"+o.toString(16)).substr(-8);return we.a.createElement(xe.a,{pointerEvents:"none",style:Hn({position:"absolute",borderColor:a.slice(0,-2)+"55",borderWidth:1,borderStyle:"dashed",backgroundColor:a.slice(0,-2)+"0F"},r)})}},fr=dr,pr=r(123),mr=r(92),gr=r(118),vr=r(77).a,yr=r(66);function br(e){return we.a.createElement(yr.a,e)}br.ignoreWarnings=function(){};var wr=br,xr=r(180),_r=yr.a,Er=yr.a,Ar=yr.a,Sr=function(){return Promise.resolve(!1)},Mr={PERMISSIONS:{},RESULTS:{},checkPermission:Sr,check:Sr,requestPermission:Sr,request:Sr,requestMultiple:Sr},Tr={},Cr={},Or={},Rr=r(70).a;function kr(){var e=be.useState(w.getColorScheme()),t=e[0],n=e[1];return be.useEffect((function(){function e(e){n(e.colorScheme)}return w.addChangeListener(e),function(){return w.removeChangeListener(e)}})),t}function Pr(){var e=Object(be.useState)((function(){return B.a.get("window")})),t=e[0],n=e[1];return Object(be.useEffect)((function(){function e(e){var t=e.window;null!=t&&n(t)}return B.a.addEventListener("change",e),n(B.a.get("window")),function(){B.a.removeEventListener("change",e)}}),[]),t}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,i=/^ms-/,o={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,a);return o[e]=i.test(t)?"-"+t:t}},function(e,t,n){"use strict";var r=n(311);e.exports=r},function(e,t,n){e.exports=n(424)},function(t,n,r){"use strict";r.r(n),r.d(n,"enableScreens",(function(){return T})),r.d(n,"screensEnabled",(function(){return C})),r.d(n,"NativeScreen",(function(){return O})),r.d(n,"Screen",(function(){return R})),r.d(n,"ScreenContainer",(function(){return k})),r.d(n,"NativeScreenContainer",(function(){return P})),r.d(n,"ScreenStack",(function(){return L})),r.d(n,"ScreenStackHeaderBackButtonImage",(function(){return D})),r.d(n,"ScreenStackHeaderRightView",(function(){return I})),r.d(n,"ScreenStackHeaderLeftView",(function(){return N})),r.d(n,"ScreenStackHeaderCenterView",(function(){return j})),r.d(n,"ScreenStackHeaderConfig",(function(){return B})),r.d(n,"ScreenStackHeaderSubview",(function(){return F})),r.d(n,"shouldUseActivityState",(function(){return z}));var i=r(17),o=r.n(i),a=r(21),s=r.n(a),l=r(23),c=r.n(l),u=r(24),h=r.n(u),d=r(25),f=r.n(d),p=r(18),m=r.n(p),g=r(0),v=r.n(g),y=r(12),b=r(3),w=r(38),x=r(217);for(var _ in x)["enableScreens","screensEnabled","NativeScreen","Screen","ScreenContainer","NativeScreenContainer","ScreenStack","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderSubview","shouldUseActivityState","default"].indexOf(_)<0&&function(e){r.d(n,e,(function(){return x[e]}))}(_);var E=["active","activityState","style","enabled"];function A(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=m()(t);if(n){var i=m()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return f()(this,e)}}function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var M=!0;function T(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];M=e}function C(){return M}var O=function(e){h()(n,e);var t=A(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.activityState,r=e.style,i=e.enabled,a=void 0===i||i,s=o()(e,E);return void 0!==t&&void 0===n&&(n=0!==t?2:0),v.a.createElement(b.a,S({style:[r,M&&a&&2!==n?{display:"none"}:null]},s))}}]),n}(v.a.Component),R=y.a.createAnimatedComponent(O),k=b.a,P=b.a,L=b.a,D=function(e){return v.a.createElement(b.a,null,v.a.createElement(w.a,S({resizeMode:"center",fadeDuration:0},e)))},I=function(e){return v.a.createElement(b.a,e)},N=function(e){return v.a.createElement(b.a,e)},j=function(e){return v.a.createElement(b.a,e)},B=b.a,F=b.a,z=!0},function(e,t,n){"use strict";(function(e){var r=n(91),i=n(165),o=n(4),a=n.n(o),s=n(15);function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(t){var n,r;function o(e){var n,r,o,l,c,u,h,d,f,p,m,g;if((f=t.call(this)||this)._overshootClamping=null!==(n=e.overshootClamping)&&void 0!==n&&n,f._restDisplacementThreshold=null!==(r=e.restDisplacementThreshold)&&void 0!==r?r:.001,f._restSpeedThreshold=null!==(o=e.restSpeedThreshold)&&void 0!==o?o:.001,f._initialVelocity=null!==(l=e.velocity)&&void 0!==l?l:0,f._lastVelocity=null!==(c=e.velocity)&&void 0!==c?c:0,f._toValue=e.toValue,f._delay=null!==(u=e.delay)&&void 0!==u?u:0,f._useNativeDriver=Object(s.c)(e),f.__isInteraction=null!==(h=e.isInteraction)&&void 0!==h?h:!f._useNativeDriver,f.__iterations=null!==(d=e.iterations)&&void 0!==d?d:1,void 0!==e.stiffness||void 0!==e.damping||void 0!==e.mass)a()(void 0===e.bounciness&&void 0===e.speed&&void 0===e.tension&&void 0===e.friction,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one"),f._stiffness=null!==(p=e.stiffness)&&void 0!==p?p:100,f._damping=null!==(m=e.damping)&&void 0!==m?m:10,f._mass=null!==(g=e.mass)&&void 0!==g?g:1;else if(void 0!==e.bounciness||void 0!==e.speed){var v,y;a()(void 0===e.tension&&void 0===e.friction&&void 0===e.stiffness&&void 0===e.damping&&void 0===e.mass,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one");var b=i.a.fromBouncinessAndSpeed(null!==(v=e.bounciness)&&void 0!==v?v:8,null!==(y=e.speed)&&void 0!==y?y:12);f._stiffness=b.stiffness,f._damping=b.damping,f._mass=1}else{var w,x,_=i.a.fromOrigamiTensionAndFriction(null!==(w=e.tension)&&void 0!==w?w:40,null!==(x=e.friction)&&void 0!==x?x:7);f._stiffness=_.stiffness,f._damping=_.damping,f._mass=1}return a()(f._stiffness>0,"Stiffness value must be greater than 0"),a()(f._damping>0,"Damping value must be greater than 0"),a()(f._mass>0,"Mass value must be greater than 0"),f}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,l(n,r);var c=o.prototype;return c.__getNativeAnimationConfig=function(){var e;return{type:"spring",overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,stiffness:this._stiffness,damping:this._damping,mass:this._mass,initialVelocity:null!==(e=this._initialVelocity)&&void 0!==e?e:this._lastVelocity,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var a=this;if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=t,this.__onEnd=n,this._lastTime=Date.now(),this._frameTime=0,r instanceof o){var s=r.getInternalState();this._lastPosition=s.lastPosition,this._lastVelocity=s.lastVelocity,this._initialVelocity=this._lastVelocity,this._lastTime=s.lastTime}var l=function(){a._useNativeDriver?a.__startNativeAnimation(i):a.onUpdate()};this._delay?this._timeout=setTimeout(l,this._delay):l()},c.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},c.onUpdate=function(){var e=Date.now();e>this._lastTime+64&&(e=this._lastTime+64);var t=(e-this._lastTime)/1e3;this._frameTime+=t;var n=this._damping,r=this._mass,i=this._stiffness,o=-this._initialVelocity,a=n/(2*Math.sqrt(i*r)),s=Math.sqrt(i/r),l=s*Math.sqrt(1-a*a),c=this._toValue-this._startPosition,u=0,h=0,d=this._frameTime;if(a<1){var f=Math.exp(-a*s*d);u=this._toValue-f*((o+a*s*c)/l*Math.sin(l*d)+c*Math.cos(l*d)),h=a*s*f*(Math.sin(l*d)*(o+a*s*c)/l+c*Math.cos(l*d))-f*(Math.cos(l*d)*(o+a*s*c)-l*c*Math.sin(l*d))}else{var p=Math.exp(-s*d);u=this._toValue-p*(c+(o+s*c)*d),h=p*(o*(d*s-1)+d*c*(s*s))}if(this._lastTime=e,this._lastPosition=u,this._lastVelocity=h,this._onUpdate(u),this.__active){var m=!1;this._overshootClamping&&0!==this._stiffness&&(m=this._startPosition<this._toValue?u>this._toValue:u<this._toValue);var g=Math.abs(h)<=this._restSpeedThreshold,v=!0;if(0!==this._stiffness&&(v=Math.abs(this._toValue-u)<=this._restDisplacementThreshold),m||g&&v)return 0!==this._stiffness&&(this._lastPosition=this._toValue,this._lastVelocity=0,this._onUpdate(this._toValue)),void this.__debouncedOnEnd({finished:!0});this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},o}(r.a);t.a=c}).call(this,n(46))},function(e,t,n){"use strict";function r(e){return 3.62*(e-30)+194}function i(e){return 3*(e-8)+25}t.a={fromOrigamiTensionAndFriction:function(e,t){return{stiffness:r(e),damping:i(t)}},fromBouncinessAndSpeed:function(e,t){function n(e,t,n){return(e-t)/(n-t)}function o(e,t,n){return t+e*(n-t)}var a=n(e/1.7,0,20);a=o(a,0,.8);var s,l,c=o(n(t/1.7,0,20),.5,200),u=(s=a,l=function(e){return e<=18?(t=e,7e-4*Math.pow(t,3)-.031*Math.pow(t,2)+.64*t+1.28):e>18&&e<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(e):function(e){return 45e-8*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(e);var t}(c),function(e,t,n){return e*n+(1-e)*t}(2*s-s*s,l,.01));return{stiffness:r(c),damping:i(u)}}}},function(e,t,n){"use strict";(function(e){var r,i=n(91),o=n(15),a=n(14);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(t){var n,i;function l(e){var n,i,s,l,c,u;return(u=t.call(this)||this)._toValue=e.toValue,u._easing=null!==(n=e.easing)&&void 0!==n?n:(r||(r=a.a.inOut(a.a.ease)),r),u._duration=null!==(i=e.duration)&&void 0!==i?i:500,u._delay=null!==(s=e.delay)&&void 0!==s?s:0,u.__iterations=null!==(l=e.iterations)&&void 0!==l?l:1,u._useNativeDriver=Object(o.c)(e),u.__isInteraction=null!==(c=e.isInteraction)&&void 0!==c?c:!u._useNativeDriver,u}i=t,(n=l).prototype=Object.create(i.prototype),n.prototype.constructor=n,s(n,i);var c=l.prototype;return c.__getNativeAnimationConfig=function(){for(var e=[],t=Math.round(this._duration/(1e3/60)),n=0;n<t;n++)e.push(this._easing(n/t));return e.push(this._easing(1)),{type:"frames",frames:e,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var o=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var a=function(){0!==o._duration||o._useNativeDriver?(o._startTime=Date.now(),o._useNativeDriver?o.__startNativeAnimation(i):o._animationFrame=requestAnimationFrame(o.onUpdate.bind(o))):(o._onUpdate(o._toValue),o.__debouncedOnEnd({finished:!0}))};this._delay?this._timeout=setTimeout(a,this._delay):a()},c.onUpdate=function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)))},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},l}(i.a);t.a=l}).call(this,n(46))},function(e,t){e.exports=function(e){return[...e].reduce((e,[t,n])=>(e[t]=n,e),{})}},function(e,t,n){e.exports=n.p+"static/media/bezier.799a5c8c.cjs"},function(t,n,r){"use strict";r.d(n,"a",(function(){return Wo})),r.d(n,"b",(function(){return Go}));var i=r(0),o=r.n(i);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(l(Object.entries(e).filter((function(e){var t=s(e,1)[0];return!n.has(t)})).map((function(e){var t=s(e,2);return a({},t[0],t[1])})))))},d=r(167),f=r.n(d);function p(e){return(p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e,t){var n="object"===p(t)?t:{wrapperElementType:t,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},r=n.wrapperElementType,a=void 0===r?"div":r,s=n.nodeMapper,l=void 0===s?function(e){return e}:s,c=n.methodNames,u=void 0===c?[]:c,d=n.initPropNames,v=void 0===d?[]:d;return Object(i.forwardRef)((function(t,n){var r=Object(i.useRef)(),s=m(Object(i.useState)({}),2),c=s[0],d=s[1];Object(i.useEffect)((function(){return d(t)}));var p=Object(i.useMemo)((function(){var n=f()(v.filter((function(e){return t.hasOwnProperty(e)})).map((function(e){return[e,t[e]]})));return e(n)}),[]);Object(i.useLayoutEffect)((function(){p(l(r.current))}),[]),Object(i.useEffect)((function(){return p._destructor instanceof Function?p._destructor:void 0}),[]);var y=Object(i.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p[e]instanceof Function?p[e].apply(p,n):void 0}),[p]),b=h(t,[].concat(g(u),g(v)));return Object.keys(b).filter((function(e){return c[e]!==t[e]})).forEach((function(e){return y(e,t[e])})),Object(i.useImperativeHandle)(n,(function(){return f()(u.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y.apply(void 0,[e].concat(n))}]})))})),o.a.createElement(a,{ref:r})}))},w=(r(318),r(319),r(182),r(53)),x=r(11);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-nav-info {\n position: absolute;\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n font-family: Sans-serif;\n z-index: 1000;\n}");var O=Object(w.a)({props:{width:{default:window.innerWidth,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.width=e)}},height:{default:window.innerHeight,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.height=e)}},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},backgroundColor:{default:"#002"},showNavInfo:{default:!0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeLabel:{default:"name"},nodeDesc:{default:"desc"},onNodeHover:{},onNodeClick:{},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkLabel:{default:"name"},linkDesc:{default:"desc"},onLinkHover:{},onLinkClick:{},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:E(E({},Object.assign.apply(Object,[{}].concat(M(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return A({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container),t.container.style.position="relative",t.container.style.width=t.width,t.container.style.height=t.height,t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="graph-nav-info",t.navInfo.textContent="Mouse drag: look, gamepad/arrow/wasd keys: move";var n,r,i,o,a,s=document.createElement("a-scene");s.setAttribute("embedded",""),s.appendChild(t.sky=document.createElement("a-sky")),t.sky.setAttribute("radius",3e3),s.appendChild(n=document.createElement("a-entity")),n.setAttribute("position","0 0 300"),n.setAttribute("movement-controls","fly: true; speed: 7"),n.appendChild(r=document.createElement("a-entity")),r.setAttribute("camera",""),r.setAttribute("position","0 0 0"),r.setAttribute("look-controls","reverseMouseDrag: false; pointerLockEnabled: false"),r.appendChild(i=document.createElement("a-text")),i.setAttribute("position","0 -0.3 -1"),i.setAttribute("width",2),i.setAttribute("align","center"),i.setAttribute("color","lavender"),i.setAttribute("value",""),r.appendChild(o=document.createElement("a-text")),o.setAttribute("position","0 -0.4 -1"),o.setAttribute("width",1.3),o.setAttribute("align","center"),o.setAttribute("color","lavender"),o.setAttribute("value",""),s.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor","rayOrigin: mouse; mouseCursorStylesEnabled: true"),a.setAttribute("raycaster","objects: [forcegraph]; interval: 100"),["left","right"].forEach((function(e){var t;n.appendChild(t=document.createElement("a-entity")),t.setAttribute("laser-controls","hand: ".concat(e)),t.setAttribute("raycaster","objects: [forcegraph]; interval: 100; lineColor: steelblue; lineOpacity: 0.85")})),s.appendChild(t.forcegraph=document.createElement("a-entity")),t.forcegraph.setAttribute("forcegraph",null),t.container.appendChild(s),t.forcegraph.setAttribute("forcegraph",Object.assign.apply(Object,M(["node","link"].map((function(e){var n={node:"Node",link:"Link"}[e];return A({},"on".concat(n,"Hover"),(function(r,a){var s=r&&Object(x.default)(t["".concat(e,"Label")])(r)||"",l=r&&Object(x.default)(t["".concat(e,"Desc")])(r)||"";i.setAttribute("value",s),o.setAttribute("value",l),t["on".concat(n,"Hover")]&&t["on".concat(n,"Hover")](r,a)}))})))))},update:function(e,t){t.hasOwnProperty("backgroundColor")&&e.sky.setAttribute("color",e.backgroundColor),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none");var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","onNodeClick","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","onLinkClick","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(M(Object.entries(e).filter((function(e){var r=S(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=S(e,2);return A({},t[0],t[1])}))),M(Object.entries(e.graphData).map((function(e){var t=S(e,2);return A({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),R=r(1),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=Object(w.a)({props:{width:{},height:{},yOffset:{default:1.5},glScale:{default:200},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},onNodeHover:{},onNodeClick:{},onLinkHover:{},onLinkClick:{},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:L(L({},Object.assign.apply(Object,[{}].concat(N(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return D({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.markerAttrs,i=void 0===r?{preset:"hiro"}:r;e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container);var o=document.createElement("a-scene");o.setAttribute("embedded",""),o.setAttribute("arjs","debugUIEnabled: false;");var a,s=document.createElement("a-marker");Object.entries(i).forEach((function(e){var t=I(e,2),n=t[0],r=t[1];return s.setAttribute(n,r)})),o.appendChild(s),o.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor"),a.setAttribute("raycaster","objects: [forcegraph]"),t.forcegraph=document.createElement("a-entity"),t.forcegraph.setAttribute("forcegraph",null),s.appendChild(t.forcegraph);var l=document.createElement("a-entity");l.setAttribute("camera",""),o.appendChild(l),t.container.appendChild(o)},update:function(e,t){t.hasOwnProperty("width")&&e.width&&(e.container.style.width=e.width),t.hasOwnProperty("height")&&e.height&&(e.container.style.height=e.height),t.hasOwnProperty("glScale")&&e.forcegraph.setAttribute("scale",N(new Array(3)).map((function(){return 1/e.glScale})).join(" ")),t.hasOwnProperty("yOffset")&&e.forcegraph.setAttribute("position","0 ".concat(e.yOffset," 0"));var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","onNodeHover","onNodeClick","onLinkHover","onLinkClick","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(N(Object.entries(e).filter((function(e){var r=I(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=I(e,2);return D({},t[0],t[1])}))),N(Object.entries(e.graphData).map((function(e){var t=I(e,2);return D({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),z=r(2);const H=new z.y,U=new z.C,V=new z.P,G=new z.Q,W=new z.Q,q=new z.Q,X=new z.s;class Y extends z.l{constructor(e,t,n){super(),n.style.touchAction="none";let r=null,i=null;const o=[],a=this;function s(){n.addEventListener("pointermove",c),n.addEventListener("pointerdown",u),n.addEventListener("pointerup",h),n.addEventListener("pointerleave",h)}function l(){n.removeEventListener("pointermove",c),n.removeEventListener("pointerdown",u),n.removeEventListener("pointerup",h),n.removeEventListener("pointerleave",h),n.style.cursor=""}function c(s){if(!1!==a.enabled){if(d(s),U.setFromCamera(V,t),r)return U.ray.intersectPlane(H,W)&&r.position.copy(W.sub(G).applyMatrix4(X)),void a.dispatchEvent({type:"drag",object:r});if("mouse"===s.pointerType||"pen"===s.pointerType)if(o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0){const e=o[0].object;H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(e.matrixWorld)),i!==e&&null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null),i!==e&&(a.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",i=e)}else null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null)}}function u(i){!1!==a.enabled&&(d(i),o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0&&(r=!0===a.transformGroup?e[0]:o[0].object,H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(r.matrixWorld)),U.ray.intersectPlane(H,W)&&(X.copy(r.parent.matrixWorld).invert(),G.copy(W).sub(q.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",a.dispatchEvent({type:"dragstart",object:r})))}function h(){!1!==a.enabled&&(r&&(a.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=i?"pointer":"auto")}function d(e){const t=n.getBoundingClientRect();V.x=(e.clientX-t.left)/t.width*2-1,V.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.transformGroup=!1,this.activate=s,this.deactivate=l,this.dispose=function(){l()},this.getObjects=function(){return e}}}var K=r(146);const Q={type:"change"},Z={type:"start"},J={type:"end"};class $ extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.TrackballControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.TrackballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.');const n=this,r=-1,i=0,o=1,a=2,s=3,l=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.target=new z.Q;const c=new z.Q;let u=1,h=r,d=r,f=0,p=0,m=0;const g=new z.Q,v=new z.P,y=new z.P,b=new z.Q,w=new z.P,x=new z.P,_=new z.P,E=new z.P,A=[],S={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const M=function(){const e=new z.P;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),T=function(){const e=new z.P;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function C(e){!1!==n.enabled&&(0===A.length&&(n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R)),function(e){A.push(e)}(e),"touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:h=s,y.copy(T(A[0].pageX,A[0].pageY)),v.copy(y);break;default:h=l;const e=A[0].pageX-A[1].pageX,t=A[0].pageY-A[1].pageY;p=f=Math.sqrt(e*e+t*t);const n=(A[0].pageX+A[1].pageX)/2,r=(A[0].pageY+A[1].pageY)/2;_.copy(M(n,r)),E.copy(_)}n.dispatchEvent(Z)}(e):function(e){if(h===r)switch(e.button){case n.mouseButtons.LEFT:h=i;break;case n.mouseButtons.MIDDLE:h=o;break;case n.mouseButtons.RIGHT:h=a;break;default:h=r}const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||(_.copy(M(e.pageX,e.pageY)),E.copy(_)):(w.copy(M(e.pageX,e.pageY)),x.copy(w)):(y.copy(T(e.pageX,e.pageY)),v.copy(y));n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R),n.dispatchEvent(Z)}(e))}function O(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:v.copy(y),y.copy(T(e.pageX,e.pageY));break;default:const t=function(e){const t=e.pointerId===A[0].pointerId?A[1]:A[0];return S[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;p=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,o=(e.pageY+t.y)/2;E.copy(M(i,o))}}(e):function(e){const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||E.copy(M(e.pageX,e.pageY)):x.copy(M(e.pageX,e.pageY)):(v.copy(y),y.copy(T(e.pageX,e.pageY)))}(e))}function R(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(A.length){case 0:h=r;break;case 1:h=s,y.copy(T(e.pageX,e.pageY)),v.copy(y)}n.dispatchEvent(J)}(e):(h=r,n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R),n.dispatchEvent(J)),N(e),0===A.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R)))}function k(e){N(e)}function P(e){!1!==n.enabled&&(window.removeEventListener("keydown",P),d===r&&(e.code!==n.keys[i]||n.noRotate?e.code!==n.keys[o]||n.noZoom?e.code!==n.keys[a]||n.noPan||(d=a):d=o:d=i))}function L(){!1!==n.enabled&&(d=r,window.addEventListener("keydown",P))}function D(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:w.y-=.025*e.deltaY;break;case 1:w.y-=.01*e.deltaY;break;default:w.y-=25e-5*e.deltaY}n.dispatchEvent(Z),n.dispatchEvent(J)}}function I(e){!1!==n.enabled&&e.preventDefault()}function N(e){delete S[e.pointerId];for(let t=0;t<A.length;t++)if(A[t].pointerId==e.pointerId)return void A.splice(t,1)}function j(e){let t=S[e.pointerId];void 0===t&&(t=new z.P,S[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new z.Q,t=new z.A,r=new z.Q,i=new z.Q,o=new z.Q,a=new z.Q;return function(){a.set(y.x-v.x,y.y-v.y,0);let s=a.length();s?(g.copy(n.object.position).sub(n.target),r.copy(g).normalize(),i.copy(n.object.up).normalize(),o.crossVectors(i,r).normalize(),i.setLength(y.y-v.y),o.setLength(y.x-v.x),a.copy(i.add(o)),e.crossVectors(a,g).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),g.applyQuaternion(t),n.object.up.applyQuaternion(t),b.copy(e),m=s):!n.staticMoving&&m&&(m*=Math.sqrt(1-n.dynamicDampingFactor),g.copy(n.object.position).sub(n.target),t.setFromAxisAngle(b,m),g.applyQuaternion(t),n.object.up.applyQuaternion(t)),v.copy(y)}}(),this.zoomCamera=function(){let e;h===l?(e=f/p,f=p,n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom*=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(x.y-w.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?w.copy(x):w.y+=(x.y-w.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new z.P,t=new z.Q,r=new z.Q;return function(){if(e.copy(E).sub(_),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(g.length()*n.panSpeed),r.copy(g).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?_.copy(E):_.add(e.subVectors(E,_).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(g.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,g.setLength(n.maxDistance)),w.copy(x)),g.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,g.setLength(n.minDistance)),w.copy(x)))},this.update=function(){g.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,g),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),c.distanceToSquared(n.object.position)>1e-6&&(n.dispatchEvent(Q),c.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(c.distanceToSquared(n.object.position)>1e-6||u!==n.object.zoom)&&(n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){h=r,d=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),g.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",I),n.domElement.removeEventListener("pointerdown",C),n.domElement.removeEventListener("pointercancel",k),n.domElement.removeEventListener("wheel",D),window.removeEventListener("keydown",P),window.removeEventListener("keyup",L)},this.domElement.addEventListener("contextmenu",I),this.domElement.addEventListener("pointerdown",C),this.domElement.addEventListener("pointercancel",k),this.domElement.addEventListener("wheel",D,{passive:!1}),window.addEventListener("keydown",P),window.addEventListener("keyup",L),this.handleResize(),this.update()}}const ee={type:"change"},te={type:"start"},ne={type:"end"};class re extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new z.Q,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.touches={ONE:z.K.ROTATE,TWO:z.K.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.listenToKeyEvents=function(e){e.addEventListener("keydown",G),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(ee),n.update(),i=r.NONE},this.update=function(){const t=new z.Q,h=(new z.A).setFromUnitVectors(e.up,new z.Q(0,1,0)),d=h.clone().invert(),f=new z.Q,p=new z.A,m=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(h),a.setFromVector3(t),n.autoRotate&&i===r.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let g=n.minAzimuthAngle,v=n.maxAzimuthAngle;return isFinite(g)&&isFinite(v)&&(g<-Math.PI?g+=m:g>Math.PI&&(g-=m),v<-Math.PI?v+=m:v>Math.PI&&(v-=m),a.theta=g<=v?Math.max(g,Math.min(v,a.theta)):a.theta>(g+v)/2?Math.max(g,a.theta):Math.min(v,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=l,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),t.setFromSpherical(a),t.applyQuaternion(d),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0)),l=1,!!(u||f.distanceToSquared(n.object.position)>o||8*(1-p.dot(n.object.quaternion))>o)&&(n.dispatchEvent(ee),f.copy(n.object.position),p.copy(n.object.quaternion),u=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",W),n.domElement.removeEventListener("pointerdown",B),n.domElement.removeEventListener("pointercancel",U),n.domElement.removeEventListener("wheel",V),n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",G)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const o=1e-6,a=new z.H,s=new z.H;let l=1;const c=new z.Q;let u=!1;const h=new z.P,d=new z.P,f=new z.P,p=new z.P,m=new z.P,g=new z.P,v=new z.P,y=new z.P,b=new z.P,w=[],x={};function _(){return Math.pow(.95,n.zoomSpeed)}function E(e){s.theta-=e}function A(e){s.phi-=e}const S=function(){const e=new z.Q;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),M=function(){const e=new z.Q;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),T=function(){const e=new z.Q;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),S(2*t*a/i.clientHeight,n.object.matrix),M(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(S(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function C(e){n.object.isPerspectiveCamera?l/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){n.object.isPerspectiveCamera?l*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(e){h.set(e.clientX,e.clientY)}function k(e){p.set(e.clientX,e.clientY)}function P(){if(1===w.length)h.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);h.set(e,t)}}function L(){if(1===w.length)p.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);p.set(e,t)}}function D(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);v.set(0,n)}function I(e){if(1==w.length)d.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);d.set(n,r)}f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d)}function N(e){if(1===w.length)m.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m)}function j(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);y.set(0,o),b.set(0,Math.pow(y.y/v.y,n.zoomSpeed)),C(b.y),v.copy(y)}function B(e){!1!==n.enabled&&(0===w.length&&(n.domElement.ownerDocument.addEventListener("pointermove",F),n.domElement.ownerDocument.addEventListener("pointerup",H)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),w.length){case 1:switch(n.touches.ONE){case z.K.ROTATE:if(!1===n.enableRotate)return;P(),i=r.TOUCH_ROTATE;break;case z.K.PAN:if(!1===n.enablePan)return;L(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case z.K.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&D(),n.enablePan&&L(),i=r.TOUCH_DOLLY_PAN;break;case z.K.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&D(),n.enableRotate&&P(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case z.r.DOLLY:if(!1===n.enableZoom)return;!function(e){v.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case z.r.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;k(e),i=r.PAN}else{if(!1===n.enableRotate)return;R(e),i=r.ROTATE}break;case z.r.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;R(e),i=r.ROTATE}else{if(!1===n.enablePan)return;k(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e))}function F(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;I(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;N(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&j(e),n.enablePan&&N(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&j(e),n.enableRotate&&I(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){if(!1===n.enabled)return;switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){d.set(e.clientX,e.clientY),f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){y.set(e.clientX,e.clientY),b.subVectors(y,v),b.y>0?C(_()):b.y<0&&O(_()),v.copy(y),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m),n.update()}(e)}}(e))}function H(e){!1!==n.enabled&&(e.pointerType,n.dispatchEvent(ne),i=r.NONE,q(e),0===w.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H)))}function U(e){q(e)}function V(e){!1===n.enabled||!1===n.enableZoom||i!==r.NONE&&i!==r.ROTATE||(e.preventDefault(),n.dispatchEvent(te),function(e){e.deltaY<0?O(_()):e.deltaY>0&&C(_()),n.update()}(e),n.dispatchEvent(ne))}function G(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:T(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:T(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:T(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:T(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function W(e){!1!==n.enabled&&e.preventDefault()}function q(e){delete x[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}function X(e){let t=x[e.pointerId];void 0===t&&(t=new z.P,x[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return x[t.pointerId]}n.domElement.addEventListener("contextmenu",W),n.domElement.addEventListener("pointerdown",B),n.domElement.addEventListener("pointercancel",U),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const ie={type:"change"};class oe extends z.l{constructor(e,t){super(),void 0===t&&(console.warn('THREE.FlyControls: The second parameter "domElement" is now mandatory.'),t=document),this.object=e,this.domElement=t,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=new z.A,i=new z.Q;this.tmpQuaternion=new z.A,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new z.Q(0,0,0),this.rotationVector=new z.Q(0,0,0),this.keydown=function(e){if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.mouseup=function(e){if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){const t=e*n.movementSpeed,o=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*o,n.rotationVector.y*o,n.rotationVector.z*o,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(i.distanceToSquared(n.object.position)>1e-6||8*(1-r.dot(n.object.quaternion))>1e-6)&&(n.dispatchEvent(ie),r.copy(n.object.quaternion),i.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",ae),this.domElement.removeEventListener("mousedown",a),this.domElement.removeEventListener("mousemove",o),this.domElement.removeEventListener("mouseup",s),window.removeEventListener("keydown",l),window.removeEventListener("keyup",c)};const o=this.mousemove.bind(this),a=this.mousedown.bind(this),s=this.mouseup.bind(this),l=this.keydown.bind(this),c=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",ae),this.domElement.addEventListener("mousemove",o),this.domElement.addEventListener("mousedown",a),this.domElement.addEventListener("mouseup",s),window.addEventListener("keydown",l),window.addEventListener("keyup",c),this.updateMovementVector(),this.updateRotationVector()}}function ae(e){e.preventDefault()}var se={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}"};class le{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const ce=new z.w(-1,1,1,-1,0,1),ue=new z.e;ue.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ue.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class he{constructor(e){this._mesh=new z.t(ue,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,ce)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class de extends le{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof z.E?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=z.O.clone(e.uniforms),this.material=new z.E({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new he(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}class fe extends le{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let o,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class pe extends le{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class me{constructor(e,t){if(this.renderer=e,void 0===t){const n={minFilter:z.q,magFilter:z.q,format:z.B},r=e.getSize(new z.P);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new z.R(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],void 0===se&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===de&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new de(se),this.clock=new z.f}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,i=this.passes.length;r<i;r++){const t=this.passes[r];if(!1!==t.enabled){if(t.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==fe&&(t instanceof fe?n=!0:t instanceof pe&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new z.P);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let i=0;i<this.passes.length;i++)this.passes[i].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}new z.w(-1,1,1,-1,0,1);const ge=new z.e;ge.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ge.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class ve extends le{constructor(e,t,n,r,i){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==i?i:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new z.g}render(e,t,n){const r=e.autoClear;let i,o;e.autoClear=!1,void 0!==this.overrideMaterial&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),i=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,i),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=o),e.autoClear=r}}function ye(){return(ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _e(e,t,n){return(_e=xe()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&be(i,n.prototype),i}).apply(null,arguments)}function Ee(e){var t="function"===typeof Map?new Map:void 0;return(Ee=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _e(e,arguments,we(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),be(r,e)})(e)}var Ae=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,be(t,n),r}(Ee(Error));function Se(e){return Math.round(255*e)}function Me(e,t,n){return Se(e)+","+Se(t)+","+Se(n)}function Te(e,t,n,r){if(void 0===r&&(r=Me),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,l=0,c=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,c=a):i>=3&&i<4?(l=a,c=o):i>=4&&i<5?(s=a,c=o):i>=5&&i<6&&(s=o,c=a);var u=n-o/2;return r(s+u,l+u,c+u)}var Ce={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var Oe=/^#[a-fA-F0-9]{6}$/,Re=/^#[a-fA-F0-9]{8}$/,ke=/^#[a-fA-F0-9]{3}$/,Pe=/^#[a-fA-F0-9]{4}$/,Le=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,De=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Ie=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ne=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function je(e){if("string"!==typeof e)throw new Ae(3);var t=function(e){if("string"!==typeof e)return e;var t=e.toLowerCase();return Ce[t]?"#"+Ce[t]:e}(e);if(t.match(Oe))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Re)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(ke))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Pe)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=Le.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=De.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=Ie.exec(t);if(a){var s="rgb("+Te(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",l=Le.exec(s);if(!l)throw new Ae(4,t,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=Ne.exec(t.substring(0,50));if(c){var u="rgb("+Te(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",h=Le.exec(u);if(!h)throw new Ae(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+c[4])}}throw new Ae(5)}var Be=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Fe(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ze(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return Be("#"+Fe(e)+Fe(t)+Fe(n));if("object"===typeof e&&void 0===t&&void 0===n)return Be("#"+Fe(e.red)+Fe(e.green)+Fe(e.blue));throw new Ae(6)}function He(e,t,n,r){if("string"===typeof e&&"number"===typeof t){var i=je(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"===typeof e&&"number"===typeof t&&"number"===typeof n&&"number"===typeof r)return r>=1?ze(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ze(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Ae(7)}function Ue(e){return function e(t,n,r){return function(){var i=r.concat(Array.prototype.slice.call(arguments));return i.length>=n?t.apply(this,i):e(t,n,i)}}(e,e.length,[])}function Ve(e,t,n){return Math.max(e,Math.min(t,n))}function Ge(e,t){if("transparent"===t)return t;var n=je(t);return He(ye({},n,{alpha:Ve(0,1,(100*("number"===typeof n.alpha?n.alpha:1)+100*parseFloat(e))/100)}))}var We=Ue(Ge);var qe=r(62);function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Qe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e){return function(e){if(Array.isArray(e))return Ze(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){if(e){if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var Je=window.THREE?window.THREE:{WebGLRenderer:z.S,Scene:z.D,PerspectiveCamera:z.x,Raycaster:z.C,TextureLoader:z.M,Vector2:z.P,Vector3:z.Q,Box3:z.c,Color:z.g,Mesh:z.t,SphereGeometry:z.G,MeshBasicMaterial:z.u,BackSide:z.b,EventDispatcher:z.l,MOUSE:z.r,Quaternion:z.A,Spherical:z.H,Clock:z.f},$e=Object(w.a)({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Object(x.default)(e.tooltipContent)(t)||"",e.hoverObj=t)}qe.a.update()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var o=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),l=h();new qe.a.Tween(s).to(o,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(c).start(),new qe.a.Tween(l).to(a,r/3).easing(qe.a.Easing.Quadratic.Out).onUpdate(u).start()}else c(o),u(a);return this}return Object.assign({},i.position,{lookAt:h()});function c(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function u(t){e.controls.target=new Je.Vector3(t.x,t.y,t.z)}function h(){return Object.assign(new Je.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return this.fitToBbox(this.getBbox.apply(this,i),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var o=new Je.Vector3(0,0,0),a=2*Math.max.apply(Math,Ke(Object.entries(t).map((function(e){var t=Ye(e,2),n=t[0],r=t[1];return Math.max.apply(Math,Ke(r.map((function(e){return Math.abs(o[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,l=a/Math.atan(s*Math.PI/180),c=l/i.aspect,u=Math.max(l,c);if(u>0){var h=o.clone().sub(i.position).normalize().multiplyScalar(-u);this.cameraPosition(h,o,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Je.Box3(new Je.Vector3(0,0,0),new Je.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,Ke(["x","y","z"].map((function(e){return Xe({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new Je.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new Je.Raycaster;return o.setFromCamera(i,e.camera),Object.assign({},o.ray.at(r,new Je.Vector3))},intersectingObjects:function(e,t,n){var r=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Je.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Je.Scene,camera:new Je.PerspectiveCamera,clock:new Je.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,o=n.rendererConfig,a=void 0===o?{}:o,s=n.extraRenderers,l=void 0===s?[]:s,c=n.waitForLoadComplete,u=void 0===c||c;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Je.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.container);t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, 21px)")}}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Je.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=l,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new me(t.renderer),t.postProcessingComposer.addPass(new ve(t.scene,t.camera)),t.controls=new{trackball:$,orbit:re,fly:oe}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(Ke(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Je.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!u,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width=e.width,e.container.style.height=e.height,[e.renderer,e.postProcessingComposer].concat(Ke(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=e.skyRadius),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Je.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=je(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Je.Color(We(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Je.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new Je.MeshBasicMaterial({map:t,side:Je.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ot(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=r[t].apply(r,o);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-info-msg {\n top: 50%;\n width: 100%;\n text-align: center;\n color: lavender;\n opacity: 0.7;\n font-size: 22px;\n position: absolute;\n font-family: Sans-serif;\n}\n\n.scene-container .clickable {\n cursor: pointer;\n}\n\n.scene-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.scene-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}");var at=window.THREE?window.THREE:{AmbientLight:z.a,DirectionalLight:z.k,Vector3:z.Q},st=ot("forceGraph",K.default),lt=Object.assign.apply(Object,rt(["jsonUrl","graphData","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaDecay","d3VelocityDecay","d3AlphaMin","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return nt({},e,st.linkProp(e))})))),ct=Object.assign.apply(Object,rt(["refresh","getGraphBbox","d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return nt({},e,st.linkMethod(e))})))),ut=ot("renderObjs",$e),ht=Object.assign.apply(Object,rt(["width","height","backgroundColor","showNavInfo","enablePointerInteraction"].map((function(e){return nt({},e,ut.linkProp(e))})))),dt=Object.assign.apply(Object,rt(["cameraPosition","postProcessingComposer"].map((function(e){return nt({},e,ut.linkMethod(e))}))).concat([{graph2ScreenCoords:ut.linkMethod("getScreenCoords"),screen2GraphCoords:ut.linkMethod("getSceneCoords")}]));function ft(e){for(var t=e;t&&!t.hasOwnProperty("__graphObjType");)t=t.parent;return t}var pt=Object(w.a)({props:tt(tt({nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)},triggerUpdate:!1},enableNavigationControls:{default:!0,onChange:function(e,t){var n=t.renderObjs.controls();n&&(n.enabled=e)},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1}},lt),ht),methods:tt(tt({zoomToFit:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e.renderObjs.fitToBbox((r=e.forceGraph).getGraphBbox.apply(r,o),t,n),this},pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.enablePointerInteraction&&(this.renderer().domElement.style.cursor=null),e.forceGraph.tickFrame(),e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},tbControls:function(e){return e.renderObjs.tbControls()},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ct),dt),stateInit:function(e){var t=e.controlType,n=e.rendererConfig,r=e.extraRenderers;return{forceGraph:new K.default,renderObjs:$e({controlType:t,rendererConfig:n,extraRenderers:r})}},init:function(e,t){e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var n=document.createElement("div");t.container.appendChild(n),t.renderObjs(n);var r,i=t.renderObjs.camera(),o=t.renderObjs.renderer(),a=t.renderObjs.controls();a.enabled=!!t.enableNavigationControls,t.lastSetCameraZ=i.position.z,t.container.appendChild(r=document.createElement("div")),r.className="graph-info-msg",r.textContent="",t.forceGraph.onLoading((function(){r.textContent="Loading..."})).onFinishLoading((function(){r.textContent=""})).onUpdate((function(){t.graphData=t.forceGraph.graphData(),0===i.position.x&&0===i.position.y&&i.position.z===t.lastSetCameraZ&&t.graphData.nodes.length&&(i.lookAt(t.forceGraph.position),t.lastSetCameraZ=i.position.z=170*Math.cbrt(t.graphData.nodes.length))})).onFinishUpdate((function(){if(t._dragControls){var e=t.graphData.nodes.find((function(e){return e.__initialFixedPos&&!e.__disposeControlsAfterDrag}));e?e.__disposeControlsAfterDrag=!0:t._dragControls.dispose(),t._dragControls=void 0}if(t.enableNodeDrag&&t.enablePointerInteraction&&"d3"===t.forceEngine){var n=t._dragControls=new Y(t.graphData.nodes.map((function(e){return e.__threeObj})).filter((function(e){return e})),i,o.domElement);n.addEventListener("dragstart",(function(e){a.enabled=!1,e.object.__initialPos=e.object.position.clone(),e.object.__prevPos=e.object.position.clone();var t=ft(e.object).__data;!t.__initialFixedPos&&(t.__initialFixedPos={fx:t.fx,fy:t.fy,fz:t.fz}),!t.__initialPos&&(t.__initialPos={x:t.x,y:t.y,z:t.z}),["x","y","z"].forEach((function(e){return t["f".concat(e)]=t[e]})),o.domElement.classList.add("grabbable")})),n.addEventListener("drag",(function(e){var n=ft(e.object);if(!e.object.hasOwnProperty("__graphObjType")){var r=e.object.__initialPos,i=e.object.__prevPos,o=e.object.position;n.position.add(o.clone().sub(i)),i.copy(o),o.copy(r)}var a=n.__data,s=n.position,l={x:s.x-a.x,y:s.y-a.y,z:s.z-a.z};["x","y","z"].forEach((function(e){return a["f".concat(e)]=a[e]=s[e]})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),a.__dragged=!0,t.onNodeDrag(a,l)})),n.addEventListener("dragend",(function(e){delete e.object.__initialPos,delete e.object.__prevPos;var r=ft(e.object).__data;r.__disposeControlsAfterDrag&&(n.dispose(),delete r.__disposeControlsAfterDrag);var i=r.__initialFixedPos,s=r.__initialPos,l={x:s.x-r.x,y:s.y-r.y,z:s.z-r.z};i&&(["x","y","z"].forEach((function(e){var t="f".concat(e);void 0===i[t]&&delete r[t]})),delete r.__initialFixedPos,delete r.__initialPos,r.__dragged&&(delete r.__dragged,t.onNodeDragEnd(r,l))),t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.enableNavigationControls&&(a.enabled=!0,a.domElement&&a.domElement.ownerDocument&&a.domElement.ownerDocument.dispatchEvent(new PointerEvent("pointerup",{pointerType:"touch"}))),o.domElement.classList.remove("grabbable")}))}})),t.renderObjs.objects([new at.AmbientLight(12303291),new at.DirectionalLight(16777215,.6),t.forceGraph]).hoverOrderComparator((function(e,t){var n=ft(e);if(!n)return 1;var r=ft(t);if(!r)return-1;var i=function(e){return"node"===e.__graphObjType};return i(r)-i(n)})).tooltipContent((function(e){var n=ft(e);return n&&Object(x.default)(t["".concat(n.__graphObjType,"Label")])(n.__data)||""})).hoverDuringDrag(!1).onHover((function(e){var n=ft(e);if(n!==t.hoverObj){var r=t.hoverObj?t.hoverObj.__graphObjType:null,i=t.hoverObj?t.hoverObj.__data:null,a=n?n.__graphObjType:null,s=n?n.__data:null;if(r&&r!==a){var l=t["on".concat("node"===r?"Node":"Link","Hover")];l&&l(null,i)}if(a){var c=t["on".concat("node"===a?"Node":"Link","Hover")];c&&c(s,r===a?i:null)}o.domElement.classList[n&&t["on".concat("node"===a?"Node":"Link","Click")]||!n&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=n}})).clickAfterDrag(!1).onClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","Click")];i&&i(r.__data,n)}else t.onBackgroundClick&&t.onBackgroundClick(n)})).onRightClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","RightClick")];i&&i(r.__data,n)}else t.onBackgroundRightClick&&t.onBackgroundRightClick(n)})),this._animationCycle()}});function mt(){}var gt=function(e){return null==e?mt:function(){return this.querySelector(e)}};function vt(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function yt(){return[]}var bt=function(e){return null==e?yt:function(){return this.querySelectorAll(e)}};var wt=function(e){return function(){return this.matches(e)}};function xt(e){return function(t){return t.matches(e)}}var _t=Array.prototype.find;function Et(){return this.firstElementChild}var At=Array.prototype.filter;function St(){return Array.from(this.children)}var Mt=function(e){return new Array(e.length)};function Tt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Tt.prototype={constructor:Tt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Ct=function(e){return function(){return e}};function Ot(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Tt(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Rt(e,t,n,r,i,o,a){var s,l,c,u=new Map,h=t.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new Tt(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function kt(e){return e.__data__}function Pt(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Dt="http://www.w3.org/1999/xhtml",It={svg:"http://www.w3.org/2000/svg",xhtml:Dt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Nt=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),It.hasOwnProperty(t)?{space:It[t],local:e}:e};function jt(e){return function(){this.removeAttribute(e)}}function Bt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ft(e,t){return function(){this.setAttribute(e,t)}}function zt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ht(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Ut(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Vt=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function Gt(e){return function(){this.style.removeProperty(e)}}function Wt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function qt(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Xt(e,t){return e.style.getPropertyValue(t)||Vt(e).getComputedStyle(e,null).getPropertyValue(t)}function Yt(e){return function(){delete this[e]}}function Kt(e,t){return function(){this[e]=t}}function Qt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Zt(e){return e.trim().split(/^|\s+/)}function Jt(e){return e.classList||new $t(e)}function $t(e){this._node=e,this._names=Zt(e.getAttribute("class")||"")}function en(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function tn(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function nn(e){return function(){en(this,e)}}function rn(e){return function(){tn(this,e)}}function on(e,t){return function(){(t.apply(this,arguments)?en:tn)(this,e)}}$t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function an(){this.textContent=""}function sn(e){return function(){this.textContent=e}}function ln(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function cn(){this.innerHTML=""}function un(e){return function(){this.innerHTML=e}}function hn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function dn(){this.nextSibling&&this.parentNode.appendChild(this)}function fn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pn(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Dt&&t.documentElement.namespaceURI===Dt?t.createElement(e):t.createElementNS(n,e)}}function mn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var gn=function(e){var t=Nt(e);return(t.local?mn:pn)(t)};function vn(){return null}function yn(){var e=this.parentNode;e&&e.removeChild(this)}function bn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xn(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function _n(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function En(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function An(e,t,n){var r=Vt(e),i=r.CustomEvent;"function"===typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Sn(e,t){return function(){return An(this,e,t)}}function Mn(e,t){return function(){return An(this,e,t.apply(this,arguments))}}var Tn=[null];function Cn(e,t){this._groups=e,this._parents=t}function On(){return new Cn([[document.documentElement]],Tn)}Cn.prototype=On.prototype={constructor:Cn,select:function(e){"function"!==typeof e&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Cn(r,this._parents)},selectAll:function(e){e="function"===typeof e?function(e){return function(){return vt(e.apply(this,arguments))}}(e):bt(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new Cn(r,i)},selectChild:function(e){return this.select(null==e?Et:function(e){return function(){return _t.call(this.children,e)}}("function"===typeof e?e:xt(e)))},selectChildren:function(e){return this.selectAll(null==e?St:function(e){return function(){return At.call(this.children,e)}}("function"===typeof e?e:xt(e)))},filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new Cn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kt);var n=t?Rt:Ot,r=this._parents,i=this._groups;"function"!==typeof e&&(e=Ct(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],h=i[c],d=h.length,f=Pt(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p),v=l[c]=new Array(d);n(u,h,m,g,v,f,t);for(var y,b,w=0,x=0;w<p;++w)if(y=m[w]){for(w>=x&&(x=w+1);!(b=g[x])&&++x<p;);y._next=b||null}}return(a=new Cn(a,r))._enter=s,a._exit=l,a},enter:function(){return new Cn(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Cn(this._exit||this._groups.map(Mt),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new Cn(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Lt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Cn(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Nt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Bt:jt:"function"===typeof t?n.local?Ut:Ht:n.local?zt:Ft)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Gt:"function"===typeof t?qt:Wt)(e,t,null==n?"":n)):Xt(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Yt:"function"===typeof t?Qt:Kt)(e,t)):this.node()[e]},classed:function(e,t){var n=Zt(e+"");if(arguments.length<2){for(var r=Jt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?on:t?nn:rn)(n,t))},text:function(e){return arguments.length?this.each(null==e?an:("function"===typeof e?ln:sn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?cn:("function"===typeof e?hn:un)(e)):this.node().innerHTML},raise:function(){return this.each(dn)},lower:function(){return this.each(fn)},append:function(e){var t="function"===typeof e?e:gn(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:gn(e),r=null==t?vn:"function"===typeof t?t:gt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yn)},clone:function(e){return this.select(e?wn:bn)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=xn(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?En:_n,r=0;r<a;++r)this.each(s(o[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?Mn:Sn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Rn=On,kn=function(e){return"string"===typeof e?new Cn([[document.querySelector(e)]],[document.documentElement]):new Cn([[e]],Tn)},Pn=r(463);const Ln={passive:!1},Dn={capture:!0,passive:!1};function In(e){e.stopImmediatePropagation()}var Nn=function(e){e.preventDefault(),e.stopImmediatePropagation()},jn=function(e){var t=e.document.documentElement,n=kn(e).on("dragstart.drag",Nn,Dn);"onselectstart"in t?n.on("selectstart.drag",Nn,Dn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")};function Bn(e,t){var n=e.document.documentElement,r=kn(e).on("dragstart.drag",null);t&&(r.on("click.drag",Nn,Dn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fn(e){return((e=Math.exp(e))+1/e)/2}var zn=function e(t,n,r){function i(e,i){var o,a,s=e[0],l=e[1],c=e[2],u=i[0],h=i[1],d=i[2],f=u-s,p=h-l,m=f*f+p*p;if(m<1e-12)a=Math.log(d/c)/t,o=function(e){return[s+e*f,l+e*p,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),v=(d*d-c*c+r*m)/(2*c*n*g),y=(d*d-c*c-r*m)/(2*d*n*g),b=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-b)/t,o=function(e){var r,i=e*a,o=Fn(b),u=c/(n*g)*(o*(r=t*i+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+u*f,l+u*p,c*o/Fn(t*i+b)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4),Hn=function(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]},Un=r(248),Vn=function(e,t,n){var r=new Un.a;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r},Gn=Object(Pn.a)("start","end","cancel","interrupt"),Wn=[],qn=function(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,h,d;if(1!==n.state)return s();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return Vn(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Vn((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Object(Un.c)((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:Gn,tween:Wn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Xn(e,t){var n=Kn(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Yn(e,t){var n=Kn(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var Qn,Zn=function(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}},Jn=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},$n=180/Math.PI,er={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},tr=function(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*$n,skewX:Math.atan(l)*$n,scaleX:a,scaleY:s}};function nr(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Jn(e,i)},{i:l-2,x:Jn(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Jn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Jn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Jn(e,n)},{i:s-2,x:Jn(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var rr=nr((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?er:tr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),ir=nr((function(e){return null==e?er:(Qn||(Qn=document.createElementNS("http://www.w3.org/2000/svg","g")),Qn.setAttribute("transform",e),(e=Qn.transform.baseVal.consolidate())?(e=e.matrix,tr(e.a,e.b,e.c,e.d,e.e,e.f)):er)}),", ",")",")");function or(e,t){var n,r;return function(){var i=Yn(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function ar(e,t,n){var r,i;if("function"!==typeof n)throw new Error;return function(){var o=Yn(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function sr(e,t,n){var r=e._id;return e.each((function(){var e=Yn(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Kn(e,r).value[t]}}var lr=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function cr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ur(){}var hr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pr=/^#([0-9a-f]{3,8})$/,mr=new RegExp("^rgb\\("+[hr,hr,hr]+"\\)$"),gr=new RegExp("^rgb\\("+[fr,fr,fr]+"\\)$"),vr=new RegExp("^rgba\\("+[hr,hr,hr,dr]+"\\)$"),yr=new RegExp("^rgba\\("+[fr,fr,fr,dr]+"\\)$"),br=new RegExp("^hsl\\("+[dr,fr,fr]+"\\)$"),wr=new RegExp("^hsla\\("+[dr,fr,fr,dr]+"\\)$"),xr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _r(){return this.rgb().formatHex()}function Er(){return this.rgb().formatRgb()}function Ar(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=pr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Sr(t):3===n?new Or(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Mr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Mr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mr.exec(e))?new Or(t[1],t[2],t[3],1):(t=gr.exec(e))?new Or(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vr.exec(e))?Mr(t[1],t[2],t[3],t[4]):(t=yr.exec(e))?Mr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=br.exec(e))?Lr(t[1],t[2]/100,t[3]/100,1):(t=wr.exec(e))?Lr(t[1],t[2]/100,t[3]/100,t[4]):xr.hasOwnProperty(e)?Sr(xr[e]):"transparent"===e?new Or(NaN,NaN,NaN,0):null}function Sr(e){return new Or(e>>16&255,e>>8&255,255&e,1)}function Mr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Or(e,t,n,r)}function Tr(e){return e instanceof ur||(e=Ar(e)),e?new Or((e=e.rgb()).r,e.g,e.b,e.opacity):new Or}function Cr(e,t,n,r){return 1===arguments.length?Tr(e):new Or(e,t,n,null==r?1:r)}function Or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Rr(){return"#"+Pr(this.r)+Pr(this.g)+Pr(this.b)}function kr(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Pr(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Lr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function Dr(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof ur||(e=Ar(e)),!e)return new Ir;if(e instanceof Ir)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ir(a,s,l,e.opacity)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Nr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function jr(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}lr(ur,Ar,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_r,formatHex:_r,formatHsl:function(){return Dr(this).formatHsl()},formatRgb:Er,toString:Er}),lr(Or,Cr,cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rr,formatHex:Rr,formatRgb:kr,toString:kr})),lr(Ir,(function(e,t,n,r){return 1===arguments.length?Dr(e):new Ir(e,t,n,null==r?1:r)}),cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Or(Nr(e>=240?e-240:e+120,i,r),Nr(e,i,r),Nr(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Br=e=>()=>e;function Fr(e,t){return function(n){return e+n*t}}function zr(e){return 1===(e=+e)?Hr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Br(isNaN(t)?n:t)}}function Hr(e,t){var n=t-e;return n?Fr(e,n):Br(isNaN(e)?t:e)}var Ur=function e(t){var n=zr(t);function r(e,t){var r=n((e=Cr(e)).r,(t=Cr(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Hr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Vr(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Cr(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}Vr((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return jr((n-r/t)*t,a,i,o,s)}})),Vr((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return jr((n-r/t)*t,i,o,a,s)}}));var Gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wr=new RegExp(Gr.source,"g");var qr=function(e,t){var n,r,i,o=Gr.lastIndex=Wr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Gr.exec(e))&&(r=Wr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Jn(n,r)})),o=Wr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})},Xr=function(e,t){var n;return("number"===typeof t?Jn:t instanceof Ar?Ur:(n=Ar(t))?(t=n,Ur):qr)(e,t)};function Yr(e){return function(){this.removeAttribute(e)}}function Kr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Zr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Jr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttribute(e)}}function $r(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function ei(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ti(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ni(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ti(e,i)),n}return i._value=t,i}function ri(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ei(e,i)),n}return i._value=t,i}function ii(e,t){return function(){Xn(this,e).delay=+t.apply(this,arguments)}}function oi(e,t){return t=+t,function(){Xn(this,e).delay=t}}function ai(e,t){return function(){Yn(this,e).duration=+t.apply(this,arguments)}}function si(e,t){return t=+t,function(){Yn(this,e).duration=t}}function li(e,t){if("function"!==typeof t)throw new Error;return function(){Yn(this,e).ease=t}}function ci(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Xn:Yn;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}var ui=Rn.prototype.constructor;function hi(e){return function(){this.style.removeProperty(e)}}function di(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fi(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&di(e,o,n)),r}return o._value=t,o}function pi(e){return function(t){this.textContent=e.call(this,t)}}function mi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pi(r)),t}return r._value=e,r}var gi=0;function vi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yi(){return++gi}var bi=Rn.prototype;vi.prototype=function(e){return Rn().transition(e)}.prototype={constructor:vi,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=gt(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,h=o[a]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=e.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,qn(h[d],t,n,d,h,Kn(s,n)));return new vi(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=bt(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=e.call(l,l.__data__,h,c),p=Kn(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&qn(d,t,n,m,f,p);o.push(f),a.push(l)}return new vi(o,a,t,n)},selectChild:bi.selectChild,selectChildren:bi.selectChildren,filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new vi(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],h=c.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)a[s]=t[s];return new vi(a,this._parents,this._name,this._id)},selection:function(){return new ui(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=yi(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Kn(a,t);qn(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new vi(r,this._parents,e,n)},call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:function(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(ci(n,e,t))},attr:function(e,t){var n=Nt(e),r="transform"===n?ir:Xr;return this.attrTween(e,"function"===typeof t?(n.local?$r:Jr)(n,r,sr(this,"attr."+e,t)):null==t?(n.local?Kr:Yr)(n):(n.local?Zr:Qr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=Nt(e);return this.tween(n,(r.local?ni:ri)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?rr:Xr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Xt(this,e),a=(this.style.removeProperty(e),Xt(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,hi(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=Xt(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Xt(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,sr(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=Yn(this,e),c=l.on,u=null==l.value[a]?o||(o=hi(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=Xt(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,fi(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(sr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,mi(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Kn(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?or:ar)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ii:oi)(t,e)):Kn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ai:si)(t,e)):Kn(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(li(t,e)):Kn(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;Yn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0===--i&&o()}};n.each((function(){var n=Yn(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&o()}))},[Symbol.iterator]:bi[Symbol.iterator]};var wi={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function xi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Rn.prototype.interrupt=function(e){return this.each((function(){Zn(this,e)}))},Rn.prototype.transition=function(e){var t,n;e instanceof vi?(t=e._id,e=e._name):(t=yi(),(n=wi).time=Object(Un.b)(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&qn(a,e,t,c,s,n||xi(a,t));return new vi(r,this._parents,e,t)};var _i=e=>()=>e;function Ei(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ai(e,t,n){this.k=e,this.x=t,this.y=n}Ai.prototype={constructor:Ai,scale:function(e){return 1===e?this:new Ai(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ai(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Si=new Ai(1,0,0);function Mi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Si;return e.__zoom}function Ti(e){e.stopImmediatePropagation()}Mi.prototype=Ai.prototype;var Ci=function(e){e.preventDefault(),e.stopImmediatePropagation()};function Oi(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function Ri(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ki(){return this.__zoom||Si}function Pi(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Li(){return navigator.maxTouchPoints||"ontouchstart"in this}function Di(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Ii=function(){var e,t,n,r=Oi,i=Ri,o=Di,a=Pi,s=Li,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=zn,d=Object(Pn.a)("start","zoom","end"),f=0,p=10;function m(e){e.property("__zoom",ki).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ai(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Ai(e.k,r,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,a=w(e,o).event(r),s=i.apply(e,o),l=null==n?y(s):"function"===typeof n?n.apply(e,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,d="function"===typeof t?t.apply(e,o):t,f=h(u.invert(l).concat(c/u.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=f(e),n=c/t[2];e=new Ai(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=Hn(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[u,i.invert(u)],Zn(this),n.start()}Ci(e),n.wheel=setTimeout(h,150),n.zoom("mouse",o(v(g(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}function h(){n.wheel=null,n.end()}}function E(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,a=w(this,t,!0).event(e),s=kn(e.view).on("mousemove.zoom",d,!0).on("mouseup.zoom",p,!0),l=Hn(e,i),u=e.clientX,h=e.clientY;jn(e.view),Ti(e),a.mouse=[l,this.__zoom.invert(l)],Zn(this),a.start()}function d(e){if(Ci(e),!a.moved){var t=e.clientX-u,n=e.clientY-h;a.moved=t*t+n*n>f}a.event(e).zoom("mouse",o(v(a.that.__zoom,a.mouse[0]=Hn(e,i),a.mouse[1]),a.extent,c))}function p(e){s.on("mousemove.zoom mouseup.zoom",null),Bn(e.view,a.moved),Ci(e),a.event(e).end()}}function A(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Hn(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),h=o(v(g(n,l),a,s),i.apply(this,t),c);Ci(e),u>0?kn(this).transition().duration(u).call(b,h,a,e):kn(this).call(m.transform,h,a,e)}}function S(n,...i){if(r.apply(this,arguments)){var o,a,s,l,c=n.touches,u=c.length,h=w(this,i,n.changedTouches.length===u).event(n);for(Ti(n),a=0;a<u;++a)s=c[a],l=[l=Hn(s,this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),o&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),Zn(this),h.start())}}function M(e,...t){if(this.__zooming){var n,r,i,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Ci(e),n=0;n<u;++n)r=l[n],i=Hn(r,this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],m=(m=f[0]-h[0])*m+(m=f[1]-h[1])*m,y=(y=p[0]-d[0])*y+(y=p[1]-d[1])*y;r=g(r,Math.sqrt(m/y)),i=[(h[0]+f[0])/2,(h[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(v(r,i,a),s.extent,c))}}function T(e,...r){if(this.__zooming){var i,o,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(Ti(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),i=0;i<l;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=Hn(o,this),Math.hypot(t[0]-o[0],t[1]-o[1])<p)){var c=kn(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property("__zoom",ki),e!==i?b(e,t,n,r):i.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){var e=this.__zoom.k,n="function"===typeof t?t.apply(this,arguments):t;return e*n}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=i.apply(this,arguments),r=this.__zoom,a=null==n?y(e):"function"===typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"===typeof t?t.apply(this,arguments):t;return o(v(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return o(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=i.apply(this,arguments),a=this.__zoom,s=null==r?y(e):"function"===typeof r?r.apply(this,arguments):r;return o(Si.translate(s[0],s[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=kn(this.that).datum();d.call(e,this.that,new Ei(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:d}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:_i(+e),m):a},m.filter=function(e){return arguments.length?(r="function"===typeof e?e:_i(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"===typeof e?e:_i(!!e),m):s},m.extent=function(e){return arguments.length?(i="function"===typeof e?e:_i([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):i},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(o=e,m):o},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(h=e,m):h},m.on=function(){var e=d.on.apply(d,arguments);return e===d?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(p=+e,m):p},m},Ni=e=>()=>e;function ji(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function Bi(e){return!e.ctrlKey&&!e.button}function Fi(){return this.parentNode}function zi(e,t){return null==t?{x:e.x,y:e.y}:t}function Hi(){return navigator.maxTouchPoints||"ontouchstart"in this}ji.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Ui=r(461),Vi=r(462),Gi=r(249),Wi=r.n(Gi),qi=r(108),Xi=r.n(qi);function Yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qi(e){return function(e){if(Array.isArray(e))return Zi(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ji=function(e,t,n){return(e<<16)+(t<<8)+n},$i=function(e,t){return 123*e%Math.pow(2,t)},eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;Yi(this,e),this.csBits=t,this.registry=["__reserved for background__"]}var t,n,r;return t=e,(n=[{key:"register",value:function(e){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var t,n=this.registry.length,r=$i(n,this.csBits),i=(t=n+(r<<24-this.csBits),"#".concat(Math.min(t,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(e),i}},{key:"lookup",value:function(e){var t="string"===typeof e?function(e){var t=Xi()(e).toRgb(),n=t.r,r=t.g,i=t.b;return Ji(n,r,i)}(e):Ji.apply(void 0,Qi(e));if(!t)return null;var n=t&Math.pow(2,24-this.csBits)-1,r=t>>24-this.csBits&Math.pow(2,this.csBits)-1;return $i(n,this.csBits)!==r||n>=this.registry.length?null:this.registry[n]}}])&&Ki(t.prototype,n),r&&Ki(t,r),e}(),to=r(84),no=r(464),ro=r(465),io=r(466),oo=r(467),ao=r(168),so=r(107),lo=r(475),co=r(477);function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(n),!0).forEach((function(t){po(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fo(e){return(fo="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(e,t){return(mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function go(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vo(e,t,n){return(vo=go()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&mo(i,n.prototype),i}).apply(null,arguments)}function yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||wo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bo(e){return function(e){if(Array.isArray(e))return xo(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||wo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){if(e){if("string"===typeof e)return xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xo(e,t):void 0}}function xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n transform: translate(-50%, 25px);\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var _o=Object(lo.a)(co.a);function Eo(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=_o(t(e))}))}var Ao=function(e,t){return t.onNeedsRedraw&&t.onNeedsRedraw()},So=Object(w.a)({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},dagMode:{onChange:function(e,t){!e&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Ao},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Ao},nodeColor:{default:"color",triggerUpdate:!1,onChange:Ao},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Ao},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkColor:{default:"color",triggerUpdate:!1,onChange:Ao},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Ao},linkWidth:{default:1,triggerUpdate:!1,onChange:Ao},linkCurvature:{default:0,triggerUpdate:!1,onChange:Ao},linkCanvasObject:{triggerUpdate:!1,onChange:Ao},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Ao},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Ao},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Ao},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,t,n){return void 0===n?e.forceLayout.force(t):(e.forceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick())),function(){var t=Object(x.default)(e.linkVisibility),n=Object(x.default)(e.linkColor),r=Object(x.default)(e.linkWidth),i=Object(x.default)(e.linkLineDash),o=Object(x.default)(e.linkCurvature),a=Object(x.default)(e.linkCanvasObjectMode),s=e.ctx,l=2*e.isShadow,c=e.graphData.links.filter(t);c.forEach((function(e){var t=o(e);if(!t)return void(e.__controlPoints=null);var n=e.source,r=e.target;if(!n||!r||!n.hasOwnProperty("x")||!r.hasOwnProperty("x"))return;var i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2));if(i>0){var a=Math.atan2(r.y-n.y,r.x-n.x),s=i*t,l={x:(n.x+r.x)/2+s*Math.cos(a-Math.PI/2),y:(n.y+r.y)/2+s*Math.sin(a-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var c=70*t;e.__controlPoints=[r.x,r.y-c,r.x+c,r.y]}}));var u=[],h=[],d=c;if(e.linkCanvasObject){var f=[],p=[];c.forEach((function(e){return({before:u,after:h,replace:f}[a(e)]||p).push(e)})),d=[].concat(bo(u),h,p),u=u.concat(f)}s.save(),u.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore();var m=Object(so.a)(d,[n,r,i]);s.save(),Object.entries(m).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],a=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(o).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],c=(r||1)/e.globalScale+l;Object.entries(o).forEach((function(e){var t=yo(e,2);t[0];var n=t[1],r=i(n[0]);s.beginPath(),n.forEach((function(e){var t=e.source,n=e.target;if(t&&n&&t.hasOwnProperty("x")&&n.hasOwnProperty("x")){s.moveTo(t.x,t.y);var r=e.__controlPoints;r?s[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(s,bo(r).concat([n.x,n.y])):s.lineTo(n.x,n.y)}})),s.strokeStyle=a,s.lineWidth=c,s.setLineDash(r||[]),s.stroke()}))}))})),s.restore(),s.save(),h.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalArrowLength),n=Object(x.default)(e.linkDirectionalArrowRelPos),r=Object(x.default)(e.linkVisibility),i=Object(x.default)(e.linkDirectionalArrowColor||e.linkColor),o=Object(x.default)(e.nodeVal),a=e.ctx;a.save(),e.graphData.links.filter(r).forEach((function(r){var s=t(r);if(s&&!(s<0)){var l=r.source,c=r.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,o(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,o(c)||1))*e.nodeRelSize,d=Math.min(1,Math.max(0,n(r))),f=i(r)||"rgba(0,0,0,0.28)",p=s/1.6/2,m=r.__controlPoints&&vo(ao.Bezier,[l.x,l.y].concat(bo(r.__controlPoints),[c.x,c.y])),g=m?function(e){return m.get(e)}:function(e){return{x:l.x+(c.x-l.x)*e||0,y:l.y+(c.y-l.y)*e||0}},v=m?m.length():Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),y=u+s+(v-u-h-s)*d,b=g(y/v),w=g((y-s)/v),x=g((y-.8*s)/v),_=Math.atan2(b.y-w.y,b.x-w.x)-Math.PI/2;a.beginPath(),a.moveTo(b.x,b.y),a.lineTo(w.x+p*Math.cos(_),w.y+p*Math.sin(_)),a.lineTo(x.x,x.y),a.lineTo(w.x-p*Math.cos(_),w.y-p*Math.sin(_)),a.fillStyle=f,a.fill()}}})),a.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalParticles),n=Object(x.default)(e.linkDirectionalParticleSpeed),r=Object(x.default)(e.linkDirectionalParticleWidth),i=Object(x.default)(e.linkVisibility),o=Object(x.default)(e.linkDirectionalParticleColor||e.linkColor),a=e.ctx;a.save(),e.graphData.links.filter(i).forEach((function(i){var s=t(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var l=i.source,c=i.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=n(i),h=i.__photons||[],d=Math.max(0,r(i)/2)/Math.sqrt(e.globalScale),f=o(i)||"rgba(0,0,0,0.28)";a.fillStyle=f;var p=i.__controlPoints?vo(ao.Bezier,[l.x,l.y].concat(bo(i.__controlPoints),[c.x,c.y])):null,m=0,g=!1;h.forEach((function(e){var t=!!e.__singleHop;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=t?0:m/s),!t&&m++,e.__progressRatio+=u,e.__progressRatio>=1){if(t)return void(g=!0);e.__progressRatio=e.__progressRatio%1}var n=e.__progressRatio,r=p?p.get(n):{x:l.x+(c.x-l.x)*n||0,y:l.y+(c.y-l.y)*n||0};a.beginPath(),a.arc(r.x,r.y,d,0,2*Math.PI,!1),a.fill()})),g&&(i.__photons=i.__photons.filter((function(e){return!e.__singleHop||e.__progressRatio<=1})))}}})),a.restore()}(),function(){var t=Object(x.default)(e.nodeVisibility),n=Object(x.default)(e.nodeVal),r=Object(x.default)(e.nodeColor),i=Object(x.default)(e.nodeCanvasObjectMode),o=e.ctx,a=e.isShadow/e.globalScale,s=e.graphData.nodes.filter(t);o.save(),s.forEach((function(t){var s=i(t);if(!e.nodeCanvasObject||"before"!==s&&"replace"!==s||(e.nodeCanvasObject(t,o,e.globalScale),"replace"!==s)){var l=Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize+a;o.beginPath(),o.arc(t.x,t.y,l,0,2*Math.PI,!1),o.fillStyle=r(t)||"rgba(31, 120, 180, 0.92)",o.fill(),e.nodeCanvasObject&&"after"===s&&e.nodeCanvasObject(t,e.ctx,e.globalScale)}else o.restore()})),o.restore()}(),this},emitParticle:function(e,t){return t&&(!t.__photons&&(t.__photons=[]),t.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Object(to.a)().force("link",Object(no.a)()).force("charge",Object(ro.a)()).force("center",Object(io.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.ctx=e},update:function(e){if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&Eo(e.graphData.nodes,Object(x.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&Eo(e.graphData.links,Object(x.default)(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]})),!e.isShadow){var t=Object(x.default)(e.linkDirectionalParticles);e.graphData.links.forEach((function(e){var n=Math.round(Math.abs(t(e)));n?e.__photons=bo(Array(n)).map((function(){return{}})):delete e.__photons}))}e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var r=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===fo(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(bo(Object.entries(c).filter((function(e){return!yo(e,2)[1].skip})).map((function(e){var t=yo(e,2);return po({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(bo(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(bo(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),i=Math.max.apply(Math,bo(Object.values(r||[]))),o=e.dagLevelDistance||e.graphData.nodes.length/(i||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var a=function(t,n){return function(a){return t?(r[a[e.nodeId]]-i/2)*o*(n?-1:1):void 0}},s=a(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),l=a(-1!==["td","bu"].indexOf(e.dagMode),"bu"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=s(e),e.fy=l(e)}))}e.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(oo.a)((function(t){var n=r[t[e.nodeId]]||-1;return("radialin"===e.dagMode?i-n:n)*o})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null);for(var c=0;c<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);c++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Mo(e,t){var n=e instanceof Array?e:[e],r=new t;return{linkProp:function(e){return{default:r[e](),onChange:function(t,r){n.forEach((function(n){return r[n][e](t)}))},triggerUpdate:!1}},linkMethod:function(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=[];return n.forEach((function(n){var r=t[n],o=r[e].apply(r,i);o!==r&&a.push(o)})),a.length?a[0]:this}}}}var To=Mo("forceGraph",So),Co=Mo(["forceGraph","shadowGraph"],So),Oo=Object.assign.apply(Object,bo(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return po({},e,To.linkProp(e))}))).concat(bo(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map((function(e){return po({},e,Co.linkProp(e))}))))),Ro=Object.assign.apply(Object,bo(["d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return po({},e,To.linkMethod(e))}))));function ko(e){if(e.canvas){var t=e.canvas.width,n=e.canvas.height;300===t&&150===n&&(t=n=0);var r=window.devicePixelRatio;t/=r,n/=r,[e.canvas,e.shadowCanvas].forEach((function(i){i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.width=e.width*r,i.height=e.height*r,t||n||i.getContext("2d").scale(r,r)}));var i=Mi(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-t)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function Po(e){var t=window.devicePixelRatio;e.setTransform(t,0,0,t,0,0)}function Lo(e,t,n){e.save(),Po(e),e.clearRect(0,0,t,n),e.restore()}var Do=Object(w.a)({props:ho({width:{default:window.innerWidth,onChange:function(e,t){return ko(t)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,t){return ko(t)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach((function(e){var n=e.type;e.objs.filter((function(e){if(!e.hasOwnProperty("__indexColor"))return!0;var n=t.colorTracker.lookup(e.__indexColor);return!n||!n.hasOwnProperty("d")||n.d!==e})).forEach((function(e){e.__indexColor=t.colorTracker.register({type:n,d:e})}))})),t.forceGraph.graphData(e),t.shadowGraph.graphData(e)},triggerUpdate:!1},backgroundColor:{onChange:function(e,t){t.canvas&&e&&(t.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,t){t.shadowGraph.nodeCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,t){t.shadowGraph.linkCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,t){t.zoom.scaleExtent([e,t.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,t){t.zoom.scaleExtent([t.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{default:function(){},triggerUpdate:!1},onZoomEnd:{default:function(){},triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Oo),aliases:{stopAnimation:"pauseAnimation"},methods:ho({graph2ScreenCoords:function(e,t,n){var r=Mi(e.canvas);return{x:t*r.k+r.x,y:n*r.k+r.y}},screen2GraphCoords:function(e,t,n){var r=Mi(e.canvas);return{x:(t-r.x)/r.k,y:(n-r.y)/r.k}},centerAt:function(e,t,n,r){if(!e.canvas)return null;if(void 0!==t||void 0!==n){var i=Object.assign({},void 0!==t?{x:t}:{},void 0!==n?{y:n}:{});return r?new qe.a.Tween(o()).to(i,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(a).start():a(i),this}return o();function o(){var t=Mi(e.canvas);return{x:(e.width/2-t.x)/t.k,y:(e.height/2-t.y)/t.k}}function a(t){var n=t.x,r=t.y;e.zoom.translateTo(e.zoom.__baseElem,void 0===n?o().x:n,void 0===r?o().y:r),e.needsRedraw=!0}},zoom:function(e,t,n){return e.canvas?void 0!==t?(n?new qe.a.Tween({k:r()}).to({k:t},n).easing(qe.a.Easing.Quadratic.Out).onUpdate((function(e){return i(e.k)})).start():i(t),this):r():null;function r(){return Mi(e.canvas).k}function i(t){e.zoom.scaleTo(e.zoom.__baseElem,t),e.needsRedraw=!0}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=this.getGraphBbox.apply(this,i);if(a){var s={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(e.width-2*n)/(a.x[1]-a.x[0]),(e.height-2*n)/(a.y[1]-a.y[0])));this.centerAt(s.x,s.y,t),this.zoom(l,t)}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=Object(x.default)(e.nodeVal),r=function(t){return Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize},i=e.graphData.nodes.filter(t).map((function(e){return{x:e.x,y:e.y,r:r(e)}}));return i.length?{x:[Object(Ui.a)(i,(function(e){return e.x-e.r})),Object(Vi.a)(i,(function(e){return e.x+e.r}))],y:[Object(Ui.a)(i,(function(e){return e.y-e.r})),Object(Vi.a)(i,(function(e){return e.y+e.r}))]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Ro),stateInit:function(){return{lastSetZoom:1,zoom:Ii(),forceGraph:new So,shadowGraph:(new So).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new eo}},init:function(e,t){e.innerHTML="";var n=document.createElement("div");n.classList.add("force-graph-container"),n.style.position="relative",e.appendChild(n),t.canvas=document.createElement("canvas"),t.backgroundColor&&(t.canvas.style.background=t.backgroundColor),n.appendChild(t.canvas),t.shadowCanvas=document.createElement("canvas");var r=t.canvas.getContext("2d"),i=t.shadowCanvas.getContext("2d"),o={x:-1e12,y:-1e12},a=function(){var e=null,n=window.devicePixelRatio,r=o.x>0&&o.y>0?i.getImageData(o.x*n,o.y*n,1,1):null;return r&&(e=t.colorTracker.lookup(r.data)),e};kn(t.canvas).call(function(){var e,t,n,r,i=Bi,o=Fi,a=zi,s=Hi,l={},c=Object(Pn.a)("start","drag","end"),u=0,h=0;function d(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,Ln).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!r&&i.call(this,a,s)){var l=b(this,o.call(this,a,s),a,s,"mouse");l&&(kn(a.view).on("mousemove.drag",p,Dn).on("mouseup.drag",m,Dn),jn(a.view),In(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function p(r){if(Nn(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}l.mouse("drag",r)}function m(e){kn(e.view).on("mousemove.drag mouseup.drag",null),Bn(e.view,n),Nn(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,a=e.changedTouches,s=o.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=b(this,s,e,t,a[n].identifier,a[n]))&&(In(e),r("start",e,a[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(Nn(e),n("drag",e,r[t]))}function y(e){var t,n,i=e.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(n=l[i[t].identifier])&&(In(e),n("end",e,i[t]))}function b(e,t,n,r,i,o){var s,h,f,p=c.copy(),m=Hn(o||n,t);if(null!=(f=a.call(e,new ji("beforestart",{sourceEvent:n,target:d,identifier:i,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-m[0]||0,h=f.y-m[1]||0,function n(o,a,c){var g,v=m;switch(o){case"start":l[i]=n,g=u++;break;case"end":delete l[i],--u;case"drag":m=Hn(c||a,t),g=u}p.call(o,e,new ji(o,{sourceEvent:a,subject:f,target:d,identifier:i,active:g,x:m[0]+s,y:m[1]+h,dx:m[0]-v[0],dy:m[1]-v[1],dispatch:p}),r)}}return d.filter=function(e){return arguments.length?(i="function"===typeof e?e:Ni(!!e),d):i},d.container=function(e){return arguments.length?(o="function"===typeof e?e:Ni(e),d):o},d.subject=function(e){return arguments.length?(a="function"===typeof e?e:Ni(e),d):a},d.touchable=function(e){return arguments.length?(s="function"===typeof e?e:Ni(!!e),d):s},d.on=function(){var e=c.on.apply(c,arguments);return e===c?d:e},d.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,d):Math.sqrt(h)},d}().subject((function(){if(!t.enableNodeDrag)return null;var e=a();return e&&"Node"===e.type?e.d:null})).on("start",(function(e){var n=e.subject;n.__initialDragPos={x:n.x,y:n.y,fx:n.fx,fy:n.fy},e.active||(n.fx=n.x,n.fy=n.y),t.canvas.classList.add("grabbable")})).on("drag",(function(e){var n=e.subject,r=n.__initialDragPos,i=e,o=Mi(t.canvas).k,a={x:r.x+(i.x-r.x)/o-n.x,y:r.y+(i.y-r.y)/o-n.y};["x","y"].forEach((function(e){return n["f".concat(e)]=n[e]=r[e]+(i[e]-r[e])/o})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),t.isPointerDragging=!0,n.__dragged=!0,t.onNodeDrag(n,a)})).on("end",(function(e){var n=e.subject,r=n.__initialDragPos,i={x:n.x-r.x,y:n.y-r.y};void 0===r.fx&&(n.fx=void 0),void 0===r.fy&&(n.fy=void 0),delete n.__initialDragPos,t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.canvas.classList.remove("grabbable"),t.isPointerDragging=!1,n.__dragged&&(delete n.__dragged,t.onNodeDragEnd(n,i))}))),t.zoom(t.zoom.__baseElem=kn(t.canvas)),t.zoom.__baseElem.on("dblclick.zoom",null),t.zoom.filter((function(e){return!e.button&&t.enableZoomPanInteraction&&(t.enableZoomInteraction||"wheel"!==e.type)&&(t.enablePanInteraction||"wheel"===e.type)})).on("zoom",(function(e){var n=e.transform;[r,i].forEach((function(e){Po(e),e.translate(n.x,n.y),e.scale(n.k,n.k)})),t.onZoom(ho({},n)),t.needsRedraw=!0})).on("end",(function(e){return t.onZoomEnd(ho({},e.transform))})),ko(t),t.forceGraph.onNeedsRedraw((function(){return t.needsRedraw=!0})).onFinishUpdate((function(){Mi(t.canvas).k===t.lastSetZoom&&t.graphData.nodes.length&&(t.zoom.scaleTo(t.zoom.__baseElem,t.lastSetZoom=4/Math.cbrt(t.graphData.nodes.length)),t.needsRedraw=!0)}));var s=document.createElement("div");s.classList.add("graph-tooltip"),n.appendChild(s),["pointermove","pointerdown"].forEach((function(e){return n.addEventListener(e,(function(r){"pointerdown"===e&&(t.isPointerPressed=!0,t.pointerDownEvent=r),!t.isPointerDragging&&"pointermove"===r.type&&t.onBackgroundClick&&(r.pressure>0||t.isPointerPressed)&&("touch"!==r.pointerType||void 0===r.movementX||[r.movementX,r.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0);var i=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(n);o.x=r.pageX-i.left,o.y=r.pageY-i.top,s.style.top="".concat(o.y,"px"),s.style.left="".concat(o.x,"px")}),{passive:!0})})),n.addEventListener("pointerup",(function(e){if(t.isPointerPressed=!1,t.isPointerDragging)t.isPointerDragging=!1;else{var n=[e,t.pointerDownEvent];requestAnimationFrame((function(){if(0===e.button)if(t.hoverObj){var r=t["on".concat(t.hoverObj.type,"Click")];r&&r.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundClick&&t.onBackgroundClick.apply(t,n);if(2===e.button)if(t.hoverObj){var i=t["on".concat(t.hoverObj.type,"RightClick")];i&&i.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundRightClick&&t.onBackgroundRightClick.apply(t,n)}))}}),{passive:!0}),n.addEventListener("contextmenu",(function(e){return!(t.onBackgroundRightClick||t.onNodeRightClick||t.onLinkRightClick)||(e.preventDefault(),!1)})),t.forceGraph(r),t.shadowGraph(i);var l=Wi()((function(){Lo(i,t.width,t.height),t.shadowGraph.linkWidth((function(e){return Object(x.default)(t.linkWidth)(e)+t.linkHoverPrecision}));var e=Mi(t.canvas);t.shadowGraph.globalScale(e.k).tickFrame()}),800);(this._animationCycle=function e(){var n=!t.autoPauseRedraw||!!t.needsRedraw||t.forceGraph.isEngineRunning()||t.graphData.links.some((function(e){return e.__photons&&e.__photons.length}));if(t.needsRedraw=!1,t.enablePointerInteraction){var i=t.isPointerDragging?null:a();if(i!==t.hoverObj){var o=t.hoverObj,c=o?o.type:null,u=i?i.type:null;if(c&&c!==u){var h=t["on".concat(c,"Hover")];h&&h(null,o.d)}if(u){var d=t["on".concat(u,"Hover")];d&&d(i.d,c===u?o.d:null)}var f=i&&Object(x.default)(t["".concat(i.type.toLowerCase(),"Label")])(i.d)||"";s.style.visibility=f?"visible":"hidden",s.innerHTML=f,t.canvas.classList[i&&t["on".concat(u,"Click")]||!i&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=i}n&&l()}if(n){Lo(r,t.width,t.height);var p=Mi(t.canvas).k;t.onRenderFramePre&&t.onRenderFramePre(r,p),t.forceGraph.globalScale(p).tickFrame(),t.onRenderFramePost&&t.onRenderFramePost(r,p)}qe.a.update(),t.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),Io={width:k.a.number,height:k.a.number,graphData:k.a.shape({nodes:k.a.arrayOf(k.a.object).isRequired,links:k.a.arrayOf(k.a.object).isRequired}),backgroundColor:k.a.string,nodeRelSize:k.a.number,nodeId:k.a.string,nodeLabel:k.a.oneOfType([k.a.string,k.a.func]),nodeVal:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),nodeVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),nodeColor:k.a.oneOfType([k.a.string,k.a.func]),nodeAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),onNodeHover:k.a.func,onNodeClick:k.a.func,linkSource:k.a.string,linkTarget:k.a.string,linkLabel:k.a.oneOfType([k.a.string,k.a.func]),linkVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkColor:k.a.oneOfType([k.a.string,k.a.func]),linkAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),linkWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkCurvature:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowLength:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowColor:k.a.oneOfType([k.a.string,k.a.func]),linkDirectionalArrowRelPos:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticles:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleSpeed:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleColor:k.a.oneOfType([k.a.string,k.a.func]),onLinkHover:k.a.func,onLinkClick:k.a.func,dagMode:k.a.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:k.a.number,dagNodeFilter:k.a.func,onDagError:k.a.func,d3AlphaMin:k.a.number,d3AlphaDecay:k.a.number,d3VelocityDecay:k.a.number,warmupTicks:k.a.number,cooldownTicks:k.a.number,cooldownTime:k.a.number,onEngineTick:k.a.func,onEngineStop:k.a.func,getGraphBbox:k.a.func},No={zoomToFit:k.a.func,onNodeRightClick:k.a.func,onNodeDrag:k.a.func,onNodeDragEnd:k.a.func,onLinkRightClick:k.a.func,linkHoverPrecision:k.a.number,onBackgroundClick:k.a.func,onBackgroundRightClick:k.a.func,enablePointerInteraction:k.a.bool,enableNodeDrag:k.a.bool},jo={showNavInfo:k.a.bool,nodeOpacity:k.a.number,nodeResolution:k.a.number,nodeThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),nodeThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkOpacity:k.a.number,linkResolution:k.a.number,linkCurveRotation:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkMaterial:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkPositionUpdate:k.a.func,linkDirectionalArrowResolution:k.a.number,linkDirectionalParticleResolution:k.a.number,forceEngine:k.a.oneOf(["d3","ngraph"]),ngraphPhysics:k.a.object,numDimensions:k.a.oneOf([1,2,3])},Bo=Object.assign({},Io,No,{linkLineDash:k.a.oneOfType([k.a.arrayOf(k.a.number),k.a.string,k.a.func]),nodeCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),nodeCanvasObject:k.a.func,nodePointerAreaPaint:k.a.func,linkCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),linkCanvasObject:k.a.func,linkPointerAreaPaint:k.a.func,autoPauseRedraw:k.a.bool,minZoom:k.a.number,maxZoom:k.a.number,enableZoomInteraction:k.a.bool,enablePanInteraction:k.a.bool,onZoom:k.a.func,onZoomEnd:k.a.func,onRenderFramePre:k.a.func,onRenderFramePost:k.a.func}),Fo=Object.assign({},Io,No,jo,{enableNavigationControls:k.a.bool,controlType:k.a.oneOf(["trackball","orbit","fly"]),rendererConfig:k.a.object,extraRenderers:k.a.arrayOf(k.a.shape({render:k.a.func.isRequired}))}),zo=Object.assign({},Io,jo,{nodeDesc:k.a.oneOfType([k.a.string,k.a.func]),linkDesc:k.a.oneOfType([k.a.string,k.a.func])}),Ho=Object.assign({},Io,jo,{markerAttrs:k.a.object,yOffset:k.a.number,glScale:k.a.number});const Uo=b(O,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"]});Uo.displayName="ForceGraphVR",Uo.propTypes=zo;const Vo=b(F,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"],initPropNames:["markerAttrs"]});Vo.displayName="ForceGraphAR",Vo.propTypes=Ho;const Go=b(pt,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","cameraPosition","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords","postProcessingComposer","scene","camera","renderer","controls","refresh"],initPropNames:["controlType","rendererConfig","extraRenderers"]});Go.displayName="ForceGraph3D",Go.propTypes=Fo;const Wo=b(Do,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Wo.displayName="ForceGraph2D",Wo.propTypes=Bo},function(t,n,r){"use strict";r.d(n,"a",(function(){return gt}));var i={};r.r(i),r.d(i,"bounce",(function(){return te})),r.d(i,"flash",(function(){return ne})),r.d(i,"jello",(function(){return re})),r.d(i,"pulse",(function(){return ie})),r.d(i,"rotate",(function(){return oe})),r.d(i,"shake",(function(){return ae})),r.d(i,"swing",(function(){return se})),r.d(i,"rubberBand",(function(){return le})),r.d(i,"tada",(function(){return ce})),r.d(i,"wobble",(function(){return ue})),r.d(i,"bounceIn",(function(){return he})),r.d(i,"bounceInUp",(function(){return de})),r.d(i,"bounceInDown",(function(){return fe})),r.d(i,"bounceInRight",(function(){return pe})),r.d(i,"bounceInLeft",(function(){return me})),r.d(i,"bounceOut",(function(){return ge})),r.d(i,"bounceOutUp",(function(){return ve})),r.d(i,"bounceOutDown",(function(){return ye})),r.d(i,"bounceOutRight",(function(){return be})),r.d(i,"bounceOutLeft",(function(){return we})),r.d(i,"fadeIn",(function(){return _e})),r.d(i,"fadeInDown",(function(){return Ee})),r.d(i,"fadeInUp",(function(){return Ae})),r.d(i,"fadeInLeft",(function(){return Se})),r.d(i,"fadeInRight",(function(){return Me})),r.d(i,"fadeInDownBig",(function(){return Te})),r.d(i,"fadeInUpBig",(function(){return Ce})),r.d(i,"fadeInLeftBig",(function(){return Oe})),r.d(i,"fadeInRightBig",(function(){return Re})),r.d(i,"fadeOut",(function(){return Pe})),r.d(i,"fadeOutDown",(function(){return Le})),r.d(i,"fadeOutUp",(function(){return De})),r.d(i,"fadeOutLeft",(function(){return Ie})),r.d(i,"fadeOutRight",(function(){return Ne})),r.d(i,"fadeOutDownBig",(function(){return je})),r.d(i,"fadeOutUpBig",(function(){return Be})),r.d(i,"fadeOutLeftBig",(function(){return Fe})),r.d(i,"fadeOutRightBig",(function(){return ze})),r.d(i,"flipInX",(function(){return He})),r.d(i,"flipInY",(function(){return Ue})),r.d(i,"flipOutX",(function(){return Ve})),r.d(i,"flipOutY",(function(){return Ge})),r.d(i,"lightSpeedIn",(function(){return We})),r.d(i,"lightSpeedOut",(function(){return qe})),r.d(i,"slideInDown",(function(){return Ye})),r.d(i,"slideInUp",(function(){return Ke})),r.d(i,"slideInLeft",(function(){return Qe})),r.d(i,"slideInRight",(function(){return Ze})),r.d(i,"slideOutDown",(function(){return $e})),r.d(i,"slideOutUp",(function(){return et})),r.d(i,"slideOutLeft",(function(){return tt})),r.d(i,"slideOutRight",(function(){return nt})),r.d(i,"zoomIn",(function(){return it})),r.d(i,"zoomInDown",(function(){return ot})),r.d(i,"zoomInUp",(function(){return at})),r.d(i,"zoomInLeft",(function(){return st})),r.d(i,"zoomInRight",(function(){return lt})),r.d(i,"zoomOut",(function(){return ht})),r.d(i,"zoomOutDown",(function(){return dt})),r.d(i,"zoomOutUp",(function(){return ft})),r.d(i,"zoomOutLeft",(function(){return pt})),r.d(i,"zoomOutRight",(function(){return mt}));var o=r(3),a=r(57),s=r(38),l=r(6),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(16),m=r.n(p),g=r(24),v=r.n(g),y=r(25),b=r.n(y),w=r(18),x=r.n(w),_=r(19),E=r.n(_),A=r(0),S=r.n(A),M=r(1),T=r.n(M),C=r(12),O=r(14),R=["perspective","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","translateX","translateY"];function k(e){var t={};return Object.keys(e).forEach((function(n){-1!==R.indexOf(n)?(t.transform||(t.transform=[]),t.transform.push(c()({},n,e[n]))):t[n]=e[n]})),t}var P=r(5);function L(e){var t=E()({},P.a.flatten(e));return t.transform&&(t.transform.forEach((function(e){var n=Object.keys(e)[0];t[n]=e[n]})),delete t.transform),t}var D={Top:["Vertical",""],Bottom:["Vertical",""],Vertical:[""],Left:["Horizontal",""],Right:["Horizontal",""],Horizontal:[""]},I=Object.keys(D);function N(e,t){var n={},r=L(t);return("string"===typeof e?[e]:e).forEach((function(e){n[e]=e in r?r[e]:function(e,t){if("backgroundColor"===e)return"rgba(0,0,0,0)";if("color"===e||-1!==e.indexOf("Color"))return"rgba(0,0,0,1)";if(0===e.indexOf("rotate")||0===e.indexOf("skew"))return"0deg";if("opacity"===e||0===e.indexOf("scale"))return 1;if("fontSize"===e)return 14;if(0===e.indexOf("margin")||0===e.indexOf("padding"))for(var n,r=0;r<I.length;r++)if(n=I[r],e.substr(-n.length)===n){for(var i,o=e.substr(0,e.length-n.length),a=D[n],s=0;s<a.length;s++)if((i=o+a[s])in t)return t[i];break}return 0}(e,r)})),n}function j(e,t){return e-t}function B(e){return null!==e}function F(e){if("from"===e)return 0;if("to"===e)return 1;var t=parseFloat(e,10);return Number.isNaN(t)||t<0||t>1?null:t}var z={};function H(e){var t=JSON.stringify(e);if(z[t])return z[t];var n=Object.keys(e).map(F).filter(B);if(n.sort(j),n.length<2)throw new Error("Animation definitions must have at least two values.");var r={};e.easing&&(r.easing=e.easing),e.style&&(r.style=e.style);for(var i=function(t){var i=n[t],o=e[i];if(o||(0===i?o=e.from:1===i&&(o=e.to)),!o)throw new Error("Missing animation keyframe, this should not happen");o=L(o),Object.keys(o).forEach((function(e){e in r||(r[e]={inputRange:[],outputRange:[]}),r[e].inputRange.push(i),r[e].outputRange.push(o[e])}))},o=0;o<n.length;o+=1)i(o);return z[t]=r,r}var U={};var V={linear:O.a.linear,ease:O.a.bezier(.25,.1,.25,1),"ease-in":O.a.bezier(.42,0,1,1),"ease-out":O.a.bezier(0,0,.58,1),"ease-in-out":O.a.bezier(.42,0,.58,1),"ease-in-cubic":O.a.bezier(.55,.055,.675,.19),"ease-out-cubic":O.a.bezier(.215,.61,.355,1),"ease-in-out-cubic":O.a.bezier(.645,.045,.355,1),"ease-in-circ":O.a.bezier(.6,.04,.98,.335),"ease-out-circ":O.a.bezier(.075,.82,.165,1),"ease-in-out-circ":O.a.bezier(.785,.135,.15,.86),"ease-in-expo":O.a.bezier(.95,.05,.795,.035),"ease-out-expo":O.a.bezier(.19,1,.22,1),"ease-in-out-expo":O.a.bezier(1,0,0,1),"ease-in-quad":O.a.bezier(.55,.085,.68,.53),"ease-out-quad":O.a.bezier(.25,.46,.45,.94),"ease-in-out-quad":O.a.bezier(.455,.03,.515,.955),"ease-in-quart":O.a.bezier(.895,.03,.685,.22),"ease-out-quart":O.a.bezier(.165,.84,.44,1),"ease-in-out-quart":O.a.bezier(.77,0,.175,1),"ease-in-quint":O.a.bezier(.755,.05,.855,.06),"ease-out-quint":O.a.bezier(.23,1,.32,1),"ease-in-out-quint":O.a.bezier(.86,0,.07,1),"ease-in-sine":O.a.bezier(.47,0,.745,.715),"ease-out-sine":O.a.bezier(.39,.575,.565,1),"ease-in-out-sine":O.a.bezier(.445,.05,.55,.95),"ease-in-back":O.a.bezier(.6,-.28,.735,.045),"ease-out-back":O.a.bezier(.175,.885,.32,1.275),"ease-in-out-back":O.a.bezier(.68,-.55,.265,1.55)};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=x()(t);if(n){var i=x()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return b()(this,e)}}var X=["rotate","rotateX","rotateY","rotateZ","skewX","skewY","transformMatrix","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","shadowColor","color","textDecorationColor","tintColor"],Y=["width","height"];function K(e,t){switch(t){case"reverse":return 0;case"alternate":return e%2?0:1;case"alternate-reverse":return e%2?1:0;case"normal":default:return 1}}function Q(e,t){return K(e,t)?0:1}function Z(e){if("string"===typeof e){var t=U[e];if(!t)throw new Error("No animation registred by the name of "+e);return t}return H(e)}function J(e,t){var n={};return Object.keys(e).forEach((function(r){"style"===r?E()(n,e.style):"easing"!==r&&(n[r]=t.interpolate(e[r]))})),k(n)}function $(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=r||i||a?C.a.timing(t,{toValue:n,delay:a,duration:r||1e3,easing:"function"===typeof i?i:V[i||"ease"],useNativeDriver:o}):C.a.spring(t,{toValue:n,useNativeDriver:o});setTimeout((function(){return s(e)}),a),c.start((function(){return l(e)}))}function ee(e){var t,n,r=e.displayName||e.name||"Component",i=C.a.createAnimatedComponent(e);return n=t=function(e){v()(n,e);var t=q(n);function n(e){var r;h()(this,n),(r=t.call(this,e)).ref=null,r.handleRef=function(e){r.ref=e};var i=new C.a.Value(Q(0,r.props.direction)),o={},a={};return e.animation&&(o=J(a=Z(e.animation),i)),r.state={animationValue:i,animationStyle:o,compiledAnimation:a,transitionStyle:{},transitionValues:{},currentTransitionValues:{}},e.transition&&(r.state=W(W({},r.state),r.initializeTransitionState(e.transition))),r.delayTimer=null,Object.keys(U).forEach((function(e){e in m()(r)||(r[e]=r.animate.bind(m()(r),e))})),r}return f()(n,[{key:"initializeTransitionState",value:function(e){var t={},n={},r=N(e,this.props.style);return Object.keys(r).forEach((function(e){var i=r[e];if(-1!==X.indexOf(e)||"number"!==typeof i)t[e]=new C.a.Value(0),n[e]=i;else{var o=new C.a.Value(i);t[e]=o,n[e]=o}})),{currentTransitionValues:r,transitionStyle:n,transitionValues:t}}},{key:"getTransitionState",value:function(e){var t=this,n="string"===typeof e?[e]:e,r=this.state,i=r.transitionValues,o=r.currentTransitionValues,a=r.transitionStyle,s=n.filter((function(e){return!t.state.transitionValues[e]}));if(s.length){var l=this.initializeTransitionState(s);i=W(W({},i),l.transitionValues),o=W(W({},o),l.currentTransitionValues),a=W(W({},a),l.transitionStyle)}return{transitionValues:i,currentTransitionValues:o,transitionStyle:a}}},{key:"setNativeProps",value:function(e){this.ref&&this.ref.setNativeProps(e)}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.animation,r=t.duration,i=t.delay,o=t.onAnimationBegin,a=t.iterationDelay;if(n){var s=function(){o(),e.startAnimation(r,0,a,(function(t){return e.props.onAnimationEnd(t)})),e.delayTimer=null};i?this.delayTimer=setTimeout(s,i):s()}}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n,r=this,i=e.animation,o=e.delay,a=e.duration,s=e.easing,l=e.iterationDelay,c=e.transition,u=e.onAnimationBegin;if(c){var h=N(c,e.style);this.transitionTo(h,a,s,o)}else t=i,n=this.props.animation,t!==n&&JSON.stringify(t)!==JSON.stringify(n)&&(i?this.delayTimer?this.setAnimation(i):(u(),this.animate(i,a,l).then((function(e){return r.props.onAnimationEnd(e)}))):this.stopAnimation())}},{key:"componentWillUnmount",value:function(){this.delayTimer&&clearTimeout(this.delayTimer)}},{key:"setAnimation",value:function(e,t){var n=Z(e);this.setState((function(e){return{animationStyle:J(n,e.animationValue),compiledAnimation:n}}),t)}},{key:"animate",value:function(e,t,n){var r=this;return new Promise((function(i){r.setAnimation(e,(function(){r.startAnimation(t,0,n,i)}))}))}},{key:"stopAnimation",value:function(){this.setState({scheduledAnimation:!1,animationStyle:{}}),this.state.animationValue.stopAnimation(),this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"startAnimation",value:function(e,t,n,r){var i=this,o=this.state,a=o.animationValue,s=o.compiledAnimation,l=this.props,c=l.direction,u=l.iterationCount,h=l.useNativeDriver,d=this.props.easing||s.easing||"ease",f=t||0,p=Q(f,c),m=K(f,c);a.setValue(p),"string"===typeof d&&(d=V[d]),("reverse"===c||"alternate"===c&&!m||"alternate-reverse"===c&&!m)&&(d=O.a.out(d));var g={toValue:m,easing:d,isInteraction:u<=1,duration:e||this.props.duration||1e3,useNativeDriver:h,delay:n||0};C.a.timing(a,g).start((function(t){f+=1,t.finished&&i.props.animation&&("infinite"===u||f<u)?i.startAnimation(e,f,n,r):r&&r(t)}))}},{key:"transition",value:function(e,t,n,r){var i=this,o=L(e),a=L(t),s=Object.keys(a),l=this.getTransitionState(s),c=l.transitionValues,u=l.currentTransitionValues,h=l.transitionStyle;s.forEach((function(e){var t=o[e],n=a[e],r=c[e];r||(r=new C.a.Value(0));var i=-1!==X.indexOf(e)||"number"!==typeof value,s=-1!==Y.indexOf(e);i?(r.setValue(0),h[e]=r.interpolate({inputRange:[0,1],outputRange:[t,n]}),u[e]=n,a[e]=1):(s?(h[e]=r.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolateLeft:"clamp"}),u[e]=n):h[e]=r,r.setValue(t))})),this.setState({transitionValues:c,transitionStyle:h,currentTransitionValues:u},(function(){i.transitionToValues(a,n||i.props.duration,r,i.props.delay)}))}},{key:"transitionTo",value:function(e,t,n,r){var i=this,o=this.state.currentTransitionValues,a=L(e),s={from:{},to:{}};Object.keys(a).forEach((function(e){var l=a[e],c=-1!==X.indexOf(e)||"number"!==typeof value,u=-1!==Y.indexOf(e),h=i.state.transitionStyle[e],d=i.state.transitionValues[e];if(c||u||!h||h!==d){var f=o[e];if("undefined"===typeof f&&i.props.style)f=N(e,i.props.style)[e];s.from[e]=f,s.to[e]=l}else $(e,d,l,t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))})),Object.keys(s.from).length&&this.transition(s.from,s.to,t,n)}},{key:"transitionToValues",value:function(e,t,n,r){var i=this;Object.keys(e).forEach((function(o){$(o,i.state.transitionValues[o],e[o],t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))}))}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.animation,r=e.transition;if(n&&r)throw new Error("You cannot combine animation and transition props");var o=function(e,t){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}(["animation","duration","direction","delay","easing","iterationCount","iterationDelay","onAnimationBegin","onAnimationEnd","onTransitionBegin","onTransitionEnd","style","transition","useNativeDriver"],this.props);return S.a.createElement(i,E()({ref:this.handleRef,style:[t,this.state.animationStyle,k(this.state.transitionStyle)]},o))}}]),n}(A.Component),t.displayName="withAnimatable("+r+")",t.propTypes={animation:T.a.oneOfType([T.a.string,T.a.object]),duration:T.a.number,direction:T.a.oneOf(["normal","reverse","alternate","alternate-reverse"]),delay:T.a.number,easing:T.a.oneOfType([T.a.oneOf(Object.keys(V)),T.a.func]),iterationCount:function(e,t){var n=e[t];return"infinite"===n||"number"===typeof n&&n>=1?null:new Error('iterationCount must be a positive number or "infinite"')},iterationDelay:T.a.number,onAnimationBegin:T.a.func,onAnimationEnd:T.a.func,onTransitionBegin:T.a.func,onTransitionEnd:T.a.func,style:T.a.oneOfType([T.a.number,T.a.array,T.a.object]),transition:T.a.oneOfType([T.a.string,T.a.arrayOf(T.a.string)]),useNativeDriver:T.a.bool},t.defaultProps={animation:void 0,delay:0,direction:"normal",duration:void 0,easing:void 0,iterationCount:1,iterationDelay:0,onAnimationBegin:function(){},onAnimationEnd:function(){},onTransitionBegin:function(){},onTransitionEnd:function(){},style:void 0,transition:void 0,useNativeDriver:!1},n}var te={0:{translateY:0},.2:{translateY:0},.4:{translateY:-30},.43:{translateY:-30},.53:{translateY:0},.7:{translateY:-15},.8:{translateY:0},.9:{translateY:-4},1:{translateY:0}},ne={0:{opacity:1},.25:{opacity:0},.5:{opacity:1},.75:{opacity:0},1:{opacity:1}},re={0:{skewX:"0deg",skewY:"0deg"},.111:{skewX:"0deg",skewY:"0deg"},.222:{skewX:"-12.5deg",skewY:"-12.5deg"},.333:{skewX:"6.25deg",skewY:"6.25deg"},.444:{skewX:"-3.125deg",skewY:"-3.125deg"},.555:{skewX:"1.5625deg",skewY:"1.5625deg"},.666:{skewX:"-0.78125deg",skewY:"-0.78125deg"},.777:{skewX:"0.390625deg",skewY:"0.390625deg"},.888:{skewX:"-0.1953125deg",skewY:"-0.1953125deg"},1:{skewX:"0deg",skewY:"0deg"}},ie={0:{scale:1},.5:{scale:1.05},1:{scale:1}},oe={0:{rotate:"0deg"},.25:{rotate:"90deg"},.5:{rotate:"180deg"},.75:{rotate:"270deg"},1:{rotate:"360deg"}},ae={0:{translateX:0},.1:{translateX:-10},.2:{translateX:10},.3:{translateX:-10},.4:{translateX:10},.5:{translateX:-10},.6:{translateX:10},.7:{translateX:-10},.8:{translateX:10},.9:{translateX:-10},1:{translateX:0}},se={0:{rotate:"0deg"},.2:{rotate:"15deg"},.4:{rotate:"-10deg"},.6:{rotate:"5deg"},.8:{rotate:"-5deg"},1:{rotate:"0deg"}},le={0:{scaleX:1,scaleY:1},.3:{scaleX:1.25,scaleY:.75},.4:{scaleX:.75,scaleY:1.25},.5:{scaleX:1.15,scaleY:.85},.65:{scaleX:.95,scaleY:1.05},.75:{scaleX:1.05,scaleY:.95},1:{scaleX:1,scaleY:1}},ce={0:{scale:1,rotate:"0deg"},.1:{scale:.9,rotate:"-3deg"},.2:{scale:.9,rotate:"-3deg"},.3:{scale:1.1,rotate:"-3deg"},.4:{rotate:"3deg"},.5:{rotate:"-3deg"},.6:{rotate:"3deg"},.7:{rotate:"-3deg"},.8:{rotate:"3deg"},.9:{scale:1.1,rotate:"3deg"},1:{scale:1,rotate:"0deg"}},ue={0:{translateX:0,rotate:"0deg"},.15:{translateX:-25,rotate:"-5deg"},.3:{translateX:20,rotate:"3deg"},.45:{translateX:-15,rotate:"-3deg"},.6:{translateX:10,rotate:"2deg"},.75:{translateX:-5,rotate:"-1deg"},1:{translateX:0,rotate:"0deg"}},he={0:{opacity:0,scale:.3},.2:{scale:1.1},.4:{scale:.9},.6:{opacity:1,scale:1.03},.8:{scale:.97},1:{opacity:1,scale:1}},de={0:{opacity:0,translateY:800},.6:{opacity:1,translateY:-25},.75:{translateY:10},.9:{translateY:-5},1:{translateY:0}},fe={0:{opacity:0,translateY:-800},.6:{opacity:1,translateY:25},.75:{translateY:-10},.9:{translateY:5},1:{translateY:0}},pe={0:{opacity:0,translateX:600},.6:{opacity:1,translateX:-20},.75:{translateX:8},.9:{translateX:-4},1:{translateX:0}},me={0:{opacity:0,translateX:-600},.6:{opacity:1,translateX:20},.75:{translateX:-8},.9:{translateX:4},1:{translateX:0}},ge={0:{opacity:1,scale:1},.2:{scale:.9},.5:{opacity:1,scale:1.11},.55:{scale:1.11},1:{opacity:0,scale:.3}},ve={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:-10},.4:{translateY:20},.45:{translateY:20},.55:{opacity:1},1:{opacity:0,translateY:-800}},ye={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:10},.4:{translateY:-20},.45:{translateY:-20},.55:{opacity:1},1:{opacity:0,translateY:800}},be={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:10},.4:{translateX:-20},.45:{translateX:-20},.55:{opacity:1},1:{opacity:0,translateX:600}},we={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:-10},.4:{translateX:20},.45:{translateX:20},.55:{opacity:1},1:{opacity:0,translateX:-600}};function xe(e,t){return{from:c()({opacity:0},e,t),to:c()({opacity:1},e,0)}}var _e={from:{opacity:0},to:{opacity:1}},Ee=xe("translateY",-100),Ae=xe("translateY",100),Se=xe("translateX",-100),Me=xe("translateX",100),Te=xe("translateY",-500),Ce=xe("translateY",500),Oe=xe("translateX",-500),Re=xe("translateX",500);function ke(e,t){return{from:c()({opacity:1},e,0),to:c()({opacity:0},e,t)}}var Pe={from:{opacity:1},to:{opacity:0}},Le=ke("translateY",100),De=ke("translateY",-100),Ie=ke("translateX",-100),Ne=ke("translateX",100),je=ke("translateY",500),Be=ke("translateY",-500),Fe=ke("translateX",-500),ze=ke("translateX",500),He={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateX:"90deg"},.4:{rotateX:"-20deg"},.6:{opacity:1,rotateX:"10deg"},.8:{rotateX:"-5deg"},1:{opacity:1,rotateX:"0deg"}},Ue={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateY:"90deg"},.4:{rotateY:"-20deg"},.6:{opacity:1,rotateY:"10deg"},.8:{rotateY:"-5deg"},1:{opacity:1,rotateY:"0deg"}},Ve={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateX:"0deg"},.3:{opacity:1,rotateX:"-20deg"},1:{opacity:0,rotateX:"90deg"}},Ge={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateY:"0deg"},.3:{opacity:1,rotateY:"-20deg"},1:{opacity:0,rotateY:"90deg"}},We={easing:"ease-out",0:{opacity:0,translateX:200,skewX:"-30deg"},.6:{opacity:1,translateX:0,skewX:"20deg"},.8:{skewX:"-5deg"},1:{opacity:1,translateX:0,skewX:"0deg"}},qe={easing:"ease-in",0:{opacity:1,translateX:0,skewX:"0deg"},1:{opacity:0,translateX:200,skewX:"30deg"}};function Xe(e,t){return{from:c()({},e,t),to:c()({},e,0)}}var Ye=Xe("translateY",-100),Ke=Xe("translateY",100),Qe=Xe("translateX",-100),Ze=Xe("translateX",100);function Je(e,t){return{from:c()({},e,0),to:c()({},e,t)}}var $e=Je("translateY",100),et=Je("translateY",-100),tt=Je("translateX",-100),nt=Je("translateX",100);function rt(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:0,scale:.1},e,-1e3*n),.6:c()({opacity:1,scale:.457},e,t),1:c()({scale:1},e,0)}}var it={from:{opacity:0,scale:.3},.5:{opacity:1},to:{opacity:1,scale:1}},ot=rt("translateY",60),at=rt("translateY",-60),st=rt("translateX",10),lt=rt("translateX",-10);function ct(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:1,scale:1},e,0),.4:c()({opacity:1,scale:.457},e,t),1:c()({opacity:0,scale:.1},e,-1e3*n)}}var ut,ht={from:{opacity:1,scale:1},.5:{opacity:1,scale:.3},to:{opacity:0,scale:0}},dt=ct("translateY",60),ft=ct("translateY",-60),pt=ct("translateX",10),mt=ct("translateX",-10);ut=i,Object.keys(ut).forEach((function(e){!function(e,t){U[e]=t}(e,H(ut[e]))}));var gt=ee(o.a);ee(a.a),ee(s.a)},function(t,n,r){"use strict";var i,o=r(19),a=r.n(o),s=r(21),l=r.n(s),c=r(23),u=r.n(c),h=r(24),d=r.n(h),f=r(25),p=r.n(f),m=r(18),g=r.n(m),v=r(6),y=r.n(v),b=r(7),w=r.n(b),x=r(254),_=(r(472),r(20)),E=r.n(_),A=r(83),S=r(256),M=r.n(S);function T(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(){if(!A.canUseDOM)return null;var e=L();return e.sheet?e.sheet:null}function R(e,t){return function(){var e=O();if(e){for(var t=E()(e.cssRules),n=[],r=0;r<t.length;r++){var i=t[r];i instanceof CSSFontFaceRule&&n.push({rule:i,index:r})}return n}return[]}().filter((function(n){var r=n.rule;return r.style.fontFamily===e&&(!t||!t.display||t.display===r.style.fontDisplay)}))}!function(e){e.AUTO="auto",e.SWAP="swap",e.BLOCK="block",e.FALLBACK="fallback",e.OPTIONAL="optional"}(i||(i={}));var k={get name(){return"ExpoFontLoader"},unloadAllAsync:function(){var e;return w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.canUseDOM){t.next=2;break}return t.abrupt("return");case 2:(e=document.getElementById(P))&&e instanceof HTMLStyleElement&&document.removeChild(e);case 4:case"end":return t.stop()}}),null,null,null,Promise)},unloadAsync:function(e,t){var n,r,i,o,a;return w.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(n=O()){s.next=3;break}return s.abrupt("return");case 3:for(r=R(e,t),i=T(r);!(o=i()).done;)a=o.value,n.deleteRule(a.index);case 5:case"end":return s.stop()}}),null,null,null,Promise)},loadAsync:function(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(A.canUseDOM){r.next=2;break}return r.abrupt("return");case 2:if(document.head&&"function"===typeof document.head.appendChild){r.next=5;break}throw new x.a("ERR_WEB_ENVIRONMENT","The browser's `document.head` element doesn't support injecting fonts.");case 5:if(n=D(e,t),document.head.appendChild(n),I()){r.next=9;break}return r.abrupt("return");case 9:return r.abrupt("return",new M.a(e,{display:t.display}).load());case 10:case"end":return r.stop()}}),null,null,null,Promise)}},P="expo-generated-fonts";function L(){var e=document.getElementById(P);if(e&&e instanceof HTMLStyleElement)return e;var t=document.createElement("style");return t.id=P,t.type="text/css",t}function D(e,t){var n="@font-face {\n font-family: "+e+";\n src: url("+t.uri+");\n font-display: "+(t.display||i.AUTO)+";\n }",r=L();if(r.styleSheet){var o=r;o.styleSheet.cssText=o.styleSheet.cssText?o.styleSheet.cssText+n:n}else{var a=document.createTextNode(n);r.appendChild(a)}return r}function I(){var e=window.navigator.userAgent,t=!!e.match(/iPad|iPhone/i),n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=e.includes("Edge"),i=e.includes("Trident"),o=e.includes("Firefox");return!n&&!t&&!r&&!i&&!o}function N(e){var t,n="string"===typeof(t=e)?t||null:"object"===typeof t&&(t.uri||t.localUri)||null,r=function(e){return e.display||i.AUTO}(e);return n&&"string"===typeof n||j(n),{uri:n,display:r}}function j(e){var t=typeof e;throw"object"===t&&(t=JSON.stringify(e,null,2)),new x.a("ERR_FONT_SOURCE","Expected font asset of type `string | FontResource | Asset` (number is not supported on web) instead got: "+t)}function B(e,t){return w.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return("object"!==typeof t||"string"!==typeof t.uri||t.downloadAsync)&&j(t),n.next=3,w.a.awrap(k.loadAsync(e,t));case 3:case"end":return n.stop()}}),null,null,null,Promise)}var F={},z={};function H(e){return e in F}function U(e,t){var n,r;return w.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if("object"!==typeof e){i.next=8;break}if(!t){i.next=3;break}throw new x.a("ERR_FONT_API","No fontFamily can be used for the provided source: "+t+". The second argument of `loadAsync()` can only be used with a `string` value as the first argument.");case 3:return n=e,r=Object.keys(n),i.next=7,w.a.awrap(Promise.all(r.map((function(e){return V(e,n[e])}))));case 7:return i.abrupt("return");case 8:return i.next=10,w.a.awrap(V(e,t));case 10:return i.abrupt("return",i.sent);case 11:case"end":return i.stop()}}),null,null,null,Promise)}function V(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}throw new x.a("ERR_FONT_SOURCE",'Cannot load null or undefined font source: { "'+e+'": '+t+' }. Expected asset of type `FontSource` for fontFamily of name: "'+e+'"');case 2:if(!F[e]){r.next=4;break}return r.abrupt("return");case 4:if(!z[e]){r.next=6;break}return r.abrupt("return",z[e]);case 6:return n=N(t),z[e]=w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.a.awrap(B(e,n));case 3:F[e]=!0;case 4:return t.prev=4,delete z[e],t.finish(4);case 7:case"end":return t.stop()}}),null,null,[[0,,4,7]],Promise),r.next=10,w.a.awrap(z[e]);case 10:case"end":return r.stop()}}),null,null,null,Promise)}var G=r(0),W=r.n(G),q=r(57),X=r(17),Y=r.n(X),K=(r(1),r(186)),Q=r(9),Z=r(115),J=r(116),$=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function ee(){if(!$){if("android"===Q.a.OS)throw new Error("RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.");throw new Error("RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.")}}var te=r(252),ne=r.n(te),re=r(253),ie=r.n(re),oe=r(110),ae=r.n(oe),se=r(5),le=r(123),ce=r(3),ue=["style","iconStyle","children"];function he(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var de=se.a.create({container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",padding:8},touchable:{overflow:"hidden"},icon:{marginRight:10},text:{fontWeight:"600",backgroundColor:"transparent"}}),fe=["ellipsizeMode","numberOfLines","textBreakStrategy","selectable","suppressHighlighting","allowFontScaling","adjustsFontSizeToFit","minimumFontScale"],pe=["accessible","accessibilityLabel","accessibilityHint","accessibilityComponentType","accessibilityRole","accessibilityStates","accessibilityTraits","onFocus","onBlur","disabled","onPress","onPressIn","onPressOut","onLayout","onLongPress","nativeID","testID","delayPressIn","delayPressOut","delayLongPress","activeOpacity","underlayColor","selectionColor","onShowUnderlay","onHideUnderlay","hasTVPreferredFocus","tvParallaxProperties"];function me(e){var t,n;return n=t=function(t){d()(r,t);var n=he(r);function r(){return l()(this,r),n.apply(this,arguments)}return u()(r,[{key:"render",value:function(){var t=this.props,n=t.style,r=t.iconStyle,i=t.children,o=Y()(t,ue),s=ae()(o,fe,"style","name","size","color"),l=ae()(o,pe),c=ie()(o,Object.keys(s),Object.keys(l),"iconStyle","borderRadius","backgroundColor");s.style=r?[de.icon,r]:de.icon;var u=ae()(this.props,"color"),h=ae()(this.props,"backgroundColor","borderRadius");return W.a.createElement(le.a,a()({style:[de.touchable,h]},l),W.a.createElement(ce.a,a()({style:[de.container,h,n]},c),W.a.createElement(e,s),ne()(i)?W.a.createElement(q.a,{style:[de.text,u]},i):i))}}]),r}(G.PureComponent),t.defaultProps={backgroundColor:"#007AFF",borderRadius:5,color:"white",size:20},n}var ge=["name","size","color","style","children"];function ve(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var ye=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function be(e,t,n,r){var i=n?n.replace(/\.(otf|ttf)$/,""):t,o=Q.a.select({windows:"/Assets/"+n+"#"+t,android:i,web:i,default:t}),a=function(t){d()(i,t);var n=ve(i);function i(){var e;l()(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).root=null,e.handleRef=function(t){e.root=t},e}return u()(i,[{key:"setNativeProps",value:function(e){this.root&&this.root.setNativeProps(e)}},{key:"render",value:function(){var t=this.props,n=t.name,i=t.size,a=t.color,s=t.style,l=t.children,c=Y()(t,ge),u=n?e[n]||"?":"";"number"===typeof u&&(u=String.fromCodePoint(u));var h={fontSize:i,color:a},d={fontFamily:o,fontWeight:"normal",fontStyle:"normal"};return c.style=[h,s,d,r||{}],c.ref=this.handleRef,W.a.createElement(q.a,c,u,l)}}]),i}(G.PureComponent);a.defaultProps={size:12,allowFontScaling:!1};var s=function(){var e=new Map;return{setValue:function(t,n){return e.set(t,{type:"value",data:n})},setError:function(t,n){return e.set(t,{type:"error",data:n})},has:function(t){return e.has(t)},get:function(t){if(e.has(t)){var n=e.get(t),r=n.type,i=n.data;if("error"===r)throw i;return i}}}}();function c(t){var n=e[t]||"?";return"number"===typeof n?String.fromCodePoint(n):n}return a.Button=me(a),a.TabBarItemIOS=a.TabBarItem,a.getImageSource=function(e){var t,n,r,i,a,l,u,h=arguments;return w.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:12,n=h.length>2&&void 0!==h[2]?h[2]:"black",ee(),r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i,!s.has(a)){d.next=8;break}return d.abrupt("return",s.get(a));case 8:return d.prev=8,d.next=11,w.a.awrap(ye.getImageForFont(o,r,t,i));case 11:return l=d.sent,u={uri:l,scale:J.a.get()},s.setValue(a,u),d.abrupt("return",u);case 17:throw d.prev=17,d.t0=d.catch(8),s.setError(a,d.t0),d.t0;case 21:case"end":return d.stop()}}),null,null,[[8,17]],Promise)},a.getImageSourceSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"black";ee();var r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i;if(s.has(a))return s.get(a);try{var l=ye.getImageForFontSync(o,r,t,i),u={uri:l,scale:J.a.get()};return s.setValue(a,u),u}catch(h){throw s.setError(a,h),h}},a.loadFont=function(){var e,t=arguments;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.length>0&&void 0!==t[0]?t[0]:n,"ios"!==Q.a.OS){r.next=7;break}if(ee(),e){r.next=5;break}throw new Error("Unable to load font, because no file was specified. ");case 5:return r.next=7,w.a.awrap(ye.loadFontWithFileName.apply(ye,E()(e.split("."))));case 7:case"end":return r.stop()}}),null,null,null,Promise)},a.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},a.getRawGlyphMap=function(){return e},a.getFontFamily=function(){return o},a}function we(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var xe=r(258),_e=r.n(xe),Ee=function(e,t,n,r){var i,o=y()({},t,n),s=be(e,t,null,r);return(i=function(e){d()(r,e);var n=we(r);function r(){var e;return l()(this,r),(e=n.apply(this,arguments))._mounted=!1,e.state={fontIsLoaded:H(t)},e}return u()(r,[{key:"componentDidMount",value:function(){return w.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._mounted=!0,this.state.fontIsLoaded){e.next=5;break}return e.next=4,w.a.awrap(U(o));case 4:this._mounted&&this.setState({fontIsLoaded:!0});case 5:case"end":return e.stop()}}),null,this,null,Promise)}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"setNativeProps",value:function(e){this._icon&&this._icon.setNativeProps(e)}},{key:"render",value:function(){var e=this;return this.state.fontIsLoaded?W.a.createElement(s,a()({ref:function(t){e._icon=t}},this.props)):W.a.createElement(q.a,null)}}]),r}(W.a.Component)).defaultProps=s.defaultProps,i.Button=me(i),i.glyphMap=e,i.getRawGlyphMap=function(){return e},i.getFontFamily=function(){return t},i.loadFont=function(){return U(o)},i.font=o,i}(r(257),"material-community",_e.a);n.a=Ee},,,,,,,function(e,t,n){var r=n(179);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.a={ignoreLogs:function(){},ignoreAllLogs:function(){},uninstall:function(){},install:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},function(t,n,r){if("undefined"===typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");let i=r(11);"default"in i&&(i=i.default);let o=r(146);"default"in o&&(o=o.default);const a=function(e){return"string"===typeof e?JSON.parse(e):e},s=function(t){if("function"===typeof t)return t;const n=eval;try{return n("("+t+")")}catch(e){}return null},l=function(e){return isNaN(parseFloat(e))?s(e)?s(e):e:parseFloat(e)};AFRAME.registerComponent("forcegraph",{schema:{jsonUrl:{type:"string",default:""},nodes:{parse:a,default:[]},links:{parse:a,default:[]},numDimensions:{type:"number",default:3},dagMode:{type:"string",default:""},dagLevelDistance:{type:"number",default:0},dagNodeFilter:{parse:s,function:()=>!0},onDagError:{parse:s,default:void 0},nodeRelSize:{type:"number",default:4},nodeId:{type:"string",default:"id"},nodeVal:{parse:l,default:"val"},nodeResolution:{type:"number",default:8},nodeVisibility:{parse:l,default:!0},nodeColor:{parse:l,default:"color"},nodeAutoColorBy:{parse:l,default:""},nodeOpacity:{type:"number",default:.75},nodeThreeObject:{parse:l,default:null},nodeThreeObjectExtend:{parse:l,default:!1},linkSource:{type:"string",default:"source"},linkTarget:{type:"string",default:"target"},linkVisibility:{parse:l,default:!0},linkColor:{parse:l,default:"color"},linkAutoColorBy:{parse:l,default:""},linkOpacity:{type:"number",default:.2},linkWidth:{parse:l,default:0},linkResolution:{type:"number",default:6},linkCurvature:{parse:l,default:0},linkCurveRotation:{parse:l,default:0},linkMaterial:{parse:l,default:null},linkThreeObject:{parse:l,default:null},linkThreeObjectExtend:{parse:l,default:!1},linkPositionUpdate:{parse:s,default:null},linkDirectionalArrowLength:{parse:l,default:0},linkDirectionalArrowColor:{parse:l,default:null},linkDirectionalArrowRelPos:{parse:l,default:.5},linkDirectionalArrowResolution:{type:"number",default:8},linkDirectionalParticles:{parse:l,default:0},linkDirectionalParticleSpeed:{parse:l,default:.01},linkDirectionalParticleWidth:{parse:l,default:.5},linkDirectionalParticleColor:{parse:l,default:null},linkDirectionalParticleResolution:{type:"number",default:4},onNodeHover:{parse:s,default:()=>{}},onLinkHover:{parse:s,default:()=>{}},onNodeClick:{parse:s,default:()=>{}},onLinkClick:{parse:s,default:()=>{}},forceEngine:{type:"string",default:"d3"},d3AlphaMin:{type:"number",default:0},d3AlphaDecay:{type:"number",default:.0228},d3VelocityDecay:{type:"number",default:.4},ngraphPhysics:{parse:a,default:null},warmupTicks:{type:"int",default:0},cooldownTicks:{type:"int",default:1e18},cooldownTime:{type:"int",default:15e3},onEngineTick:{parse:s,default:function(){}},onEngineStop:{parse:s,default:function(){}}},getGraphBbox:function(){return this.forceGraph||(this.forceGraph=new o),this.forceGraph.getGraphBbox()},emitParticle:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.emitParticle.apply(e,arguments);return t===e?this:t},d3Force:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.d3Force.apply(e,arguments);return t===e?this:t},d3ReheatSimulation:function(){return this.forceGraph&&this.forceGraph.d3ReheatSimulation(),this},refresh:function(){return this.forceGraph&&this.forceGraph.refresh(),this},init:function(){const e=this.state={};e.infoEl=document.createElement("a-text"),e.infoEl.setAttribute("position","0 -0.1 -1"),e.infoEl.setAttribute("width",1),e.infoEl.setAttribute("align","center"),e.infoEl.setAttribute("color","lavender");const t=document.querySelector("a-entity[camera], a-camera");t.appendChild(e.infoEl),e.cameraObj=t.object3D.children.filter((function(e){return"PerspectiveCamera"===e.type}))[0],this.el.sceneEl.addEventListener("camera-set-active",(function(t){e.cameraObj=t.detail.cameraEl.components.camera.camera})),this.forceGraph||(this.forceGraph=new o),this.forceGraph.onFinishUpdate(()=>this.el.setObject3D("forcegraphGroup",this.forceGraph)).onLoading(()=>e.infoEl.setAttribute("value","Loading...")).onFinishLoading(()=>e.infoEl.setAttribute("value","")),this.el.addEventListener("raycaster-intersected",t=>e.hoverDetail=t.detail),this.el.addEventListener("raycaster-intersected-cleared",t=>e.hoverDetail=t.detail),this.el.addEventListener("click",()=>e.hoverObj&&this.data["on"+("node"===e.hoverObj.__graphObjType?"Node":"Link")+"Click"](e.hoverObj.__data))},remove:function(){this.state.infoEl.remove(),this.el.removeObject3D("forcegraphGroup")},update:function(e){const t=this,n=this.data,r=AFRAME.utils.diff(n,e);["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].filter((function(e){return e in r})).forEach((function(e){t.forceGraph[e](""!==n[e]?n[e]:null)})),("nodes"in r||"links"in r)&&t.forceGraph.graphData({nodes:n.nodes,links:n.links})},tick:function(e,t){const n=this.state,r=this.data,i=n.hoverDetail?n.hoverDetail.getIntersection?n.hoverDetail.getIntersection(this.el):n.hoverDetail.intersection||void 0:void 0;let o=i?i.object:void 0;for(;o&&!o.hasOwnProperty("__graphObjType");)o=o.parent;if(o!==n.hoverObj){const e=n.hoverObj?n.hoverObj.__graphObjType:null,t=n.hoverObj?n.hoverObj.__data:null,i=o?o.__graphObjType:null,a=o?o.__data:null;e&&e!==i&&r["on"+("node"===e?"Node":"Link")+"Hover"](null,t),i&&r["on"+("node"===i?"Node":"Link")+"Hover"](a,e===i?t:null),n.hoverObj=o}this.forceGraph.tickFrame()}})},function(e,t,n){e.exports=function(e){var t=n(366),h=n(367),d=n(152);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=c[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:i(p),createBounds:o(p),createDragForce:a(p),createSpringForce:s(p),integrate:l(p)},c[p]=f}var m=f.Body,g=f.createQuadTree,v=f.createBounds,y=f.createDragForce,b=f.createSpringForce,w=f.integrate,x=n(368).random(42),_=[],E=[],A=g(e,x),S=v(_,e,x),M=b(e,x),T=y(e),C=[],O=new Map,R=0;L("nbody",(function(){if(0===_.length)return;A.insertBodies(_);var e=_.length;for(;e--;){var t=_[e];t.isPinned||(t.reset(),A.updateBodyForce(t),T.update(t))}})),L("spring",(function(){var e=E.length;for(;e--;)M.update(E[e])}));var k={bodies:_,quadTree:A,springs:E,settings:e,addForce:L,removeForce:function(e){var t=C.indexOf(O.get(e));if(t<0)return;C.splice(t,1),O.delete(e)},getForces:function(){return O},step:function(){for(var t=0;t<C.length;++t)C[t](R);var n=w(_,e.timeStep,e.adaptiveTimeStepWeight);return R+=1,n},addBody:function(e){if(!e)throw new Error("Body is required");return _.push(e),e},addBodyAt:function(e){if(!e)throw new Error("Body position is required");var t=(e=>new m(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&S.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!==typeof r&&(r=-1);var o=new t(e,n,r,i>=0?i:-1);return E.push(o),o},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=E.indexOf(e);return t>-1?(E.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return S.getBestNewPosition(e)},getBBox:P,getBoundingBox:P,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,A.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,A.options({theta:t}),this):e.theta},random:x};return function(e,t){for(var n in e)u(e,t,n)}(e,k),d(k),k;function P(){return S.update(),S.box}function L(e,t){if(O.has(e))throw new Error("Force "+e+" is already added");O.set(e,t),C.push(t)}};var r=n(360),i=n(361),o=n(362),a=n(363),s=n(364),l=n(365),c={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},function(e,t){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r={UIManager:n(29).a};t.a=r},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(){return{type:"GO_BACK"}}function i(){if("string"===typeof(arguments.length<=0?void 0:arguments[0]))return{type:"NAVIGATE",payload:{name:arguments.length<=0?void 0:arguments[0],params:arguments.length<=1?void 0:arguments[1]}};var e=(arguments.length<=0?void 0:arguments[0])||{};if(!e.hasOwnProperty("key")&&!e.hasOwnProperty("name"))throw new Error("You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.");return{type:"NAVIGATE",payload:e}}function o(e){return{type:"RESET",payload:e}}function a(e){return{type:"SET_PARAMS",payload:{params:e}}}n.r(t),n.d(t,"goBack",(function(){return r})),n.d(t,"navigate",(function(){return i})),n.d(t,"reset",(function(){return o})),n.d(t,"setParams",(function(){return a}))},function(t,n,r){"use strict";(function(t){var i=r(8),o=r.n(i),a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(43),d=r(93),f=r(135),p=r(40),m=r(69),g=r(47),v=r(58),y=r(136),b=r(137),w=r(138),x=r(139),_=r(140),E=r(259),A=(r(375),["key","routeNames"]);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T="The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.";try{Object.defineProperty(t,"REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED",{set:function(e){console.warn("Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools")}})}catch(e){}var C=u.forwardRef((function(e,t){var n=e.initialState,r=e.onStateChange,i=e.onUnhandledAction,a=e.independent,s=e.children;if(!u.useContext(m.a).isDefault&&!a)throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitely. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");var l=Object(E.a)((function(){return function e(t){if(void 0!==t){t.key,t.routeNames;return M(M({},c()(t,A)),{},{stale:!0,routes:t.routes.map((function(t){return void 0===t.state?t:M(M({},t),{},{state:e(t.state)})}))})}}(null==n?void 0:n)})),S=o()(l,5),C=S[0],O=S[1],R=S[2],k=S[3],P=S[4],L=u.useRef(!0),D=u.useRef(),I=u.useCallback((function(){return D.current}),[]),N=u.useCallback((function(e){D.current=e}),[]),j=Object(b.a)(),B=j.listeners,F=j.addListener,z=Object(w.a)(),H=z.keyedListeners,U=z.addKeyedListener,V=function(e){if(null==B.focus[0])throw new Error(T);B.focus[0]((function(t){return t.dispatch(e)}))},G=function(){if(null==B.focus[0])return!1;var e=B.focus[0]((function(e){return e.canGoBack()})),t=e.result;return!!e.handled&&t},W=u.useCallback((function(e){var t,n,r,i=null!==(t=null===e||void 0===e?void 0:e.key)&&void 0!==t?t:null===(n=(r=H.getState).root)||void 0===n?void 0:n.call(r).key;if(null==i)throw new Error(T);B.focus[0]((function(t){return t.dispatch(M(M({},h.CommonActions.reset(e)),{},{target:i}))}))}),[H.getState,B.focus]),q=u.useCallback((function(){var e,t;return null===(e=(t=H.getState).root)||void 0===e?void 0:e.call(t)}),[H.getState]),X=u.useCallback((function(){var e=q();if(void 0!==e){for(;void 0!==e.routes[e.index].state;)e=e.routes[e.index].state;return e.routes[e.index]}}),[q]),Y=Object(_.a)(),K=Object(x.a)({}),Q=K.addOptionsGetter,Z=K.getCurrentOptions;u.useImperativeHandle(t,(function(){return M(M(M({},Object.keys(h.CommonActions).reduce((function(e,t){return e[t]=function(){return V(h.CommonActions[t].apply(h.CommonActions,arguments))},e}),{})),Y.create("root")),{},{resetRoot:W,dispatch:V,canGoBack:G,getRootState:q,dangerouslyGetState:function(){return C},dangerouslyGetParent:function(){},getCurrentRoute:X,getCurrentOptions:Z})}));var J=u.useCallback((function(e,t){Y.emit({type:"__unsafe_action__",data:{action:e,noop:t}})}),[Y]),$=u.useRef(),ee=u.useCallback((function(e){$.current!==e&&($.current=e,Y.emit({type:"options",data:{options:e}}))}),[Y]),te=u.useMemo((function(){return{addListener:F,addKeyedListener:U,onDispatchAction:J,onOptionsChange:ee}}),[F,U,J,ee]),ne=u.useMemo((function(){return{scheduleUpdate:k,flushUpdates:P}}),[k,P]),re=u.useRef(!0),ie=u.useCallback((function(){return re.current}),[]),oe=u.useMemo((function(){return{state:C,getState:O,setState:R,getKey:I,setKey:N,getIsInitial:ie,addOptionsGetter:Q}}),[C,O,R,I,N,ie,Q]),ae=u.useRef(r);u.useEffect((function(){re.current=!1,ae.current=r})),u.useEffect((function(){Y.emit({type:"state",data:{state:C}}),!L.current&&ae.current&&ae.current(q()),L.current=!1}),[q,Y,C]);var se=u.useCallback((function(e){}),[]),le=u.createElement(y.a.Provider,{value:ne},u.createElement(p.a.Provider,{value:te},u.createElement(m.a.Provider,{value:oe},u.createElement(f.a.Provider,{value:null!==i&&void 0!==i?i:se},u.createElement(d.b,null,s)))));return a&&(le=u.createElement(g.a.Provider,{value:void 0},u.createElement(v.a.Provider,{value:void 0},le))),le}));n.a=C}).call(this,r(46))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(141);function i(e){return function(){if(void 0!==arguments[0])throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.");return{Navigator:e,Screen:r.a}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n(0),n(47)},function(e,t,n){"use strict";n(0),n(71)},function(e,t,n){"use strict";n(8),n(0),n(71)},function(e,t,n){"use strict";n(8),n(0),n(71)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(6),i=n.n(r),o=n(19),a=n.n(o),s=n(20),l=n.n(s),c=n(8),u=n.n(c),h=n(260),d=n.n(h),f=n(142),p=n(143);function m(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){var n,r=Object(p.a)(t),o=u()(r,2),s=o[0],c=o[1],h=[];null!==c&&void 0!==c&&c.initialRouteName&&h.push({initialRouteName:c.initialRouteName,parentScreens:[]});var d=null===c||void 0===c?void 0:c.screens,f=e.replace(/\/+/g,"/").replace(/^\//,"").replace(/\?.*$/,"");if(f=f.endsWith("/")?f:"".concat(f,"/"),void 0===d){var m=f.split("/").filter(Boolean).map((function(t,n,r){var i=decodeURIComponent(t);return n===r.length-1?{name:i,params:O(e)}:{name:i}}));return m.length?T(m,h):void 0}var g,v,b=(n=[]).concat.apply(n,l()(Object.keys(d).map((function(e){return _(s,e,d,[],h,[])})))).sort((function(e,t){if(e.pattern===t.pattern)return t.routeNames.join(">").localeCompare(e.routeNames.join(">"));if(e.pattern.startsWith(t.pattern))return-1;if(t.pattern.startsWith(e.pattern))return 1;var n=e.pattern.split("/"),r=t.pattern.split("/"),i=n.indexOf("*"),o=r.indexOf("*");return-1===i&&-1!==o?-1:-1!==i&&-1===o?1:i===o?r.length-n.length:o-i}));if(b.reduce((function(e,t){if(e[t.pattern]){var n=e[t.pattern].routeNames,r=t.routeNames;if(!(n.length>r.length?r.every((function(e,t){return n[t]===e})):n.every((function(e,t){return r[t]===e}))))throw new Error("Found conflicting screens with the same pattern. The pattern '".concat(t.pattern,"' resolves to both '").concat(n.join(" > "),"' and '").concat(r.join(" > "),"'. Patterns must be unique and cannot resolve to more than one screen."))}return a()(e,i()({},t.pattern,t))}),{}),"/"===f){var w=b.find((function(e){return""===e.path&&e.routeNames.every((function(e){var t;return!(null!==(t=b.find((function(t){return t.screen===e})))&&void 0!==t&&t.path)}))}));return w?T(w.routeNames.map((function(t,n,r){return n===r.length-1?{name:t,params:O(e,w.parse)}:{name:t}})),h):void 0}if(!1===s){var E=x(f,b.map((function(e){return y(y({},e),{},{regex:e.regex?new RegExp(e.regex.source+"$"):void 0})}))),S=E.routes,M=E.remainingPath;void 0!==S&&(f=M,g=v=T(S,h))}else for(;f;){var R=x(f,b),k=R.routes;if(f=R.remainingPath,void 0===k){var P=f.split("/");k=[{name:decodeURIComponent(P[0])}],P.shift(),f=P.join("/")}var L=T(k,h);if(v){for(var D;null!==(I=v)&&void 0!==I&&I.routes[v.index||0].state;){var I;v=v.routes[v.index||0].state}v.routes[(null===(D=v)||void 0===D?void 0:D.index)||0].state=L}else g=L;v=L}if(null!=v&&null!=g){var N=C(v),j=O(e,A(N.name,b));return j&&(N.params=y(y({},N.params),j)),g}}var w=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,l()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},x=function(e,t){for(var n,r,o=e,s=function(e){if(!e.regex)return"continue";var r=o.match(e.regex);if(r){var s=null===(c=e.pattern)||void 0===c?void 0:c.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t,n){return a()(e,i()({},t,r[2*(n+1)].replace(/\//,"")))}),{});return n=e.routeNames.map((function(e){var n,r=t.find((function(t){return t.screen===e})),i=null===r||void 0===r||null===(n=r.path)||void 0===n?void 0:n.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t){var n=s[t];if(n){var i,o=t.replace(/^:/,"").replace(/\?$/,"");e[o]=null!==(i=r.parse)&&void 0!==i&&i[o]?r.parse[o](n):n}return e}),{});return i&&Object.keys(i).length?{name:e,params:i}:{name:e}})),o=o.replace(r[1],""),"break"}},l=m(t);!(r=l()).done;){var c,u=s(r.value);if("continue"!==u&&"break"===u)break}return{routes:n,remainingPath:o}},_=function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=[];i.push(n),a.push(n);var u=r[n];if("string"===typeof u){var h=s?w(s,u):u;c.push(E(t,n,i,h,u))}else if("object"===typeof u){var d;if("string"===typeof u.path){if(t)d=!0!==u.exact&&s?w(s,u.path):u.path;else{if(u.exact&&void 0===u.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");d=!0!==u.exact?w(s||"",u.path||""):u.path||""}c.push(E(t,n,i,d,u.path,u.parse))}u.screens&&(u.initialRouteName&&o.push({initialRouteName:u.initialRouteName,parentScreens:a}),Object.keys(u.screens).forEach((function(n){var r,h=e(t,n,u.screens,i,o,l()(a),null!==(r=d)&&void 0!==r?r:s);c.push.apply(c,l()(h))})))}return i.pop(),c},E=function(e,t,n,r,i,o){return{screen:t,regex:(r=r.split("/").filter(Boolean).join("/"))?new RegExp("^(".concat(r.split("/").map((function(t){if(e&&"*"===t)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return t.startsWith(":")?"(([^/]+\\/)".concat(t.endsWith("?")?"?":"",")"):"".concat("*"===t?".*":d()(t),"\\/")})).join(""),")")):void 0,pattern:r,path:i,routeNames:l()(n),parse:o}},A=function(e,t){for(var n,r=m(t);!(n=r()).done;){var i=n.value;if(e===i.routeNames[i.routeNames.length-1])return i.parse}},S=function(e,t,n){for(var r,i=m(n);!(r=i()).done;){var o=r.value;if(t.length===o.parentScreens.length){for(var a=!0,s=0;s<t.length;s++)if(0!==t[s].localeCompare(o.parentScreens[s])){a=!1;break}if(a)return e!==o.initialRouteName?o.initialRouteName:void 0}}},M=function(e,t,n){return n?e?{index:1,routes:[{name:e},t]}:{routes:[t]}:e?{index:1,routes:[{name:e},y(y({},t),{},{state:{routes:[]}})]}:{routes:[y(y({},t),{},{state:{routes:[]}})]}},T=function(e,t){var n,r=e.shift(),i=[],o=S(r.name,i,t);if(i.push(r.name),n=M(o,r,0===e.length),e.length>0)for(var a=n;r=e.shift();){o=S(r.name,i,t);var s=a.index||a.routes.length-1;a.routes[s].state=M(o,r,0===e.length),e.length>0&&(a=a.routes[s].state),i.push(r.name)}return n},C=function(e){for(var t,n=e;null!==(r=n)&&void 0!==r&&r.routes[n.index||0].state;){var r;n=n.routes[n.index||0].state}return n.routes[(null===(t=n)||void 0===t?void 0:t.index)||0]},O=function(e,t){var n=e.split("?")[1],r=f.parse(n);return t&&Object.keys(r).forEach((function(e){t[e]&&"string"===typeof r[e]&&(r[e]=t[e](r[e]))})),Object.keys(r).length?r:void 0}},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},r=i.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(t){var o=a(r[0]);o!==r[0]&&(n[r[0]]=o)}r=i.exec(e)}n["%C2"]="\ufffd";for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];e=e.replace(new RegExp(c,"g"),n[c])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(20),i=n.n(r),o=n(6),a=n.n(o),s=n(19),l=n.n(s),c=n(8),u=n.n(c),h=n(142),d=n(143);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(null==e)throw Error("Got 'undefined' for the navigation state. You must pass a valid state object.");for(var n=Object(d.a)(t),r=u()(n,2),i=r[0],o=r[1],a=o?w(i,o.screens):{},s="/",c=e,f={},m=function(){for(var t="number"===typeof c.index?c.index:0,n=c.routes[t],r=void 0,o=void 0,d=function e(t){var n="number"===typeof t.index?t.routes[t.index]:t.routes[t.routes.length-1];return n.state?e(n.state):n}(e),m=a,w=[],x=!0;n.name in m&&x;)if(r=m[n.name].pattern,w.push(n.name),n.params&&function(){var e=null===(y=m[n.name])||void 0===y?void 0:y.stringify,t=g(Object.entries(n.params).map((function(t){var n=u()(t,2),r=n[0],i=n[1];return[r,null!==e&&void 0!==e&&e[r]?e[r](i):String(i)]})));r&&l()(f,t),d===n&&(o=p({},t),null===(b=r)||void 0===b||b.split("/").filter((function(e){return e.startsWith(":")})).forEach((function(e){var t=v(e);o&&delete o[t]})))}(),m[n.name].screens&&void 0!==n.state){t="number"===typeof n.state.index?n.state.index:n.state.routes.length-1;var _=n.state.routes[t],E=m[n.name].screens;E&&_.name in E?(n=_,m=E):x=!1}else x=!1;if(void 0===r&&(r=w.join("/")),void 0!==m[n.name]?s+=r.split("/").map((function(e){var t=v(e);if("*"===e){if(i)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return n.name}if(e.startsWith(":")){var r=f[t];return void 0===r&&e.endsWith("?")?"":encodeURIComponent(r)}return encodeURIComponent(e)})).join("/"):s+=encodeURIComponent(n.name),o||(o=d.params),n.state)s+="/";else if(o){for(var A in o)"undefined"===o[A]&&delete o[A];var S=h.stringify(o);S&&(s+="?".concat(S))}c=n.state};c;){var y,b;m()}return s=(s=s.replace(/\/+/g,"/")).length>1?s.replace(/\/$/,""):s}var g=function(e){return e.reduce((function(e,t){var n=u()(t,2),r=n[0],i=n[1];if(e.hasOwnProperty(r))throw new Error("A value for key '".concat(r,"' already exists in the object."));return e[r]=i,e}),{})},v=function(e){return e.replace(/^:/,"").replace(/\?$/,"")},y=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,i()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},b=function(e,t,n){var r,i;if("string"===typeof t)return{pattern:n?y(n,t):t};if(e)i=!0!==t.exact&&n&&t.path?y(n,t.path):t.path;else{if(t.exact&&void 0===t.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");i=!0!==t.exact?y(n||"",t.path||""):t.path||""}var o=t.screens?w(e,t.screens,i):void 0;return{pattern:null===(r=i)||void 0===r?void 0:r.split("/").filter(Boolean).join("/"),stringify:t.stringify,screens:o}},w=function(e,t,n){return g(Object.entries(t).map((function(t){var r=u()(t,2),i=r[0],o=r[1];return[i,b(e,o,n)]})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(8),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){var n,r,i=t?d(t):{},o=null!=e.index?e.routes.slice(0,e.index+1):e.routes;if(0!==o.length){if(!(1===o.length&&void 0===o[0].key||2===o.length&&void 0===o[0].key&&o[0].name===(null===i||void 0===i?void 0:i.initialRouteName)&&void 0===o[1].key))return{type:"RESET",payload:e};for(var s=e.routes[null!==(n=e.index)&&void 0!==n?n:e.routes.length-1],l=null===s||void 0===s?void 0:s.state,c=null===i||void 0===i||null===(r=i.screens)||void 0===r?void 0:r[null===s||void 0===s?void 0:s.name],h=u({},s.params),f=s?{name:s.name,params:h}:void 0;l;){var p,m,g;if(0===l.routes.length)return;var v=null!=l.index?l.routes.slice(0,l.index+1):l.routes,y=v[v.length-1];if(a()(h,{initial:void 0,screen:void 0,params:void 0,state:void 0}),1===v.length&&void 0===v[0].key)h.initial=!0,h.screen=y.name;else{if(2!==v.length||void 0!==v[0].key||v[0].name!==(null===(p=c)||void 0===p?void 0:p.initialRouteName)||void 0!==v[1].key){h.state=l;break}h.initial=!1,h.screen=y.name}y.state?(h.params=u({},y.params),h=h.params):h.params=y.params,l=y.state,c=null===(m=c)||void 0===m||null===(g=m.screens)||void 0===g?void 0:g[y.name]}if(f)return{type:"NAVIGATE",payload:f}}}var d=function(e){return"object"===typeof e&&null!=e?{initialRouteName:e.initialRouteName,screens:null!=e.screens?f(e.screens):void 0}:{}},f=function(e){return Object.entries(e).reduce((function(e,t){var n=i()(t,2),r=n[0],o=n[1];return e[r]=d(o),e}),{})}},function(e,t,n){"use strict";n(109)},function(e,t){},function(e,t,n){var r=n(155)(n(206));e.exports=r},function(e,t,n){var r=n(385),i=n(387),o=n(388);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r](o(e["@@transducer/step"],e),t))}var l="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"===typeof e&&(e=i(e)),r(n))return function(e,t,n){for(var r=0,i=n.length;r<i;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"===typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[l])return a(e,t,n[l]());if("function"===typeof n.next)return a(e,t,n);if("function"===typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},function(e,t,n){var r=n(56)((function(e){return function(){return e}}));e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(51);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(t,n,r){"use strict";(function(n){var i=r(51),o=r(429),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof n&&"[object process]"===Object.prototype.toString.call(n))&&(e=r(212)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),t.exports=l}).call(this,r(111))},function(t,n,r){"use strict";var i=r(51),o=r(430),a=r(432),s=r(209),l=r(433),c=r(436),u=r(437),h=r(213);t.exports=function(t){return new Promise((function(n,r){var d=t.data,f=t.headers;i.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=l(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:e,config:t,request:p};o(n,r,i),p=null}},p.onabort=function(){p&&(r(h("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(h("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,"ECONNABORTED",p)),p=null},i.isStandardBrowserEnv()){var y=(t.withCredentials||u(v))&&t.xsrfCookieName?a.read(t.xsrfCookieName):void 0;y&&(f[t.xsrfHeaderName]=y)}if("setRequestHeader"in p&&i.forEach(f,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)})),i.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"===typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),d||(d=null),p.send(d)}))}},function(e,t,n){"use strict";var r=n(431);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(a).concat(s),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(h,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(){return r.useContext(i.a)}},function(e,t){},function(e,t,n){var r=n(452),i={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=o);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in a)if(a.hasOwnProperty(s)){if(!("channels"in a[s]))throw new Error("missing channels property: "+s);if(!("labels"in a[s]))throw new Error("missing channel labels property: "+s);if(a[s].labels.length!==a[s].channels)throw new Error("channel and label counts mismatch: "+s);var l=a[s].channels,c=a[s].labels;delete a[s].channels,delete a[s].labels,Object.defineProperty(a[s],"channels",{value:l}),Object.defineProperty(a[s],"labels",{value:c})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,i,o,a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?i=o=0:(o=u/c,t=h(a),n=h(s),r=h(l),a===c?i=r-n:s===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,o,a,s=1/0;for(var l in r)if(r.hasOwnProperty(l)){var c=r[l],u=(o=e,a=c,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<s&&(s=u,n=l)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[t,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},a.hsv.hsl=function(e){var t,n,r,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(t=(2-o)*s)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,i,o,a,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(h>1&&(c/=h,u/=h),r=6*l-(t=Math.floor(6*l)),0!==(1&t)&&(r=1-r),i=c+r*((n=1-u)-c),t){default:case 6:case 0:o=n,a=i,s=c;break;case 1:o=i,a=n,s=c;break;case 2:o=c,a=n,s=i;break;case 3:o=c,a=i,s=n;break;case 4:o=i,a=c,s=n;break;case 5:o=n,a=c,s=i}return[255*o,255*a,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ie}));var r=n(8),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s),c=n(17),u=n.n(c),h=n(20),d=n.n(h),f=n(0),p=(n(376),n(43)),m=n(69),g=n(47),v=n(141),y=n(140),b=n(41),w=n(93);var x=f.memo((function(e){return e.children}),(function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if("children"!==a&&e[a]!==t[a])return!1}return!0})),_=n(139);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=e.screen,n=e.route,r=e.navigation,i=e.routeState,o=e.getState,a=e.setState,s=e.options,l=f.useRef(),c=f.useCallback((function(){return l.current}),[]),u=Object(_.a)({key:n.key,options:s,navigation:r}).addOptionsGetter,h=f.useCallback((function(e){l.current=e}),[]),d=f.useCallback((function(){var e=o().routes.find((function(e){return e.key===n.key}));return e?e.state:void 0}),[o,n.key]),p=f.useCallback((function(e){var t=o();a(A(A({},t),{},{routes:t.routes.map((function(t){return t.key===n.key?A(A({},t),{},{state:e}):t}))}))}),[o,n.key,a]),g=f.useRef(!0);f.useEffect((function(){g.current=!1}));var v=f.useCallback((function(){return g.current}),[]),y=f.useMemo((function(){return{state:i,getState:d,setState:p,getKey:c,setKey:h,getIsInitial:v,addOptionsGetter:u}}),[i,d,p,c,h,v,u]),b=t.getComponent?t.getComponent():t.component;return f.createElement(m.a.Provider,{value:y},f.createElement(w.b,null,f.createElement(x,{name:t.name,render:b||t.children,navigation:r,route:n},void 0!==b?f.createElement(b,{navigation:r,route:n}):void 0!==t.children?t.children({navigation:r,route:n}):null)))}var M=n(40),T=["emit"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=n(109),k=n(58);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=e.state,n=e.screens,r=e.navigation,o=e.screenOptions,a=e.onAction,s=e.getState,c=e.setState,h=e.addListener,d=e.addKeyedListener,m=e.onRouteFocus,v=e.router,y=e.emitter,b=f.useState({}),w=i()(b,2),x=w[0],_=w[1],E=f.useContext(M.a),A=E.onDispatchAction,C=E.onOptionsChange,P=f.useMemo((function(){return{navigation:r,onAction:a,addListener:h,addKeyedListener:d,onRouteFocus:m,onDispatchAction:A,onOptionsChange:C}}),[r,a,h,d,m,A,C]),D=function(e){var t=e.state,n=e.getState,r=e.navigation,i=e.setOptions,o=e.router,a=e.emitter,s=f.useMemo((function(){return{current:{}}}),[n,r,i,o,a]),c=O(O({},o.actionCreators),p.CommonActions);return s.current=t.routes.reduce((function(e,t){var o=s.current[t.key];if(o)e[t.key]=o;else{r.emit;var h=u()(r,T),d=function(e){var i="function"===typeof e?e(n()):e;r.dispatch("object"===typeof i&&null!=i?O({source:t.key},i):i)},f=Object.keys(c).reduce((function(e,t){return e[t]=function(){return d(c[t].apply(c,arguments))},e}),{});e[t.key]=O(O(O(O({},h),f),a.create(t.key)),{},{dispatch:d,setOptions:function(e){return i((function(n){return O(O({},n),{},l()({},t.key,O(O({},n[t.key]),e)))}))},isFocused:function(){var e=n();return e.routes[e.index].key===t.key&&(!r||r.isFocused())}})}return e}),{}),s.current}({state:t,getState:s,navigation:r,setOptions:_,router:v,emitter:y});return Object(R.b)(t.routes).reduce((function(e,r,i){var a=n[r.name],l=D[r.key],u=L(L(L({},"object"===typeof o||null==o?o:o({route:r,navigation:l})),"object"===typeof a.options||null==a.options?a.options:a.options({route:r,navigation:l})),x[r.key]);return e[r.key]={navigation:l,render:function(){return f.createElement(M.a.Provider,{key:r.key,value:P},f.createElement(k.a.Provider,{value:l},f.createElement(g.a.Provider,{value:r},f.createElement(S,{navigation:l,route:r,screen:a,routeState:t.routes[i].state,getState:s,setState:c,options:u}))))},options:u},e}),{})}var I=n(135),N=n(87);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;var V=Symbol("VISITED_ROUTE_KEYS"),G=function(e,t,n,r,i){for(var o,a,s=r.map((function(e){return e.key})),c=n.filter((function(e){return!s.includes(e.key)})).reverse(),u=null!==(o=i[V])&&void 0!==o?o:new Set,h=U(U({},i),{},l()({},V,u)),d=F(c);!(a=d()).done;){var f,p=a.value;if(!u.has(p.key)){if(null===(f=t[p.key])||void 0===f?void 0:f.call(t,h))return!0;if(u.add(p.key),e.emit({type:"beforeRemove",target:p.key,data:{action:h},canPreventDefault:!0}).defaultPrevented)return!0}}return!1};function W(e){var t=e.router,n=e.getState,r=e.setState,i=e.key,o=e.actionListeners,a=e.beforeRemoveListeners,s=e.routerConfigOptions,l=e.emitter,c=f.useContext(M.a),u=c.onAction,h=c.onRouteFocus,d=c.addListener,p=c.onDispatchAction,m=f.useRef(s);f.useEffect((function(){m.current=s}));var v=f.useCallback((function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,c=n();if(s.has(c.key))return!1;if(s.add(c.key),"string"!==typeof e.target||e.target===c.key){var d=t.getStateForAction(c,e,m.current);if(null!==(d=null===d&&e.target===c.key?c:d)){if(p(e,c===d),c!==d){var f=G(l,a,c.routes,d.routes,e);if(f)return!0;r(d)}if(void 0!==h){var g=t.shouldActionChangeFocus(e);g&&void 0!==i&&h(i)}return!0}}if(void 0!==u&&u(e,s))return!0;for(var v=o.length-1;v>=0;v--){var y=o[v];if(y(e,s))return!0}return!1}),[o,a,l,n,i,u,p,h,t,r]);return function(e){var t=e.getState,n=e.emitter,r=e.beforeRemoveListeners,i=f.useContext(M.a).addKeyedListener,o=f.useContext(g.a),a=null===o||void 0===o?void 0:o.key;f.useEffect((function(){if(a)return null===i||void 0===i?void 0:i("beforeRemove",a,(function(e){var i=t();return G(n,r,i.routes,[],e)}))}),[i,r,n,t,a])}({getState:n,emitter:l,beforeRemoveListeners:a}),f.useEffect((function(){return null===d||void 0===d?void 0:d("action",v)}),[d,v]),v}var q=n(137);function X(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K=n(138);function Q(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $=n(136),ee=n(124);var te=["children"];function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;function ie(e,t){var n=function(){var e=f.useState((function(){return Object(b.a)()})),t=i()(e,1)[0],n=f.useContext(w.a);if(void 0===n)throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?");return f.useEffect((function(){var e=n.register,r=n.unregister;return e(t),function(){return r(t)}}),[n,t]),t}(),r=f.useContext(g.a),o=t.children,s=u()(t,te),c=f.useRef(e(re(re({},s),null!==r&&void 0!==r&&r.params&&null==r.params.state&&!1!==r.params.initial&&"string"===typeof r.params.screen?{initialRouteName:r.params.screen}:null))).current,h=function e(t){return f.Children.toArray(t).reduce((function(t,n){var r,i;if(f.isValidElement(n)){if(n.type===v.a)return t.push(n.props),t;if(n.type===f.Fragment)return t.push.apply(t,d()(e(n.props.children))),t}throw new Error("A navigator can only contain 'Screen' components as its direct children (found ".concat(f.isValidElement(n)?"'".concat("string"===typeof n.type?n.type:null===(r=n.type)||void 0===r?void 0:r.name,"'").concat(null!==(i=n.props)&&void 0!==i&&i.name?" for the screen '".concat(n.props.name,"'"):""):"object"===typeof n?JSON.stringify(n):"'".concat(String(n),"'"),"). To render this component in the navigator, pass it in the 'component' prop to 'Screen'."))}),[])}(o),x=h.reduce((function(e,t){if(t.name in e)throw new Error("A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '".concat(t.name,"')"));return e[t.name]=t,e}),{}),_=h.map((function(e){return e.name})),E=_.reduce((function(e,t){var n,i,o,a=x[t].initialParams,s=null==(null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&!1!==(null===r||void 0===r||null===(i=r.params)||void 0===i?void 0:i.initial)&&(null===r||void 0===r||null===(o=r.params)||void 0===o?void 0:o.screen)===t?r.params.params:void 0;return e[t]=void 0!==a||void 0!==s?re(re({},a),s):void 0,e}),{}),A=_.reduce((function(e,t){return a()(e,l()({},t,x[t].getId))}),{});if(!_.length)throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");var S=f.useCallback((function(e){return void 0===e.type||e.type===c.type}),[c.type]),T=f.useCallback((function(e){return void 0!==e&&!1===e.stale&&S(e)}),[S]),C=f.useContext(m.a),O=C.state,R=C.getState,P=C.setState,L=C.setKey,N=C.getKey,j=C.getIsInitial,F=f.useMemo((function(){var e,t,n;return void 0!==O&&S(O)||null!=(null===r||void 0===r||null===(e=r.params)||void 0===e?void 0:e.state)?[c.getRehydratedState(null!==(t=null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&void 0!==t?t:O,{routeNames:_,routeParamList:E,routeGetIdList:A}),!1]:[c.getInitialState({routeNames:_,routeParamList:E,routeGetIdList:A}),!0]}),[O,c,S]),z=i()(F,2),H=z[0],U=z[1],V=T(O)?O:H,G=V;Q(V.routeNames,_)||(G=c.getStateForRouteNamesChange(V,{routeNames:_,routeParamList:E,routeGetIdList:A}));var Y=f.useRef(null===r||void 0===r?void 0:r.params);if(f.useEffect((function(){Y.current=null===r||void 0===r?void 0:r.params}),[null===r||void 0===r?void 0:r.params]),null!==r&&void 0!==r&&r.params){var Z,ne=Y.current;"object"===typeof r.params.state&&null!=r.params.state&&r.params.state!==(null===ne||void 0===ne?void 0:ne.state)?Z=p.CommonActions.reset(r.params.state):"string"===typeof r.params.screen&&(!1===r.params.initial&&U||r.params!==ne)&&(Z=p.CommonActions.navigate(r.params.screen,r.params.params));var ie=Z?c.getStateForAction(G,Z,{routeNames:_,routeParamList:E,routeGetIdList:A}):null;G=null!==ie?c.getRehydratedState(ie,{routeNames:_,routeParamList:E,routeGetIdList:A}):G}var oe=V!==G;Object($.b)((function(){oe&&P(G)})),V=G,f.useEffect((function(){return L(n),j()||P(G),function(){setTimeout((function(){void 0!==R()&&N()===n&&P(void 0)}),0)}}),[]);var ae=f.useRef();ae.current=H;var se=f.useCallback((function(){var e=R();return T(e)?e:ae.current}),[R,T]),le=Object(y.a)((function(e){var t,n,r,i=[];e.target?null!==(r=n=V.routes.find((function(t){return t.key===e.target})))&&void 0!==r&&r.name&&i.push(n.name):(n=V.routes[V.index],i.push.apply(i,d()(Object.keys(x).filter((function(e){var t;return(null===(t=n)||void 0===t?void 0:t.name)===e})))));if(null!=n){var o=ye[n.key].navigation;(t=[]).concat.apply(t,d()(i.map((function(t){var r=x[t].listeners,i="function"===typeof r?r({route:n,navigation:o}):r;return i?Object.keys(i).filter((function(t){return t===e.type})).map((function(e){return null===i||void 0===i?void 0:i[e]})):void 0})))).filter((function(e,t,n){return e&&n.lastIndexOf(e)===t})).forEach((function(t){return null===t||void 0===t?void 0:t(e)}))}}));!function(e){var t=e.state,n=e.emitter,r=f.useContext(k.a),i=f.useRef(),o=t.routes[t.index].key;f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("focus",(function(){i.current=o,n.emit({type:"focus",target:o})}))}),[o,n,r]),f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("blur",(function(){i.current=void 0,n.emit({type:"blur",target:o})}))}),[o,n,r]),f.useEffect((function(){var e=i.current;i.current=o,void 0!==e||r||n.emit({type:"focus",target:o}),e===o||r&&!r.isFocused()||void 0!==e&&(n.emit({type:"blur",target:e}),n.emit({type:"focus",target:o}))}),[o,n,r])}({state:V,emitter:le}),f.useEffect((function(){le.emit({type:"state",data:{state:V}})}),[le,V]);var ce=Object(q.a)(),ue=ce.listeners,he=ce.addListener,de=Object(K.a)(),fe=de.keyedListeners,pe=de.addKeyedListener,me=W({router:c,getState:se,setState:P,key:null===r||void 0===r?void 0:r.key,actionListeners:ue.action,beforeRemoveListeners:fe.beforeRemove,routerConfigOptions:{routeNames:_,routeParamList:E,routeGetIdList:A},emitter:le}),ge=function(e){var t=e.router,n=e.getState,r=e.key,i=e.setState,o=f.useContext(M.a).onRouteFocus;return f.useCallback((function(e){var a=n(),s=t.getStateForRouteFocus(a,e);s!==a&&i(s),void 0!==o&&void 0!==r&&o(r)}),[n,o,t,i,r])}({router:c,key:null===r||void 0===r?void 0:r.key,getState:se,setState:P}),ve=function(e){var t=e.onAction,n=e.getState,r=e.emitter,i=e.router,o=f.useContext(I.a),a=f.useContext(k.a);return f.useMemo((function(){var e=function(e){var r="function"===typeof e?e(n()):e;t(r)||null===o||void 0===o||o(r)},s=B(B({},i.actionCreators),p.CommonActions),l=Object.keys(s).reduce((function(t,n){return t[n]=function(){return e(s[n].apply(s,arguments))},t}),{});return B(B(B({},a),l),{},{dispatch:e,emit:r.emit,isFocused:a?a.isFocused:function(){return!0},canGoBack:function(){var e=n();return null!==i.getStateForAction(e,p.CommonActions.goBack(),{routeNames:e.routeNames,routeParamList:{},routeGetIdList:{}})||(null===a||void 0===a?void 0:a.canGoBack())||!1},dangerouslyGetParent:function(){return a},dangerouslyGetState:n})}),[r.emit,n,t,o,a,i])}({onAction:me,getState:se,emitter:le,router:c});!function(e){var t=e.navigation,n=e.focusedListeners,r=f.useContext(M.a).addListener,i=f.useCallback((function(e){if(t.isFocused()){for(var r,i=X(n);!(r=i()).done;){var o=(0,r.value)(e),a=o.handled,s=o.result;if(a)return{handled:a,result:s}}return{handled:!0,result:e(t)}}return{handled:!1,result:null}}),[n,t]);f.useEffect((function(){return null===r||void 0===r?void 0:r("focus",i)}),[r,i])}({navigation:ve,focusedListeners:ue.focus}),function(e){var t=e.getState,n=e.getStateListeners,r=f.useContext(M.a).addKeyedListener,i=f.useContext(g.a),o=i?i.key:"root",a=f.useCallback((function(){var e=t(),r=e.routes.map((function(e){var t,r=null===(t=n[e.key])||void 0===t?void 0:t.call(n);return e.state===r?e:J(J({},e),{},{state:r})}));return Q(e.routes,r)?e:J(J({},e),{},{routes:r})}),[t,n]);f.useEffect((function(){return null===r||void 0===r?void 0:r("getState",o,a)}),[r,a,o])}({getState:se,getStateListeners:fe.getState});var ye=D({state:V,screens:x,navigation:ve,screenOptions:t.screenOptions,onAction:me,getState:se,setState:P,onRouteFocus:ge,addListener:he,addKeyedListener:pe,router:c,emitter:le});return function(e){var t=e.state,n=e.navigation,r=e.descriptors,i=f.useContext(ee.a);i&&n.isFocused()&&(i.options=r[t.routes[t.index].key].options)}({state:V,navigation:ve,descriptors:ye}),{state:V,navigation:ve,descriptors:ye}}},function(e,t,n){"use strict";var r=n(8),i=n.n(r),o=n(6),a=n.n(o),s=n(17),l=n.n(s),c=n(0),u=n(75),h=n(126),d=n(88),f=c.createContext({options:void 0});f.displayName="LinkingContext";var p=f,m=n(7),g=n.n(m);var v=n(128);var y=n(125),b=["theme","linking","fallback","documentTitle","onReady"];function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=c.forwardRef((function(e,t){var n=e.theme,r=void 0===n?d.a:n,o=e.linking,s=e.fallback,f=void 0===s?null:s,m=e.documentTitle,_=e.onReady,E=l()(e,b),A=!!o&&!1!==o.enabled,S=c.useRef(null);Object(y.a)(S),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.enabled,r=void 0===n||n,i=t.formatter,o=void 0===i?function(e,t){var n;return null!==(n=null===e||void 0===e?void 0:e.title)&&void 0!==n?n:null===t||void 0===t?void 0:t.name}:i;c.useEffect((function(){if(r){var t=e.current;if(t){var n=o(t.getCurrentOptions(),t.getCurrentRoute());document.title=n}return null===t||void 0===t?void 0:t.addListener("options",(function(e){var n=o(e.data.options,null===t||void 0===t?void 0:t.getCurrentRoute());document.title=n}))}}))}(S,m);var M=function(e){var t=c.useState(e),n=i()(t,1)[0],r=[!1,void 0];n.then((function(e){r=[!0,e]}));var o=c.useState(r),a=i()(o,2),s=a[0],l=a[1],u=i()(s,1)[0];return c.useEffect((function(){var e=!1;return u||function(){var t;g.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,g.a.awrap(n);case 3:t=r.sent;case 4:return r.prev=4,e||l([!0,t]),r.finish(4);case 7:case"end":return r.stop()}}),null,null,[[0,,4,7]],Promise)}(),function(){e=!0}}),[n,u]),s}(Object(v.a)(S,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enabled:A,prefixes:[]},o)).getInitialState),T=i()(M,2),C=T[0],O=T[1];c.useImperativeHandle(t,(function(){return S.current}));var R=c.useMemo((function(){return{options:o}}),[o]),k=null!=E.initialState||!A||C,P=c.useRef(_);return c.useEffect((function(){P.current=_})),c.useEffect((function(){var e;k&&(null===(e=P.current)||void 0===e||e.call(P))}),[k]),k?c.createElement(p.Provider,{value:R},c.createElement(h.a,{value:r},c.createElement(u.BaseNavigationContainer,x({},E,{initialState:null==E.initialState?O:E.initialState,ref:S})))):f}));t.a=_},,,function(e,t,n){"use strict";var r=n(297);e.exports={isRtlLang:r.isRtlLang,getLangDir:r.getLangDir}},function(e,t,n){"use strict";var r=n(299),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}e.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prefixMap,n=e.plugins;return function e(s){for(var l in s){var c=s[l];if((0,a.default)(c))s[l]=e(c);else if(Array.isArray(c)){for(var u=[],h=0,d=c.length;h<d;++h){var f=(0,i.default)(n,l,c[h],s,t);(0,o.default)(u,f||c[h])}u.length>0&&(s[l]=u)}else{var p=(0,i.default)(n,l,c,s,t);p&&(s[l]=p),s=(0,r.default)(t,l,s)}}return s}};var r=s(n(303)),i=s(n(304)),o=s(n(305)),a=s(n(306));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&"text"===t)return["-webkit-text","text"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("cross-fade(")>-1)return a.map((function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("cursor"===e&&i.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("filter(")>-1)return a.map((function(e){return t.replace(/filter\(/g,e+"filter(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("display"===e&&r.hasOwnProperty(t))return r[t]};var r={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){Object.prototype.hasOwnProperty.call(i,e)&&(n[i[e]]=r[t]||t);if("flex"===e){if(Object.prototype.hasOwnProperty.call(o,t))return void(n.msFlex=o[t]);if(a.test(t))return void(n.msFlex=t+" 1 0%");var s=t.split(/\s/);switch(s.length){case 1:return void(n.msFlex="1 1 "+t);case 2:return void(a.test(s[1])?n.msFlex=s[0]+" "+s[1]+" 0%":n.msFlex=s[0]+" 1 "+s[1]);default:n.msFlex=t}}};var r={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},i={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"},o={auto:"1 1 auto",inherit:"inherit",initial:"0 1 auto",none:"0 0 auto",unset:"unset"},a=/^\d+(\.\d+)?$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"flexDirection"===e&&"string"===typeof t&&(t.indexOf("column")>-1?n.WebkitBoxOrient="vertical":n.WebkitBoxOrient="horizontal",t.indexOf("reverse")>-1?n.WebkitBoxDirection="reverse":n.WebkitBoxDirection="normal");i.hasOwnProperty(e)&&(n[i[e]]=r[t]||t)};var r={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},i={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&s.test(t))return a.map((function(e){return t.replace(s,(function(t){return e+t}))}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-","-moz-",""],s=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){return"number"===typeof e&&!isNaN(e)}function o(e){return"string"===typeof e&&e.includes("/")}t.default=function(e,t,n){if("display"===e&&t in s)return s[t];if(e in l){(0,l[e])(t,n)}};var a=["center","end","start","stretch"],s={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},l={alignSelf:function(e,t){a.indexOf(e)>-1&&(t.msGridRowAlign=e)},gridColumn:function(e,t){if(i(e))t.msGridColumn=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridColumnStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridColumnEnd(+s+ +f,t):l.gridColumnEnd(+c,t)}else l.gridColumnStart(e,t)},gridColumnEnd:function(e,t){var n=t.msGridColumn;i(e)&&i(n)&&(t.msGridColumnSpan=e-n)},gridColumnStart:function(e,t){i(e)&&(t.msGridColumn=e)},gridRow:function(e,t){if(i(e))t.msGridRow=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridRowStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridRowEnd(+s+ +f,t):l.gridRowEnd(+c,t)}else l.gridRowStart(e,t)},gridRowEnd:function(e,t){var n=t.msGridRow;i(e)&&i(n)&&(t.msGridRowSpan=e-n)},gridRowStart:function(e,t){i(e)&&(t.msGridRow=e)},gridTemplateColumns:function(e,t){t.msGridColumns=e},gridTemplateRows:function(e,t){t.msGridRows=e},justifySelf:function(e,t){a.indexOf(e)>-1&&(t.msGridColumnAlign=e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1)return a.map((function(e){return t.replace(/image-set\(/g,e+"image-set(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(Object.prototype.hasOwnProperty.call(r,e))for(var i=r[e],o=0,a=i.length;o<a;++o)n[i[o]]=t};var r={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(i.hasOwnProperty(e)&&o.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},o={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){if("string"===typeof t&&s.hasOwnProperty(e)){var c=function(e,t){if((0,i.default)(e))return e;for(var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,a=n.length;o<a;++o){var s=n[o],c=[s];for(var u in t){var h=(0,r.default)(u);if(s.indexOf(h)>-1&&"order"!==h)for(var d=t[u],f=0,p=d.length;f<p;++f)c.unshift(s.replace(h,l[d[f]]+h))}n[o]=c.join(",")}return n.join(",")}(t,a),u=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-moz-|-ms-/.test(e)})).join(",");if(e.indexOf("Webkit")>-1)return u;var h=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-webkit-|-ms-/.test(e)})).join(",");return e.indexOf("Moz")>-1?h:(n["Webkit"+(0,o.default)(e)]=u,n["Moz"+(0,o.default)(e)]=h,c)}};var r=a(n(307)),i=a(n(100)),o=a(n(181));function a(e){return e&&e.__esModule?e:{default:e}}var s={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},l={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"}},function(e,t,n){"use strict";var r=n(0),i=n(310);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedTurboModule")},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedModule")},function(e,t,n){"use strict";(function(e){var r=n(91),i=n(15);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(t){var n,r;function a(e){var n,r,o,a;return(a=t.call(this)||this)._deceleration=null!==(n=e.deceleration)&&void 0!==n?n:.998,a._velocity=e.velocity,a._useNativeDriver=Object(i.c)(e),a.__isInteraction=null!==(r=e.isInteraction)&&void 0!==r?r:!a._useNativeDriver,a.__iterations=null!==(o=e.iterations)&&void 0!==o?o:1,a}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,o(n,r);var s=a.prototype;return s.__getNativeAnimationConfig=function(){return{type:"decay",deceleration:this._deceleration,velocity:this._velocity,iterations:this.__iterations}},s.start=function(e,t,n,r,i){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(i):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))},s.onUpdate=function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))))},s.stop=function(){t.prototype.stop.call(this),this.__active=!1,e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},a}(r.a);t.a=a}).call(this,n(46))},function(e,t,n){"use strict";(function(e){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(){this.any_blank_count=0,this.any_blank_ms=0,this.any_blank_speed_sum=0,this.mostly_blank_count=0,this.mostly_blank_ms=0,this.pixels_blank=0,this.pixels_sampled=0,this.pixels_scrolled=0,this.total_time_spent=0,this.sample_count=0},a=[],s=10,l=null,c=function(){function t(e){this._anyBlankStartTime=null,this._enabled=!1,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null,this._getFrameMetrics=e,this._enabled=(l||0)>Math.random(),this._resetData()}t.addListener=function(e){return null===l&&console.warn("Call `FillRateHelper.setSampleRate` before `addListener`."),a.push(e),{remove:function(){a=a.filter((function(t){return e!==t}))}}},t.setSampleRate=function(e){l=e},t.setMinSampleCount=function(e){s=e};var n=t.prototype;return n.activate=function(){this._enabled&&null==this._samplesStartTime&&(this._samplesStartTime=e.performance.now())},n.deactivateAndFlush=function(){if(this._enabled){var t=this._samplesStartTime;if(null!=t)if(this._info.sample_count<s)this._resetData();else{var n=e.performance.now()-t,i=r(r({},this._info),{},{total_time_spent:n});a.forEach((function(e){return e(i)})),this._resetData()}}},n.computeBlankness=function(t,n,r){if(!this._enabled||0===t.getItemCount(t.data)||null==this._samplesStartTime)return 0;var i=r.dOffset,o=r.offset,a=r.velocity,s=r.visibleLength;this._info.sample_count++,this._info.pixels_sampled+=Math.round(s),this._info.pixels_scrolled+=Math.round(Math.abs(i));var l=Math.round(1e3*Math.abs(a)),c=e.performance.now();null!=this._anyBlankStartTime&&(this._info.any_blank_ms+=c-this._anyBlankStartTime),this._anyBlankStartTime=null,null!=this._mostlyBlankStartTime&&(this._info.mostly_blank_ms+=c-this._mostlyBlankStartTime),this._mostlyBlankStartTime=null;for(var u=0,h=n.first,d=this._getFrameMetrics(h);h<=n.last&&(!d||!d.inLayout);)d=this._getFrameMetrics(h),h++;d&&h>0&&(u=Math.min(s,Math.max(0,d.offset-o)));for(var f=0,p=n.last,m=this._getFrameMetrics(p);p>=n.first&&(!m||!m.inLayout);)m=this._getFrameMetrics(p),p--;if(m&&p<t.getItemCount(t.data)-1){var g=m.offset+m.length;f=Math.min(s,Math.max(0,o+s-g))}var v=Math.round(u+f),y=v/s;return y>0?(this._anyBlankStartTime=c,this._info.any_blank_speed_sum+=l,this._info.any_blank_count++,this._info.pixels_blank+=v,y>.5&&(this._mostlyBlankStartTime=c,this._info.mostly_blank_count++)):(l<.01||Math.abs(i)<1)&&this.deactivateAndFlush(),y},n.enabled=function(){return this._enabled},n._resetData=function(){this._anyBlankStartTime=null,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null},t}();t.a=c}).call(this,n(46))},function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=[],c={},u=0,h=e.multigraph?function(e,t,n){var r=l(e,t),i=c.hasOwnProperty(r);if(i||M(e,t)){i||(c[r]=0);var o="@"+ ++c[r];r=l(e+o,t+o)}return new s(e,t,n,r)}:function(e,t,n){var r=l(e,t);return new s(e,t,n,r)},d=[],f=T,p=T,m=T,g=T,v={addNode:w,addLink:function(e,t,r){m();var i=x(e)||w(e),o=x(t)||w(t),s=h(e,t,r);n.push(s),a(i,s),e!==t&&a(o,s);return f(s,"add"),g(),s},removeLink:S,removeNode:_,getNode:x,getNodeCount:E,getLinkCount:A,getLinksCount:A,getNodesCount:E,getLinks:function(e){var t=x(e);return t?t.links:null},forEachNode:R,forEachLinkedNode:function(e,n,r){var i=x(e);if(i&&i.links&&"function"===typeof n)return r?function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(o.fromId===n&&r(t.get(o.toId),o))return!0}}(i.links,e,n):function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=o.fromId===n?o.toId:o.fromId;if(r(t.get(a),o))return!0}}(i.links,e,n)},forEachLink:function(e){var t,r;if("function"===typeof e)for(t=0,r=n.length;t<r;++t)e(n[t])},beginUpdate:m,endUpdate:g,clear:function(){m(),R((function(e){_(e.id)})),g()},hasLink:M,hasNode:x,getLink:M};return r(v),function(){var e=v.on;v.on=function(){return v.beginUpdate=m=C,v.endUpdate=g=O,f=y,p=b,v.on=e,e.apply(v,arguments)}}(),v;function y(e,t){d.push({link:e,changeType:t})}function b(e,t){d.push({node:e,changeType:t})}function w(e,n){if(void 0===e)throw new Error("Invalid node identifier");m();var r=x(e);return r?(r.data=n,p(r,"update")):(r=new o(e,n),p(r,"add")),t.set(e,r),g(),r}function x(e){return t.get(e)}function _(e){var n=x(e);if(!n)return!1;m();var r=n.links;if(r){n.links=null;for(var i=0;i<r.length;++i)S(r[i])}return t.delete(e),p(n,"remove"),g(),!0}function E(){return t.size}function A(){return n.length}function S(e){if(!e)return!1;var t=i(e,n);if(t<0)return!1;m(),n.splice(t,1);var r=x(e.fromId),o=x(e.toId);return r&&(t=i(e,r.links))>=0&&r.links.splice(t,1),o&&(t=i(e,o.links))>=0&&o.links.splice(t,1),f(e,"remove"),g(),!0}function M(e,t){var n,r=x(e);if(!r||!r.links)return null;for(n=0;n<r.links.length;++n){var i=r.links[n];if(i.fromId===e&&i.toId===t)return i}return null}function T(){}function C(){u+=1}function O(){0===(u-=1)&&d.length>0&&(v.fire("changed",d),d.length=0)}function R(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(152);function i(e,t){if(!t)return-1;if(t.indexOf)return t.indexOf(e);var n,r=t.length;for(n=0;n<r;n+=1)if(t[n]===e)return n;return-1}function o(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.push(t):e.links=[t]}function s(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function l(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},function(e,t,n){e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var o=(t&&t.createSimulator||n(183))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var a=function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(a=t.nodeMass);var s=new Map,l={},c=0,u=o.settings.springTransform||i;c=0,e.forEachNode((function(e){g(e.id),c+=1})),e.forEachLink(y),e.on("changed",m);var h=!1,d={step:function(){if(0===c)return f(!0),!0;var e=o.step();d.lastMove=e,d.fire("step");var t=e/c<=.01;return f(t),t},getNodePosition:function(e){return x(e).pos},setNodePosition:function(e){var t=x(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=l[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return o.getBBox()},forEachBody:p,pinNode:function(e,t){x(e.id).isPinned=!!t},isNodePinned:function(e){return x(e.id).isPinned},dispose:function(){e.off("changed",m),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var i=e.hasLink(t,n);if(!i)return;r=i.id}return l[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:o,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function m(t){for(var n=0;n<t.length;++n){var r=t[n];"add"===r.changeType?(r.node&&g(r.node.id),r.link&&y(r.link)):"remove"===r.changeType&&(r.node&&v(r.node),r.link&&b(r.link))}c=e.getNodesCount()}function g(t){var n=s.get(t);if(!n){var r=e.getNode(t);if(!r)throw new Error("initBody() was called with unknown node id");var i=r.position;if(!i){var a=function(e){var t=[];if(!e.links)return t;for(var n=Math.min(e.links.length,2),r=0;r<n;++r){var i=e.links[r],o=i.fromId!==e.id?s.get(i.fromId):s.get(i.toId);o&&o.pos&&t.push(o)}return t}(r);i=o.getBestNewBodyPosition(a)}(n=o.addBodyAt(i)).id=t,s.set(t,n),w(t),function(e){return e&&(e.isPinned||e.data&&e.data.isPinned)}(r)&&(n.isPinned=!0)}}function v(e){var t=e.id,n=s.get(t);n&&(s.delete(t),o.removeBody(n))}function y(e){w(e.fromId),w(e.toId);var t=s.get(e.fromId),n=s.get(e.toId),r=o.addSpring(t,n,e.length);u(e,r),l[e.id]=r}function b(t){var n=l[t.id];if(n){var r=e.getNode(t.fromId),i=e.getNode(t.toId);r&&w(r.id),i&&w(i.id),delete l[t.id],o.removeSpring(n)}}function w(e){var t=s.get(e);if(t.mass=a(e),Number.isNaN(t.mass))throw new Error("Node mass should be a number")}function x(e){var t=s.get(e);return t||(g(e),t=s.get(e)),t}},e.exports.simulator=n(183);var r=n(152);function i(){}},function(e,t){function n(e,t,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g}));var r,i,o=0,a=0,s=0,l=0,c=0,u=0,h="object"===typeof performance&&performance.now?performance:Date,d="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function f(){return c||(d(p),c=h.now()+u)}function p(){c=0}function m(){this._call=this._time=this._next=null}function g(e,t,n){var r=new m;return r.restart(e,t,n),r}function v(){c=(l=h.now())+u,o=a=0;try{!function(){f(),++o;for(var e,t=r;t;)(e=c-t._time)>=0&&t._call.call(void 0,e),t=t._next;--o}()}finally{o=0,function(){var e,t,n=r,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,b(o)}(),c=0}}function y(){var e=h.now(),t=e-l;t>1e3&&(u-=t,l=e)}function b(e){o||(a&&(a=clearTimeout(a)),e-c>24?(e<1/0&&(a=setTimeout(v,e-h.now()-u)),s&&(s=clearInterval(s))):(s||(l=h.now(),s=setInterval(y,1e3)),o=1,d(v)))}m.prototype=g.prototype={constructor:m,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?f():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function p(e,t,n){var r,i,o,a,s,l,c=0,u=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(x,t),u?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=o}function x(){var e=f();if(w(e))return _(e);s=setTimeout(x,function(e){var n=t-(e-l);return p?d(n,o-(e-c)):n}(e))}function _(e){return s=void 0,v&&r?y(e):(r=i=void 0,a)}function E(){var e=f(),n=w(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return b(l);if(p)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(p="maxWait"in n)?h(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?a:_(f())},E}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return m(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(46))},function(t,n,r){"use strict";var i=r(2);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=s(t);if(n){var i=s(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m="undefined"!==typeof window&&window.THREE?window.THREE:{LinearFilter:i.q,Sprite:i.I,SpriteMaterial:i.J,Texture:i.L},g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,n,r,i=u(s);function s(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"rgba(255, 255, 255, 1)";return o(this,s),(e=i.call(this,new m.SpriteMaterial({map:new m.Texture})))._text="".concat(t),e._textHeight=n,e._color=r,e._backgroundColor=!1,e._padding=0,e._borderWidth=0,e._borderRadius=0,e._borderColor="white",e._strokeWidth=0,e._strokeColor="white",e._fontFace="Arial",e._fontSize=90,e._fontWeight="normal",e._canvas=document.createElement("canvas"),e._texture=e.material.map,e._texture.minFilter=m.LinearFilter,e._genCanvas(),e}return t=s,(n=[{key:"text",get:function(){return this._text},set:function(e){this._text=e,this._genCanvas()}},{key:"textHeight",get:function(){return this._textHeight},set:function(e){this._textHeight=e,this._genCanvas()}},{key:"color",get:function(){return this._color},set:function(e){this._color=e,this._genCanvas()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._genCanvas()}},{key:"padding",get:function(){return this._padding},set:function(e){this._padding=e,this._genCanvas()}},{key:"borderWidth",get:function(){return this._borderWidth},set:function(e){this._borderWidth=e,this._genCanvas()}},{key:"borderRadius",get:function(){return this._borderRadius},set:function(e){this._borderRadius=e,this._genCanvas()}},{key:"borderColor",get:function(){return this._borderColor},set:function(e){this._borderColor=e,this._genCanvas()}},{key:"fontFace",get:function(){return this._fontFace},set:function(e){this._fontFace=e,this._genCanvas()}},{key:"fontSize",get:function(){return this._fontSize},set:function(e){this._fontSize=e,this._genCanvas()}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(e){this._fontWeight=e,this._genCanvas()}},{key:"strokeWidth",get:function(){return this._strokeWidth},set:function(e){this._strokeWidth=e,this._genCanvas()}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(e){this._strokeColor=e,this._genCanvas()}},{key:"_genCanvas",value:function(){var e=this,t=this._canvas,n=t.getContext("2d"),r=Array.isArray(this.borderWidth)?this.borderWidth:[this.borderWidth,this.borderWidth],i=r.map((function(t){return t*e.fontSize*.1})),o=(Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius]).map((function(t){return t*e.fontSize*.1})),a=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],s=a.map((function(t){return t*e.fontSize*.1})),l=this.text.split("\n"),c="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);n.font=c;var u=Math.max.apply(Math,d(l.map((function(e){return n.measureText(e).width})))),f=this.fontSize*l.length;if(t.width=u+2*i[0]+2*s[0],t.height=f+2*i[1]+2*s[1],this.borderWidth){if(n.strokeStyle=this.borderColor,i[0]){var p=i[0]/2;n.lineWidth=i[0],n.beginPath(),n.moveTo(p,o[0]),n.lineTo(p,t.height-o[3]),n.moveTo(t.width-p,o[1]),n.lineTo(t.width-p,t.height-o[2]),n.stroke()}if(i[1]){var m=i[1]/2;n.lineWidth=i[1],n.beginPath(),n.moveTo(Math.max(i[0],o[0]),m),n.lineTo(t.width-Math.max(i[0],o[1]),m),n.moveTo(Math.max(i[0],o[3]),t.height-m),n.lineTo(t.width-Math.max(i[0],o[2]),t.height-m),n.stroke()}if(this.borderRadius){var g=Math.max.apply(Math,d(i)),v=g/2;n.lineWidth=g,n.beginPath(),[!!o[0]&&[o[0],v,v,o[0]],!!o[1]&&[t.width-o[1],t.width-v,v,o[1]],!!o[2]&&[t.width-o[2],t.width-v,t.height-v,t.height-o[2]],!!o[3]&&[o[3],v,t.height-v,t.height-o[3]]].filter((function(e){return e})).forEach((function(e){var t=h(e,4),r=t[0],i=t[1],o=t[2],a=t[3];n.moveTo(r,o),n.quadraticCurveTo(i,o,i,a)})),n.stroke()}}this.backgroundColor&&(n.fillStyle=this.backgroundColor,this.borderRadius?(n.beginPath(),n.moveTo(i[0],o[0]),[[i[0],o[0],t.width-o[1],i[1],i[1],i[1]],[t.width-i[0],t.width-i[0],t.width-i[0],i[1],o[1],t.height-o[2]],[t.width-i[0],t.width-o[2],o[3],t.height-i[1],t.height-i[1],t.height-i[1]],[i[0],i[0],i[0],t.height-i[1],t.height-o[3],o[0]]].forEach((function(e){var t=h(e,6),r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5];n.quadraticCurveTo(r,a,i,s),n.lineTo(o,l)})),n.closePath(),n.fill()):n.fillRect(i[0],i[1],t.width-2*i[0],t.height-2*i[1])),n.translate.apply(n,d(i)),n.translate.apply(n,d(s)),n.font=c,n.fillStyle=this.color,n.textBaseline="bottom";var y=this.strokeWidth>0;y&&(n.lineWidth=this.strokeWidth*this.fontSize/10,n.strokeStyle=this.strokeColor),l.forEach((function(t,r){var i=(u-n.measureText(t).width)/2,o=(r+1)*e.fontSize;y&&n.strokeText(t,i,o),n.fillText(t,i,o)})),this._texture.image=t,this._texture.needsUpdate=!0;var b=this.textHeight*l.length+2*r[1]+2*a[1];this.scale.set(b*t.width/t.height,b,0)}},{key:"clone",value:function(){return new this.constructor(this.text,this.textHeight,this.color).copy(this)}},{key:"copy",value:function(e){return m.Sprite.prototype.copy.call(this,e),this.color=e.color,this.backgroundColor=e.backgroundColor,this.padding=e.padding,this.borderWidth=e.borderWidth,this.borderColor=e.borderColor,this.fontFace=e.fontFace,this.fontSize=e.fontSize,this.fontWeight=e.fontWeight,this.strokeWidth=e.strokeWidth,this.strokeColor=e.strokeColor,this}}])&&a(t.prototype,n),r&&a(t,r),s}(m.Sprite);n.a=g},function(e,t,n){"use strict";e.exports=function(e,t,n){if("function"===typeof Array.prototype.findIndex)return e.findIndex(t,n);if("function"!==typeof t)throw new TypeError("predicate must be a function");var r=Object(e),i=r.length;if(0===i)return-1;for(var o=0;o<i;o++)if(t.call(n,r[o],o,r))return o;return-1}},function(e,t){var n=Object.prototype.toString,r=Array.isArray;e.exports=function(e){return"string"==typeof e||!r(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==n.call(e)}},function(t,n,r){(function(n){var r=/^\[object .+?Constructor\]$/,i=/^(?:0|[1-9]\d*)$/,o="object"==typeof n&&n&&n.Object===Object&&n,a="object"==typeof self&&self&&self.Object===Object&&self,s=o||a||Function("return this")();function l(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function c(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!==t)return function(e,t,n,r){var i=e.length,o=n+(r?1:-1);for(;r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,f,n);var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function u(e,t,n){for(var r=-1,i=e?e.length:0;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function d(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function f(e){return e!==e}function p(e,t){return e.has(t)}function m(e,t){return function(n){return e(t(n))}}var g=Array.prototype,v=Function.prototype,y=Object.prototype,b=s["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=v.toString,_=y.hasOwnProperty,E=y.toString,A=RegExp("^"+x.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=s.Symbol,M=m(Object.getPrototypeOf,Object),T=y.propertyIsEnumerable,C=g.splice,O=S?S.isConcatSpreadable:void 0,R=Object.getOwnPropertySymbols,k=Math.max,P=G(s,"Map"),L=G(Object,"create");function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.__data__=new N;++t<n;)this.add(e[t])}function B(e,t){var n=J(e)||Z(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!_.call(e,o)||i&&("length"==o||Y(o,r))||n.push(o);return n}function F(e,t){for(var n=e.length;n--;)if(Q(e[n][0],t))return n;return-1}function z(t){return!(!te(t)||(n=t,w&&w in n))&&(ee(t)||function(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}(t)?A:r).test(function(t){if(null!=t){try{return x.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var n}function H(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||y;return e===n}(e),n=[];for(var r in e)("constructor"!=r||!t&&_.call(e,r))&&n.push(r);return n}function U(e){return function(e,t,n){var r=t(e);return J(e)?r:d(r,n(e))}(e,re,q)}function V(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return z(n)?n:void 0}D.prototype.clear=function(){this.__data__=L?L(null):{}},D.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},D.prototype.get=function(e){var t=this.__data__;if(L){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return L?void 0!==t[e]:_.call(t,e)},D.prototype.set=function(e,t){return this.__data__[e]=L&&void 0===t?"__lodash_hash_undefined__":t,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},I.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},I.prototype.has=function(e){return F(this.__data__,e)>-1},I.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},N.prototype.clear=function(){this.__data__={hash:new D,map:new(P||I),string:new D}},N.prototype.delete=function(e){return V(this,e).delete(e)},N.prototype.get=function(e){return V(this,e).get(e)},N.prototype.has=function(e){return V(this,e).has(e)},N.prototype.set=function(e,t){return V(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},j.prototype.has=function(e){return this.__data__.has(e)};var W=R?m(R,Object):se,q=R?function(e){for(var t=[];e;)d(t,W(e)),e=M(e);return t}:se;function X(e){return J(e)||Z(e)||!!(O&&e&&e[O])}function Y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==E.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Q(e,t){return e===t||e!==e&&t!==t}function Z(e){return function(e){return ne(e)&&$(e)}(e)&&_.call(e,"callee")&&(!T.call(e,"callee")||"[object Arguments]"==E.call(e))}var J=Array.isArray;function $(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!ee(e)}function ee(e){var t=te(e)?E.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return $(e)?B(e,!0):H(e)}var ie,oe,ae=(ie=function(e,t){return null==e?{}:(t=h(function e(t,n,r,i,o){var a=-1,s=t.length;for(r||(r=X),o||(o=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,i,o):d(o,l):i||(o[o.length]=l)}return o}(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i,o=-1,a=c,s=!0,l=e.length,d=[],f=t.length;if(!l)return d;n&&(t=h(t,(i=n,function(e){return i(e)}))),r?(a=u,s=!1):t.length>=200&&(a=p,s=!1,t=new j(t));e:for(;++o<l;){var m=e[o],g=n?n(m):m;if(m=r||0!==m?m:0,s&&g===g){for(var v=f;v--;)if(t[v]===g)continue e;d.push(m)}else a(t,g,r)||d.push(m)}return d}(U(e),t)))},oe=k(void 0===oe?ie.length-1:oe,0),function(){for(var e=arguments,t=-1,n=k(e.length-oe,0),r=Array(n);++t<n;)r[t]=e[oe+t];t=-1;for(var i=Array(oe+1);++t<oe;)i[t]=e[t];return i[oe]=r,l(ie,this,i)});function se(){return[]}t.exports=ae}).call(this,r(46))},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(21),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(255);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){var i;return o()(this,n),(i=t.call(this,r)).code=e,i}return n}(r.n(d)()(Error))},function(e,t,n){var r=n(18),i=n(153),o=n(371),a=n(372);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function n(e){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(e)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function r(e,t){e.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function i(e){var t=e.a.offsetWidth,n=t+100;return e.f.style.width=n+"px",e.c.scrollLeft=n,e.b.scrollLeft=e.b.scrollWidth+100,e.g!==t&&(e.g=t,!0)}function o(e,n){function r(){var e=o;i(e)&&e.a.parentNode&&n(e.g)}var o=e;t(e.b,r),t(e.c,r),i(e)}function a(e,t){var n=t||{};this.family=e,this.style=n.style||"normal",this.weight=n.weight||"normal",this.stretch=n.stretch||"normal"}var s=null,l=null,c=null,u=null;function h(){return null===u&&(u=!!document.fonts),u}function d(){if(null===c){var e=document.createElement("div");try{e.style.font="condensed 100px sans-serif"}catch(t){}c=""!==e.style.font}return c}function f(e,t){return[e.style,e.weight,d()?e.stretch:"","100px",t].join(" ")}a.prototype.load=function(e,t){var i=this,a=e||"BESbswy",c=0,u=t||3e3,d=(new Date).getTime();return new Promise((function(e,t){if(h()&&!function(){if(null===l)if(h()&&/Apple/.test(window.navigator.vendor)){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);l=!!e&&603>parseInt(e[1],10)}else l=!1;return l}()){var p=new Promise((function(e,t){!function n(){(new Date).getTime()-d>=u?t(Error(u+"ms timeout exceeded")):document.fonts.load(f(i,'"'+i.family+'"'),a).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),m=new Promise((function(e,t){c=setTimeout((function(){t(Error(u+"ms timeout exceeded"))}),u)}));Promise.race([m,p]).then((function(){clearTimeout(c),e(i)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function l(){var t;(t=-1!=g&&-1!=v||-1!=g&&-1!=y||-1!=v&&-1!=y)&&((t=g!=v&&g!=y&&v!=y)||(null===s&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),s=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=s&&(g==b&&v==b&&y==b||g==w&&v==w&&y==w||g==x&&v==x&&y==x)),t=!t),t&&(_.parentNode&&_.parentNode.removeChild(_),clearTimeout(c),e(i))}var h=new n(a),p=new n(a),m=new n(a),g=-1,v=-1,y=-1,b=-1,w=-1,x=-1,_=document.createElement("div");_.dir="ltr",r(h,f(i,"sans-serif")),r(p,f(i,"serif")),r(m,f(i,"monospace")),_.appendChild(h.a),_.appendChild(p.a),_.appendChild(m.a),document.body.appendChild(_),b=h.a.offsetWidth,w=p.a.offsetWidth,x=m.a.offsetWidth,function e(){if((new Date).getTime()-d>=u)_.parentNode&&_.parentNode.removeChild(_),t(Error(u+"ms timeout exceeded"));else{var n=document.hidden;!0!==n&&void 0!==n||(g=h.a.offsetWidth,v=p.a.offsetWidth,y=m.a.offsetWidth,l()),c=setTimeout(e,50)}}(),o(h,(function(e){g=e,l()})),r(h,f(i,'"'+i.family+'",sans-serif')),o(p,(function(e){v=e,l()})),r(p,f(i,'"'+i.family+'",serif')),o(m,(function(e){y=e,l()})),r(m,f(i,'"'+i.family+'",monospace'))}))}))},e.exports=a}()},function(e){e.exports=JSON.parse('{"ab-testing":983497,"abjad-arabic":987944,"abjad-hebrew":987945,"abugida-devanagari":987946,"abugida-thai":987947,"access-point":983043,"access-point-network":983042,"access-point-network-off":986081,"account":983044,"account-alert":983045,"account-alert-outline":985936,"account-arrow-left":985937,"account-arrow-left-outline":985938,"account-arrow-right":985939,"account-arrow-right-outline":985940,"account-box":983046,"account-box-multiple":985396,"account-box-multiple-outline":987146,"account-box-outline":983047,"account-cancel":987871,"account-cancel-outline":987872,"account-cash":987287,"account-cash-outline":987288,"account-check":983048,"account-check-outline":986082,"account-child":985737,"account-child-circle":985738,"account-child-outline":987336,"account-circle":983049,"account-circle-outline":985941,"account-clock":985942,"account-clock-outline":985943,"account-cog":988016,"account-cog-outline":988017,"account-convert":983050,"account-convert-outline":987905,"account-cowboy-hat":986779,"account-details":984625,"account-details-outline":988018,"account-edit":984764,"account-edit-outline":987131,"account-group":985161,"account-group-outline":985944,"account-hard-hat":984501,"account-heart":985241,"account-heart-outline":986083,"account-key":983051,"account-key-outline":986084,"account-lock":987486,"account-lock-outline":987487,"account-minus":983053,"account-minus-outline":985836,"account-multiple":983054,"account-multiple-check":985285,"account-multiple-check-outline":987646,"account-multiple-minus":984531,"account-multiple-minus-outline":986085,"account-multiple-outline":983055,"account-multiple-plus":983056,"account-multiple-plus-outline":985088,"account-multiple-remove":987658,"account-multiple-remove-outline":987659,"account-music":985091,"account-music-outline":986345,"account-network":983057,"account-network-outline":986086,"account-off":983058,"account-off-outline":986087,"account-outline":983059,"account-plus":983060,"account-plus-outline":985089,"account-question":985945,"account-question-outline":985946,"account-remove":983061,"account-remove-outline":985837,"account-search":983062,"account-search-outline":985397,"account-settings":984624,"account-settings-outline":987337,"account-star":983063,"account-star-outline":986088,"account-supervisor":985739,"account-supervisor-circle":985740,"account-supervisor-outline":987437,"account-switch":983065,"account-switch-outline":984267,"account-tie":986339,"account-tie-outline":987338,"account-tie-voice":987912,"account-tie-voice-off":987914,"account-tie-voice-off-outline":987915,"account-tie-voice-outline":987913,"account-voice":984523,"adjust":983066,"adobe":985398,"adobe-acrobat":987037,"air-conditioner":983067,"air-filter":986435,"air-horn":986540,"air-humidifier":987289,"air-humidifier-off":988262,"air-purifier":986436,"airbag":986089,"airballoon":983068,"airballoon-outline":987147,"airplane":983069,"airplane-landing":984532,"airplane-off":983070,"airplane-takeoff":984533,"airport":985163,"alarm":983072,"alarm-bell":984974,"alarm-check":983073,"alarm-light":984975,"alarm-light-outline":986090,"alarm-multiple":983074,"alarm-note":986737,"alarm-note-off":986738,"alarm-off":983075,"alarm-plus":983076,"alarm-snooze":984718,"album":983077,"alert":983078,"alert-box":983079,"alert-box-outline":986340,"alert-circle":983080,"alert-circle-check":987629,"alert-circle-check-outline":987630,"alert-circle-outline":984534,"alert-decagram":984765,"alert-decagram-outline":986341,"alert-minus":988347,"alert-minus-outline":988350,"alert-octagon":983081,"alert-octagon-outline":986342,"alert-octagram":984935,"alert-octagram-outline":986343,"alert-outline":983082,"alert-plus":988346,"alert-plus-outline":988349,"alert-remove":988348,"alert-remove-outline":988351,"alert-rhombus":987598,"alert-rhombus-outline":987599,"alien":985242,"alien-outline":987339,"align-horizontal-center":987587,"align-horizontal-left":987586,"align-horizontal-right":987588,"align-vertical-bottom":987589,"align-vertical-center":987590,"align-vertical-top":987591,"all-inclusive":984766,"allergy":987736,"alpha":983083,"alpha-a":985838,"alpha-a-box":985864,"alpha-a-box-outline":986091,"alpha-a-circle":986092,"alpha-a-circle-outline":986093,"alpha-b":985839,"alpha-b-box":985865,"alpha-b-box-outline":986094,"alpha-b-circle":986095,"alpha-b-circle-outline":986096,"alpha-c":985840,"alpha-c-box":985866,"alpha-c-box-outline":986097,"alpha-c-circle":986098,"alpha-c-circle-outline":986099,"alpha-d":985841,"alpha-d-box":985867,"alpha-d-box-outline":986100,"alpha-d-circle":986101,"alpha-d-circle-outline":986102,"alpha-e":985842,"alpha-e-box":985868,"alpha-e-box-outline":986103,"alpha-e-circle":986104,"alpha-e-circle-outline":986105,"alpha-f":985843,"alpha-f-box":985869,"alpha-f-box-outline":986106,"alpha-f-circle":986107,"alpha-f-circle-outline":986108,"alpha-g":985844,"alpha-g-box":985870,"alpha-g-box-outline":986109,"alpha-g-circle":986110,"alpha-g-circle-outline":986111,"alpha-h":985845,"alpha-h-box":985871,"alpha-h-box-outline":986112,"alpha-h-circle":986113,"alpha-h-circle-outline":986114,"alpha-i":985846,"alpha-i-box":985872,"alpha-i-box-outline":986115,"alpha-i-circle":986116,"alpha-i-circle-outline":986117,"alpha-j":985847,"alpha-j-box":985873,"alpha-j-box-outline":986118,"alpha-j-circle":986119,"alpha-j-circle-outline":986120,"alpha-k":985848,"alpha-k-box":985874,"alpha-k-box-outline":986121,"alpha-k-circle":986122,"alpha-k-circle-outline":986123,"alpha-l":985849,"alpha-l-box":985875,"alpha-l-box-outline":986124,"alpha-l-circle":986125,"alpha-l-circle-outline":986126,"alpha-m":985850,"alpha-m-box":985876,"alpha-m-box-outline":986127,"alpha-m-circle":986128,"alpha-m-circle-outline":986129,"alpha-n":985851,"alpha-n-box":985877,"alpha-n-box-outline":986130,"alpha-n-circle":986131,"alpha-n-circle-outline":986132,"alpha-o":985852,"alpha-o-box":985878,"alpha-o-box-outline":986133,"alpha-o-circle":986134,"alpha-o-circle-outline":986135,"alpha-p":985853,"alpha-p-box":985879,"alpha-p-box-outline":986136,"alpha-p-circle":986137,"alpha-p-circle-outline":986138,"alpha-q":985854,"alpha-q-box":985880,"alpha-q-box-outline":986139,"alpha-q-circle":986140,"alpha-q-circle-outline":986141,"alpha-r":985855,"alpha-r-box":985881,"alpha-r-box-outline":986142,"alpha-r-circle":986143,"alpha-r-circle-outline":986144,"alpha-s":985856,"alpha-s-box":985882,"alpha-s-box-outline":986145,"alpha-s-circle":986146,"alpha-s-circle-outline":986147,"alpha-t":985857,"alpha-t-box":985883,"alpha-t-box-outline":986148,"alpha-t-circle":986149,"alpha-t-circle-outline":986150,"alpha-u":985858,"alpha-u-box":985884,"alpha-u-box-outline":986151,"alpha-u-circle":986152,"alpha-u-circle-outline":986153,"alpha-v":985859,"alpha-v-box":985885,"alpha-v-box-outline":986154,"alpha-v-circle":986155,"alpha-v-circle-outline":986156,"alpha-w":985860,"alpha-w-box":985886,"alpha-w-box-outline":986157,"alpha-w-circle":986158,"alpha-w-circle-outline":986159,"alpha-x":985861,"alpha-x-box":985887,"alpha-x-box-outline":986160,"alpha-x-circle":986161,"alpha-x-circle-outline":986162,"alpha-y":985862,"alpha-y-box":985888,"alpha-y-box-outline":986163,"alpha-y-circle":986164,"alpha-y-circle-outline":986165,"alpha-z":985863,"alpha-z-box":985889,"alpha-z-box-outline":986166,"alpha-z-circle":986167,"alpha-z-circle-outline":986168,"alphabet-aurebesh":987948,"alphabet-cyrillic":987949,"alphabet-greek":987950,"alphabet-latin":987951,"alphabet-piqad":987952,"alphabet-tengwar":987959,"alphabetical":983084,"alphabetical-off":987148,"alphabetical-variant":987149,"alphabetical-variant-off":987150,"altimeter":984535,"amazon":983085,"amazon-alexa":985286,"ambulance":983087,"ammunition":986344,"ampersand":985741,"amplifier":983088,"amplifier-off":987573,"anchor":983089,"android":983090,"android-auto":985742,"android-debug-bridge":983091,"android-messages":986437,"android-studio":983092,"angle-acute":985399,"angle-obtuse":985400,"angle-right":985401,"angular":984754,"angularjs":984767,"animation":984536,"animation-outline":985743,"animation-play":985402,"animation-play-outline":985744,"ansible":987290,"antenna":987417,"anvil":985243,"apache-kafka":987151,"api":987291,"api-off":987735,"apple":983093,"apple-airplay":983071,"apple-finder":983094,"apple-icloud":983096,"apple-ios":983095,"apple-keyboard-caps":984626,"apple-keyboard-command":984627,"apple-keyboard-control":984628,"apple-keyboard-option":984629,"apple-keyboard-shift":984630,"apple-safari":983097,"application":984596,"application-export":986541,"application-import":986542,"approximately-equal":987038,"approximately-equal-box":987039,"apps":983099,"apps-box":986438,"arch":985287,"archive":983100,"archive-arrow-down":987737,"archive-arrow-down-outline":987738,"archive-arrow-up":987739,"archive-arrow-up-outline":987740,"archive-outline":987662,"arm-flex":987095,"arm-flex-outline":987094,"arrange-bring-forward":983101,"arrange-bring-to-front":983102,"arrange-send-backward":983103,"arrange-send-to-back":983104,"arrow-all":983105,"arrow-bottom-left":983106,"arrow-bottom-left-bold-outline":985527,"arrow-bottom-left-thick":985528,"arrow-bottom-right":983107,"arrow-bottom-right-bold-outline":985529,"arrow-bottom-right-thick":985530,"arrow-collapse":984597,"arrow-collapse-all":983108,"arrow-collapse-down":984978,"arrow-collapse-horizontal":985164,"arrow-collapse-left":984979,"arrow-collapse-right":984980,"arrow-collapse-up":984981,"arrow-collapse-vertical":985165,"arrow-decision":985531,"arrow-decision-auto":985532,"arrow-decision-auto-outline":985533,"arrow-decision-outline":985534,"arrow-down":983109,"arrow-down-bold":984878,"arrow-down-bold-box":984879,"arrow-down-bold-box-outline":984880,"arrow-down-bold-circle":983111,"arrow-down-bold-circle-outline":983112,"arrow-down-bold-hexagon-outline":983113,"arrow-down-bold-outline":985535,"arrow-down-box":984768,"arrow-down-circle":986331,"arrow-down-circle-outline":986332,"arrow-down-drop-circle":983114,"arrow-down-drop-circle-outline":983115,"arrow-down-thick":983110,"arrow-expand":984598,"arrow-expand-all":983116,"arrow-expand-down":984982,"arrow-expand-horizontal":985166,"arrow-expand-left":984983,"arrow-expand-right":984984,"arrow-expand-up":984985,"arrow-expand-vertical":985167,"arrow-horizontal-lock":987483,"arrow-left":983117,"arrow-left-bold":984881,"arrow-left-bold-box":984882,"arrow-left-bold-box-outline":984883,"arrow-left-bold-circle":983119,"arrow-left-bold-circle-outline":983120,"arrow-left-bold-hexagon-outline":983121,"arrow-left-bold-outline":985536,"arrow-left-box":984769,"arrow-left-circle":986333,"arrow-left-circle-outline":986334,"arrow-left-drop-circle":983122,"arrow-left-drop-circle-outline":983123,"arrow-left-right":986739,"arrow-left-right-bold":986740,"arrow-left-right-bold-outline":985537,"arrow-left-thick":983118,"arrow-right":983124,"arrow-right-bold":984884,"arrow-right-bold-box":984885,"arrow-right-bold-box-outline":984886,"arrow-right-bold-circle":983126,"arrow-right-bold-circle-outline":983127,"arrow-right-bold-hexagon-outline":983128,"arrow-right-bold-outline":985538,"arrow-right-box":984770,"arrow-right-circle":986335,"arrow-right-circle-outline":986336,"arrow-right-drop-circle":983129,"arrow-right-drop-circle-outline":983130,"arrow-right-thick":983125,"arrow-split-horizontal":985403,"arrow-split-vertical":985404,"arrow-top-left":983131,"arrow-top-left-bold-outline":985539,"arrow-top-left-bottom-right":986741,"arrow-top-left-bottom-right-bold":986742,"arrow-top-left-thick":985540,"arrow-top-right":983132,"arrow-top-right-bold-outline":985541,"arrow-top-right-bottom-left":986743,"arrow-top-right-bottom-left-bold":986744,"arrow-top-right-thick":985542,"arrow-up":983133,"arrow-up-bold":984887,"arrow-up-bold-box":984888,"arrow-up-bold-box-outline":984889,"arrow-up-bold-circle":983135,"arrow-up-bold-circle-outline":983136,"arrow-up-bold-hexagon-outline":983137,"arrow-up-bold-outline":985543,"arrow-up-box":984771,"arrow-up-circle":986337,"arrow-up-circle-outline":986338,"arrow-up-down":986745,"arrow-up-down-bold":986746,"arrow-up-down-bold-outline":985544,"arrow-up-drop-circle":983138,"arrow-up-drop-circle-outline":983139,"arrow-up-thick":983134,"arrow-vertical-lock":987484,"artstation":985947,"aspect-ratio":985636,"assistant":983140,"asterisk":984772,"at":983141,"atlassian":985092,"atm":986439,"atom":984936,"atom-variant":986747,"attachment":983142,"audio-video":985405,"audio-video-off":987574,"augmented-reality":985168,"auto-download":988030,"auto-fix":983144,"auto-upload":983145,"autorenew":983146,"av-timer":983147,"aws":986639,"axe":985288,"axis":986440,"axis-arrow":986441,"axis-arrow-info":988174,"axis-arrow-lock":986442,"axis-lock":986443,"axis-x-arrow":986444,"axis-x-arrow-lock":986445,"axis-x-rotate-clockwise":986446,"axis-x-rotate-counterclockwise":986447,"axis-x-y-arrow-lock":986448,"axis-y-arrow":986449,"axis-y-arrow-lock":986450,"axis-y-rotate-clockwise":986451,"axis-y-rotate-counterclockwise":986452,"axis-z-arrow":986453,"axis-z-arrow-lock":986454,"axis-z-rotate-clockwise":986455,"axis-z-rotate-counterclockwise":986456,"babel":985637,"baby":983148,"baby-bottle":986937,"baby-bottle-outline":986938,"baby-buggy":988128,"baby-carriage":984719,"baby-carriage-off":987040,"baby-face":986748,"baby-face-outline":986749,"backburger":983149,"backspace":983150,"backspace-outline":985948,"backspace-reverse":986750,"backspace-reverse-outline":986751,"backup-restore":983151,"bacteria":986837,"bacteria-outline":986838,"badge-account":986535,"badge-account-alert":986536,"badge-account-alert-outline":986537,"badge-account-horizontal":986637,"badge-account-horizontal-outline":986638,"badge-account-outline":986538,"badminton":985169,"bag-carry-on":986939,"bag-carry-on-check":986469,"bag-carry-on-off":986940,"bag-checked":986941,"bag-personal":986640,"bag-personal-off":986641,"bag-personal-off-outline":986642,"bag-personal-outline":986643,"baguette":986942,"balloon":985638,"ballot":985545,"ballot-outline":985546,"ballot-recount":986169,"ballot-recount-outline":986170,"bandage":986543,"bandcamp":984693,"bank":983152,"bank-minus":986544,"bank-outline":986752,"bank-plus":986545,"bank-remove":986546,"bank-transfer":985639,"bank-transfer-in":985640,"bank-transfer-out":985641,"barcode":983153,"barcode-off":987702,"barcode-scan":983154,"barley":983155,"barley-off":985949,"barn":985950,"barrel":983156,"baseball":985170,"baseball-bat":985171,"bash":987523,"basket":983158,"basket-fill":983159,"basket-outline":987521,"basket-unfill":983160,"basketball":985094,"basketball-hoop":986171,"basketball-hoop-outline":986172,"bat":985951,"battery":983161,"battery-10":983162,"battery-10-bluetooth":985406,"battery-20":983163,"battery-20-bluetooth":985407,"battery-30":983164,"battery-30-bluetooth":985408,"battery-40":983165,"battery-40-bluetooth":985409,"battery-50":983166,"battery-50-bluetooth":985410,"battery-60":983167,"battery-60-bluetooth":985411,"battery-70":983168,"battery-70-bluetooth":985412,"battery-80":983169,"battery-80-bluetooth":985413,"battery-90":983170,"battery-90-bluetooth":985414,"battery-alert":983171,"battery-alert-bluetooth":985415,"battery-alert-variant":987340,"battery-alert-variant-outline":987341,"battery-bluetooth":985416,"battery-bluetooth-variant":985417,"battery-charging":983172,"battery-charging-10":985244,"battery-charging-100":983173,"battery-charging-20":983174,"battery-charging-30":983175,"battery-charging-40":983176,"battery-charging-50":985245,"battery-charging-60":983177,"battery-charging-70":985246,"battery-charging-80":983178,"battery-charging-90":983179,"battery-charging-high":987814,"battery-charging-low":987812,"battery-charging-medium":987813,"battery-charging-outline":985247,"battery-charging-wireless":985095,"battery-charging-wireless-10":985096,"battery-charging-wireless-20":985097,"battery-charging-wireless-30":985098,"battery-charging-wireless-40":985099,"battery-charging-wireless-50":985100,"battery-charging-wireless-60":985101,"battery-charging-wireless-70":985102,"battery-charging-wireless-80":985103,"battery-charging-wireless-90":985104,"battery-charging-wireless-alert":985105,"battery-charging-wireless-outline":985106,"battery-heart":987663,"battery-heart-outline":987664,"battery-heart-variant":987665,"battery-high":987811,"battery-low":987809,"battery-medium":987810,"battery-minus":983180,"battery-negative":983181,"battery-off":987741,"battery-off-outline":987742,"battery-outline":983182,"battery-plus":983183,"battery-positive":983184,"battery-unknown":983185,"battery-unknown-bluetooth":985418,"battlenet":985952,"beach":983186,"beaker":986346,"beaker-alert":987689,"beaker-alert-outline":987690,"beaker-check":987691,"beaker-check-outline":987692,"beaker-minus":987693,"beaker-minus-outline":987694,"beaker-outline":984720,"beaker-plus":987695,"beaker-plus-outline":987696,"beaker-question":987697,"beaker-question-outline":987698,"beaker-remove":987699,"beaker-remove-outline":987700,"bed":983779,"bed-double":987092,"bed-double-outline":987091,"bed-empty":985248,"bed-king":987090,"bed-king-outline":987089,"bed-outline":983193,"bed-queen":987088,"bed-queen-outline":987099,"bed-single":987245,"bed-single-outline":987246,"bee":987041,"bee-flower":987042,"beehive-off-outline":988141,"beehive-outline":987342,"beer":983192,"beer-outline":987916,"bell":983194,"bell-alert":986457,"bell-alert-outline":986753,"bell-cancel":988135,"bell-cancel-outline":988136,"bell-check":987621,"bell-check-outline":987622,"bell-circle":986458,"bell-circle-outline":986459,"bell-minus":988137,"bell-minus-outline":988138,"bell-off":983195,"bell-off-outline":985745,"bell-outline":983196,"bell-plus":983197,"bell-plus-outline":985746,"bell-remove":988139,"bell-remove-outline":988140,"bell-ring":983198,"bell-ring-outline":983199,"bell-sleep":983200,"bell-sleep-outline":985747,"beta":983201,"betamax":985547,"biathlon":986644,"bicycle":987292,"bicycle-basket":987701,"bike":983203,"bike-fast":987423,"billboard":987152,"billiards":985953,"billiards-rack":985954,"binoculars":983205,"bio":983206,"biohazard":983207,"bitbucket":983208,"bitcoin":985107,"black-mesa":983209,"blender":986347,"blender-software":983211,"blinds":983212,"blinds-open":987153,"block-helper":983213,"blogger":983214,"blood-bag":986348,"bluetooth":983215,"bluetooth-audio":983216,"bluetooth-connect":983217,"bluetooth-off":983218,"bluetooth-settings":983219,"bluetooth-transfer":983220,"blur":983221,"blur-linear":983222,"blur-off":983223,"blur-radial":983224,"bolnisi-cross":986349,"bolt":986547,"bomb":984721,"bomb-off":984773,"bone":983225,"book":983226,"book-account":988077,"book-account-outline":988078,"book-alphabet":984605,"book-cross":983202,"book-information-variant":987247,"book-lock":984986,"book-lock-open":984987,"book-minus":984537,"book-minus-multiple":985748,"book-minus-multiple-outline":985355,"book-multiple":983227,"book-multiple-outline":984118,"book-music":983143,"book-open":983229,"book-open-outline":985955,"book-open-page-variant":984538,"book-open-variant":983230,"book-outline":985956,"book-play":986754,"book-play-outline":986755,"book-plus":984539,"book-plus-multiple":985749,"book-plus-multiple-outline":985822,"book-remove":985751,"book-remove-multiple":985750,"book-remove-multiple-outline":984266,"book-search":986756,"book-search-outline":986757,"book-variant":983231,"book-variant-multiple":983228,"bookmark":983232,"bookmark-check":983233,"bookmark-check-outline":988027,"bookmark-minus":985548,"bookmark-minus-outline":985549,"bookmark-multiple":986645,"bookmark-multiple-outline":986646,"bookmark-music":983234,"bookmark-music-outline":988025,"bookmark-off":985550,"bookmark-off-outline":985551,"bookmark-outline":983235,"bookmark-plus":983237,"bookmark-plus-outline":983236,"bookmark-remove":983238,"bookmark-remove-outline":988026,"bookshelf":987743,"boom-gate":986758,"boom-gate-alert":986759,"boom-gate-alert-outline":986760,"boom-gate-down":986761,"boom-gate-down-outline":986762,"boom-gate-outline":986763,"boom-gate-up":986764,"boom-gate-up-outline":986765,"boombox":984540,"boomerang":987343,"bootstrap":984774,"border-all":983239,"border-all-variant":985249,"border-bottom":983240,"border-bottom-variant":985250,"border-color":983241,"border-horizontal":983242,"border-inside":983243,"border-left":983244,"border-left-variant":985251,"border-none":983245,"border-none-variant":985252,"border-outside":983246,"border-right":983247,"border-right-variant":985253,"border-style":983248,"border-top":983249,"border-top-variant":985254,"border-vertical":983250,"bottle-soda":987248,"bottle-soda-classic":987249,"bottle-soda-classic-outline":988003,"bottle-soda-outline":987250,"bottle-tonic":987438,"bottle-tonic-outline":987439,"bottle-tonic-plus":987440,"bottle-tonic-plus-outline":987441,"bottle-tonic-skull":987442,"bottle-tonic-skull-outline":987443,"bottle-wine":985172,"bottle-wine-outline":987920,"bow-tie":984696,"bowl":983694,"bowl-mix":984599,"bowl-mix-outline":983780,"bowl-outline":983721,"bowling":983251,"box":983252,"box-cutter":983253,"box-cutter-off":985930,"box-shadow":984631,"boxing-glove":985957,"braille":985552,"brain":985553,"bread-slice":986350,"bread-slice-outline":986351,"bridge":984600,"briefcase":983254,"briefcase-account":986352,"briefcase-account-outline":986353,"briefcase-check":983255,"briefcase-check-outline":987934,"briefcase-clock":987344,"briefcase-clock-outline":987345,"briefcase-download":983256,"briefcase-download-outline":986173,"briefcase-edit":985752,"briefcase-edit-outline":986174,"briefcase-minus":985642,"briefcase-minus-outline":986175,"briefcase-outline":985108,"briefcase-plus":985643,"briefcase-plus-outline":986176,"briefcase-remove":985644,"briefcase-remove-outline":986177,"briefcase-search":985645,"briefcase-search-outline":986178,"briefcase-upload":983257,"briefcase-upload-outline":986179,"briefcase-variant":988308,"briefcase-variant-outline":988309,"brightness-1":983258,"brightness-2":983259,"brightness-3":983260,"brightness-4":983261,"brightness-5":983262,"brightness-6":983263,"brightness-7":983264,"brightness-auto":983265,"brightness-percent":986354,"broom":983266,"brush":983267,"bucket":988181,"bucket-outline":988182,"buddhism":985419,"buffer":984601,"buffet":984440,"bug":983268,"bug-check":985646,"bug-check-outline":985647,"bug-outline":985648,"bugle":986548,"bulldozer":985890,"bullet":986355,"bulletin-board":983269,"bullhorn":983270,"bullhorn-outline":985891,"bullseye":984541,"bullseye-arrow":985289,"bulma":987879,"bunk-bed":987906,"bunk-bed-outline":983191,"bus":983271,"bus-alert":985753,"bus-articulated-end":984988,"bus-articulated-front":984989,"bus-clock":985290,"bus-double-decker":984990,"bus-marker":987666,"bus-multiple":986943,"bus-school":984991,"bus-side":984992,"bus-stop":987154,"bus-stop-covered":987155,"bus-stop-uncovered":987156,"cable-data":988052,"cached":983272,"cactus":986549,"cake":983273,"cake-layered":983274,"cake-variant":983275,"calculator":983276,"calculator-variant":985754,"calendar":983277,"calendar-account":986839,"calendar-account-outline":986840,"calendar-alert":985649,"calendar-arrow-left":987444,"calendar-arrow-right":987445,"calendar-blank":983278,"calendar-blank-multiple":987251,"calendar-blank-outline":985958,"calendar-check":983279,"calendar-check-outline":986180,"calendar-clock":983280,"calendar-edit":985255,"calendar-export":985892,"calendar-heart":985554,"calendar-import":985893,"calendar-minus":986460,"calendar-month":986647,"calendar-month-outline":986648,"calendar-multiple":983281,"calendar-multiple-check":983282,"calendar-multiselect":985650,"calendar-outline":985959,"calendar-plus":983283,"calendar-question":984722,"calendar-range":984697,"calendar-range-outline":985960,"calendar-refresh":983521,"calendar-refresh-outline":983555,"calendar-remove":983284,"calendar-remove-outline":986181,"calendar-search":985420,"calendar-star":985555,"calendar-sync":986766,"calendar-sync-outline":986767,"calendar-text":983285,"calendar-text-outline":986182,"calendar-today":983286,"calendar-week":985651,"calendar-week-begin":985652,"calendar-weekend":986841,"calendar-weekend-outline":986842,"call-made":983287,"call-merge":983288,"call-missed":983289,"call-received":983290,"call-split":983291,"camcorder":983292,"camcorder-off":983295,"camera":983296,"camera-account":985291,"camera-burst":984723,"camera-control":985961,"camera-enhance":983297,"camera-enhance-outline":985962,"camera-front":983298,"camera-front-variant":983299,"camera-gopro":984993,"camera-image":985292,"camera-iris":983300,"camera-metering-center":984994,"camera-metering-matrix":984995,"camera-metering-partial":984996,"camera-metering-spot":984997,"camera-off":984543,"camera-outline":986461,"camera-party-mode":983301,"camera-plus":986843,"camera-plus-outline":986844,"camera-rear":983302,"camera-rear-variant":983303,"camera-retake":986649,"camera-retake-outline":986650,"camera-switch":983304,"camera-switch-outline":985162,"camera-timer":983305,"camera-wireless":986550,"camera-wireless-outline":986551,"campfire":986845,"cancel":984890,"candle":984546,"candycane":983306,"cannabis":984998,"caps-lock":985755,"car":983307,"car-2-plus":987157,"car-3-plus":987158,"car-arrow-left":988082,"car-arrow-right":988083,"car-back":986651,"car-battery":983308,"car-brake-abs":986183,"car-brake-alert":986184,"car-brake-hold":986462,"car-brake-parking":986463,"car-brake-retarder":987159,"car-child-seat":987043,"car-clutch":987160,"car-cog":988108,"car-connected":983309,"car-convertible":984999,"car-coolant-level":987161,"car-cruise-control":986464,"car-defrost-front":986465,"car-defrost-rear":986466,"car-door":985963,"car-door-lock":987293,"car-electric":985964,"car-esp":986185,"car-estate":985000,"car-hatchback":985001,"car-info":987582,"car-key":985965,"car-light-dimmed":986186,"car-light-fog":986187,"car-light-high":986188,"car-limousine":985293,"car-multiple":985966,"car-off":986652,"car-parking-lights":986467,"car-pickup":985002,"car-seat":987044,"car-seat-cooler":987045,"car-seat-heater":987046,"car-settings":988109,"car-shift-pattern":986944,"car-side":985003,"car-sports":985004,"car-tire-alert":986189,"car-traction-control":986468,"car-turbocharger":987162,"car-wash":983310,"car-windshield":987163,"car-windshield-outline":987164,"carabiner":988352,"caravan":985005,"card":985967,"card-account-details":984530,"card-account-details-outline":986539,"card-account-details-star":983715,"card-account-details-star-outline":984795,"card-account-mail":983438,"card-account-mail-outline":986776,"card-account-phone":986777,"card-account-phone-outline":986778,"card-bulleted":985968,"card-bulleted-off":985969,"card-bulleted-off-outline":985970,"card-bulleted-outline":985971,"card-bulleted-settings":985972,"card-bulleted-settings-outline":985973,"card-outline":985974,"card-plus":987647,"card-plus-outline":987648,"card-search":987252,"card-search-outline":987253,"card-text":985975,"card-text-outline":985976,"cards":984632,"cards-club":985294,"cards-diamond":985295,"cards-diamond-outline":987165,"cards-heart":985296,"cards-outline":984633,"cards-playing-outline":984634,"cards-spade":985297,"cards-variant":984775,"carrot":983311,"cart":983312,"cart-arrow-down":986470,"cart-arrow-right":986190,"cart-arrow-up":986471,"cart-minus":986472,"cart-off":984683,"cart-outline":983313,"cart-plus":983314,"cart-remove":986473,"case-sensitive-alt":983315,"cash":983316,"cash-100":983317,"cash-marker":986552,"cash-minus":987744,"cash-multiple":983318,"cash-plus":987745,"cash-refund":985756,"cash-register":986356,"cash-remove":987746,"cash-usd":987510,"cash-usd-outline":983319,"cassette":985556,"cast":983320,"cast-audio":987166,"cast-connected":983321,"cast-education":986653,"cast-off":984970,"castle":983322,"cat":983323,"cctv":985006,"ceiling-light":984937,"cellphone":983324,"cellphone-android":983325,"cellphone-arrow-down":985557,"cellphone-basic":983326,"cellphone-charging":988055,"cellphone-cog":985425,"cellphone-dock":983327,"cellphone-erase":985421,"cellphone-information":986945,"cellphone-iphone":983328,"cellphone-key":985422,"cellphone-link":983329,"cellphone-link-off":983330,"cellphone-lock":985423,"cellphone-message":985299,"cellphone-message-off":987346,"cellphone-nfc":986768,"cellphone-nfc-off":987864,"cellphone-off":985424,"cellphone-play":987167,"cellphone-screenshot":985653,"cellphone-settings":983331,"cellphone-sound":985426,"cellphone-text":985298,"cellphone-wireless":985109,"celtic-cross":986357,"centos":987418,"certificate":983332,"certificate-outline":987528,"chair-rolling":986952,"chair-school":983333,"charity":986191,"chart-arc":983334,"chart-areaspline":983335,"chart-areaspline-variant":986769,"chart-bar":983336,"chart-bar-stacked":984938,"chart-bell-curve":986192,"chart-bell-curve-cumulative":987047,"chart-bubble":984547,"chart-donut":985007,"chart-donut-variant":985008,"chart-gantt":984684,"chart-histogram":983337,"chart-line":983338,"chart-line-stacked":984939,"chart-line-variant":985009,"chart-multiline":985300,"chart-multiple":987667,"chart-pie":983339,"chart-ppf":988032,"chart-sankey":987615,"chart-sankey-variant":987616,"chart-scatter-plot":986770,"chart-scatter-plot-hexbin":984685,"chart-timeline":984686,"chart-timeline-variant":986771,"chart-tree":986772,"chat":985977,"chat-alert":985978,"chat-alert-outline":987849,"chat-minus":988176,"chat-minus-outline":988179,"chat-outline":986846,"chat-plus":988175,"chat-plus-outline":988178,"chat-processing":985979,"chat-processing-outline":987850,"chat-remove":988177,"chat-remove-outline":988180,"chat-sleep":987857,"chat-sleep-outline":987858,"check":983340,"check-all":983341,"check-bold":986654,"check-box-multiple-outline":986193,"check-box-outline":986194,"check-circle":984544,"check-circle-outline":984545,"check-decagram":984977,"check-network":986195,"check-network-outline":986196,"check-outline":985173,"check-underline":986655,"check-underline-circle":986656,"check-underline-circle-outline":986657,"checkbook":985757,"checkbox-blank":983342,"checkbox-blank-circle":983343,"checkbox-blank-circle-outline":983344,"checkbox-blank-off":987884,"checkbox-blank-off-outline":987885,"checkbox-blank-outline":983345,"checkbox-intermediate":985174,"checkbox-marked":983346,"checkbox-marked-circle":983347,"checkbox-marked-circle-outline":983348,"checkbox-marked-outline":983349,"checkbox-multiple-blank":983350,"checkbox-multiple-blank-circle":984635,"checkbox-multiple-blank-circle-outline":984636,"checkbox-multiple-blank-outline":983351,"checkbox-multiple-marked":983352,"checkbox-multiple-marked-circle":984637,"checkbox-multiple-marked-circle-outline":984638,"checkbox-multiple-marked-outline":983353,"checkerboard":983354,"checkerboard-minus":987650,"checkerboard-plus":987649,"checkerboard-remove":987651,"cheese":987833,"cheese-off":988142,"chef-hat":985980,"chemical-weapon":983355,"chess-bishop":985180,"chess-king":985175,"chess-knight":985176,"chess-pawn":985177,"chess-queen":985178,"chess-rook":985179,"chevron-double-down":983356,"chevron-double-left":983357,"chevron-double-right":983358,"chevron-double-up":983359,"chevron-down":983360,"chevron-down-box":985558,"chevron-down-box-outline":985559,"chevron-down-circle":985894,"chevron-down-circle-outline":985895,"chevron-left":983361,"chevron-left-box":985560,"chevron-left-box-outline":985561,"chevron-left-circle":985896,"chevron-left-circle-outline":985897,"chevron-right":983362,"chevron-right-box":985562,"chevron-right-box-outline":985563,"chevron-right-circle":985898,"chevron-right-circle-outline":985899,"chevron-triple-down":986553,"chevron-triple-left":986554,"chevron-triple-right":986555,"chevron-triple-up":986556,"chevron-up":983363,"chevron-up-box":985564,"chevron-up-box-outline":985565,"chevron-up-circle":985900,"chevron-up-circle-outline":985901,"chili-hot":985010,"chili-medium":985011,"chili-mild":985012,"chili-off":988263,"chip":984602,"christianity":985427,"christianity-outline":986358,"church":983364,"cigar":987529,"cigar-off":988187,"circle":984933,"circle-double":986773,"circle-edit-outline":985301,"circle-expand":986774,"circle-half":988053,"circle-half-full":988054,"circle-medium":985566,"circle-multiple":985912,"circle-multiple-outline":984725,"circle-off-outline":987347,"circle-outline":984934,"circle-slice-1":985758,"circle-slice-2":985759,"circle-slice-3":985760,"circle-slice-4":985761,"circle-slice-5":985762,"circle-slice-6":985763,"circle-slice-7":985764,"circle-slice-8":985765,"circle-small":985567,"circular-saw":986658,"city":983366,"city-variant":985654,"city-variant-outline":985655,"clipboard":983367,"clipboard-account":983368,"clipboard-account-outline":986197,"clipboard-alert":983369,"clipboard-alert-outline":986359,"clipboard-arrow-down":983370,"clipboard-arrow-down-outline":986198,"clipboard-arrow-left":983371,"clipboard-arrow-left-outline":986360,"clipboard-arrow-right":986361,"clipboard-arrow-right-outline":986362,"clipboard-arrow-up":986199,"clipboard-arrow-up-outline":986200,"clipboard-check":983374,"clipboard-check-multiple":987747,"clipboard-check-multiple-outline":987748,"clipboard-check-outline":985256,"clipboard-file":987749,"clipboard-file-outline":987750,"clipboard-flow":984776,"clipboard-flow-outline":987415,"clipboard-list":987348,"clipboard-list-outline":987349,"clipboard-multiple":987751,"clipboard-multiple-outline":987752,"clipboard-outline":983372,"clipboard-play":986201,"clipboard-play-multiple":987753,"clipboard-play-multiple-outline":987754,"clipboard-play-outline":986202,"clipboard-plus":984913,"clipboard-plus-outline":987935,"clipboard-pulse":985181,"clipboard-pulse-outline":985182,"clipboard-text":983373,"clipboard-text-multiple":987755,"clipboard-text-multiple-outline":987756,"clipboard-text-outline":985656,"clipboard-text-play":986203,"clipboard-text-play-outline":986204,"clippy":983375,"clock":985428,"clock-alert":985429,"clock-alert-outline":984526,"clock-check":987048,"clock-check-outline":987049,"clock-digital":986775,"clock-end":983377,"clock-fast":983378,"clock-in":983379,"clock-out":983380,"clock-outline":983376,"clock-start":983381,"clock-time-eight":988230,"clock-time-eight-outline":988242,"clock-time-eleven":988233,"clock-time-eleven-outline":988245,"clock-time-five":988227,"clock-time-five-outline":988239,"clock-time-four":988226,"clock-time-four-outline":988238,"clock-time-nine":988231,"clock-time-nine-outline":988243,"clock-time-one":988223,"clock-time-one-outline":988235,"clock-time-seven":988229,"clock-time-seven-outline":988241,"clock-time-six":988228,"clock-time-six-outline":988240,"clock-time-ten":988232,"clock-time-ten-outline":988244,"clock-time-three":988225,"clock-time-three-outline":988237,"clock-time-twelve":988234,"clock-time-twelve-outline":988246,"clock-time-two":988224,"clock-time-two-outline":988236,"close":983382,"close-box":983383,"close-box-multiple":986205,"close-box-multiple-outline":986206,"close-box-outline":983384,"close-circle":983385,"close-circle-multiple":984618,"close-circle-multiple-outline":985219,"close-circle-outline":983386,"close-network":983387,"close-network-outline":986207,"close-octagon":983388,"close-octagon-outline":983389,"close-outline":984777,"close-thick":988056,"closed-caption":983390,"closed-caption-outline":986557,"cloud":983391,"cloud-alert":985568,"cloud-braces":985013,"cloud-check":983392,"cloud-check-outline":987852,"cloud-circle":983393,"cloud-download":983394,"cloud-download-outline":985981,"cloud-lock":987633,"cloud-lock-outline":987634,"cloud-off-outline":983396,"cloud-outline":983395,"cloud-print":983397,"cloud-print-outline":983398,"cloud-question":985657,"cloud-refresh":984362,"cloud-search":985430,"cloud-search-outline":985431,"cloud-sync":984639,"cloud-sync-outline":987862,"cloud-tags":985014,"cloud-upload":983399,"cloud-upload-outline":985982,"clover":985110,"coach-lamp":987168,"coat-rack":987294,"code-array":983400,"code-braces":983401,"code-braces-box":987350,"code-brackets":983402,"code-equal":983403,"code-greater-than":983404,"code-greater-than-or-equal":983405,"code-json":984614,"code-less-than":983406,"code-less-than-or-equal":983407,"code-not-equal":983408,"code-not-equal-variant":983409,"code-parentheses":983410,"code-parentheses-box":987351,"code-string":983411,"code-tags":983412,"code-tags-check":984724,"codepen":983413,"coffee":983414,"coffee-maker":987295,"coffee-off":987050,"coffee-off-outline":987051,"coffee-outline":984778,"coffee-to-go":983415,"coffee-to-go-outline":987918,"coffin":985983,"cog":984211,"cog-box":984212,"cog-clockwise":987613,"cog-counterclockwise":987614,"cog-off":988110,"cog-off-outline":988111,"cog-outline":985275,"cog-refresh":988254,"cog-refresh-outline":988255,"cog-sync":988256,"cog-sync-outline":988257,"cog-transfer":987227,"cog-transfer-outline":987228,"cogs":985302,"collage":984640,"collapse-all":985766,"collapse-all-outline":985767,"color-helper":983417,"comma":986659,"comma-box":986667,"comma-box-outline":986660,"comma-circle":986661,"comma-circle-outline":986662,"comment":983418,"comment-account":983419,"comment-account-outline":983420,"comment-alert":983421,"comment-alert-outline":983422,"comment-arrow-left":985569,"comment-arrow-left-outline":985570,"comment-arrow-right":985571,"comment-arrow-right-outline":985572,"comment-check":983423,"comment-check-outline":983424,"comment-edit":987583,"comment-edit-outline":987844,"comment-eye":985658,"comment-eye-outline":985659,"comment-multiple":985183,"comment-multiple-outline":983425,"comment-outline":983426,"comment-plus":985573,"comment-plus-outline":983427,"comment-processing":983428,"comment-processing-outline":983429,"comment-question":985111,"comment-question-outline":983430,"comment-quote":987169,"comment-quote-outline":987170,"comment-remove":984542,"comment-remove-outline":983431,"comment-search":985660,"comment-search-outline":985661,"comment-text":983432,"comment-text-multiple":985184,"comment-text-multiple-outline":985185,"comment-text-outline":983433,"compare":983434,"compare-horizontal":988306,"compare-vertical":988307,"compass":983435,"compass-off":985984,"compass-off-outline":985985,"compass-outline":983436,"compass-rose":988034,"concourse-ci":987296,"console":983437,"console-line":985015,"console-network":985257,"console-network-outline":986208,"consolidate":987352,"contactless-payment":986474,"contactless-payment-circle":983841,"contactless-payment-circle-outline":984072,"contacts":984779,"contacts-outline":984504,"contain":985662,"contain-end":985663,"contain-start":985664,"content-copy":983439,"content-cut":983440,"content-duplicate":983441,"content-paste":983442,"content-save":983443,"content-save-alert":986946,"content-save-alert-outline":986947,"content-save-all":983444,"content-save-all-outline":986948,"content-save-cog":988251,"content-save-cog-outline":988252,"content-save-edit":986363,"content-save-edit-outline":986364,"content-save-move":986663,"content-save-move-outline":986664,"content-save-outline":985112,"content-save-settings":984603,"content-save-settings-outline":985902,"contrast":983445,"contrast-box":983446,"contrast-circle":983447,"controller-classic":985986,"controller-classic-outline":985987,"cookie":983448,"coolant-temperature":984008,"copyright":984550,"cordova":985432,"corn":985016,"corn-off":988143,"cosine-wave":988281,"counter":983449,"cow":983450,"cpu-32-bit":986847,"cpu-64-bit":986848,"crane":985186,"creation":984692,"creative-commons":986475,"credit-card":987119,"credit-card-check":988112,"credit-card-check-outline":988113,"credit-card-clock":986849,"credit-card-clock-outline":986850,"credit-card-marker":984744,"credit-card-marker-outline":986558,"credit-card-minus":987052,"credit-card-minus-outline":987053,"credit-card-multiple":987120,"credit-card-multiple-outline":983452,"credit-card-off":987121,"credit-card-off-outline":984548,"credit-card-outline":983451,"credit-card-plus":987122,"credit-card-plus-outline":984694,"credit-card-refund":987123,"credit-card-refund-outline":985768,"credit-card-remove":987054,"credit-card-remove-outline":987055,"credit-card-scan":987124,"credit-card-scan-outline":983453,"credit-card-settings":987125,"credit-card-settings-outline":985303,"credit-card-wireless":985090,"credit-card-wireless-off":984442,"credit-card-wireless-off-outline":984443,"credit-card-wireless-outline":986476,"cricket":986477,"crop":983454,"crop-free":983455,"crop-landscape":983456,"crop-portrait":983457,"crop-rotate":984726,"crop-square":983458,"crosshairs":983459,"crosshairs-gps":983460,"crosshairs-off":986949,"crosshairs-question":987446,"crown":983461,"crown-outline":987600,"cryengine":985433,"crystal-ball":985903,"cube":983462,"cube-off":988188,"cube-off-outline":988189,"cube-outline":983463,"cube-scan":985988,"cube-send":983464,"cube-unfolded":983465,"cup":983466,"cup-off":984549,"cup-off-outline":988029,"cup-outline":987919,"cup-water":983467,"cupboard":986950,"cupboard-outline":986951,"cupcake":985434,"curling":985187,"currency-bdt":985188,"currency-brl":985989,"currency-btc":983468,"currency-cny":985018,"currency-eth":985019,"currency-eur":983469,"currency-eur-off":987925,"currency-gbp":983470,"currency-ils":986209,"currency-inr":983471,"currency-jpy":985020,"currency-krw":985021,"currency-kzt":985189,"currency-ngn":983472,"currency-php":985574,"currency-rial":986780,"currency-rub":983473,"currency-sign":985022,"currency-try":983474,"currency-twd":985023,"currency-usd":983489,"currency-usd-circle":987499,"currency-usd-circle-outline":983416,"currency-usd-off":984698,"current-ac":988288,"current-dc":985436,"cursor-default":983488,"cursor-default-click":986365,"cursor-default-click-outline":986366,"cursor-default-gesture":987431,"cursor-default-gesture-outline":987432,"cursor-default-outline":983487,"cursor-move":983486,"cursor-pointer":983485,"cursor-text":984551,"database":983484,"database-check":985769,"database-edit":985990,"database-export":985438,"database-import":985437,"database-lock":985770,"database-marker":987894,"database-minus":983483,"database-plus":983482,"database-refresh":984514,"database-remove":986368,"database-search":985190,"database-settings":986369,"database-sync":986367,"death-star":985304,"death-star-variant":985305,"deathly-hallows":985991,"debian":985306,"debug-step-into":983481,"debug-step-out":983480,"debug-step-over":983479,"decagram":984940,"decagram-outline":984941,"decimal":987297,"decimal-comma":987298,"decimal-comma-decrease":987299,"decimal-comma-increase":987300,"decimal-decrease":983478,"decimal-increase":983477,"delete":983476,"delete-alert":987301,"delete-alert-outline":987302,"delete-circle":984707,"delete-circle-outline":985992,"delete-empty":984780,"delete-empty-outline":986781,"delete-forever":984552,"delete-forever-outline":985993,"delete-off":987303,"delete-off-outline":987304,"delete-outline":985575,"delete-restore":985113,"delete-sweep":984553,"delete-sweep-outline":986210,"delete-variant":983475,"delta":983490,"desk":987705,"desk-lamp":985439,"deskphone":983491,"desktop-classic":985024,"desktop-mac":983492,"desktop-mac-dashboard":985576,"desktop-tower":983493,"desktop-tower-monitor":985771,"details":983494,"dev-to":986478,"developer-board":984727,"deviantart":983495,"devices":987056,"diabetes":987430,"dialpad":984604,"diameter":986211,"diameter-outline":986212,"diameter-variant":986213,"diamond":985994,"diamond-outline":985995,"diamond-stone":983496,"dice-1":983498,"dice-1-outline":987466,"dice-2":983499,"dice-2-outline":987467,"dice-3":983500,"dice-3-outline":987468,"dice-4":983501,"dice-4-outline":987469,"dice-5":983502,"dice-5-outline":987470,"dice-6":983503,"dice-6-outline":987471,"dice-d10":987475,"dice-d10-outline":984943,"dice-d12":987476,"dice-d12-outline":985191,"dice-d20":987477,"dice-d20-outline":984554,"dice-d4":987472,"dice-d4-outline":984555,"dice-d6":987473,"dice-d6-outline":984557,"dice-d8":987474,"dice-d8-outline":984556,"dice-multiple":984942,"dice-multiple-outline":987478,"digital-ocean":987703,"dip-switch":985025,"directions":983504,"directions-fork":984641,"disc":984558,"disc-alert":983505,"disc-player":985440,"discord":984687,"dishwasher":985772,"dishwasher-alert":987576,"dishwasher-off":987577,"disqus":983506,"distribute-horizontal-center":987593,"distribute-horizontal-left":987592,"distribute-horizontal-right":987594,"distribute-vertical-bottom":987595,"distribute-vertical-center":987596,"distribute-vertical-top":987597,"diving-flippers":986559,"diving-helmet":986560,"diving-scuba":986561,"diving-scuba-flag":986562,"diving-scuba-tank":986563,"diving-scuba-tank-multiple":986564,"diving-snorkel":986565,"division":983508,"division-box":983509,"dlna":985665,"dna":984708,"dns":983510,"dns-outline":985996,"do-not-disturb":984728,"do-not-disturb-off":984729,"dock-bottom":987305,"dock-left":987306,"dock-right":987307,"dock-window":987308,"docker":985192,"doctor":985666,"dog":985667,"dog-service":985773,"dog-side":985668,"dolby":984755,"dolly":986782,"domain":983511,"domain-off":986479,"domain-plus":987309,"domain-remove":987310,"dome-light":988190,"domino-mask":987171,"donkey":985026,"door":985114,"door-closed":985115,"door-closed-lock":987311,"door-open":985116,"doorbell":987878,"doorbell-video":985193,"dot-net":985774,"dots-horizontal":983512,"dots-horizontal-circle":985027,"dots-horizontal-circle-outline":985997,"dots-vertical":983513,"dots-vertical-circle":985028,"dots-vertical-circle-outline":985998,"douban":984730,"download":983514,"download-box":988258,"download-box-outline":988259,"download-circle":988260,"download-circle-outline":988261,"download-lock":987936,"download-lock-outline":987937,"download-multiple":985577,"download-network":984820,"download-network-outline":986214,"download-off":987312,"download-off-outline":987313,"download-outline":985999,"drag":983515,"drag-horizontal":983516,"drag-horizontal-variant":987888,"drag-variant":986000,"drag-vertical":983517,"drag-vertical-variant":987889,"drama-masks":986370,"draw":986953,"drawing":983518,"drawing-box":983519,"dresser":986954,"dresser-outline":986955,"drone":983522,"dropbox":983523,"drupal":983524,"duck":983525,"dumbbell":983526,"dump-truck":986215,"ear-hearing":985029,"ear-hearing-off":985669,"earth":983527,"earth-arrow-right":987921,"earth-box":984781,"earth-box-minus":988167,"earth-box-off":984782,"earth-box-plus":988166,"earth-box-remove":988168,"earth-minus":988164,"earth-off":983528,"earth-plus":988163,"earth-remove":988165,"egg":985775,"egg-easter":985776,"egg-off":988144,"egg-off-outline":988145,"egg-outline":988146,"eight-track":985578,"eject":983530,"eject-outline":986001,"electric-switch":986783,"electric-switch-closed":987353,"electron-framework":987172,"elephant":985030,"elevation-decline":983531,"elevation-rise":983532,"elevator":983533,"elevator-down":987842,"elevator-passenger":988033,"elevator-up":987841,"ellipse":986784,"ellipse-outline":986785,"email":983534,"email-alert":984783,"email-alert-outline":986434,"email-box":986371,"email-check":985777,"email-check-outline":985778,"email-edit":986851,"email-edit-outline":986852,"email-lock":983537,"email-mark-as-unread":986002,"email-minus":986853,"email-minus-outline":986854,"email-multiple":986855,"email-multiple-outline":986856,"email-newsletter":987057,"email-off":988131,"email-off-outline":988132,"email-open":983535,"email-open-multiple":986857,"email-open-multiple-outline":986858,"email-open-outline":984559,"email-outline":983536,"email-plus":985579,"email-plus-outline":985580,"email-receive":987354,"email-receive-outline":987355,"email-search":985441,"email-search-outline":985442,"email-send":987356,"email-send-outline":987357,"email-sync":987847,"email-sync-outline":987848,"email-variant":984560,"ember":985904,"emby":984756,"emoticon":986216,"emoticon-angry":986217,"emoticon-angry-outline":986218,"emoticon-confused":987358,"emoticon-confused-outline":987359,"emoticon-cool":986219,"emoticon-cool-outline":983539,"emoticon-cry":986220,"emoticon-cry-outline":986221,"emoticon-dead":986222,"emoticon-dead-outline":984731,"emoticon-devil":986223,"emoticon-devil-outline":983540,"emoticon-excited":986224,"emoticon-excited-outline":984732,"emoticon-frown":986956,"emoticon-frown-outline":986957,"emoticon-happy":986225,"emoticon-happy-outline":983541,"emoticon-kiss":986226,"emoticon-kiss-outline":986227,"emoticon-lol":987668,"emoticon-lol-outline":987669,"emoticon-neutral":986228,"emoticon-neutral-outline":983542,"emoticon-outline":983538,"emoticon-poop":983543,"emoticon-poop-outline":986229,"emoticon-sad":986230,"emoticon-sad-outline":983544,"emoticon-tongue":983545,"emoticon-tongue-outline":986231,"emoticon-wink":986232,"emoticon-wink-outline":986233,"engine":983546,"engine-off":985670,"engine-off-outline":985671,"engine-outline":983547,"epsilon":987360,"equal":983548,"equal-box":983549,"equalizer":986786,"equalizer-outline":986787,"eraser":983550,"eraser-variant":984642,"escalator":983551,"escalator-box":988057,"escalator-down":987840,"escalator-up":987839,"eslint":986234,"et":985779,"ethereum":985194,"ethernet":983552,"ethernet-cable":983553,"ethernet-cable-off":983554,"ev-station":984561,"evernote":983556,"excavator":987173,"exclamation":983557,"exclamation-thick":987704,"exit-run":985672,"exit-to-app":983558,"expand-all":985780,"expand-all-outline":985781,"expansion-card":985262,"expansion-card-variant":987058,"exponent":985443,"exponent-box":985444,"export":983559,"export-variant":986003,"eye":983560,"eye-check":986372,"eye-check-outline":986373,"eye-circle":986004,"eye-circle-outline":986005,"eye-minus":987174,"eye-minus-outline":987175,"eye-off":983561,"eye-off-outline":984785,"eye-outline":984784,"eye-plus":985195,"eye-plus-outline":985196,"eye-settings":985197,"eye-settings-outline":985198,"eyedropper":983562,"eyedropper-minus":988125,"eyedropper-off":988127,"eyedropper-plus":988124,"eyedropper-remove":988126,"eyedropper-variant":983563,"face":984643,"face-agent":986480,"face-outline":986006,"face-profile":984644,"face-profile-woman":987254,"face-recognition":986235,"face-woman":987255,"face-woman-outline":987256,"facebook":983564,"facebook-messenger":983566,"facebook-workplace":985905,"factory":983567,"fan":983568,"fan-alert":988268,"fan-chevron-down":988269,"fan-chevron-up":988270,"fan-minus":988272,"fan-off":985117,"fan-plus":988271,"fan-remove":988273,"fan-speed-1":988274,"fan-speed-2":988275,"fan-speed-3":988276,"fast-forward":983569,"fast-forward-10":986481,"fast-forward-30":986374,"fast-forward-5":987640,"fast-forward-outline":984786,"fax":983570,"feather":984787,"feature-search":985673,"feature-search-outline":985674,"fedora":985307,"fencing":988353,"ferris-wheel":986788,"ferry":983571,"file":983572,"file-account":984891,"file-account-outline":987176,"file-alert":985675,"file-alert-outline":985676,"file-cabinet":985782,"file-cad":986859,"file-cad-box":986860,"file-cancel":986566,"file-cancel-outline":986567,"file-certificate":987526,"file-certificate-outline":987527,"file-chart":983573,"file-chart-outline":987177,"file-check":983574,"file-check-outline":986665,"file-clock":987873,"file-clock-outline":987874,"file-cloud":983575,"file-cloud-outline":987178,"file-code":983598,"file-code-outline":987179,"file-cog":987259,"file-cog-outline":987260,"file-compare":985258,"file-delimited":983576,"file-delimited-outline":986789,"file-document":983577,"file-document-edit":986568,"file-document-edit-outline":986569,"file-document-outline":985582,"file-download":985445,"file-download-outline":985446,"file-edit":987623,"file-edit-outline":987624,"file-excel":983579,"file-excel-box":983580,"file-excel-box-outline":987180,"file-excel-outline":987181,"file-export":983581,"file-export-outline":987182,"file-eye":986570,"file-eye-outline":986571,"file-find":983582,"file-find-outline":986007,"file-hidden":984595,"file-image":983583,"file-image-outline":986800,"file-import":983584,"file-import-outline":987183,"file-key":987524,"file-key-outline":987525,"file-link":987511,"file-link-outline":987512,"file-lock":983585,"file-lock-outline":987184,"file-move":985785,"file-move-outline":987185,"file-multiple":983586,"file-multiple-outline":987186,"file-music":983587,"file-music-outline":986666,"file-outline":983588,"file-pdf":983589,"file-pdf-box":983590,"file-pdf-box-outline":987059,"file-pdf-outline":986669,"file-percent":985118,"file-percent-outline":987187,"file-phone":987513,"file-phone-outline":987514,"file-plus":984914,"file-plus-outline":986861,"file-powerpoint":983591,"file-powerpoint-box":983592,"file-powerpoint-box-outline":987188,"file-powerpoint-outline":987189,"file-presentation-box":983593,"file-question":985199,"file-question-outline":987190,"file-refresh":985368,"file-refresh-outline":984385,"file-remove":986008,"file-remove-outline":987191,"file-replace":985906,"file-replace-outline":985907,"file-restore":984688,"file-restore-outline":987192,"file-search":986236,"file-search-outline":986237,"file-send":983594,"file-send-outline":987193,"file-settings":987257,"file-settings-outline":987258,"file-star":987194,"file-star-outline":987195,"file-swap":987060,"file-swap-outline":987061,"file-sync":987670,"file-sync-outline":987671,"file-table":986238,"file-table-box":987361,"file-table-box-multiple":987362,"file-table-box-multiple-outline":987363,"file-table-box-outline":987364,"file-table-outline":986239,"file-tree":984645,"file-tree-outline":988114,"file-undo":985308,"file-undo-outline":987196,"file-upload":985677,"file-upload-outline":985678,"file-video":983595,"file-video-outline":986668,"file-word":983596,"file-word-box":983597,"file-word-box-outline":987197,"file-word-outline":987198,"film":983599,"filmstrip":983600,"filmstrip-box":983858,"filmstrip-box-multiple":986392,"filmstrip-off":983601,"filter":983602,"filter-menu":987365,"filter-menu-outline":987366,"filter-minus":986862,"filter-minus-outline":986863,"filter-outline":983603,"filter-plus":986864,"filter-plus-outline":986865,"filter-remove":983604,"filter-remove-outline":983605,"filter-variant":983606,"filter-variant-minus":987410,"filter-variant-plus":987411,"filter-variant-remove":987199,"finance":985119,"find-replace":984788,"fingerprint":983607,"fingerprint-off":986801,"fire":983608,"fire-extinguisher":986866,"fire-hydrant":987447,"fire-hydrant-alert":987448,"fire-hydrant-off":987449,"fire-truck":985259,"firebase":985447,"firefox":983609,"fireplace":986670,"fireplace-off":986671,"firework":986672,"fish":983610,"fish-off":988147,"fishbowl":986867,"fishbowl-outline":986868,"fit-to-page":986869,"fit-to-page-outline":986870,"flag":983611,"flag-checkered":983612,"flag-minus":986009,"flag-minus-outline":987314,"flag-outline":983613,"flag-plus":986010,"flag-plus-outline":987315,"flag-remove":986011,"flag-remove-outline":987316,"flag-triangle":983615,"flag-variant":983616,"flag-variant-outline":983614,"flare":986482,"flash":983617,"flash-alert":986871,"flash-alert-outline":986872,"flash-auto":983618,"flash-circle":985120,"flash-off":983619,"flash-outline":984789,"flash-red-eye":984699,"flashlight":983620,"flashlight-off":983621,"flask":983187,"flask-empty":983188,"flask-empty-minus":987706,"flask-empty-minus-outline":987707,"flask-empty-off":988148,"flask-empty-off-outline":988149,"flask-empty-outline":983189,"flask-empty-plus":987708,"flask-empty-plus-outline":987709,"flask-empty-remove":987710,"flask-empty-remove-outline":987711,"flask-minus":987712,"flask-minus-outline":987713,"flask-off":988150,"flask-off-outline":988151,"flask-outline":983190,"flask-plus":987714,"flask-plus-outline":987715,"flask-remove":987716,"flask-remove-outline":987717,"flask-round-bottom":987723,"flask-round-bottom-empty":987724,"flask-round-bottom-empty-outline":987725,"flask-round-bottom-outline":987726,"fleur-de-lis":987907,"flip-horizontal":987367,"flip-to-back":983623,"flip-to-front":983624,"flip-vertical":987368,"floor-lamp":985309,"floor-lamp-dual":987200,"floor-lamp-variant":987201,"floor-plan":985121,"floppy":983625,"floppy-variant":985583,"flower":983626,"flower-outline":985584,"flower-poppy":986376,"flower-tulip":985585,"flower-tulip-outline":985586,"focus-auto":986958,"focus-field":986959,"focus-field-horizontal":986960,"focus-field-vertical":986961,"folder":983627,"folder-account":983628,"folder-account-outline":986012,"folder-alert":986572,"folder-alert-outline":986573,"folder-clock":985786,"folder-clock-outline":985787,"folder-cog":987263,"folder-cog-outline":987264,"folder-download":983629,"folder-download-outline":987369,"folder-edit":985310,"folder-edit-outline":986574,"folder-google-drive":983630,"folder-heart":987370,"folder-heart-outline":987371,"folder-home":987317,"folder-home-outline":987318,"folder-image":983631,"folder-information":987319,"folder-information-outline":987320,"folder-key":985260,"folder-key-network":985261,"folder-key-network-outline":986240,"folder-key-outline":987372,"folder-lock":983632,"folder-lock-open":983633,"folder-marker":987757,"folder-marker-outline":987758,"folder-move":983634,"folder-move-outline":987718,"folder-multiple":983635,"folder-multiple-image":983636,"folder-multiple-outline":983637,"folder-multiple-plus":988286,"folder-multiple-plus-outline":988287,"folder-music":987993,"folder-music-outline":987994,"folder-network":985200,"folder-network-outline":986241,"folder-open":984944,"folder-open-outline":986575,"folder-outline":983638,"folder-plus":983639,"folder-plus-outline":986013,"folder-pound":986377,"folder-pound-outline":986378,"folder-refresh":984905,"folder-refresh-outline":984386,"folder-remove":983640,"folder-remove-outline":986014,"folder-search":985448,"folder-search-outline":985449,"folder-settings":987261,"folder-settings-outline":987262,"folder-star":984733,"folder-star-multiple":988115,"folder-star-multiple-outline":988116,"folder-star-outline":986015,"folder-swap":987062,"folder-swap-outline":987063,"folder-sync":986379,"folder-sync-outline":986380,"folder-table":987875,"folder-table-outline":987876,"folder-text":986242,"folder-text-outline":986243,"folder-upload":983641,"folder-upload-outline":987373,"folder-zip":984811,"folder-zip-outline":985017,"font-awesome":983098,"food":983642,"food-apple":983643,"food-apple-outline":986244,"food-croissant":985032,"food-drumstick":988191,"food-drumstick-off":988264,"food-drumstick-off-outline":988265,"food-drumstick-outline":988192,"food-fork-drink":984562,"food-off":984563,"food-steak":988266,"food-steak-off":988267,"food-variant":983644,"food-variant-off":988133,"foot-print":986962,"football":983645,"football-australian":983646,"football-helmet":983647,"forklift":985033,"form-dropdown":988160,"form-select":988161,"form-textarea":987285,"form-textbox":984590,"form-textbox-lock":987997,"form-textbox-password":985077,"format-align-bottom":984915,"format-align-center":983648,"format-align-justify":983649,"format-align-left":983650,"format-align-middle":984916,"format-align-right":983651,"format-align-top":984917,"format-annotation-minus":985788,"format-annotation-plus":984646,"format-bold":983652,"format-clear":983653,"format-color-fill":983654,"format-color-highlight":986673,"format-color-marker-cancel":987923,"format-color-text":984734,"format-columns":985311,"format-float-center":983655,"format-float-left":983656,"format-float-none":983657,"format-float-right":983658,"format-font":984790,"format-font-size-decrease":985587,"format-font-size-increase":985588,"format-header-1":983659,"format-header-2":983660,"format-header-3":983661,"format-header-4":983662,"format-header-5":983663,"format-header-6":983664,"format-header-decrease":983665,"format-header-equal":983666,"format-header-increase":983667,"format-header-pound":983668,"format-horizontal-align-center":984606,"format-horizontal-align-left":984607,"format-horizontal-align-right":984608,"format-indent-decrease":983669,"format-indent-increase":983670,"format-italic":983671,"format-letter-case":985908,"format-letter-case-lower":985909,"format-letter-case-upper":985910,"format-letter-ends-with":987064,"format-letter-matches":987065,"format-letter-starts-with":987066,"format-line-spacing":983672,"format-line-style":984520,"format-line-weight":984521,"format-list-bulleted":983673,"format-list-bulleted-square":986576,"format-list-bulleted-triangle":986802,"format-list-bulleted-type":983674,"format-list-checkbox":985450,"format-list-checks":984918,"format-list-numbered":983675,"format-list-numbered-rtl":986381,"format-list-text":987759,"format-overline":986803,"format-page-break":984791,"format-paint":983676,"format-paragraph":983677,"format-pilcrow":984792,"format-quote-close":983678,"format-quote-close-outline":987560,"format-quote-open":984919,"format-quote-open-outline":987559,"format-rotate-90":984746,"format-section":984735,"format-size":983679,"format-strikethrough":983680,"format-strikethrough-variant":983681,"format-subscript":983682,"format-superscript":983683,"format-text":983684,"format-text-rotation-angle-down":987067,"format-text-rotation-angle-up":987068,"format-text-rotation-down":986483,"format-text-rotation-down-vertical":987069,"format-text-rotation-none":986484,"format-text-rotation-up":987070,"format-text-rotation-vertical":987071,"format-text-variant":986674,"format-text-wrapping-clip":986382,"format-text-wrapping-overflow":986383,"format-text-wrapping-wrap":986384,"format-textbox":986385,"format-textdirection-l-to-r":983685,"format-textdirection-r-to-l":983686,"format-title":984564,"format-underline":983687,"format-vertical-align-bottom":984609,"format-vertical-align-center":984610,"format-vertical-align-top":984611,"format-wrap-inline":983688,"format-wrap-square":983689,"format-wrap-tight":983690,"format-wrap-top-bottom":983691,"forum":983692,"forum-outline":985122,"forward":983693,"forwardburger":986485,"fountain":985451,"fountain-pen":986386,"fountain-pen-tip":986387,"freebsd":985312,"frequently-asked-questions":986804,"fridge":983696,"fridge-alert":987569,"fridge-alert-outline":987570,"fridge-bottom":983698,"fridge-off":987567,"fridge-off-outline":987568,"fridge-outline":983695,"fridge-top":983697,"fruit-cherries":987202,"fruit-cherries-off":988152,"fruit-citrus":987203,"fruit-citrus-off":988153,"fruit-grapes":987204,"fruit-grapes-outline":987205,"fruit-pineapple":987206,"fruit-watermelon":987207,"fuel":985034,"fullscreen":983699,"fullscreen-exit":983700,"function":983701,"function-variant":985201,"furigana-horizontal":987265,"furigana-vertical":987266,"fuse":986245,"fuse-alert":988205,"fuse-blade":986246,"fuse-off":988204,"gamepad":983702,"gamepad-circle":986675,"gamepad-circle-down":986676,"gamepad-circle-left":986677,"gamepad-circle-outline":986678,"gamepad-circle-right":986679,"gamepad-circle-up":986680,"gamepad-down":986681,"gamepad-left":986682,"gamepad-right":986683,"gamepad-round":986684,"gamepad-round-down":986685,"gamepad-round-left":986686,"gamepad-round-outline":986687,"gamepad-round-right":986688,"gamepad-round-up":986689,"gamepad-square":986805,"gamepad-square-outline":986806,"gamepad-up":986690,"gamepad-variant":983703,"gamepad-variant-outline":986807,"gamma":987374,"gantry-crane":986577,"garage":984793,"garage-alert":985202,"garage-alert-variant":987861,"garage-open":984794,"garage-open-variant":987860,"garage-variant":987859,"gas-cylinder":984647,"gas-station":983704,"gas-station-off":988169,"gas-station-off-outline":988170,"gas-station-outline":986808,"gate":983705,"gate-and":985313,"gate-arrow-right":987497,"gate-nand":985314,"gate-nor":985315,"gate-not":985316,"gate-open":987498,"gate-or":985317,"gate-xnor":985318,"gate-xor":985319,"gatsby":986691,"gauge":983706,"gauge-empty":985203,"gauge-full":985204,"gauge-low":985205,"gavel":983707,"gender-female":983708,"gender-male":983709,"gender-male-female":983710,"gender-male-female-variant":987455,"gender-non-binary":987456,"gender-transgender":983711,"gentoo":985320,"gesture":985035,"gesture-double-tap":984892,"gesture-pinch":985789,"gesture-spread":985790,"gesture-swipe":986486,"gesture-swipe-down":984893,"gesture-swipe-horizontal":985791,"gesture-swipe-left":984894,"gesture-swipe-right":984895,"gesture-swipe-up":984896,"gesture-swipe-vertical":985792,"gesture-tap":984897,"gesture-tap-box":987817,"gesture-tap-button":987816,"gesture-tap-hold":986487,"gesture-two-double-tap":984898,"gesture-two-tap":984899,"ghost":983712,"ghost-off":985589,"gif":986488,"gift":986692,"gift-outline":983713,"git":983714,"github":983716,"gitlab":986016,"glass-cocktail":983894,"glass-flute":983717,"glass-mug":983718,"glass-mug-variant":987414,"glass-pint-outline":987917,"glass-stange":983719,"glass-tulip":983720,"glass-wine":985206,"glasses":983722,"globe-light":987863,"globe-model":985321,"gmail":983723,"gnome":983724,"go-kart":986489,"go-kart-track":986490,"gog":986017,"gold":987727,"golf":985123,"golf-cart":987556,"golf-tee":987267,"gondola":984710,"goodreads":986491,"google":983725,"google-ads":986247,"google-analytics":985036,"google-assistant":985037,"google-cardboard":983726,"google-chrome":983727,"google-circles":983728,"google-circles-communities":983729,"google-circles-extended":983730,"google-circles-group":983731,"google-classroom":983744,"google-cloud":987638,"google-controller":983732,"google-controller-off":983733,"google-downasaur":988002,"google-drive":983734,"google-earth":983735,"google-fit":985452,"google-glass":983736,"google-hangouts":983753,"google-home":985124,"google-keep":984796,"google-lens":985590,"google-maps":984565,"google-my-business":987208,"google-nearby":983737,"google-photos":984797,"google-play":983740,"google-plus":983741,"google-podcast":986809,"google-spreadsheet":985591,"google-street-view":986248,"google-translate":983743,"gradient":984736,"grain":986492,"graph":987209,"graph-outline":987210,"graphql":985207,"grave-stone":986018,"grease-pencil":984648,"greater-than":985453,"greater-than-or-equal":985454,"grid":983745,"grid-large":984920,"grid-off":983746,"grill":986693,"grill-outline":987530,"group":983747,"guitar-acoustic":984945,"guitar-electric":983748,"guitar-pick":983749,"guitar-pick-outline":983750,"guy-fawkes-mask":985125,"hail":985793,"hair-dryer":987375,"hair-dryer-outline":987376,"halloween":986019,"hamburger":984709,"hammer":985322,"hammer-screwdriver":987938,"hammer-wrench":987939,"hand":985679,"hand-heart":987377,"hand-left":986694,"hand-okay":985680,"hand-peace":985681,"hand-peace-variant":985682,"hand-pointing-down":985683,"hand-pointing-left":985684,"hand-pointing-right":983751,"hand-pointing-up":985685,"hand-right":986695,"hand-saw":986696,"hand-water":988063,"handball":986963,"handcuffs":987454,"handshake":987672,"hanger":983752,"hard-hat":985455,"harddisk":983754,"harddisk-plus":987211,"harddisk-remove":987212,"hat-fedora":986020,"hazard-lights":986249,"hdr":986493,"hdr-off":986494,"head":987998,"head-alert":987960,"head-alert-outline":987961,"head-check":987962,"head-check-outline":987963,"head-cog":987964,"head-cog-outline":987965,"head-dots-horizontal":987966,"head-dots-horizontal-outline":987967,"head-flash":987968,"head-flash-outline":987969,"head-heart":987970,"head-heart-outline":987971,"head-lightbulb":987972,"head-lightbulb-outline":987973,"head-minus":987974,"head-minus-outline":987975,"head-outline":987999,"head-plus":987976,"head-plus-outline":987977,"head-question":987978,"head-question-outline":987979,"head-remove":987980,"head-remove-outline":987981,"head-snowflake":987982,"head-snowflake-outline":987983,"head-sync":987984,"head-sync-outline":987985,"headphones":983755,"headphones-bluetooth":985456,"headphones-box":983756,"headphones-off":985038,"headphones-settings":983757,"headset":983758,"headset-dock":983759,"headset-off":983760,"heart":983761,"heart-box":983762,"heart-box-outline":983763,"heart-broken":983764,"heart-broken-outline":986388,"heart-circle":985457,"heart-circle-outline":985458,"heart-flash":986873,"heart-half":984799,"heart-half-full":984798,"heart-half-outline":984800,"heart-minus":988207,"heart-minus-outline":988210,"heart-multiple":985686,"heart-multiple-outline":985687,"heart-off":984921,"heart-off-outline":988212,"heart-outline":983765,"heart-plus":988206,"heart-plus-outline":988209,"heart-pulse":984566,"heart-remove":988208,"heart-remove-outline":988211,"helicopter":985794,"help":983766,"help-box":984971,"help-circle":983767,"help-circle-outline":984613,"help-network":984821,"help-network-outline":986250,"help-rhombus":986021,"help-rhombus-outline":986022,"hexadecimal":987815,"hexagon":983768,"hexagon-multiple":984801,"hexagon-multiple-outline":987378,"hexagon-outline":983769,"hexagon-slice-1":985795,"hexagon-slice-2":985796,"hexagon-slice-3":985797,"hexagon-slice-4":985798,"hexagon-slice-5":985799,"hexagon-slice-6":985800,"hexagram":985801,"hexagram-outline":985802,"high-definition":985039,"high-definition-box":985208,"highway":984567,"hiking":986495,"hinduism":985459,"history":983770,"hockey-puck":985209,"hockey-sticks":985210,"hololens":983771,"home":983772,"home-account":985126,"home-alert":985211,"home-analytics":986810,"home-assistant":985040,"home-automation":985041,"home-circle":985042,"home-circle-outline":987213,"home-city":986389,"home-city-outline":986390,"home-currency-usd":985263,"home-edit":987481,"home-edit-outline":987482,"home-export-outline":987035,"home-flood":986874,"home-floor-0":986578,"home-floor-1":986496,"home-floor-2":986497,"home-floor-3":986498,"home-floor-a":986499,"home-floor-b":986500,"home-floor-g":986501,"home-floor-l":986502,"home-floor-negative-1":986579,"home-group":986580,"home-heart":985127,"home-import-outline":987036,"home-lightbulb":987729,"home-lightbulb-outline":987730,"home-lock":985323,"home-lock-open":985324,"home-map-marker":984568,"home-minus":985460,"home-minus-outline":988117,"home-modern":983773,"home-outline":984737,"home-plus":985461,"home-plus-outline":988118,"home-remove":987719,"home-remove-outline":988119,"home-roof":987435,"home-search":988080,"home-search-outline":988081,"home-thermometer":986964,"home-thermometer-outline":986965,"home-variant":983774,"home-variant-outline":986023,"hook":984802,"hook-off":984803,"hops":983775,"horizontal-rotate-clockwise":987379,"horizontal-rotate-counterclockwise":987380,"horseshoe":985688,"hospital":987126,"hospital-box":983776,"hospital-box-outline":987127,"hospital-building":983777,"hospital-marker":983778,"hot-tub":985128,"hours-24":988280,"hubspot":986391,"hulu":985129,"human":983782,"human-baby-changing-table":988043,"human-child":983783,"human-female":984649,"human-female-boy":985689,"human-female-female":985690,"human-female-girl":985691,"human-greeting":984650,"human-handsdown":984651,"human-handsup":984652,"human-male":984653,"human-male-boy":985692,"human-male-child":988044,"human-male-female":983784,"human-male-girl":985693,"human-male-height":986875,"human-male-height-variant":986876,"human-male-male":985694,"human-pregnant":984527,"human-wheelchair":988045,"humble-bundle":984900,"hvac":987986,"hydraulic-oil-level":987940,"hydraulic-oil-temperature":987941,"hydro-power":987877,"ice-cream":985130,"ice-cream-off":986706,"ice-pop":986877,"id-card":987072,"identifier":986878,"ideogram-cjk":987953,"ideogram-cjk-variant":987954,"iframe":986251,"iframe-array":987381,"iframe-array-outline":987382,"iframe-braces":987383,"iframe-braces-outline":987384,"iframe-outline":986252,"iframe-parentheses":987385,"iframe-parentheses-outline":987386,"iframe-variable":987387,"iframe-variable-outline":987388,"image":983785,"image-album":983786,"image-area":983787,"image-area-close":983788,"image-auto-adjust":987073,"image-broken":983789,"image-broken-variant":983790,"image-edit":987619,"image-edit-outline":987620,"image-filter-black-white":983792,"image-filter-center-focus":983793,"image-filter-center-focus-strong":986879,"image-filter-center-focus-strong-outline":986880,"image-filter-center-focus-weak":983794,"image-filter-drama":983795,"image-filter-frames":983796,"image-filter-hdr":983797,"image-filter-none":983798,"image-filter-tilt-shift":983799,"image-filter-vintage":983800,"image-frame":986697,"image-minus":988185,"image-move":985592,"image-multiple":983801,"image-multiple-outline":983791,"image-off":985131,"image-off-outline":987601,"image-outline":985462,"image-plus":985212,"image-remove":988184,"image-search":985463,"image-search-outline":985464,"image-size-select-actual":986253,"image-size-select-large":986254,"image-size-select-small":986255,"import":983802,"inbox":984711,"inbox-arrow-down":983803,"inbox-arrow-down-outline":987760,"inbox-arrow-up":984017,"inbox-arrow-up-outline":987761,"inbox-full":987762,"inbox-full-outline":987763,"inbox-multiple":985264,"inbox-multiple-outline":986024,"inbox-outline":987764,"incognito":984569,"incognito-circle":988193,"incognito-circle-off":988194,"incognito-off":983157,"infinity":984804,"information":983804,"information-outline":983805,"information-variant":984654,"instagram":983806,"instrument-triangle":987214,"invert-colors":983809,"invert-colors-off":986698,"iobroker":987880,"ip":985695,"ip-network":985696,"ip-network-outline":986256,"ipod":986257,"islam":985465,"island":987215,"iv-bag":987321,"jabber":986581,"jeepney":983810,"jellyfish":986881,"jellyfish-outline":986882,"jira":983811,"jquery":985213,"jsfiddle":983812,"judaism":985466,"jump-rope":987903,"kabaddi":986503,"karate":985132,"keg":983813,"kettle":984570,"kettle-alert":987927,"kettle-alert-outline":987928,"kettle-off":987931,"kettle-off-outline":987932,"kettle-outline":986966,"kettle-steam":987929,"kettle-steam-outline":987930,"kettlebell":987904,"key":983814,"key-arrow-right":987922,"key-change":983815,"key-link":987551,"key-minus":983816,"key-outline":986582,"key-plus":983817,"key-remove":983818,"key-star":987550,"key-variant":983819,"key-wireless":987074,"keyboard":983820,"keyboard-backspace":983821,"keyboard-caps":983822,"keyboard-close":983823,"keyboard-esc":987831,"keyboard-f1":987819,"keyboard-f10":987828,"keyboard-f11":987829,"keyboard-f12":987830,"keyboard-f2":987820,"keyboard-f3":987821,"keyboard-f4":987822,"keyboard-f5":987823,"keyboard-f6":987824,"keyboard-f7":987825,"keyboard-f8":987826,"keyboard-f9":987827,"keyboard-off":983824,"keyboard-off-outline":986699,"keyboard-outline":985467,"keyboard-return":983825,"keyboard-settings":985593,"keyboard-settings-outline":985594,"keyboard-space":987216,"keyboard-tab":983826,"keyboard-variant":983827,"khanda":987389,"kickstarter":984901,"klingon":987995,"knife":985595,"knife-military":985596,"kodi":983828,"kubernetes":987390,"label":983829,"label-multiple":988021,"label-multiple-outline":988022,"label-off":985803,"label-off-outline":985804,"label-outline":983830,"label-percent":987882,"label-percent-outline":987883,"label-variant":985805,"label-variant-outline":985806,"ladybug":985133,"lambda":984615,"lamp":984757,"lan":983831,"lan-check":987818,"lan-connect":983832,"lan-disconnect":983833,"lan-pending":983834,"language-c":984689,"language-cpp":984690,"language-csharp":983835,"language-css3":983836,"language-fortran":987674,"language-go":985043,"language-haskell":986258,"language-html5":983837,"language-java":985911,"language-javascript":983838,"language-kotlin":987673,"language-lua":985265,"language-markdown":983892,"language-markdown-outline":986971,"language-php":983839,"language-python":983840,"language-r":985044,"language-ruby":986413,"language-ruby-on-rails":985807,"language-swift":984805,"language-typescript":984806,"language-xaml":984691,"laptop":983842,"laptop-chromebook":983843,"laptop-mac":983844,"laptop-off":984807,"laptop-windows":983845,"laravel":985808,"laser-pointer":988292,"lasso":986883,"lastpass":984134,"latitude":986967,"launch":983847,"lava-lamp":985045,"layers":983848,"layers-minus":986700,"layers-off":983849,"layers-off-outline":985597,"layers-outline":985598,"layers-plus":986701,"layers-remove":986702,"layers-search":987654,"layers-search-outline":987655,"layers-triple":986968,"layers-triple-outline":986969,"lead-pencil":984655,"leaf":983850,"leaf-maple":986259,"leaf-maple-off":987866,"leaf-off":987865,"leak":986583,"leak-off":986584,"led-off":983851,"led-on":983852,"led-outline":983853,"led-strip":985046,"led-strip-variant":987217,"led-variant-off":983854,"led-variant-on":983855,"led-variant-outline":983856,"leek":987517,"less-than":985468,"less-than-or-equal":985469,"library":983857,"library-shelves":986025,"license":987075,"lifebuoy":985214,"light-switch":985470,"lightbulb":983861,"lightbulb-cfl":987656,"lightbulb-cfl-off":987657,"lightbulb-cfl-spiral":987765,"lightbulb-cfl-spiral-off":987843,"lightbulb-group":987731,"lightbulb-group-off":987853,"lightbulb-group-off-outline":987854,"lightbulb-group-outline":987732,"lightbulb-multiple":987733,"lightbulb-multiple-off":987855,"lightbulb-multiple-off-outline":987856,"lightbulb-multiple-outline":987734,"lightbulb-off":986703,"lightbulb-off-outline":986704,"lightbulb-on":984808,"lightbulb-on-outline":984809,"lightbulb-outline":983862,"lighthouse":985599,"lighthouse-on":985600,"lightning-bolt":988171,"lightning-bolt-outline":988172,"lingerie":988278,"link":983863,"link-box":986394,"link-box-outline":986395,"link-box-variant":986396,"link-box-variant-outline":986397,"link-lock":987322,"link-off":983864,"link-plus":986260,"link-variant":983865,"link-variant-minus":987391,"link-variant-off":983866,"link-variant-plus":987392,"link-variant-remove":987393,"linkedin":983867,"linux":983869,"linux-mint":985325,"lipstick":988085,"litecoin":985697,"loading":984946,"location-enter":987076,"location-exit":987077,"lock":983870,"lock-alert":985326,"lock-check":988058,"lock-clock":985471,"lock-open":983871,"lock-open-alert":988059,"lock-open-check":988060,"lock-open-outline":983872,"lock-open-variant":987078,"lock-open-variant-outline":987079,"lock-outline":983873,"lock-pattern":984810,"lock-plus":984571,"lock-question":985327,"lock-reset":984947,"lock-smart":985266,"locker":985047,"locker-multiple":985048,"login":983874,"login-variant":984572,"logout":983875,"logout-variant":984573,"longitude":986970,"looks":983876,"loupe":983877,"lumx":983878,"lungs":987268,"magnet":983879,"magnet-on":983880,"magnify":983881,"magnify-close":985472,"magnify-minus":983882,"magnify-minus-cursor":985698,"magnify-minus-outline":984812,"magnify-plus":983883,"magnify-plus-cursor":985699,"magnify-plus-outline":984813,"magnify-remove-cursor":987660,"magnify-remove-outline":987661,"magnify-scan":987766,"mail":986811,"mailbox":984814,"mailbox-open":986504,"mailbox-open-outline":986505,"mailbox-open-up":986506,"mailbox-open-up-outline":986507,"mailbox-outline":986508,"mailbox-up":986509,"mailbox-up-outline":986510,"map":983885,"map-check":986812,"map-check-outline":986813,"map-clock":986398,"map-clock-outline":986399,"map-legend":985601,"map-marker":983886,"map-marker-alert":986885,"map-marker-alert-outline":986886,"map-marker-check":986261,"map-marker-check-outline":987899,"map-marker-circle":983887,"map-marker-distance":985328,"map-marker-down":987394,"map-marker-left":987867,"map-marker-left-outline":987869,"map-marker-minus":984656,"map-marker-minus-outline":987897,"map-marker-multiple":983888,"map-marker-multiple-outline":987767,"map-marker-off":983889,"map-marker-off-outline":987901,"map-marker-outline":985049,"map-marker-path":986400,"map-marker-plus":984657,"map-marker-plus-outline":987896,"map-marker-question":986887,"map-marker-question-outline":986888,"map-marker-radius":983890,"map-marker-radius-outline":987900,"map-marker-remove":986889,"map-marker-remove-outline":987898,"map-marker-remove-variant":986890,"map-marker-right":987868,"map-marker-right-outline":987870,"map-marker-up":987395,"map-minus":985473,"map-outline":985474,"map-plus":985475,"map-search":985476,"map-search-outline":985477,"mapbox":986026,"margin":983891,"marker":984658,"marker-cancel":986585,"marker-check":983893,"mastodon":985809,"material-design":985478,"material-ui":983895,"math-compass":983896,"math-cos":986262,"math-integral":987080,"math-integral-box":987081,"math-log":987269,"math-norm":987082,"math-norm-box":987083,"math-sin":986263,"math-tan":986264,"matrix":984616,"medal":985479,"medal-outline":987942,"medical-bag":984815,"meditation":987515,"memory":983899,"menu":983900,"menu-down":983901,"menu-down-outline":984758,"menu-left":983902,"menu-left-outline":985602,"menu-open":986027,"menu-right":983903,"menu-right-outline":985603,"menu-swap":985700,"menu-swap-outline":985701,"menu-up":983904,"menu-up-outline":984759,"merge":986972,"message":983905,"message-alert":983906,"message-alert-outline":985604,"message-arrow-left":987890,"message-arrow-left-outline":987891,"message-arrow-right":987892,"message-arrow-right-outline":987893,"message-bulleted":984738,"message-bulleted-off":984739,"message-cog":984817,"message-cog-outline":987506,"message-draw":983907,"message-image":983908,"message-image-outline":987500,"message-lock":987084,"message-lock-outline":987501,"message-minus":987502,"message-minus-outline":987503,"message-outline":983909,"message-plus":984659,"message-plus-outline":987323,"message-processing":983910,"message-processing-outline":987504,"message-reply":983911,"message-reply-text":983912,"message-settings":984816,"message-settings-outline":987505,"message-text":983913,"message-text-clock":987507,"message-text-clock-outline":987508,"message-text-lock":987085,"message-text-lock-outline":987509,"message-text-outline":983914,"message-video":983915,"meteor":984617,"metronome":985050,"metronome-tick":985051,"micro-sd":985052,"microphone":983916,"microphone-minus":985267,"microphone-off":983917,"microphone-outline":983918,"microphone-plus":985268,"microphone-settings":983919,"microphone-variant":983920,"microphone-variant-off":983921,"microscope":984660,"microsoft":983922,"microsoft-access":988046,"microsoft-azure":985093,"microsoft-azure-devops":987093,"microsoft-bing":983204,"microsoft-dynamics-365":985480,"microsoft-edge":983529,"microsoft-edge-legacy":987728,"microsoft-excel":988047,"microsoft-internet-explorer":983808,"microsoft-office":984006,"microsoft-onedrive":984010,"microsoft-onenote":984903,"microsoft-outlook":986402,"microsoft-powerpoint":988048,"microsoft-sharepoint":988049,"microsoft-teams":983739,"microsoft-visual-studio":984592,"microsoft-visual-studio-code":985630,"microsoft-windows":984499,"microsoft-windows-classic":985633,"microsoft-word":988050,"microsoft-xbox":984505,"microsoft-xbox-controller":984506,"microsoft-xbox-controller-battery-alert":984907,"microsoft-xbox-controller-battery-charging":985634,"microsoft-xbox-controller-battery-empty":984908,"microsoft-xbox-controller-battery-full":984909,"microsoft-xbox-controller-battery-low":984910,"microsoft-xbox-controller-battery-medium":984911,"microsoft-xbox-controller-battery-unknown":984912,"microsoft-xbox-controller-menu":986735,"microsoft-xbox-controller-off":984507,"microsoft-xbox-controller-view":986736,"microsoft-yammer":984969,"microwave":986265,"microwave-off":988195,"middleware":986973,"middleware-outline":986974,"midi":985329,"midi-port":985330,"mine":986586,"minecraft":983923,"mini-sd":985605,"minidisc":985606,"minus":983924,"minus-box":983925,"minus-box-multiple":987457,"minus-box-multiple-outline":987458,"minus-box-outline":984818,"minus-circle":983926,"minus-circle-multiple":983898,"minus-circle-multiple-outline":985811,"minus-circle-off":988249,"minus-circle-off-outline":988250,"minus-circle-outline":983927,"minus-network":983928,"minus-network-outline":986266,"mirror":987645,"mixed-martial-arts":986511,"mixed-reality":985215,"mixer":985053,"molecule":986028,"molecule-co":987902,"molecule-co2":985060,"monitor":983929,"monitor-cellphone":985481,"monitor-cellphone-star":985482,"monitor-clean":987396,"monitor-dashboard":985607,"monitor-edit":987846,"monitor-eye":988084,"monitor-lock":986587,"monitor-multiple":983930,"monitor-off":986512,"monitor-screenshot":986705,"monitor-share":988291,"monitor-speaker":986975,"monitor-speaker-off":986976,"monitor-star":986588,"moon-first-quarter":986977,"moon-full":986978,"moon-last-quarter":986979,"moon-new":986980,"moon-waning-crescent":986981,"moon-waning-gibbous":986982,"moon-waxing-crescent":986983,"moon-waxing-gibbous":986984,"moped":987270,"more":983931,"mother-heart":987924,"mother-nurse":986401,"motion-sensor":986513,"motion-sensor-off":988213,"motorbike":983932,"mouse":983933,"mouse-bluetooth":985483,"mouse-off":983934,"mouse-variant":983935,"mouse-variant-off":983936,"move-resize":984661,"move-resize-variant":984662,"movie":983937,"movie-edit":987426,"movie-edit-outline":987427,"movie-filter":987428,"movie-filter-outline":987429,"movie-open":987086,"movie-open-outline":987087,"movie-outline":986589,"movie-roll":985054,"movie-search":987602,"movie-search-outline":987603,"muffin":985484,"multiplication":983938,"multiplication-box":983939,"mushroom":985055,"mushroom-off":988154,"mushroom-off-outline":988155,"mushroom-outline":985056,"music":984922,"music-accidental-double-flat":986985,"music-accidental-double-sharp":986986,"music-accidental-flat":986987,"music-accidental-natural":986988,"music-accidental-sharp":986989,"music-box":983940,"music-box-multiple":983859,"music-box-multiple-outline":986884,"music-box-outline":983941,"music-circle":983942,"music-circle-outline":985812,"music-clef-alto":986990,"music-clef-bass":986991,"music-clef-treble":986992,"music-note":983943,"music-note-bluetooth":984574,"music-note-bluetooth-off":984575,"music-note-eighth":983944,"music-note-eighth-dotted":986993,"music-note-half":983945,"music-note-half-dotted":986994,"music-note-off":983946,"music-note-off-outline":986995,"music-note-outline":986996,"music-note-plus":986590,"music-note-quarter":983947,"music-note-quarter-dotted":986997,"music-note-sixteenth":983948,"music-note-sixteenth-dotted":986998,"music-note-whole":983949,"music-note-whole-dotted":986999,"music-off":984923,"music-rest-eighth":987000,"music-rest-half":987001,"music-rest-quarter":987002,"music-rest-sixteenth":987003,"music-rest-whole":987004,"nail":986591,"nas":985331,"nativescript":985216,"nature":983950,"nature-people":983951,"navigation":983952,"near-me":984525,"necklace":986891,"needle":983953,"netflix":984902,"network":984819,"network-off":986267,"network-off-outline":986268,"network-outline":986269,"network-strength-1":985332,"network-strength-1-alert":985333,"network-strength-2":985334,"network-strength-2-alert":985335,"network-strength-3":985336,"network-strength-3-alert":985337,"network-strength-4":985338,"network-strength-4-alert":985339,"network-strength-off":985340,"network-strength-off-outline":985341,"network-strength-outline":985342,"new-box":983956,"newspaper":983957,"newspaper-minus":986892,"newspaper-plus":986893,"newspaper-variant":987137,"newspaper-variant-multiple":987138,"newspaper-variant-multiple-outline":987139,"newspaper-variant-outline":987140,"nfc":983958,"nfc-search-variant":986707,"nfc-tap":983959,"nfc-variant":983960,"nfc-variant-off":986708,"ninja":984948,"nintendo-game-boy":988051,"nintendo-switch":985057,"nintendo-wii":984491,"nintendo-wiiu":984877,"nix":987397,"nodejs":983961,"noodles":987518,"not-equal":985485,"not-equal-variant":985486,"note":983962,"note-multiple":984760,"note-multiple-outline":984761,"note-outline":983963,"note-plus":983964,"note-plus-outline":983965,"note-text":983966,"note-text-outline":987607,"notebook":985134,"notebook-multiple":986709,"notebook-outline":986815,"notification-clear-all":983967,"npm":984823,"nuke":984740,"null":985058,"numeric":983968,"numeric-0":985913,"numeric-0-box":983969,"numeric-0-box-multiple":986894,"numeric-0-box-multiple-outline":983970,"numeric-0-box-outline":983971,"numeric-0-circle":986270,"numeric-0-circle-outline":986271,"numeric-1":985914,"numeric-1-box":983972,"numeric-1-box-multiple":986895,"numeric-1-box-multiple-outline":983973,"numeric-1-box-outline":983974,"numeric-1-circle":986272,"numeric-1-circle-outline":986273,"numeric-10":987113,"numeric-10-box":987005,"numeric-10-box-multiple":987114,"numeric-10-box-multiple-outline":987115,"numeric-10-box-outline":987006,"numeric-10-circle":987116,"numeric-10-circle-outline":987117,"numeric-2":985915,"numeric-2-box":983975,"numeric-2-box-multiple":986896,"numeric-2-box-multiple-outline":983976,"numeric-2-box-outline":983977,"numeric-2-circle":986274,"numeric-2-circle-outline":986275,"numeric-3":985916,"numeric-3-box":983978,"numeric-3-box-multiple":986897,"numeric-3-box-multiple-outline":983979,"numeric-3-box-outline":983980,"numeric-3-circle":986276,"numeric-3-circle-outline":986277,"numeric-4":985917,"numeric-4-box":983981,"numeric-4-box-multiple":986898,"numeric-4-box-multiple-outline":983986,"numeric-4-box-outline":983982,"numeric-4-circle":986278,"numeric-4-circle-outline":986279,"numeric-5":985918,"numeric-5-box":983985,"numeric-5-box-multiple":986899,"numeric-5-box-multiple-outline":983983,"numeric-5-box-outline":983984,"numeric-5-circle":986280,"numeric-5-circle-outline":986281,"numeric-6":985919,"numeric-6-box":983987,"numeric-6-box-multiple":986900,"numeric-6-box-multiple-outline":983988,"numeric-6-box-outline":983989,"numeric-6-circle":986282,"numeric-6-circle-outline":986283,"numeric-7":985920,"numeric-7-box":983990,"numeric-7-box-multiple":986901,"numeric-7-box-multiple-outline":983991,"numeric-7-box-outline":983992,"numeric-7-circle":986284,"numeric-7-circle-outline":986285,"numeric-8":985921,"numeric-8-box":983993,"numeric-8-box-multiple":986902,"numeric-8-box-multiple-outline":983994,"numeric-8-box-outline":983995,"numeric-8-circle":986286,"numeric-8-circle-outline":986287,"numeric-9":985922,"numeric-9-box":983996,"numeric-9-box-multiple":986903,"numeric-9-box-multiple-outline":983997,"numeric-9-box-outline":983998,"numeric-9-circle":986288,"numeric-9-circle-outline":986289,"numeric-9-plus":987118,"numeric-9-plus-box":983999,"numeric-9-plus-box-multiple":986904,"numeric-9-plus-box-multiple-outline":984000,"numeric-9-plus-box-outline":984001,"numeric-9-plus-circle":986290,"numeric-9-plus-circle-outline":986291,"numeric-negative-1":987218,"nut":984824,"nutrition":984002,"nuxt":987398,"oar":984700,"ocarina":986592,"oci":987881,"ocr":987450,"octagon":984003,"octagon-outline":984004,"octagram":984825,"octagram-outline":984949,"odnoklassniki":984005,"offer":987675,"office-building":985489,"oil":984007,"oil-lamp":986905,"oil-level":987219,"oil-temperature":987128,"omega":984009,"one-up":986029,"onepassword":985217,"opacity":984524,"open-in-app":984011,"open-in-new":984012,"open-source-initiative":986030,"openid":984013,"opera":984014,"orbit":983064,"order-alphabetical-ascending":983565,"order-alphabetical-descending":986375,"order-bool-ascending":983742,"order-bool-ascending-variant":985487,"order-bool-descending":988036,"order-bool-descending-variant":985488,"order-numeric-ascending":984389,"order-numeric-descending":984390,"origin":985923,"ornament":984015,"ornament-variant":984016,"outdoor-lamp":987220,"overscan":987141,"owl":984018,"pac-man":986031,"package":984019,"package-down":984020,"package-up":984021,"package-variant":984022,"package-variant-closed":984023,"page-first":984576,"page-last":984577,"page-layout-body":984826,"page-layout-footer":984827,"page-layout-header":984828,"page-layout-header-footer":987007,"page-layout-sidebar-left":984829,"page-layout-sidebar-right":984830,"page-next":986032,"page-next-outline":986033,"page-previous":986034,"page-previous-outline":986035,"pail":988183,"pail-minus":988215,"pail-minus-outline":988220,"pail-off":988217,"pail-off-outline":988222,"pail-outline":988218,"pail-plus":988214,"pail-plus-outline":988219,"pail-remove":988216,"pail-remove-outline":988221,"palette":984024,"palette-advanced":984025,"palette-outline":986636,"palette-swatch":985269,"palette-swatch-outline":987996,"palm-tree":987221,"pan":986036,"pan-bottom-left":986037,"pan-bottom-right":986038,"pan-down":986039,"pan-horizontal":986040,"pan-left":986041,"pan-right":986042,"pan-top-left":986043,"pan-top-right":986044,"pan-up":986045,"pan-vertical":986046,"panda":984026,"pandora":984027,"panorama":984028,"panorama-fisheye":984029,"panorama-horizontal":984030,"panorama-vertical":984031,"panorama-wide-angle":984032,"paper-cut-vertical":984033,"paper-roll":987479,"paper-roll-outline":987480,"paperclip":984034,"parachute":986292,"parachute-outline":986293,"parking":984035,"party-popper":987222,"passport":985059,"passport-biometric":986593,"pasta":987488,"patio-heater":987008,"patreon":985218,"pause":984036,"pause-circle":984037,"pause-circle-outline":984038,"pause-octagon":984039,"pause-octagon-outline":984040,"paw":984041,"paw-off":984663,"pdf-box":986710,"peace":985220,"peanut":987132,"peanut-off":987133,"peanut-off-outline":987135,"peanut-outline":987134,"pen":984042,"pen-lock":986594,"pen-minus":986595,"pen-off":986596,"pen-plus":986597,"pen-remove":986598,"pencil":984043,"pencil-box":984044,"pencil-box-multiple":987460,"pencil-box-multiple-outline":987461,"pencil-box-outline":984045,"pencil-circle":984831,"pencil-circle-outline":984950,"pencil-lock":984046,"pencil-lock-outline":986599,"pencil-minus":986600,"pencil-minus-outline":986601,"pencil-off":984047,"pencil-off-outline":986602,"pencil-outline":986294,"pencil-plus":986603,"pencil-plus-outline":986604,"pencil-remove":986605,"pencil-remove-outline":986606,"pencil-ruler":987987,"penguin":986816,"pentagon":984833,"pentagon-outline":984832,"percent":984048,"percent-outline":987768,"periodic-table":985270,"perspective-less":986403,"perspective-more":986404,"pharmacy":984049,"phone":984050,"phone-alert":986906,"phone-alert-outline":987534,"phone-bluetooth":984051,"phone-bluetooth-outline":987535,"phone-cancel":987324,"phone-cancel-outline":987536,"phone-check":987561,"phone-check-outline":987562,"phone-classic":984578,"phone-classic-off":987769,"phone-forward":984052,"phone-forward-outline":987537,"phone-hangup":984053,"phone-hangup-outline":987538,"phone-in-talk":984054,"phone-in-talk-outline":987522,"phone-incoming":984055,"phone-incoming-outline":987539,"phone-lock":984056,"phone-lock-outline":987540,"phone-log":984057,"phone-log-outline":987541,"phone-message":987542,"phone-message-outline":987543,"phone-minus":984664,"phone-minus-outline":987544,"phone-missed":984058,"phone-missed-outline":987557,"phone-off":986607,"phone-off-outline":987558,"phone-outgoing":984059,"phone-outgoing-outline":987545,"phone-outline":986608,"phone-paused":984060,"phone-paused-outline":987546,"phone-plus":984665,"phone-plus-outline":987547,"phone-return":985135,"phone-return-outline":987548,"phone-ring":987563,"phone-ring-outline":987564,"phone-rotate-landscape":985221,"phone-rotate-portrait":985222,"phone-settings":984061,"phone-settings-outline":987549,"phone-voip":984062,"pi":984063,"pi-box":984064,"pi-hole":986609,"piano":984701,"pickaxe":985271,"picture-in-picture-bottom-right":986711,"picture-in-picture-bottom-right-outline":986712,"picture-in-picture-top-right":986713,"picture-in-picture-top-right-outline":986714,"pier":985223,"pier-crane":985224,"pig":984065,"pig-variant":987142,"piggy-bank":987143,"pill":984066,"pillar":984834,"pin":984067,"pin-off":984068,"pin-off-outline":985392,"pin-outline":985393,"pine-tree":984069,"pine-tree-box":984070,"pine-tree-fire":988186,"pinterest":984071,"pinwheel":985813,"pinwheel-outline":985814,"pipe":985061,"pipe-disconnected":985062,"pipe-leak":985225,"pipe-wrench":987988,"pirate":985608,"pistol":984835,"piston":985226,"pizza":984073,"play":984074,"play-box":987770,"play-box-multiple":986393,"play-box-multiple-outline":988134,"play-box-outline":984075,"play-circle":984076,"play-circle-outline":984077,"play-network":985227,"play-network-outline":986295,"play-outline":986907,"play-pause":984078,"play-protected-content":984079,"play-speed":985343,"playlist-check":984519,"playlist-edit":985344,"playlist-minus":984080,"playlist-music":986296,"playlist-music-outline":986297,"playlist-play":984081,"playlist-plus":984082,"playlist-remove":984083,"playlist-star":986610,"plex":984762,"plus":984085,"plus-box":984086,"plus-box-multiple":983860,"plus-box-multiple-outline":987459,"plus-box-outline":984836,"plus-circle":984087,"plus-circle-multiple":983884,"plus-circle-multiple-outline":984088,"plus-circle-outline":984089,"plus-minus":985490,"plus-minus-box":985491,"plus-minus-variant":988361,"plus-network":984090,"plus-network-outline":986298,"plus-one":984091,"plus-outline":984837,"plus-thick":987628,"podcast":985492,"podium":986405,"podium-bronze":986406,"podium-gold":986407,"podium-silver":986408,"point-of-sale":986514,"pokeball":984093,"pokemon-go":985609,"poker-chip":985136,"polaroid":984094,"police-badge":987495,"police-badge-outline":987496,"poll":984095,"poll-box":984096,"poll-box-outline":987771,"polo":988355,"polymer":984097,"pool":984582,"popcorn":984098,"post":987144,"post-outline":987145,"postage-stamp":986299,"pot":983781,"pot-mix":984667,"pot-mix-outline":984695,"pot-outline":983807,"pot-steam":984666,"pot-steam-outline":983846,"pound":984099,"pound-box":984100,"pound-box-outline":987519,"power":984101,"power-cycle":985345,"power-off":985346,"power-on":985347,"power-plug":984741,"power-plug-off":984742,"power-plug-off-outline":988196,"power-plug-outline":988197,"power-settings":984102,"power-sleep":985348,"power-socket":984103,"power-socket-au":985349,"power-socket-de":987399,"power-socket-eu":985063,"power-socket-fr":987400,"power-socket-jp":987401,"power-socket-uk":985064,"power-socket-us":985065,"power-standby":985350,"powershell":985610,"prescription":984838,"presentation":984104,"presentation-play":984105,"printer":984106,"printer-3d":984107,"printer-3d-nozzle":986715,"printer-3d-nozzle-alert":987584,"printer-3d-nozzle-alert-outline":987585,"printer-3d-nozzle-outline":986716,"printer-alert":984108,"printer-check":987462,"printer-eye":988248,"printer-off":986717,"printer-pos":987223,"printer-search":988247,"printer-settings":984839,"printer-wireless":985611,"priority-high":984579,"priority-low":984580,"professional-hexagon":984109,"progress-alert":986300,"progress-check":985493,"progress-clock":985494,"progress-close":987402,"progress-download":985495,"progress-upload":985496,"progress-wrench":986301,"projector":984110,"projector-screen":984111,"propane-tank":987991,"propane-tank-outline":987992,"protocol":987096,"publish":984743,"pulse":984112,"pump":988162,"pumpkin":986047,"purse":986908,"purse-outline":986909,"puzzle":984113,"puzzle-check":988198,"puzzle-check-outline":988199,"puzzle-edit":988371,"puzzle-edit-outline":988377,"puzzle-heart":988372,"puzzle-heart-outline":988378,"puzzle-minus":988369,"puzzle-minus-outline":988375,"puzzle-outline":985702,"puzzle-plus":988368,"puzzle-plus-outline":988374,"puzzle-remove":988370,"puzzle-remove-outline":988376,"puzzle-star":988373,"puzzle-star-outline":988379,"qi":985497,"qqchat":984581,"qrcode":984114,"qrcode-edit":985272,"qrcode-minus":987532,"qrcode-plus":987531,"qrcode-remove":987533,"qrcode-scan":984115,"quadcopter":984116,"quality-high":984117,"quality-low":985612,"quality-medium":985613,"quora":986409,"rabbit":985351,"racing-helmet":986515,"racquetball":986516,"radar":984119,"radiator":984120,"radiator-disabled":985815,"radiator-off":985816,"radio":984121,"radio-am":986302,"radio-fm":986303,"radio-handheld":984122,"radio-off":987676,"radio-tower":984123,"radioactive":984124,"radioactive-off":986817,"radiobox-blank":984125,"radiobox-marked":984126,"radiology-box":988357,"radiology-box-outline":988358,"radius":986304,"radius-outline":986305,"railroad-light":986910,"raspberry-pi":984127,"ray-end":984128,"ray-end-arrow":984129,"ray-start":984130,"ray-start-arrow":984131,"ray-start-end":984132,"ray-vertex":984133,"react":984840,"read":984135,"receipt":984137,"record":984138,"record-circle":986818,"record-circle-outline":986819,"record-player":985498,"record-rec":984139,"rectangle":986718,"rectangle-outline":986719,"recycle":984140,"recycle-variant":988061,"reddit":984141,"redhat":987419,"redo":984142,"redo-variant":984143,"reflect-horizontal":985614,"reflect-vertical":985615,"refresh":984144,"refresh-circle":988023,"regex":984145,"registered-trademark":985703,"relation-many-to-many":988310,"relation-many-to-one":988311,"relation-many-to-one-or-many":988312,"relation-many-to-only-one":988313,"relation-many-to-zero-or-many":988314,"relation-many-to-zero-or-one":988315,"relation-one-or-many-to-many":988316,"relation-one-or-many-to-one":988317,"relation-one-or-many-to-one-or-many":988318,"relation-one-or-many-to-only-one":988319,"relation-one-or-many-to-zero-or-many":988320,"relation-one-or-many-to-zero-or-one":988321,"relation-one-to-many":988322,"relation-one-to-one":988323,"relation-one-to-one-or-many":988324,"relation-one-to-only-one":988325,"relation-one-to-zero-or-many":988326,"relation-one-to-zero-or-one":988327,"relation-only-one-to-many":988328,"relation-only-one-to-one":988329,"relation-only-one-to-one-or-many":988330,"relation-only-one-to-only-one":988331,"relation-only-one-to-zero-or-many":988332,"relation-only-one-to-zero-or-one":988333,"relation-zero-or-many-to-many":988334,"relation-zero-or-many-to-one":988335,"relation-zero-or-many-to-one-or-many":988336,"relation-zero-or-many-to-only-one":988337,"relation-zero-or-many-to-zero-or-many":988338,"relation-zero-or-many-to-zero-or-one":988339,"relation-zero-or-one-to-many":988340,"relation-zero-or-one-to-one":988341,"relation-zero-or-one-to-one-or-many":988342,"relation-zero-or-one-to-only-one":988343,"relation-zero-or-one-to-zero-or-many":988344,"relation-zero-or-one-to-zero-or-one":988345,"relative-scale":984146,"reload":984147,"reload-alert":987403,"reminder":985228,"remote":984148,"remote-desktop":985273,"remote-off":986820,"remote-tv":986821,"remote-tv-off":986822,"rename-box":984149,"reorder-horizontal":984712,"reorder-vertical":984713,"repeat":984150,"repeat-off":984151,"repeat-once":984152,"replay":984153,"reply":984154,"reply-all":984155,"reply-all-outline":986911,"reply-circle":987566,"reply-outline":986912,"reproduction":984156,"resistor":985924,"resistor-nodes":985925,"resize":985704,"resize-bottom-right":984157,"responsive":984158,"restart":984841,"restart-alert":987404,"restart-off":986517,"restore":985499,"restore-alert":987405,"rewind":984159,"rewind-10":986410,"rewind-30":986518,"rewind-5":987641,"rewind-outline":984842,"rhombus":984843,"rhombus-medium":985616,"rhombus-medium-outline":988380,"rhombus-outline":984844,"rhombus-split":985617,"rhombus-split-outline":988381,"ribbon":984160,"rice":985066,"ring":985067,"rivet":986720,"road":984161,"road-variant":984162,"robber":987224,"robot":984745,"robot-industrial":985926,"robot-mower":987639,"robot-mower-outline":987635,"robot-vacuum":984845,"robot-vacuum-variant":985352,"rocket":984163,"rocket-launch":988382,"rocket-launch-outline":988383,"rocket-outline":988079,"rodent":987943,"roller-skate":986411,"roller-skate-off":983365,"rollerblade":986412,"rollerblade-off":983086,"rollupjs":986048,"roman-numeral-1":987272,"roman-numeral-10":987281,"roman-numeral-2":987273,"roman-numeral-3":987274,"roman-numeral-4":987275,"roman-numeral-5":987276,"roman-numeral-6":987277,"roman-numeral-7":987278,"roman-numeral-8":987279,"roman-numeral-9":987280,"room-service":985229,"room-service-outline":986519,"rotate-3d":986823,"rotate-3d-variant":984164,"rotate-left":984165,"rotate-left-variant":984166,"rotate-orbit":986520,"rotate-right":984167,"rotate-right-variant":984168,"rounded-corner":984583,"router":987618,"router-network":987271,"router-wireless":984169,"router-wireless-settings":985705,"routes":984170,"routes-clock":987225,"rowing":984584,"rss":984171,"rss-box":984172,"rss-off":986913,"rug":988277,"rugby":986521,"ruler":984173,"ruler-square":986306,"ruler-square-compass":986814,"run":984846,"run-fast":984174,"rv-truck":987604,"sack":986414,"sack-percent":986415,"safe":985706,"safe-square":987772,"safe-square-outline":987773,"safety-goggles":986416,"sail-boat":986824,"sale":984175,"salesforce":985230,"sass":985068,"satellite":984176,"satellite-uplink":985353,"satellite-variant":984177,"sausage":985274,"saw-blade":986721,"sawtooth-wave":988282,"saxophone":984585,"scale":984178,"scale-balance":984529,"scale-bathroom":984179,"scale-off":987226,"scan-helper":988120,"scanner":984747,"scanner-off":985354,"scatter-plot":986825,"scatter-plot-outline":986826,"school":984180,"school-outline":987520,"scissors-cutting":985707,"scooter":987625,"scoreboard":987774,"scoreboard-outline":987775,"screen-rotation":984181,"screen-rotation-lock":984184,"screw-flat-top":986611,"screw-lag":986612,"screw-machine-flat-top":986613,"screw-machine-round-top":986614,"screw-round-top":986615,"screwdriver":984182,"script":986049,"script-outline":984183,"script-text":986050,"script-text-outline":986051,"sd":984185,"seal":984186,"seal-variant":987097,"search-web":984847,"seat":986307,"seat-flat":984187,"seat-flat-angled":984188,"seat-individual-suite":984189,"seat-legroom-extra":984190,"seat-legroom-normal":984191,"seat-legroom-reduced":984192,"seat-outline":986308,"seat-passenger":987721,"seat-recline-extra":984193,"seat-recline-normal":984194,"seatbelt":986309,"security":984195,"security-network":984196,"seed":986722,"seed-off":988157,"seed-off-outline":988158,"seed-outline":986723,"segment":986827,"select":984197,"select-all":984198,"select-color":986417,"select-compare":985817,"select-drag":985708,"select-group":987010,"select-inverse":984199,"select-marker":987776,"select-multiple":987777,"select-multiple-marker":987778,"select-off":984200,"select-place":987098,"select-search":987652,"selection":984201,"selection-drag":985709,"selection-ellipse":986418,"selection-ellipse-arrow-inside":986914,"selection-marker":987779,"selection-multiple":987781,"selection-multiple-marker":987780,"selection-off":984951,"selection-search":987653,"semantic-web":987926,"send":984202,"send-check":987489,"send-check-outline":987490,"send-circle":986616,"send-circle-outline":986617,"send-clock":987491,"send-clock-outline":987492,"send-lock":985069,"send-lock-outline":987494,"send-outline":987493,"serial-port":984668,"server":984203,"server-minus":984204,"server-network":984205,"server-network-off":984206,"server-off":984207,"server-plus":984208,"server-remove":984209,"server-security":984210,"set-all":984952,"set-center":984953,"set-center-right":984954,"set-left":984955,"set-left-center":984956,"set-left-right":984957,"set-merge":988384,"set-none":984958,"set-right":984959,"set-split":988385,"set-square":988253,"set-top-box":985503,"settings-helper":985710,"shaker":987406,"shaker-outline":987407,"shape":985137,"shape-circle-plus":984669,"shape-outline":985138,"shape-oval-plus":987642,"shape-plus":984213,"shape-polygon-plus":984670,"shape-rectangle-plus":984671,"shape-square-plus":984672,"share":984214,"share-all":987636,"share-all-outline":987637,"share-circle":987565,"share-off":986915,"share-off-outline":986916,"share-outline":985394,"share-variant":984215,"sheep":986310,"shield":984216,"shield-account":985231,"shield-account-outline":985618,"shield-airplane":984763,"shield-airplane-outline":986311,"shield-alert":986828,"shield-alert-outline":986829,"shield-bug":988122,"shield-bug-outline":988123,"shield-car":987011,"shield-check":984421,"shield-check-outline":986312,"shield-cross":986313,"shield-cross-outline":986314,"shield-edit":987552,"shield-edit-outline":987553,"shield-half":988000,"shield-half-full":984960,"shield-home":984714,"shield-home-outline":986315,"shield-key":986052,"shield-key-outline":986053,"shield-link-variant":986419,"shield-link-variant-outline":986420,"shield-lock":985501,"shield-lock-outline":986316,"shield-off":985502,"shield-off-outline":985500,"shield-outline":984217,"shield-plus":985818,"shield-plus-outline":985819,"shield-refresh":983210,"shield-refresh-outline":983520,"shield-remove":985820,"shield-remove-outline":985821,"shield-search":986522,"shield-star":987451,"shield-star-outline":987452,"shield-sun":987229,"shield-sun-outline":987230,"shield-sync":987554,"shield-sync-outline":987555,"ship-wheel":985139,"shoe-formal":985927,"shoe-heel":985928,"shoe-print":986618,"shopping":984218,"shopping-music":984219,"shopping-outline":987605,"shopping-search":987012,"shovel":984848,"shovel-off":984849,"shower":985504,"shower-head":985505,"shredder":984220,"shuffle":984221,"shuffle-disabled":984222,"shuffle-variant":984223,"shuriken":988031,"sigma":984224,"sigma-lower":984619,"sign-caution":984225,"sign-direction":984961,"sign-direction-minus":987136,"sign-direction-plus":987100,"sign-direction-remove":987101,"sign-real-estate":987416,"sign-text":984962,"signal":984226,"signal-2g":984850,"signal-3g":984851,"signal-4g":984852,"signal-5g":985711,"signal-cellular-1":985276,"signal-cellular-2":985277,"signal-cellular-3":985278,"signal-cellular-outline":985279,"signal-distance-variant":986724,"signal-hspa":984853,"signal-hspa-plus":984854,"signal-off":984963,"signal-variant":984586,"signature":986619,"signature-freehand":986620,"signature-image":986621,"signature-text":986622,"silo":985929,"silverware":984227,"silverware-clean":987102,"silverware-fork":984228,"silverware-fork-knife":985712,"silverware-spoon":984229,"silverware-variant":984230,"sim":984231,"sim-alert":984232,"sim-off":984233,"simple-icons":987933,"sina-weibo":985823,"sine-wave":985435,"sitemap":984234,"size-l":988070,"size-m":988069,"size-s":988068,"size-xl":988071,"size-xs":988067,"size-xxl":988072,"size-xxs":988066,"size-xxxl":988073,"skate":986421,"skateboard":988354,"skew-less":986422,"skew-more":986423,"ski":987908,"ski-cross-country":987909,"ski-water":987910,"skip-backward":984235,"skip-backward-outline":986917,"skip-forward":984236,"skip-forward-outline":986918,"skip-next":984237,"skip-next-circle":984673,"skip-next-circle-outline":984674,"skip-next-outline":986919,"skip-previous":984238,"skip-previous-circle":984675,"skip-previous-circle-outline":984676,"skip-previous-outline":986920,"skull":984716,"skull-crossbones":986054,"skull-crossbones-outline":986055,"skull-outline":986056,"skull-scan":988359,"skull-scan-outline":988360,"skype":984239,"skype-business":984240,"slack":984241,"slash-forward":987103,"slash-forward-box":987104,"sleep":984242,"sleep-off":984243,"slope-downhill":986623,"slope-uphill":986624,"slot-machine":987412,"slot-machine-outline":987413,"smart-card":987325,"smart-card-outline":987326,"smart-card-reader":987327,"smart-card-reader-outline":987328,"smog":985713,"smoke-detector":983954,"smoking":984244,"smoking-off":984245,"smoking-pipe":988173,"smoking-pipe-off":988200,"snapchat":984246,"snowboard":987911,"snowflake":984855,"snowflake-alert":986921,"snowflake-melt":987851,"snowflake-variant":986922,"snowman":984247,"soccer":984248,"soccer-field":985140,"sofa":984249,"solar-panel":986523,"solar-panel-large":986524,"solar-power":985714,"soldering-iron":987282,"solid":984717,"sony-playstation":984084,"sort":984250,"sort-alphabetical-ascending":984509,"sort-alphabetical-ascending-variant":987464,"sort-alphabetical-descending":984511,"sort-alphabetical-descending-variant":987465,"sort-alphabetical-variant":984251,"sort-ascending":984252,"sort-bool-ascending":988037,"sort-bool-ascending-variant":988038,"sort-bool-descending":988039,"sort-bool-descending-variant":988040,"sort-descending":984253,"sort-numeric-ascending":988041,"sort-numeric-ascending-variant":985357,"sort-numeric-descending":988042,"sort-numeric-descending-variant":985810,"sort-numeric-variant":984254,"sort-reverse-variant":983868,"sort-variant":984255,"sort-variant-lock":986317,"sort-variant-lock-open":986318,"sort-variant-remove":987463,"soundcloud":984256,"source-branch":984620,"source-branch-check":988367,"source-branch-minus":988363,"source-branch-plus":988362,"source-branch-refresh":988365,"source-branch-remove":988364,"source-branch-sync":988366,"source-commit":984856,"source-commit-end":984857,"source-commit-end-local":984858,"source-commit-local":984859,"source-commit-next-local":984860,"source-commit-start":984861,"source-commit-start-next-local":984862,"source-fork":984257,"source-merge":984621,"source-pull":984258,"source-repository":986319,"source-repository-multiple":986320,"soy-sauce":985070,"soy-sauce-off":988156,"spa":986321,"spa-outline":986322,"space-invaders":986057,"space-station":988035,"spade":986725,"speaker":984259,"speaker-bluetooth":985506,"speaker-multiple":986424,"speaker-off":984260,"speaker-wireless":984863,"speedometer":984261,"speedometer-medium":987013,"speedometer-slow":987014,"spellcheck":984262,"spider":987626,"spider-thread":987627,"spider-web":986058,"spoon-sugar":988201,"spotify":984263,"spotlight":984264,"spotlight-beam":984265,"spray":984677,"spray-bottle":985824,"sprinkler":987231,"sprinkler-variant":987232,"sprout":986726,"sprout-outline":986727,"square":984932,"square-edit-outline":985356,"square-medium":985619,"square-medium-outline":985620,"square-off":987886,"square-off-outline":987887,"square-outline":984931,"square-root":984964,"square-root-box":985507,"square-small":985621,"square-wave":988283,"squeegee":985825,"ssh":985280,"stack-exchange":984587,"stack-overflow":984268,"stackpath":983897,"stadium":987129,"stadium-variant":984864,"stairs":984269,"stairs-box":988062,"stairs-down":987838,"stairs-up":987837,"stamper":986425,"standard-definition":985071,"star":984270,"star-box":985715,"star-box-multiple":987782,"star-box-multiple-outline":987783,"star-box-outline":985716,"star-circle":984271,"star-circle-outline":985508,"star-face":985509,"star-four-points":985826,"star-four-points-outline":985827,"star-half":983622,"star-half-full":984272,"star-off":984273,"star-outline":984274,"star-three-points":985828,"star-three-points-outline":985829,"state-machine":987631,"steam":984275,"steering":984276,"steering-off":985358,"step-backward":984277,"step-backward-2":984278,"step-forward":984279,"step-forward-2":984280,"stethoscope":984281,"sticker":988004,"sticker-alert":988005,"sticker-alert-outline":988006,"sticker-check":988007,"sticker-check-outline":988008,"sticker-circle-outline":984528,"sticker-emoji":984965,"sticker-minus":988009,"sticker-minus-outline":988010,"sticker-outline":988011,"sticker-plus":988012,"sticker-plus-outline":988013,"sticker-remove":988014,"sticker-remove-outline":988015,"stocking":984282,"stomach":987283,"stop":984283,"stop-circle":984678,"stop-circle-outline":984679,"store":984284,"store-24-hour":984285,"store-outline":988001,"storefront":985031,"storefront-outline":987329,"stove":984286,"strategy":987606,"stretch-to-page":986923,"stretch-to-page-outline":986924,"string-lights":987834,"string-lights-off":987835,"subdirectory-arrow-left":984588,"subdirectory-arrow-right":984589,"subtitles":985622,"subtitles-outline":985623,"subway":984748,"subway-alert-variant":986525,"subway-variant":984287,"summit":984966,"sunglasses":984288,"surround-sound":984517,"surround-sound-2-0":985072,"surround-sound-3-1":985073,"surround-sound-5-1":985074,"surround-sound-7-1":985075,"svg":984865,"swap-horizontal":984289,"swap-horizontal-bold":986061,"swap-horizontal-circle":987105,"swap-horizontal-circle-outline":987106,"swap-horizontal-variant":985281,"swap-vertical":984290,"swap-vertical-bold":986062,"swap-vertical-circle":987107,"swap-vertical-circle-outline":987108,"swap-vertical-variant":985282,"swim":984291,"switch":984292,"sword":984293,"sword-cross":984967,"syllabary-hangul":987955,"syllabary-hiragana":987956,"syllabary-katakana":987957,"syllabary-katakana-halfwidth":987958,"symfony":985830,"sync":984294,"sync-alert":984295,"sync-circle":988024,"sync-off":984296,"tab":984297,"tab-minus":985931,"tab-plus":984924,"tab-remove":985932,"tab-unselected":984298,"table":984299,"table-account":988089,"table-alert":988090,"table-arrow-down":988091,"table-arrow-left":988092,"table-arrow-right":988093,"table-arrow-up":988094,"table-border":985624,"table-cancel":988095,"table-chair":987233,"table-check":988096,"table-clock":988097,"table-cog":988098,"table-column":985141,"table-column-plus-after":984300,"table-column-plus-before":984301,"table-column-remove":984302,"table-column-width":984303,"table-edit":984304,"table-eye":987284,"table-eye-off":988099,"table-furniture":984508,"table-headers-eye":987677,"table-headers-eye-off":987678,"table-heart":988100,"table-key":988101,"table-large":984305,"table-large-plus":987015,"table-large-remove":987016,"table-lock":988102,"table-merge-cells":985510,"table-minus":988103,"table-multiple":988104,"table-network":988105,"table-of-contents":985142,"table-off":988106,"table-plus":985717,"table-refresh":988064,"table-remove":985718,"table-row":985143,"table-row-height":984306,"table-row-plus-after":984307,"table-row-plus-before":984308,"table-row-remove":984309,"table-search":985359,"table-settings":985144,"table-split-cell":988202,"table-star":988107,"table-sync":988065,"table-tennis":986728,"tablet":984310,"tablet-android":984311,"tablet-cellphone":985511,"tablet-dashboard":986830,"tablet-ipad":984312,"taco":984930,"tag":984313,"tag-faces":984314,"tag-heart":984715,"tag-heart-outline":986063,"tag-minus":985360,"tag-minus-outline":987679,"tag-multiple":984315,"tag-multiple-outline":987895,"tag-off":987680,"tag-off-outline":987681,"tag-outline":984316,"tag-plus":984866,"tag-plus-outline":987682,"tag-remove":984867,"tag-remove-outline":987683,"tag-text":987684,"tag-text-outline":984317,"tailwind":988159,"tank":986426,"tanker-truck":987109,"tape-measure":985933,"target":984318,"target-account":986064,"target-variant":985719,"taxi":984319,"tea":986526,"tea-outline":986527,"teach":985232,"teamviewer":984320,"telegram":984321,"telescope":985934,"television":984322,"television-ambient-light":987990,"television-box":985145,"television-classic":985076,"television-classic-off":985146,"television-clean":987408,"television-guide":984323,"television-off":985147,"television-pause":987017,"television-play":986831,"television-stop":987018,"temperature-celsius":984324,"temperature-fahrenheit":984325,"temperature-kelvin":984326,"tennis":986528,"tennis-ball":984327,"tent":984328,"terraform":987234,"terrain":984329,"test-tube":984680,"test-tube-empty":985361,"test-tube-off":985362,"text":985512,"text-box":983578,"text-box-check":986790,"text-box-check-outline":986791,"text-box-minus":986792,"text-box-minus-outline":986793,"text-box-multiple":985783,"text-box-multiple-outline":985784,"text-box-outline":985581,"text-box-plus":986794,"text-box-plus-outline":986795,"text-box-remove":986796,"text-box-remove-outline":986797,"text-box-search":986798,"text-box-search-outline":986799,"text-recognition":987453,"text-search":988088,"text-shadow":984681,"text-short":985513,"text-subject":985514,"text-to-speech":984330,"text-to-speech-off":984331,"texture":984332,"texture-box":987110,"theater":984333,"theme-light-dark":984334,"thermometer":984335,"thermometer-alert":986625,"thermometer-chevron-down":986626,"thermometer-chevron-up":986627,"thermometer-high":987330,"thermometer-lines":984336,"thermometer-low":987331,"thermometer-minus":986628,"thermometer-plus":986629,"thermostat":983955,"thermostat-box":985233,"thought-bubble":985078,"thought-bubble-outline":985079,"thumb-down":984337,"thumb-down-outline":984338,"thumb-up":984339,"thumb-up-outline":984340,"thumbs-up-down":984341,"ticket":984342,"ticket-account":984343,"ticket-confirmation":984344,"ticket-confirmation-outline":988074,"ticket-outline":985363,"ticket-percent":984868,"ticket-percent-outline":988203,"tie":984345,"tilde":984869,"timelapse":984346,"timeline":986065,"timeline-alert":987029,"timeline-alert-outline":987032,"timeline-clock":987643,"timeline-clock-outline":987644,"timeline-help":987033,"timeline-help-outline":987034,"timeline-outline":986066,"timeline-plus":987030,"timeline-plus-outline":987031,"timeline-text":986067,"timeline-text-outline":986068,"timer":988075,"timer-10":984348,"timer-3":984349,"timer-off":988076,"timer-off-outline":984350,"timer-outline":984347,"timer-sand":984351,"timer-sand-empty":984749,"timer-sand-full":984972,"timetable":984352,"toaster":987235,"toaster-off":987575,"toaster-oven":986323,"toggle-switch":984353,"toggle-switch-off":984354,"toggle-switch-off-outline":985625,"toggle-switch-outline":985626,"toilet":985515,"toolbox":985516,"toolbox-outline":985517,"tools":987236,"tooltip":984355,"tooltip-account":983052,"tooltip-edit":984356,"tooltip-edit-outline":987845,"tooltip-image":984357,"tooltip-image-outline":986069,"tooltip-outline":984358,"tooltip-plus":986070,"tooltip-plus-outline":984359,"tooltip-text":984360,"tooltip-text-outline":986071,"tooth":985283,"tooth-outline":984361,"toothbrush":987433,"toothbrush-electric":987436,"toothbrush-paste":987434,"tortoise":986427,"toslink":987832,"tournament":985518,"tow-truck":985148,"tower-beach":984705,"tower-fire":984706,"toy-brick":987784,"toy-brick-marker":987785,"toy-brick-marker-outline":987786,"toy-brick-minus":987787,"toy-brick-minus-outline":987788,"toy-brick-outline":987789,"toy-brick-plus":987790,"toy-brick-plus-outline":987791,"toy-brick-remove":987792,"toy-brick-remove-outline":987793,"toy-brick-search":987794,"toy-brick-search-outline":987795,"track-light":985364,"trackpad":985080,"trackpad-lock":985395,"tractor":985234,"tractor-variant":988356,"trademark":985720,"traffic-cone":988028,"traffic-light":984363,"train":984364,"train-car":986072,"train-variant":985284,"tram":984365,"tram-side":987111,"transcribe":984366,"transcribe-close":984367,"transfer":987237,"transfer-down":986529,"transfer-left":986530,"transfer-right":984368,"transfer-up":986531,"transit-connection":986428,"transit-connection-variant":986429,"transit-detour":987019,"transit-transfer":984750,"transition":985365,"transition-masked":985366,"translate":984522,"translate-off":986630,"transmission-tower":986430,"trash-can":985721,"trash-can-outline":985722,"tray":987796,"tray-alert":987797,"tray-full":987798,"tray-minus":987799,"tray-plus":987800,"tray-remove":987801,"treasure-chest":984870,"tree":984369,"tree-outline":986729,"trello":984370,"trending-down":984371,"trending-neutral":984372,"trending-up":984373,"triangle":984374,"triangle-outline":984375,"triangle-wave":988284,"triforce":986073,"trophy":984376,"trophy-award":984377,"trophy-broken":986532,"trophy-outline":984378,"trophy-variant":984379,"trophy-variant-outline":984380,"truck":984381,"truck-check":986324,"truck-check-outline":987802,"truck-delivery":984382,"truck-delivery-outline":987803,"truck-fast":984968,"truck-fast-outline":987804,"truck-outline":987805,"truck-trailer":984871,"trumpet":987286,"tshirt-crew":985723,"tshirt-crew-outline":984383,"tshirt-v":985724,"tshirt-v-outline":984384,"tumble-dryer":985367,"tumble-dryer-alert":987578,"tumble-dryer-off":987579,"tune":984622,"tune-vertical":984682,"turnstile":986325,"turnstile-outline":986326,"turtle":986327,"twitch":984387,"twitter":984388,"twitter-retweet":984391,"two-factor-authentication":985519,"typewriter":986925,"ubisoft":986074,"ubuntu":984392,"ufo":987332,"ufo-outline":987333,"ultra-high-definition":985081,"umbraco":984393,"umbrella":984394,"umbrella-closed":985520,"umbrella-closed-outline":988130,"umbrella-closed-variant":988129,"umbrella-outline":984395,"undo":984396,"undo-variant":984397,"unfold-less-horizontal":984398,"unfold-less-vertical":984928,"unfold-more-horizontal":984399,"unfold-more-vertical":984929,"ungroup":984400,"unicode":986832,"unity":984751,"unreal":985521,"untappd":984401,"update":984752,"upload":984402,"upload-lock":988019,"upload-lock-outline":988020,"upload-multiple":985149,"upload-network":984822,"upload-network-outline":986328,"upload-off":987334,"upload-off-outline":987335,"upload-outline":986631,"usb":984403,"usb-flash-drive":987806,"usb-flash-drive-outline":987807,"usb-port":987632,"valve":987238,"valve-closed":987239,"valve-open":987240,"van-passenger":985082,"van-utility":985083,"vanish":985084,"vanity-light":987617,"variable":985831,"variable-box":987409,"vector-arrange-above":984404,"vector-arrange-below":984405,"vector-bezier":985832,"vector-circle":984406,"vector-circle-variant":984407,"vector-combine":984408,"vector-curve":984409,"vector-difference":984410,"vector-difference-ab":984411,"vector-difference-ba":984412,"vector-ellipse":985235,"vector-intersection":984413,"vector-line":984414,"vector-link":987112,"vector-point":984415,"vector-polygon":984416,"vector-polyline":984417,"vector-polyline-edit":987685,"vector-polyline-minus":987686,"vector-polyline-plus":987687,"vector-polyline-remove":987688,"vector-radius":984906,"vector-rectangle":984518,"vector-selection":984418,"vector-square":983041,"vector-triangle":984419,"vector-union":984420,"vhs":985627,"vibrate":984422,"vibrate-off":986329,"video":984423,"video-3d":985085,"video-3d-off":988121,"video-3d-variant":986833,"video-4k-box":985150,"video-account":985369,"video-box":983293,"video-box-off":983294,"video-check":987241,"video-check-outline":987242,"video-image":985370,"video-input-antenna":985151,"video-input-component":985152,"video-input-hdmi":985153,"video-input-scart":987020,"video-input-svideo":985154,"video-minus":985522,"video-minus-outline":983738,"video-off":984424,"video-off-outline":986075,"video-outline":986076,"video-plus":985523,"video-plus-outline":983507,"video-stabilization":985371,"video-switch":984425,"video-switch-outline":984976,"video-vintage":985628,"video-wireless":986834,"video-wireless-outline":986835,"view-agenda":984426,"view-agenda-outline":987608,"view-array":984427,"view-array-outline":988293,"view-carousel":984428,"view-carousel-outline":988294,"view-column":984429,"view-column-outline":988295,"view-comfy":986730,"view-comfy-outline":988296,"view-compact":986731,"view-compact-outline":986732,"view-dashboard":984430,"view-dashboard-outline":985629,"view-dashboard-variant":985155,"view-dashboard-variant-outline":988297,"view-day":984431,"view-day-outline":988298,"view-grid":984432,"view-grid-outline":987609,"view-grid-plus":987021,"view-grid-plus-outline":987610,"view-headline":984433,"view-list":984434,"view-list-outline":988299,"view-module":984435,"view-module-outline":988300,"view-parallel":984872,"view-parallel-outline":988301,"view-quilt":984436,"view-quilt-outline":988302,"view-sequential":984873,"view-sequential-outline":988303,"view-split-horizontal":986059,"view-split-vertical":986060,"view-stream":984437,"view-stream-outline":988304,"view-week":984438,"view-week-outline":988305,"vimeo":984439,"violin":984591,"virtual-reality":985236,"virus":988086,"virus-outline":988087,"vk":984441,"vlc":984444,"voice-off":986836,"voicemail":984445,"volleyball":985524,"volume-high":984446,"volume-low":984447,"volume-medium":984448,"volume-minus":984926,"volume-mute":984927,"volume-off":984449,"volume-plus":984925,"volume-source":987424,"volume-variant-off":986632,"volume-vibrate":987425,"vote":985631,"vote-outline":985632,"vpn":984450,"vuejs":985156,"vuetify":986733,"walk":984451,"wall":985086,"wall-sconce":985372,"wall-sconce-flat":985373,"wall-sconce-flat-variant":984092,"wall-sconce-round":984904,"wall-sconce-round-variant":985374,"wallet":984452,"wallet-giftcard":984453,"wallet-membership":984454,"wallet-outline":986077,"wallet-plus":987022,"wallet-plus-outline":987023,"wallet-travel":984455,"wallpaper":986633,"wan":984456,"wardrobe":987024,"wardrobe-outline":987025,"warehouse":987009,"washing-machine":984874,"washing-machine-alert":987580,"washing-machine-off":987581,"watch":984457,"watch-export":984458,"watch-export-variant":985237,"watch-import":984459,"watch-import-variant":985238,"watch-variant":985239,"watch-vibrate":984753,"watch-vibrate-off":986330,"water":984460,"water-boiler":987026,"water-boiler-alert":987571,"water-boiler-off":987572,"water-off":984461,"water-outline":986634,"water-percent":984462,"water-polo":987808,"water-pump":984463,"water-pump-off":987027,"water-well":987243,"water-well-outline":987244,"watering-can":988289,"watering-can-outline":988290,"watermark":984594,"wave":986926,"waveform":988285,"waves":984973,"waze":986078,"weather-cloudy":984464,"weather-cloudy-alert":986927,"weather-cloudy-arrow-right":986734,"weather-fog":984465,"weather-hail":984466,"weather-hazy":986928,"weather-hurricane":985240,"weather-lightning":984467,"weather-lightning-rainy":984702,"weather-night":984468,"weather-night-partly-cloudy":986929,"weather-partly-cloudy":984469,"weather-partly-lightning":986930,"weather-partly-rainy":986931,"weather-partly-snowy":986932,"weather-partly-snowy-rainy":986933,"weather-pouring":984470,"weather-rainy":984471,"weather-snowy":984472,"weather-snowy-heavy":986934,"weather-snowy-rainy":984703,"weather-sunny":984473,"weather-sunny-alert":986935,"weather-sunset":984474,"weather-sunset-down":984475,"weather-sunset-up":984476,"weather-tornado":986936,"weather-windy":984477,"weather-windy-variant":984478,"web":984479,"web-box":987028,"web-clock":987722,"webcam":984480,"webhook":984623,"webpack":984875,"webrtc":987720,"wechat":984593,"weight":984481,"weight-gram":986431,"weight-kilogram":984482,"weight-lifter":987485,"weight-pound":985525,"whatsapp":984483,"wheelchair-accessibility":984484,"whistle":985526,"whistle-outline":987836,"white-balance-auto":984485,"white-balance-incandescent":984486,"white-balance-iridescent":984487,"white-balance-sunny":984488,"widgets":984876,"widgets-outline":987989,"wifi":984489,"wifi-off":984490,"wifi-star":986635,"wifi-strength-1":985375,"wifi-strength-1-alert":985376,"wifi-strength-1-lock":985377,"wifi-strength-2":985378,"wifi-strength-2-alert":985379,"wifi-strength-2-lock":985380,"wifi-strength-3":985381,"wifi-strength-3-alert":985382,"wifi-strength-3-lock":985383,"wifi-strength-4":985384,"wifi-strength-4-alert":985385,"wifi-strength-4-lock":985386,"wifi-strength-alert-outline":985387,"wifi-strength-lock-outline":985388,"wifi-strength-off":985389,"wifi-strength-off-outline":985390,"wifi-strength-outline":985391,"wikipedia":984492,"wind-turbine":986533,"window-close":984493,"window-closed":984494,"window-closed-variant":987611,"window-maximize":984495,"window-minimize":984496,"window-open":984497,"window-open-variant":987612,"window-restore":984498,"window-shutter":987420,"window-shutter-alert":987421,"window-shutter-open":987422,"wiper":985833,"wiper-wash":986534,"wizard-hat":988279,"wordpress":984500,"wrap":984502,"wrap-disabled":986079,"wrench":984503,"wrench-outline":986080,"xamarin":985157,"xamarin-outline":985158,"xing":984510,"xml":984512,"xmpp":985087,"y-combinator":984612,"yahoo":985935,"yeast":984513,"yin-yang":984704,"yoga":987516,"youtube":984515,"youtube-gaming":985160,"youtube-studio":985159,"youtube-subscription":986432,"youtube-tv":984136,"z-wave":985834,"zend":985835,"zigbee":986433,"zip-box":984516,"zip-box-outline":987130,"zip-disk":985635,"zodiac-aquarius":985725,"zodiac-aries":985726,"zodiac-cancer":985727,"zodiac-capricorn":985728,"zodiac-gemini":985729,"zodiac-leo":985730,"zodiac-libra":985731,"zodiac-pisces":985732,"zodiac-sagittarius":985733,"zodiac-scorpio":985734,"zodiac-taurus":985735,"zodiac-virgo":985736,"blank":63116}')},function(e,t,n){e.exports=n.p+"./fonts/MaterialCommunityIcons.ttf"},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(8),i=n.n(r),o=n(0),a={};function s(e){var t=o.useRef(a),n=o.useRef(!1),r=o.useRef(!0);o.useEffect((function(){return r.current=!0,function(){r.current=!1}}),[]),t.current===a&&(t.current="function"===typeof e?e():e);var s=o.useState(t.current),l=i()(s,2),c=l[0],u=l[1],h=o.useCallback((function(){return t.current}),[]),d=o.useCallback((function(e){e!==t.current&&r.current&&(t.current=e,n.current||u(e))}),[]),f=o.useCallback((function(e){n.current=!0;try{e()}finally{n.current=!1}}),[]),p=o.useCallback((function(){r.current&&u(t.current)}),[]);c!==t.current&&u(t.current);var m=t.current;return o.useDebugValue(m),[m,h,d,f,p]}},function(e,t,n){"use strict";e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(378)),o=r(n(381)),a=r(n(383)),s=r(n(158)),l=r(n(392)),c=r(n(393)),u=r(n(394)),h=r(n(397)),d=r(n(207)),f=r(n(399)),p=r(n(400)),m=r(n(410)),g=r(n(113)),v=r(n(411)),y=r(n(412)),b=r(n(413)),w=r(n(415)),x=r(n(416)),_=r(n(162)),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},A=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))},S=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},M=x([[w,b],[y(Number),b],[v,function(e){return Number(e)}]]),T=g(3,(function(e,t,n){var r=y(Number);return r(e)&&r(t)&&r(n)&&m(n,e)&&m(t,n)})),C=g(2,(function(e,t){return p(t,e)})),O=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},R={Accept:"application/json","Content-Type":"application/json"},k={timeout:0},P=["ECONNABORTED"],L=["ENOTFOUND","ECONNREFUSED","ECONNRESET"],D=T(200,299),I=T(400,499),N=T(500,599),j=f(w,d(void 0),h("status")),B=function(e){return"Network Error"===e.message?"NETWORK_ERROR":_.isCancel(e)?"CANCEL_ERROR":x([[w,function(){return F(j(e.response))}],[C(P),d("TIMEOUT_ERROR")],[C(L),d("CONNECTION_ERROR")],[v,d("UNKNOWN_ERROR")]])(e.code)},F=function(e){return x([[w,d("UNKNOWN_ERROR")],[D,d(null)],[I,d("CLIENT_ERROR")],[N,d("SERVER_ERROR")],[v,d("UNKNOWN_ERROR")]])(e)},z=function(e){var t,n=u(R,e.headers||{});if(e.axiosInstance)t=e.axiosInstance;else{var r=u(k,c("headers",e));t=_.create(r)}var h=[],d=[],f=[],p=[],m=[],g=function(e,r){return n[e]=r,t},v=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),b(u({url:t,params:n,method:e},r))},y=function(e,t,n,r){return void 0===n&&(n=null),void 0===r&&(r={}),b(u({url:t,method:e,data:n},r))},b=function(e){return A(void 0,void 0,void 0,(function(){var r,i,o;return S(this,(function(s){switch(s.label){case 0:if(e.headers=E({},n,e.headers),d.length>0&&l((function(t){return t(e)}),d),!(f.length>0))return[3,6];r=0,s.label=1;case 1:return r<f.length?(i=f[r](e),O(i)?[4,i]:[3,3]):[3,6];case 2:return s.sent(),[3,5];case 3:return[4,i(e)];case 4:s.sent(),s.label=5;case 5:return r++,[3,1];case 6:return o=a(x(M(new Date)),w),[2,t.request(e).then(o).catch(o)]}}))}))},w=function(e){return h.forEach((function(t){try{t(e)}catch(e){}})),e},x=o((function(e,t){return A(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,h,d,f,g,v,y,b,w;return S(this,(function(x){switch(x.label){case 0:if(n=M(new Date),r=n-e,i=t instanceof Error||_.isCancel(t),o=t,a=t,s=i?a.response:o,c=s&&s.status||null,u=i?B(t):F(c),h=i?a:null,d=D(c),f=t.config||null,g=s&&s.headers||null,v=s&&s.data||null,y={duration:r,problem:u,originalError:h,ok:d,status:c,headers:g,config:f,data:v},p.length>0&&l((function(e){return e(y)}),p),!(m.length>0))return[3,6];b=0,x.label=1;case 1:return b<m.length?(w=m[b](y),O(w)?[4,w]:[3,3]):[3,6];case 2:return x.sent(),[3,5];case 3:return[4,w(y)];case 4:x.sent(),x.label=5;case 5:return b++,[3,1];case 6:return[2,y]}}))}))}));return{axiosInstance:t,monitors:h,addMonitor:function(e){h.push(e)},requestTransforms:d,asyncRequestTransforms:f,responseTransforms:p,asyncResponseTransforms:m,addRequestTransform:function(e){return d.push(e)},addAsyncRequestTransform:function(e){return f.push(e)},addResponseTransform:function(e){return p.push(e)},addAsyncResponseTransform:function(e){return m.push(e)},setHeader:g,setHeaders:function(e){return l((function(t){return g(t,e[t])}),s(e)),t},deleteHeader:function(e){return delete n[e],t},headers:n,setBaseURL:function(e){return t.defaults.baseURL=e,t},getBaseURL:function(){return t.defaults.baseURL},any:b,get:i(v,["get"]),delete:i(v,["delete"]),head:i(v,["head"]),post:i(y,["post"]),put:i(y,["put"]),patch:i(y,["patch"]),link:i(v,["link"]),unlink:i(v,["unlink"])}},H=_.isCancel,U=_.CancelToken,V={DEFAULT_HEADERS:R,NONE:null,CLIENT_ERROR:"CLIENT_ERROR",SERVER_ERROR:"SERVER_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",CONNECTION_ERROR:"CONNECTION_ERROR",NETWORK_ERROR:"NETWORK_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR",create:z,isCancel:H,CancelToken:U};t.DEFAULT_HEADERS=R,t.NONE=null,t.CLIENT_ERROR="CLIENT_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.CONNECTION_ERROR="CONNECTION_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.CANCEL_ERROR="CANCEL_ERROR",t.getProblemFromError=B,t.getProblemFromStatus=F,t.create=z,t.isCancel=H,t.CancelToken=U,t.default=V},function(e,t,n){"use strict";var r=n(447),i=n(451),o=[].slice,a=["keyword","gray","hex"],s={};Object.keys(i).forEach((function(e){s[o.call(i[e].labels).sort().join("")]=e}));var l={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);var n,u;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var h=r.get(e);if(null===h)throw new Error("Unable to parse color from string: "+e);this.model=h.model,u=i[this.model].channels,this.color=h.value.slice(0,u),this.valpha="number"===typeof h.value[u]?h.value[u]:1}else if(e.length){this.model=t||"rgb",u=i[this.model].channels;var d=o.call(e,0,u);this.color=f(d,u),this.valpha="number"===typeof e[u]?e[u]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var m=p.sort().join("");if(!(m in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[m];var g=i[this.model].labels,v=[];for(n=0;n<g.length;n++)v.push(e[g[n]]);this.color=f(v)}if(l[this.model])for(u=i[this.model].channels,n=0;n<u;n++){var y=l[this.model][n];y&&(this.color[n]=y(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function u(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(l[e]||(l[e]=[]))[t]=n})),e=e[0],function(r){var i;return arguments.length?(n&&(r=n(r)),(i=this[e]()).color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function h(e){return function(t){return Math.max(0,Math.min(e,t))}}function d(e){return Array.isArray(e)?e:[e]}function f(e,t){for(var n=0;n<t;n++)"number"!==typeof e[n]&&(e[n]=0);return e}c.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in r.to?this:this.rgb(),n=1===(t=t.round("number"===typeof e?e:1)).valpha?t.color:t.color.concat(this.valpha);return r.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"===typeof e?e:1),n=1===t.valpha?t.color:t.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},t=i[this.model].channels,n=i[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new c(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new c(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:u("rgb",0,h(255)),green:u("rgb",1,h(255)),blue:u("rgb",2,h(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:u("hsl",1,h(100)),lightness:u("hsl",2,h(100)),saturationv:u("hsv",1,h(100)),value:u("hsv",2,h(100)),chroma:u("hcg",1,h(100)),gray:u("hcg",2,h(100)),white:u("hwb",1,h(100)),wblack:u("hwb",2,h(100)),cyan:u("cmyk",0,h(100)),magenta:u("cmyk",1,h(100)),yellow:u("cmyk",2,h(100)),black:u("cmyk",3,h(100)),x:u("xyz",0,h(100)),y:u("xyz",1,h(100)),z:u("xyz",2,h(100)),l:u("lab",0,h(100)),a:u("lab",1),b:u("lab",2),keyword:function(e){return arguments.length?new c(e):i[this.model].keyword(this.color)},hex:function(e){return arguments.length?new c(e):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(i).forEach((function(e){if(-1===a.indexOf(e)){var t=i[e].channels;c.prototype[e]=function(){if(this.model===e)return new c(this);if(arguments.length)return new c(arguments,e);var n="number"===typeof arguments[t]?t:this.valpha;return new c(d(i[this.model][e].raw(this.color)).concat(n),e)},c[e]=function(n){return"number"===typeof n&&(n=f(o.call(arguments),t)),new c(n,e)}}})),e.exports=c},function(e,t,n){"use strict";function r(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}n.d(t,"a",(function(){return v}));var o=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function a(e){return"[object String]"===Object.prototype.toString.call(e)}var s=i((function(e){return!!o(e)||!!e&&("object"===typeof e&&(!a(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));"undefined"!==typeof Symbol&&Symbol.iterator;function l(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var c=Object.prototype.toString,u=function(){return"[object Arguments]"===c.call(arguments)?function(e){return"[object Arguments]"===c.call(e)}:function(e){return l("callee",e)}},h=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],f=function(){return arguments.propertyIsEnumerable("length")}(),p=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};Object.keys;Number.isInteger;function m(e){return function t(n){for(var r,i,o,a=[],l=0,c=n.length;l<c;){if(s(n[l]))for(o=0,i=(r=e?t(n[l]):n[l]).length;o<i;)a[a.length]=r[o],o+=1;else a[a.length]=n[l];l+=1}return a}}var g=function(e){return(e<10?"0":"")+e};Date.prototype.toISOString;var v=i(m(!0));"function"===typeof Object.assign&&Object.assign;var y="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";String.prototype.trim},,function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(19),o=r.n(i),a=r(0),s=r(103),l=r(6),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y);var w=r(83);var x={get name(){return"ExpoErrorRecovery"},saveRecoveryProps:function(t){if(w.canUseDOM)try{localStorage.setItem("EXPO_ERROR_RECOVERY_STORAGE",t)}catch(e){}},recoveredProps:function(){if(!w.canUseDOM)return null;try{var t=localStorage.getItem("EXPO_ERROR_RECOVERY_STORAGE");return localStorage.removeItem("EXPO_ERROR_RECOVERY_STORAGE"),t}catch(e){}return null}()},_=function(){if(x.recoveredProps)return JSON.parse(x.recoveredProps);return null}();function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}function M(e){var t,n,r=(n=e,function(e){m()(r,e);var t=S(r);function r(){return h()(this,r),t.apply(this,arguments)}return f()(r,[{key:"render",value:function(){var e=A(A({},this.props),{},{exp:A(A({},this.props.exp),{},{errorRecovery:_})});return a.createElement(n,o()({},e))}}]),r}(a.Component)),i=function(e){return a.createElement(r,o()({},e))};s.a.registerComponent("main",(function(){return i}));var l=null!=(t=document.getElementById("root"))?t:document.getElementById("main");s.a.runApplication("main",{rootTag:l})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(6),n(17);var r=n(7),i=n.n(r),o=n(8),a=n.n(o),s=n(267),l=n(223),c={get isRTL(){var e;return null!=(e=l.isRtlLang(this.locale))&&e},get locale(){return s.a.isDOMAvailable?navigator.language||navigator.systemLanguage||navigator.browserLanguage||navigator.userLanguage||this.locales[0]:""},get locales(){if(!s.a.isDOMAvailable)return[];var e=navigator.languages,t=void 0===e?[]:e;return Array.from(t)},get timezone(){return"undefined"===typeof Intl?"Etc/UTC":Intl.DateTimeFormat().resolvedOptions().timeZone||"Etc/UTC"},get isoCurrencyCodes(){return[]},get region(){var e=this.locale;if("string"===typeof e){var t=e.split("-"),n=a()(t,2)[1];return n?n.toUpperCase():null}return null},getLocalizationAsync:function(){var e,t,n,r,o,a;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return e=this.region,t=this.isoCurrencyCodes,n=this.timezone,r=this.locales,o=this.locale,a=this.isRTL,i.abrupt("return",{region:e,isoCurrencyCodes:t,timezone:n,locales:r,locale:o,isRTL:a});case 2:case"end":return i.stop()}}),null,this,null,Promise)}};var u=function(e){return e.replace("_","-")},h=u(c.locale);c.locales.map(u),c.timezone,c.isoCurrencyCodes,c.region,c.isRTL},function(e,t,n){"use strict";var r,i=n(9),o="undefined"!==typeof window&&!(null==(r=window.document)||!r.createElement),a={OS:i.a.OS,select:i.a.select,isDOMAvailable:o};t.a=a},function(t,n,r){"use strict";r.d(n,"a",(function(){return L}));var i=r(17),o=r.n(i),a=r(20),s=r.n(a),l=r(19),c=r.n(l),u=r(21),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y),w=r(0),x=r.n(w),_=r(3),E=r(123),A=r(72),S=r(12),M=r(14);function T(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var C=["easeInOut","easeOut","easeIn"],O=function(e){m()(n,e);var t=T(n);function n(e){var r;return h()(this,n),(r=t.call(this,e)).contentHandle=null,r._handleRef=function(e){r.contentHandle=e},r._handleLayoutChange=function(e){var t=e.nativeEvent.layout.height;r.state.animating||r.props.collapsed||r.state.measuring||r.state.contentHeight===t||(r.state.height.setValue(t),r.setState({contentHeight:t}))},r.state={measuring:!1,measured:!1,height:new S.a.Value(e.collapsedHeight),contentHeight:0,animating:!1},r}return f()(n,[{key:"componentDidUpdate",value:function(e){var t=this;e.collapsed!==this.props.collapsed?this.setState({measured:!1},(function(){return t._componentDidUpdate(e)})):this._componentDidUpdate(e)}},{key:"componentWillUnmount",value:function(){this.unmounted=!0}},{key:"_componentDidUpdate",value:function(e){e.collapsed!==this.props.collapsed?this._toggleCollapsed(this.props.collapsed):this.props.collapsed&&e.collapsedHeight!==this.props.collapsedHeight&&this.state.height.setValue(this.props.collapsedHeight)}},{key:"_measureContent",value:function(e){var t=this;this.setState({measuring:!0},(function(){requestAnimationFrame((function(){t.contentHandle?("function"===typeof t.contentHandle.measure?t.contentHandle:t.contentHandle.getNode()).measure((function(n,r,i,o){t.setState({measuring:!1,measured:!0,contentHeight:o},(function(){return e(o)}))})):t.setState({measuring:!1},(function(){return e(t.props.collapsedHeight)}))}))}))}},{key:"_toggleCollapsed",value:function(e){var t=this;if(e)this._transitionToHeight(this.props.collapsedHeight);else{if(!this.contentHandle)return void(this.state.measured&&this._transitionToHeight(this.state.contentHeight));this._measureContent((function(e){t._transitionToHeight(e)}))}}},{key:"_transitionToHeight",value:function(e){var t=this,n=this.props.duration,r=this.props.easing;if("string"===typeof r){for(var i,o=!1,a=0;a<C.length;a++)if(i=C[a],r.substr(0,i.length)===i){r=r.substr(i.length,1).toLowerCase()+r.substr(i.length+1),i=i.substr(4,1).toLowerCase()+i.substr(5),r=M.a[i](M.a[r||"ease"]),o=!0;break}if(o||(r=M.a[r]),!r)throw new Error('Invalid easing type "'+this.props.easing+'"')}this._animation&&this._animation.stop(),this.setState({animating:!0}),this._animation=S.a.timing(this.state.height,{useNativeDriver:!1,toValue:e||0,duration:n,easing:r}).start((function(){t.unmounted||t.setState({animating:!1},(function(){t.unmounted||t.props.onAnimationEnd()}))}))}},{key:"render",value:function(){var e=this.props,t=e.collapsed,n=e.enablePointerEvents,r=e.renderChildrenCollapsed,i=this.state,o=i.height,a=i.contentHeight,s=i.measuring,l=i.measured,c=i.animating,u=!s&&(l||t)&&{overflow:"hidden",height:o},h={};s?(h.position="absolute",h.opacity=0):"center"===this.props.align?h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[a/-2,0]})}]:"bottom"===this.props.align&&(h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[-a,0]})}]),c&&(h.height=a);var d=r||(!t||t&&c)&&(c||s||l);return x.a.createElement(S.a.View,{style:u,pointerEvents:!n&&t?"none":"auto"},x.a.createElement(S.a.View,{ref:this._handleRef,style:[this.props.style,h],onLayout:this.state.animating?void 0:this._handleLayoutChange},d&&this.props.children))}}]),n}(w.Component);O.defaultProps={align:"top",collapsed:!0,collapsedHeight:0,enablePointerEvents:!1,duration:300,easing:"easeOutCubic",onAnimationEnd:function(){return null},renderChildrenCollapsed:!0};var R=["activeSections","expandMultiple","onChange","containerStyle","sectionContainerStyle","expandFromBottom","sections","underlayColor","touchableProps","touchableComponent","onAnimationEnd","renderContent","renderHeader","renderFooter","renderSectionTitle","disabled","renderAsFlatList","keyExtractor"];function k(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var P=["align","collapsed","collapsedHeight","renderChildrenCollapsed","enablePointerEvents","duration","easing","style","onAnimationEnd"],L=function(e){m()(n,e);var t=k(n);function n(){var e;h()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i)))._renderContainer=function(t,n,r){var i=e.props,o=i.activeSections,a=i.sectionContainerStyle,s=i.expandFromBottom,l=i.sections,u=i.underlayColor,h=i.touchableProps,d=i.touchableComponent,f=i.renderHeader,p=i.renderFooter,m=i.renderSectionTitle;return x.a.createElement(_.a,{key:n,style:a},m(t,n,o.includes(n)),s&&r(t,n),x.a.createElement(d,c()({onPress:function(){return e._toggleSection(n)},underlayColor:u},h,{accessibilityState:{expanded:o.includes(n)}}),f(t,n,o.includes(n),l)),!s&&r(t,n),p&&p(t,n,o.includes(n),l))},e}return f()(n,[{key:"_toggleSection",value:function(e){if(!this.props.disabled){var t=this.props,n=t.activeSections,r=t.expandMultiple,i=t.onChange,o=[];o=n.includes(e)?n.filter((function(t){return t!==e})):r?[].concat(s()(n),[e]):[e],i&&i(o)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.activeSections,r=(t.expandMultiple,t.onChange,t.containerStyle),i=(t.sectionContainerStyle,t.expandFromBottom,t.sections),a=(t.underlayColor,t.touchableProps,t.touchableComponent,t.onAnimationEnd),s=t.renderContent,l=(t.renderHeader,t.renderFooter,t.renderSectionTitle,t.disabled,t.renderAsFlatList),u=t.keyExtractor,h=o()(t,R),d={},f={};Object.keys(h).forEach((function(e){P.includes(e)?f[e]=h[e]:d[e]=h[e]}));var p=function(e,t){return x.a.createElement(O,c()({collapsed:!n.includes(t)},f,{onAnimationEnd:function(){return a(e,t)}}),s(e,t,n.includes(t),i))};return l?x.a.createElement(A.a,c()({style:r,data:i,extraData:n,nestedScrollEnabled:!0,keyExtractor:u,renderItem:function(t){var n=t.item,r=t.index,i=n,o=u(n,r);return e._renderContainer(i,o,p)}},d)):x.a.createElement(_.a,c()({style:r},d),i.map((function(t,n){var r=u(t,n);return e._renderContainer(t,r,p)})))}}]),n}(w.Component);L.defaultProps={underlayColor:"black",disabled:!1,expandFromBottom:!1,expandMultiple:!1,touchableComponent:E.a,keyExtractor:function(e,t){return t},renderSectionTitle:function(){return null},onAnimationEnd:function(){return null},sectionContainerStyle:{},renderAsFlatList:!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));function r(e,t,n,r,i){if(isNaN(t)||isNaN(n)||isNaN(r))return e;var o,a,s,l,c,u,h,d,f,p,m,g,v=e._root,y={data:i},b=e._x0,w=e._y0,x=e._z0,_=e._x1,E=e._y1,A=e._z1;if(!v)return e._root=y,e;for(;v.length;)if((d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l,o=v,!(v=v[m=p<<2|f<<1|d]))return o[m]=y,e;if(c=+e._x.call(null,v.data),u=+e._y.call(null,v.data),h=+e._z.call(null,v.data),t===c&&n===u&&r===h)return y.next=v,o?o[m]=y:e._root=y,e;do{o=o?o[m]=new Array(8):e._root=new Array(8),(d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l}while((m=p<<2|f<<1|d)===(g=(h>=l)<<2|(u>=s)<<1|c>=a));return o[g]=v,o[m]=y,e}var i=function(e,t,n,r,i,o,a){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=i,this.y1=o,this.z1=a};function o(e){return e[0]}function a(e){return e[1]}function s(e){return e[2]}function l(e,t,n,r){var i=new c(null==t?o:t,null==n?a:n,null==r?s:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function c(e,t,n,r,i,o,a,s,l){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this._root=void 0}function u(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var h=l.prototype=c.prototype;h.copy=function(){var e,t,n=new c(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=u(r),n;for(e=[{source:r,target:n._root=new Array(8)}];r=e.pop();)for(var i=0;i<8;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(8)}):r.target[i]=u(t));return n},h.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e),i=+this._z.call(null,e);return r(this.cover(t,n,i),t,n,i,e)},h.addAll=function(e){var t,n,i,o,a,s=e.length,l=new Array(s),c=new Array(s),u=new Array(s),h=1/0,d=1/0,f=1/0,p=-1/0,m=-1/0,g=-1/0;for(n=0;n<s;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||isNaN(a=+this._z.call(null,t))||(l[n]=i,c[n]=o,u[n]=a,i<h&&(h=i),i>p&&(p=i),o<d&&(d=o),o>m&&(m=o),a<f&&(f=a),a>g&&(g=a));if(h>p||d>m||f>g)return this;for(this.cover(h,d,f).cover(p,m,g),n=0;n<s;++n)r(this,l[n],c[n],u[n],e[n]);return this},h.cover=function(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._z0,a=this._x1,s=this._y1,l=this._z1;if(isNaN(r))a=(r=Math.floor(e))+1,s=(i=Math.floor(t))+1,l=(o=Math.floor(n))+1;else{for(var c,u,h=a-r||1,d=this._root;r>e||e>=a||i>t||t>=s||o>n||n>=l;)switch(u=(n<o)<<2|(t<i)<<1|e<r,(c=new Array(8))[u]=d,d=c,h*=2,u){case 0:a=r+h,s=i+h,l=o+h;break;case 1:r=a-h,s=i+h,l=o+h;break;case 2:a=r+h,i=s-h,l=o+h;break;case 3:r=a-h,i=s-h,l=o+h;break;case 4:a=r+h,s=i+h,o=l-h;break;case 5:r=a-h,s=i+h,o=l-h;break;case 6:a=r+h,i=s-h,o=l-h;break;case 7:r=a-h,i=s-h,o=l-h}this._root&&this._root.length&&(this._root=d)}return this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this},h.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},h.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},h.find=function(e,t,n,r){var o,a,s,l,c,u,h,d,f,p=this._x0,m=this._y0,g=this._z0,v=this._x1,y=this._y1,b=this._z1,w=[],x=this._root;for(x&&w.push(new i(x,p,m,g,v,y,b)),null==r?r=1/0:(p=e-r,m=t-r,g=n-r,v=e+r,y=t+r,b=n+r,r*=r);d=w.pop();)if(!(!(x=d.node)||(a=d.x0)>v||(s=d.y0)>y||(l=d.z0)>b||(c=d.x1)<p||(u=d.y1)<m||(h=d.z1)<g))if(x.length){var _=(a+c)/2,E=(s+u)/2,A=(l+h)/2;w.push(new i(x[7],_,E,A,c,u,h),new i(x[6],a,E,A,_,u,h),new i(x[5],_,s,A,c,E,h),new i(x[4],a,s,A,_,E,h),new i(x[3],_,E,l,c,u,A),new i(x[2],a,E,l,_,u,A),new i(x[1],_,s,l,c,E,A),new i(x[0],a,s,l,_,E,A)),(f=(n>=A)<<2|(t>=E)<<1|e>=_)&&(d=w[w.length-1],w[w.length-1]=w[w.length-1-f],w[w.length-1-f]=d)}else{var S=e-+this._x.call(null,x.data),M=t-+this._y.call(null,x.data),T=n-+this._z.call(null,x.data),C=S*S+M*M+T*T;if(C<r){var O=Math.sqrt(r=C);p=e-O,m=t-O,g=n-O,v=e+O,y=t+O,b=n+O,o=x.data}}return o},h.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,g=this._root,v=this._x0,y=this._y0,b=this._z0,w=this._x1,x=this._y1,_=this._z1;if(!g)return this;if(g.length)for(;;){if((h=o>=(l=(v+w)/2))?v=l:w=l,(d=a>=(c=(y+x)/2))?y=c:x=c,(f=s>=(u=(b+_)/2))?b=u:_=u,t=g,!(g=g[p=f<<2|d<<1|h]))return this;if(!g.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,m=p)}for(;g.data!==e;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):t?(i?t[p]=i:delete t[p],(g=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&g===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!g.length&&(n?n[m]=g:this._root=g),this):(this._root=i,this)},h.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},h.root=function(){return this._root},h.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},h.visit=function(e){var t,n,r,o,a,s,l,c,u=[],h=this._root;for(h&&u.push(new i(h,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=u.pop();)if(!e(h=t.node,r=t.x0,o=t.y0,a=t.z0,s=t.x1,l=t.y1,c=t.z1)&&h.length){var d=(r+s)/2,f=(o+l)/2,p=(a+c)/2;(n=h[7])&&u.push(new i(n,d,f,p,s,l,c)),(n=h[6])&&u.push(new i(n,r,f,p,d,l,c)),(n=h[5])&&u.push(new i(n,d,o,p,s,f,c)),(n=h[4])&&u.push(new i(n,r,o,p,d,f,c)),(n=h[3])&&u.push(new i(n,d,f,a,s,l,p)),(n=h[2])&&u.push(new i(n,r,f,a,d,l,p)),(n=h[1])&&u.push(new i(n,d,o,a,s,f,p)),(n=h[0])&&u.push(new i(n,r,o,a,d,f,p))}return this},h.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.z0,u=t.x1,h=t.y1,d=t.z1,f=(s+u)/2,p=(l+h)/2,m=(c+d)/2;(a=o[0])&&n.push(new i(a,s,l,c,f,p,m)),(a=o[1])&&n.push(new i(a,f,l,c,u,p,m)),(a=o[2])&&n.push(new i(a,s,p,c,f,h,m)),(a=o[3])&&n.push(new i(a,f,p,c,u,h,m)),(a=o[4])&&n.push(new i(a,s,l,m,f,p,d)),(a=o[5])&&n.push(new i(a,f,l,m,u,p,d)),(a=o[6])&&n.push(new i(a,s,p,m,f,h,d)),(a=o[7])&&n.push(new i(a,f,p,m,u,h,d))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},h.x=function(e){return arguments.length?(this._x=e,this):this._x},h.y=function(e){return arguments.length?(this._y=e,this):this._y},h.z=function(e){return arguments.length?(this._z=e,this):this._z}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));function r(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,c,u,h,d,f=e._root,p={data:r},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a,i=f,!(f=f[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[h]=p:e._root=p,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a}while((h=u<<1|c)===(d=(l>=a)<<1|s>=o));return i[d]=f,i[h]=p,e}var i=function(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i};function o(e){return e[0]}function a(e){return e[1]}function s(e,t,n){var r=new l(null==t?o:t,null==n?a:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function l(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function c(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var u=s.prototype=l.prototype;u.copy=function(){var e,t,n=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=c(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=c(t));return n},u.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return r(this.cover(t,n),t,n,e)},u.addAll=function(e){var t,n,i,o,a=e.length,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,d=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=i,l[n]=o,i<c&&(c=i),i>h&&(h=i),o<u&&(u=o),o>d&&(d=o));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),n=0;n<a;++n)r(this,s[n],l[n],e[n]);return this},u.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n||1,c=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},u.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},u.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},u.find=function(e,t,n){var r,o,a,s,l,c,u,h=this._x0,d=this._y0,f=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new i(g,h,d,f,p)),null==n?n=1/0:(h=e-n,d=t-n,f=e+n,p=t+n,n*=n);c=m.pop();)if(!(!(g=c.node)||(o=c.x0)>f||(a=c.y0)>p||(s=c.x1)<h||(l=c.y1)<d))if(g.length){var v=(o+s)/2,y=(a+l)/2;m.push(new i(g[3],v,y,s,l),new i(g[2],o,y,v,l),new i(g[1],v,a,s,y),new i(g[0],o,a,v,y)),(u=(t>=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var b=e-+this._x.call(null,g.data),w=t-+this._y.call(null,g.data),x=b*b+w*w;if(x<n){var _=Math.sqrt(n=x);h=e-_,d=t-_,f=e+_,p=t+_,r=g.data}}return r},u.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f=this._root,p=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((c=o>=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},u.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},u.root=function(){return this._root},u.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},u.visit=function(e){var t,n,r,o,a,s,l=[],c=this._root;for(c&&l.push(new i(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,r=t.x0,o=t.y0,a=t.x1,s=t.y1)&&c.length){var u=(r+a)/2,h=(o+s)/2;(n=c[3])&&l.push(new i(n,u,h,a,s)),(n=c[2])&&l.push(new i(n,r,h,u,s)),(n=c[1])&&l.push(new i(n,u,o,a,h)),(n=c[0])&&l.push(new i(n,r,o,u,h))}return this},u.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.x1,u=t.y1,h=(s+c)/2,d=(l+u)/2;(a=o[0])&&n.push(new i(a,s,l,h,d)),(a=o[1])&&n.push(new i(a,h,l,c,d)),(a=o[2])&&n.push(new i(a,s,d,h,u)),(a=o[3])&&n.push(new i(a,h,d,c,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},u.x=function(e){return arguments.length?(this._x=e,this):this._x},u.y=function(e){return arguments.length?(this._y=e,this):this._y}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));function r(e,t,n){if(isNaN(t))return e;var r,i,o,a,s,l,c=e._root,u={data:n},h=e._x0,d=e._x1;if(!c)return e._root=u,e;for(;c.length;)if((a=t>=(i=(h+d)/2))?h=i:d=i,r=c,!(c=c[s=+a]))return r[s]=u,e;if(t===(o=+e._x.call(null,c.data)))return u.next=c,r?r[s]=u:e._root=u,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(a=t>=(i=(h+d)/2))?h=i:d=i}while((s=+a)===(l=+(o>=i)));return r[l]=c,r[s]=u,e}var i=function(e,t,n){this.node=e,this.x0=t,this.x1=n};function o(e){return e[0]}function a(e,t){var n=new s(null==t?o:t,NaN,NaN);return null==e?n:n.addAll(e)}function s(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function l(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var c=a.prototype=s.prototype;c.copy=function(){var e,t,n=new s(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=l(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var i=0;i<2;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(2)}):r.target[i]=l(t));return n},c.add=function(e){var t=+this._x.call(null,e);return r(this.cover(t),t,e)},c.addAll=function(e){var t,n,i=e.length,o=new Array(i),a=1/0,s=-1/0;for(t=0;t<i;++t)isNaN(n=+this._x.call(null,e[t]))||(o[t]=n,n<a&&(a=n),n>s&&(s=n));if(a>s)return this;for(this.cover(a).cover(s),t=0;t<i;++t)r(this,o[t],e[t]);return this},c.cover=function(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var r,i,o=n-t||1,a=this._root;t>e||e>=n;)switch(i=+(e<t),(r=new Array(2))[i]=a,a=r,o*=2,i){case 0:n=t+o;break;case 1:t=n-o}this._root&&this._root.length&&(this._root=a)}return this._x0=t,this._x1=n,this},c.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},c.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},c.find=function(e,t){var n,r,o,a,s,l=this._x0,c=this._x1,u=[],h=this._root;for(h&&u.push(new i(h,l,c)),null==t?t=1/0:(l=e-t,c=e+t);a=u.pop();)if(!(!(h=a.node)||(r=a.x0)>c||(o=a.x1)<l))if(h.length){var d=(r+o)/2;u.push(new i(h[1],d,o),new i(h[0],r,d)),(s=+(e>=d))&&(a=u[u.length-1],u[u.length-1]=u[u.length-1-s],u[u.length-1-s]=a)}else{var f=Math.abs(e-+this._x.call(null,h.data));f<t&&(t=f,l=e-f,c=e+f,n=h.data)}return n},c.remove=function(e){if(isNaN(o=+this._x.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u=this._root,h=this._x0,d=this._x1;if(!u)return this;if(u.length)for(;;){if((s=o>=(a=(h+d)/2))?h=a:d=a,t=u,!(u=u[l=+s]))return this;if(!u.length)break;t[l+1&1]&&(n=t,c=l)}for(;u.data!==e;)if(r=u,!(u=u.next))return this;return(i=u.next)&&delete u.next,r?(i?r.next=i:delete r.next,this):t?(i?t[l]=i:delete t[l],(u=t[0]||t[1])&&u===(t[1]||t[0])&&!u.length&&(n?n[c]=u:this._root=u),this):(this._root=i,this)},c.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},c.root=function(){return this._root},c.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},c.visit=function(e){var t,n,r,o,a=[],s=this._root;for(s&&a.push(new i(s,this._x0,this._x1));t=a.pop();)if(!e(s=t.node,r=t.x0,o=t.x1)&&s.length){var l=(r+o)/2;(n=s[1])&&a.push(new i(n,l,o)),(n=s[0])&&a.push(new i(n,r,l))}return this},c.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._x1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.x1,c=(s+l)/2;(a=o[0])&&n.push(new i(a,s,c)),(a=o[1])&&n.push(new i(a,c,l))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.x1);return this},c.x=function(e){return arguments.length?(this._x=e,this):this._x}},,,,,,,,,,,,,,,,,,,function(e,t,n){(function(t){var n;n=function(){"use strict";var e=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),n="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},o=["top","right","bottom","left","width","height","size","weight"],a="undefined"!==typeof MutationObserver,s=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&l()}function s(){i(a)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return l}(this.refresh.bind(this),20)};s.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},s.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},s.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},s.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},s.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},s.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},s.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),o.some((function(e){return!!~t.indexOf(e)}))&&this.refresh()},s.getInstance=function(){return this.instance_||(this.instance_=new s),this.instance_},s.instance_=null;var l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},u=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function f(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return u;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),l=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(l+a)!==n&&(l-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var f=Math.round(s+o)-t,p=Math.round(l+a)-n;1!==Math.abs(f)&&(s-=f),1!==Math.abs(p)&&(l-=p)}return g(i.left,i.top,s,l)}var p="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return n?p(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):f(e):u}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e};v.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},v.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var y=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return l(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);l(this,{target:e,contentRect:n})},b=function(t,n,r){if(this.activeObservations_=[],this.observations_=new e,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r};b.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},b.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},b.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},b.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},b.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},b.prototype.clearActive=function(){this.activeObservations_.splice(0)},b.prototype.hasActive=function(){return this.activeObservations_.length>0};var w="undefined"!==typeof WeakMap?new WeakMap:new e,x=function(e){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s.getInstance(),n=new b(e,t,this);w.set(this,n)};return["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){return(t=w.get(this))[e].apply(t,arguments);var t}})),"undefined"!==typeof r.ResizeObserver?r.ResizeObserver:(r.ResizeObserver=x,x)},e.exports=n()}).call(this,n(46))},function(e,t,n){"use strict";n.r(t);var r=n(265),i=n(264);Object(r.a)(i.a)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r,i=r={_regexEscape:/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,_regexParseLocale:/^([a-zA-Z]*)([_\-a-zA-Z]*)$/,_escapeRegExpPattern:function(e){return"string"!==typeof e?e:e.replace(r._regexEscape,"\\$1")},_toLowerCase:function(e,t){return"string"!==typeof e?t&&e:e.toLowerCase()},_toUpperCase:function(e,t){return"string"!==typeof e?t&&e:e.toUpperCase()},_trim:function(e,t,n){var i,o=[],a=function(e){o.push("^"+e+"+|"+e+"+$")};if("boolean"===typeof t&&(n=t,t=null),"string"!==typeof e)return n&&e;if(Array.isArray(t)&&t.map((function(e){var t=r._escapeRegExpPattern(e);a(t)})),"string"===typeof t){var s=r._escapeRegExpPattern(t);a(s)}t||a("\\s");var l="("+o.join("|")+")";for(i=new RegExp(l,"g");e.match(i);)e=e.replace(i,"");return e},_parseLocale:function(e){var t,n=r._regexParseLocale.exec(e);if(e&&n)return n[2]=r._trim(n[2],["-","_"]),{lang:r._toLowerCase(n[1]),countryCode:t=r._toUpperCase(n[2])||t}},isRtlLang:function(e){var t=r._parseLocale(e);if(t)return r._BIDI_RTL_LANGS.indexOf(t.lang)>=0},getLangDir:function(e){return r.isRtlLang(e)?"rtl":"ltr"}};Object.defineProperty(r,"_BIDI_RTL_LANGS",{value:["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","ku","mzn","nqo","pnb","ps","sd","ug","ur"],writable:!1,enumerable:!0,configurable:!1}),e.exports=i},function(e,t,n){"use strict";var r=n(151),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function x(){}function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var E=_.prototype=new x;E.constructor=_,r(E,w.prototype),E.isPureReactComponent=!0;var A={current:null},S=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!M.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:A.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var O=/\/+/g,R=[];function k(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?"."+D(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+D(s=t[c],c);l+=e(s,u,r,i)}else if(null===t||"object"!==typeof t?u=null:u="function"===typeof(u=g&&t[g]||t["@@iterator"])?u:null,"function"===typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+D(s,c++),r,i);else if("object"===s)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function D(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function I(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n)),r.push(e))}function j(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),L(e,N,t=k(t,o,r,i)),P(t)}var B={current:null};function F(){var e=B.current;if(null===e)throw Error(v(321));return e}var z={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return j(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,I,t=k(null,null,t,n)),P(t)},count:function(e){return L(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){if(!C(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=_,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)S.call(t,u)&&!M.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(t,n,r){"use strict";var i=r(0),o=r(151),a=r(301);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!i)throw Error(s(227));var l=new Set,c={};function u(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(c[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},g={};function v(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function w(e){return e[1].toUpperCase()}function x(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(g,e)||!p.call(m,e)&&(f.test(e)?g[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,A=60106,S=60107,M=60108,T=60114,C=60109,O=60110,R=60112,k=60113,P=60120,L=60115,D=60116,I=60121,N=60128,j=60129,B=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),A=z("react.portal"),S=z("react.fragment"),M=z("react.strict_mode"),T=z("react.profiler"),C=z("react.provider"),O=z("react.context"),R=z("react.forward_ref"),k=z("react.suspense"),P=z("react.suspense_list"),L=z("react.memo"),D=z("react.lazy"),I=z("react.block"),z("react.scope"),N=z("react.opaque.id"),j=z("react.debug_trace_mode"),B=z("react.offscreen"),F=z("react.legacy_hidden")}var H,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function G(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||""}return"\n"+H+e}var W=!1;function q(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?G(e):""}function X(e){switch(e.tag){case 5:return G(e.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case A:return"Portal";case T:return"Profiler";case M:return"StrictMode";case k:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case R:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case L:return Y(e.type);case I:return Y(e._render);case D:t=e._payload,e=e._init;try{return Y(e(t))}catch(n){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function te(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ne(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function re(e,t){ne(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ie(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function se(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ce(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function he(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ge,ve=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((ge=ge||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ge.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function xe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=xe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ae(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Me(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ce=null,Oe=null;function Re(e){if(e=$r(e)){if("function"!==typeof Te)throw Error(s(280));var t=e.stateNode;t&&(t=ti(t),Te(e.stateNode,e.type,t))}}function ke(e){Ce?Oe?Oe.push(e):Oe=[e]:Ce=e}function Pe(){if(Ce){var e=Ce,t=Oe;if(Oe=Ce=null,Re(e),t)for(e=0;e<t.length;e++)Re(t[e])}}function Le(e,t){return e(t)}function De(e,t,n,r,i){return e(t,n,r,i)}function Ie(){}var Ne=Le,je=!1,Be=!1;function Fe(){null===Ce&&null===Oe||(Ie(),Pe())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=ti(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var He=!1;if(d)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){He=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(ac){He=!1}function Ve(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ge=!1,We=null,qe=!1,Xe=null,Ye={onError:function(e){Ge=!0,We=e}};function Ke(e,t,n,r,i,o,a,s,l){Ge=!1,We=null,Ve.apply(Ye,arguments)}function Qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Qe(e)!==e)throw Error(s(188))}function $e(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qe(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Je(i),e;if(o===r)return Je(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,lt=null,ct=null,ut=new Map,ht=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ht.delete(t.pointerId)}}function gt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=$r(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vt(e){var t=Jr(e.target);if(null!==t){var n=Qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=$r(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=$r(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ct&&yt(ct)&&(ct=null),ut.forEach(bt),ht.forEach(bt)}function xt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,wt)))}function _t(e){function t(t){return xt(t,e)}if(0<at.length){xt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&xt(st,e),null!==lt&&xt(lt,e),null!==ct&&xt(ct,e),ut.forEach(t),ht.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)vt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var At={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},St={},Mt={};function Tt(e){if(St[e])return St[e];if(!At[e])return e;var t,n=At[e];for(t in n)if(n.hasOwnProperty(t)&&t in Mt)return St[e]=n[t];return e}d&&(Mt=document.createElement("div").style,"AnimationEvent"in window||(delete At.animationend.animation,delete At.animationiteration.animation,delete At.animationstart.animation),"TransitionEvent"in window||delete At.transitionend.transition);var Ct=Tt("animationend"),Ot=Tt("animationiteration"),Rt=Tt("animationstart"),kt=Tt("transitionend"),Pt=new Map,Lt=new Map,Dt=["abort","abort",Ct,"animationEnd",Ot,"animationIteration",Rt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lt.set(r,t),Pt.set(r,i),u(i,[r])}}(0,a.unstable_now)();var Nt=8;function jt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Nt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=jt(l),i=Nt):0!==(s&=o)&&(r=jt(s),i=Nt)}else 0!==(o=n&~a)?(r=jt(o),i=Nt):0!==s&&(r=jt(s),i=Nt);if(0===r)return 0;if(r=n&((0>(r=31-Gt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(jt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Gt(t)),r|=e[n],t&=~i;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ht(24&~t))?zt(10,t):e;case 10:return 0===(e=Ht(192&~t))?zt(8,t):e;case 8:return 0===(e=Ht(3584&~t))&&(0===(e=Ht(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ht(805306368&~t))&&(t=268435456),t}throw Error(s(358,e))}function Ht(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Gt(t)]=n}var Gt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/qt|0)|0},Wt=Math.log,qt=Math.LN2;var Xt=a.unstable_UserBlockingPriority,Yt=a.unstable_runWithPriority,Kt=!0;function Qt(e,t,n,r){je||Ie();var i=Jt,o=je;je=!0;try{De(i,e,t,n,r)}finally{(je=o)||Fe()}}function Zt(e,t,n,r){Yt(Xt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if(Kt)if((i=0===(4&t))&&0<at.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=$t(e,t,n,r);if(null===o)i&&mt(e,r);else{if(i){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=gt(st,e,t,n,r,i),!0;case"dragenter":return lt=gt(lt,e,t,n,r,i),!0;case"mouseover":return ct=gt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ut.set(o,gt(ut.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ht.set(o,gt(ht.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;mt(e,r)}kr(e,t,r,null,n)}}}function $t(e,t,n,r){var i=Me(r);if(null!==(i=Jr(i))){var o=Qe(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ze(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return kr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,un,hn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=ln(dn),pn=o({},dn,{view:0,detail:0}),mn=ln(pn),gn=o({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hn&&(hn&&"mousemove"===e.type?(cn=e.screenX-hn.screenX,un=e.screenY-hn.screenY):un=cn=0,hn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:un}}),vn=ln(gn),yn=ln(o({},gn,{dataTransfer:0})),bn=ln(o({},pn,{relatedTarget:0})),wn=ln(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=ln(o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=ln(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return Mn}var Cn=ln(o({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),On=ln(o({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(o({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),kn=ln(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=ln(o({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=[9,13,27,32],Dn=d&&"CompositionEvent"in window,In=null;d&&"documentMode"in document&&(In=document.documentMode);var Nn=d&&"TextEvent"in window&&!In,jn=d&&(!Dn||In&&8<In&&11>=In),Bn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Wn(e,t,n,r){ke(r),0<(t=Lr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Xn=null;function Yn(e){Sr(e,0)}function Kn(e){if(J(ei(e)))return e}function Qn(e,t){if("change"===e)return t}var Zn=!1;if(d){var Jn;if(d){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"===typeof er.oninput}Jn=$n}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Xn=qn=null)}function nr(e){if("value"===e.propertyName&&Kn(Xn)){var t=[];if(Wn(t,Xn,e,Me(e)),e=Yn,je)e(t);else{je=!0;try{Le(e,t)}finally{je=!1,Fe()}}}}function rr(e,t,n){"focusin"===e?(tr(),Xn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Xn)}function or(e,t){if("click"===e)return Kn(t)}function ar(e,t){if("input"===e||"change"===e)return Kn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},lr=Object.prototype.hasOwnProperty;function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!lr.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=d&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==mr||mr!==$(r)||("selectionStart"in(r=mr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&cr(vr,r)||(vr=r,0<(r=Lr(gr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Dt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<wr.length;xr++)Lt.set(wr[xr],0);h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,l,c){if(Ke.apply(this,arguments),Ge){if(!Ge)throw Error(s(198));var u=We;Ge=!1,We=null,qe||(qe=!0,Xe=u)}}(r,t,void 0,e),e.currentTarget=null}function Sr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}}}if(qe)throw e=Xe,qe=!1,Xe=null,e}function Mr(e,t){var n=ni(t),r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Cr(e){e[Tr]||(e[Tr]=!0,l.forEach((function(t){Er.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ni(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Rr(o,e,i,t),a.add(s))}function Rr(e,t,n,r){var i=Lt.get(t);switch(void 0===i?2:i){case 0:i=Qt;break;case 1:i=Zt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!He||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function kr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Jr(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{Ne(e,t,n)}finally{Be=!1,Fe()}}((function(){var r=o,i=Me(n),a=[];e:{var s=Pt.get(e);if(void 0!==s){var l=fn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Cn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case Ct:case Ot:case Rt:l=wn;break;case kt:l=kn;break;case"scroll":l=mn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=On}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&(null!=(m=ze(p,d))&&u.push(Pr(p,m,f)))),h)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!Jr(c)&&!c[Qr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Jr(c):null)&&(c!==(h=Qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=vn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=On,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?s:ei(l),f=null==c?s:ei(c),(s=new u(m,p+"leave",l,n,i)).target=h,s.relatedTarget=f,m=null,Jr(i)===r&&((u=new u(d,p+"enter",c,n,i)).target=f,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Dr(f))p++;for(f=0,m=d;m;m=Dr(m))f++;for(;0<p-f;)u=Dr(u),p--;for(;0<f-p;)d=Dr(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Dr(u),d=Dr(d)}u=null}else u=null;null!==l&&Ir(a,s,l,u,!1),null!==c&&null!==h&&Ir(a,h,c,u,!0)}if("select"===(l=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Qn;else if(Gn(s))if(Zn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Wn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&oe(s,"number",s.value)),v=r?ei(r):window,e){case"focusin":(Gn(v)||"true"===v.contentEditable)&&(mr=v,gr=r,vr=null);break;case"focusout":vr=gr=mr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":br(a,n,i)}var y;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?zn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Un=!0)),0<(v=Lr(r,b)).length&&(b=new _n(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Dn&&zn(e,t)?(e=rn(),nn=tn=en=null,Un=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Sr(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=ze(e,n))&&r.unshift(Pr(e,o,i)),null!=(o=ze(e,t))&&r.push(Pr(e,o,i))),e=e.return}return r}function Dr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=ze(n,o))&&a.unshift(Pr(n,l,s)):i||null!=(l=ze(n,o))&&a.push(Pr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Nr(){}var jr=null,Br=null;function Fr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function zr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Hr="function"===typeof setTimeout?setTimeout:void 0,Ur="function"===typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var qr=0;var Xr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Xr,Kr="__reactProps$"+Xr,Qr="__reactContainer$"+Xr,Zr="__reactEvents$"+Xr;function Jr(e){var t=e[Yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qr]||n[Yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Yr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function $r(e){return!(e=e[Yr]||e[Qr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function ti(e){return e[Kr]||null}function ni(e){var t=e[Zr];return void 0===t&&(t=e[Zr]=new Set),t}var ri=[],ii=-1;function oi(e){return{current:e}}function ai(e){0>ii||(e.current=ri[ii],ri[ii]=null,ii--)}function si(e,t){ii++,ri[ii]=e.current,e.current=t}var li={},ci=oi(li),ui=oi(!1),hi=li;function di(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function pi(){ai(ui),ai(ci)}function mi(e,t,n){if(ci.current!==li)throw Error(s(168));si(ci,t),si(ui,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(s(108,Y(t)||"Unknown",i));return o({},n,r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,hi=ci.current,si(ci,e),si(ui,ui.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=gi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ai(ui),ai(ci),si(ci,e)):ai(ui),si(ui,n)}var bi=null,wi=null,xi=a.unstable_runWithPriority,_i=a.unstable_scheduleCallback,Ei=a.unstable_cancelCallback,Ai=a.unstable_shouldYield,Si=a.unstable_requestPaint,Mi=a.unstable_now,Ti=a.unstable_getCurrentPriorityLevel,Ci=a.unstable_ImmediatePriority,Oi=a.unstable_UserBlockingPriority,Ri=a.unstable_NormalPriority,ki=a.unstable_LowPriority,Pi=a.unstable_IdlePriority,Li={},Di=void 0!==Si?Si:function(){},Ii=null,Ni=null,ji=!1,Bi=Mi(),Fi=1e4>Bi?Mi:function(){return Mi()-Bi};function zi(){switch(Ti()){case Ci:return 99;case Oi:return 98;case Ri:return 97;case ki:return 96;case Pi:return 95;default:throw Error(s(332))}}function Hi(e){switch(e){case 99:return Ci;case 98:return Oi;case 97:return Ri;case 96:return ki;case 95:return Pi;default:throw Error(s(332))}}function Ui(e,t){return e=Hi(e),xi(e,t)}function Vi(e,t,n){return e=Hi(e),_i(e,t,n)}function Gi(){if(null!==Ni){var e=Ni;Ni=null,Ei(e)}Wi()}function Wi(){if(!ji&&null!==Ii){ji=!0;var e=0;try{var t=Ii;Ui(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ii=null}catch(n){throw null!==Ii&&(Ii=Ii.slice(e+1)),_i(Ci,Gi),n}finally{ji=!1}}}var qi=_.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Yi=oi(null),Ki=null,Qi=null,Zi=null;function Ji(){Zi=Qi=Ki=null}function $i(e){var t=Yi.current;ai(Yi),e.type._context._currentValue=t}function eo(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function to(e,t){Ki=e,Zi=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function no(e,t){if(Zi!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Zi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Ki)throw Error(s(308));Qi=t,Ki.dependencies={lanes:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function co(e,t,n,r){var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var h=e.alternate;if(null!==h){var d=(h=h.updateQueue).lastBaseUpdate;d!==s&&(null===d?h.firstBaseUpdate=u:d.next=u,h.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,h=u=c=null;;){l=a.lane;var f=a.eventTime;if((r&l)===l){null!==h&&(h=h.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(l=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,l);break e}d=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(l="function"===typeof(p=m.payload)?p.call(f,d,l):p)||void 0===l)break e;d=o({},d,l);break e;case 2:ro=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else f={eventTime:f,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===h?(u=h=f,c=d):h=h.next=f,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===h&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=h,Is|=s,e.lanes=s,e.memoizedState=d}}function uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(s(191,i));i.call(r)}}}var ho=(new i.Component).refs;function fo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var po={isMounted:function(e){return!!(e=e._reactInternals)&&Qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=al(),r=sl(e),i=ao(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),so(e,i),ll(e,r,n)}};function mo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function go(e,t,n){var r=!1,i=li,o=t.contextType;return"object"===typeof o&&null!==o?o=no(o):(i=fi(t)?hi:ci.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=po,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&po.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,io(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=no(o):(o=fi(t)?hi:ci.current,i.context=di(e,o)),co(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&po.enqueueReplaceState(i,i.state,null),co(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var bo=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=zl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function a(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Gl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=Hl(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=Ul(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Gl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Hl(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case A:return(t=Wl(t,e.mode,n)).return=e,t}if(bo(t)||V(t))return(t=Ul(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===S?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null}if(bo(n)||V(n))return null!==i?null:h(e,t,n,r,null);xo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===S?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||V(r))return h(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(i,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(m===s.length)return n(i,h),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return c}for(h=r(i,h);m<s.length;m++)null!==(g=p(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),c}function g(i,a,l,c){var u=V(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,m=a,g=a=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),a=o(b,a,g),null===h?u=b:h.sibling=b,h=b,m=v}if(y.done)return n(i,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,c))&&(a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"===typeof o&&null!==o&&o.type===S&&null===o.key;c&&(o=o.props.children);var u="object"===typeof o&&null!==o;if(u)switch(o.$$typeof){case E:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){switch(c.tag){case 7:if(o.type===S){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===S?((r=Ul(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Hl(o.type,o.key,o.props,null,e.mode,l)).ref=wo(e,r,o),l.return=e,e=l)}return a(e);case A:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Wl(o,e.mode,l)).return=e,e=r}return a(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Gl(o,e.mode,l)).return=e,e=r),a(e);if(bo(o))return m(e,r,o,l);if(V(o))return g(e,r,o,l);if(u&&xo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(s(152,Y(e.type)||"Component"))}return n(e,r)}}var Eo=_o(!0),Ao=_o(!1),So={},Mo=oi(So),To=oi(So),Co=oi(So);function Oo(e){if(e===So)throw Error(s(174));return e}function Ro(e,t){switch(si(Co,t),si(To,e),si(Mo,So),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(Mo),si(Mo,t)}function ko(){ai(Mo),ai(To),ai(Co)}function Po(e){Oo(Co.current);var t=Oo(Mo.current),n=me(t,e.type);t!==n&&(si(To,e),si(Mo,n))}function Lo(e){To.current===e&&(ai(Mo),ai(To))}var Do=oi(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var No=null,jo=null,Bo=!1;function Fo(e,t){var n=Bl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function zo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ho(e){if(Bo){var t=jo;if(t){var n=t;if(!zo(e,t)){if(!(t=Gr(n.nextSibling))||!zo(e,t))return e.flags=-1025&e.flags|2,Bo=!1,void(No=e);Fo(No,n)}No=e,jo=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Bo=!1,No=e}}function Uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;No=e}function Vo(e){if(e!==No)return!1;if(!Bo)return Uo(e),Bo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!zr(t,e.memoizedProps))for(t=jo;t;)Fo(e,t),t=Gr(t.nextSibling);if(Uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){jo=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}jo=null}}else jo=No?Gr(e.stateNode.nextSibling):null;return!0}function Go(){jo=No=null,Bo=!1}var Wo=[];function qo(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Xo=_.ReactCurrentDispatcher,Yo=_.ReactCurrentBatchConfig,Ko=0,Qo=null,Zo=null,Jo=null,$o=!1,ea=!1;function ta(){throw Error(s(321))}function na(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,i,o){if(Ko=o,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=null===e||null===e.memoizedState?Oa:Ra,e=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(s(301));o+=1,Jo=Zo=null,t.updateQueue=null,Xo.current=ka,e=n(r,i)}while(ea)}if(Xo.current=Ca,t=null!==Zo&&null!==Zo.next,Ko=0,Jo=Zo=Qo=null,$o=!1,t)throw Error(s(300));return e}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e,Jo}function oa(){if(null===Zo){var e=Qo.alternate;e=null!==e?e.memoizedState:null}else e=Zo.next;var t=null===Jo?Qo.memoizedState:Jo.next;if(null!==t)Jo=t,Zo=e;else{if(null===e)throw Error(s(310));e={memoizedState:(Zo=e).memoizedState,baseState:Zo.baseState,baseQueue:Zo.baseQueue,queue:Zo.queue,next:null},null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e}return Jo}function aa(e,t){return"function"===typeof t?t(e):t}function sa(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=Zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=a=o=null,c=i;do{var u=c.lane;if((Ko&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var h={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(a=l=h,o=r):l=l.next=h,Qo.lanes|=u,Is|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=a,sr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function la(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);sr(o,t.memoizedState)||(La=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ca(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ko&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(s(350))}function ua(e,t,n,r){var i=Ts;if(null===i)throw Error(s(349));var o=t._getVersion,a=o(t._source),l=Xo.current,c=l.useState((function(){return ca(i,t,n)})),u=c[1],h=c[0];c=Jo;var d=e.memoizedState,f=d.refs,p=f.getSnapshot,m=d.source;d=d.subscribe;var g=Qo;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!sr(a,e)){e=n(t._source),sr(h,e)||(u(e),e=sl(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,s=e;0<s;){var l=31-Gt(s),c=1<<l;r[l]|=e,s&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=sl(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),sr(p,n)&&sr(m,t)&&sr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:h}).dispatch=u=Ta.bind(null,Qo,e),c.queue=e,c.baseQueue=null,h=ca(i,t,n),c.memoizedState=c.baseState=h),h}function ha(e,t,n){return ua(oa(),e,t,n)}function da(e){var t=ia();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:e}).dispatch=Ta.bind(null,Qo,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qo.updateQueue)?(t={lastEffect:null},Qo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function pa(e){return e={current:e},ia().memoizedState=e}function ma(){return oa().memoizedState}function ga(e,t,n,r){var i=ia();Qo.flags|=e,i.memoizedState=fa(1|t,n,void 0,void 0===r?null:r)}function va(e,t,n,r){var i=oa();r=void 0===r?null:r;var o=void 0;if(null!==Zo){var a=Zo.memoizedState;if(o=a.destroy,null!==r&&na(r,a.deps))return void fa(t,n,o,r)}Qo.flags|=e,i.memoizedState=fa(1|t,n,o,r)}function ya(e,t){return ga(516,4,e,t)}function ba(e,t){return va(516,4,e,t)}function wa(e,t){return va(4,2,e,t)}function xa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _a(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,va(4,2,xa.bind(null,t,e),n)}function Ea(){}function Aa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ma(e,t){var n=zi();Ui(98>n?98:n,(function(){e(!0)})),Ui(97<n?97:n,(function(){var n=Yo.transition;Yo.transition=1;try{e(!1),t()}finally{Yo.transition=n}}))}function Ta(e,t,n){var r=al(),i=sl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Qo||null!==a&&a===Qo)ea=$o=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,sr(l,s))return}catch(c){}ll(e,i,r)}}var Ca={readContext:no,useCallback:ta,useContext:ta,useEffect:ta,useImperativeHandle:ta,useLayoutEffect:ta,useMemo:ta,useReducer:ta,useRef:ta,useState:ta,useDebugValue:ta,useDeferredValue:ta,useTransition:ta,useMutableSource:ta,useOpaqueIdentifier:ta,unstable_isNewReconciler:!1},Oa={readContext:no,useCallback:function(e,t){return ia().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:ya,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ga(4,2,xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=ia();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ia();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,Qo,e),[r.memoizedState,e]},useRef:pa,useState:da,useDebugValue:Ea,useDeferredValue:function(e){var t=da(e),n=t[0],r=t[1];return ya((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=da(!1),t=e[0];return pa(e=Ma.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ia();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ua(r,e,t,n)},useOpaqueIdentifier:function(){if(Bo){var e=!1,t=function(e){return{$$typeof:N,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(qr++).toString(36))),Error(s(355))})),n=da(t)[1];return 0===(2&Qo.mode)&&(Qo.flags|=516,fa(5,(function(){n("r:"+(qr++).toString(36))}),void 0,null)),t}return da(t="r:"+(qr++).toString(36)),t},unstable_isNewReconciler:!1},Ra={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:sa,useRef:ma,useState:function(){return sa(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=sa(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=sa(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return sa(aa)[0]},unstable_isNewReconciler:!1},ka={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:la,useRef:ma,useState:function(){return la(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=la(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=la(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return la(aa)[0]},unstable_isNewReconciler:!1},Pa=_.ReactCurrentOwner,La=!1;function Da(e,t,n,r){t.child=null===e?Ao(t,null,n,r):Eo(t,e.child,n,r)}function Ia(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Na(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Fl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Hl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)?ts(e,t,o):(t.flags|=1,(e=zl(a,r)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,n,r,i,o){if(null!==e&&cr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(o&i))return t.lanes=e.lanes,ts(e,t,o);0!==(16384&e.flags)&&(La=!0)}return za(e,t,n,r,o)}function Ba(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},gl(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gl(t,e),null;t.memoizedState={baseLanes:0},gl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,gl(t,r);return Da(e,t,i,n),t.child}function Fa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function za(e,t,n,r,i){var o=fi(n)?hi:ci.current;return o=di(t,o),to(t,i),n=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Ha(e,t,n,r,i){if(fi(n)){var o=!0;vi(t)}else o=!1;if(to(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=no(c):c=di(t,c=fi(n)?hi:ci.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&vo(t,a,r,c),ro=!1;var d=t.memoizedState;a.state=d,co(t,r,a,i),l=t.memoizedState,s!==r||d!==l||ui.current||ro?("function"===typeof u&&(fo(t,n,u,r),l=t.memoizedState),(s=ro||mo(t,n,s,r,d,l,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,oo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,h=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=no(l):l=di(t,l=fi(n)?hi:ci.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==h||d!==l)&&vo(t,a,r,l),ro=!1,d=t.memoizedState,a.state=d,co(t,r,a,i);var p=t.memoizedState;s!==h||d!==p||ui.current||ro?("function"===typeof f&&(fo(t,n,f,r),p=t.memoizedState),(c=ro||mo(t,n,c,r,d,p,l))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,o,i)}function Ua(e,t,n,r,i,o){Fa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&yi(t,n,!1),ts(e,t,o);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Eo(t,e.child,null,o),t.child=Eo(t,null,s,o)):Da(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Va(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Ro(e,t.containerInfo)}var Ga,Wa,qa,Xa={dehydrated:null,retryLane:0};function Ya(e,t,n){var r,i=t.pendingProps,o=Do.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),si(Do,1&o),null===e?(void 0!==i.fallback&&Ho(t),e=i.children,o=i.fallback,a?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"===typeof i.unstable_expectedLoadTime?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=Vl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=Za(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,i):(n=Qa(e,t,i.children,n),t.memoizedState=null,n))}function Ka(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Vl(t,i,0,null),n=Ul(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Qa(e,t,n,r){var i=e.child;return e=i.sibling,n=zl(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Za(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=zl(a,s),null!==e?r=zl(e,r):(r=Ul(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ja(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),eo(e.return,t)}function $a(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Da(e,t,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ja(e,n);else if(19===e.tag)Ja(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(si(Do,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Io(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$a(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Io(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$a(t,!0,n,null,o,t.lastEffect);break;case"together":$a(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ts(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Is|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=zl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=zl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ns(e,t){if(!Bo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rs(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return fi(t.type)&&pi(),null;case 3:return ko(),ai(ui),ai(ci),qo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Vo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Lo(t);var i=Oo(Co.current);if(n=t.type,null!==e&&null!=t.stateNode)Wa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(s(166));return null}if(e=Oo(Mo.current),Vo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Yr]=t,r[Kr]=a,n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Mr(_r[e],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":te(r,a),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Mr("invalid",r);break;case"textarea":ce(r,a),Mr("invalid",r)}for(var l in Ae(n,a),e=null,a)a.hasOwnProperty(l)&&(i=a[l],"children"===l?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):c.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Mr("scroll",r));switch(n){case"input":Z(r),ie(r,a,!0);break;case"textarea":Z(r),he(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Nr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Yr]=t,e[Kr]=r,Ga(e,t),t.stateNode=e,l=Se(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<_r.length;i++)Mr(_r[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":te(e,r),i=ee(e,r),Mr("invalid",e);break;case"option":i=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":ce(e,r),i=le(e,r),Mr("invalid",e);break;default:i=r}Ae(n,i);var u=i;for(a in u)if(u.hasOwnProperty(a)){var h=u[a];"style"===a?_e(e,h):"dangerouslySetInnerHTML"===a?null!=(h=h?h.__html:void 0)&&ve(e,h):"children"===a?"string"===typeof h?("textarea"!==n||""!==h)&&ye(e,h):"number"===typeof h&&ye(e,""+h):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(c.hasOwnProperty(a)?null!=h&&"onScroll"===a&&Mr("scroll",e):null!=h&&x(e,a,h,l))}switch(n){case"input":Z(e),ie(e,r,!1);break;case"textarea":Z(e),he(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?se(e,!!r.multiple,a,!1):null!=r.defaultValue&&se(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Nr)}Fr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)qa(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));n=Oo(Co.current),Oo(Mo.current),Vo(t)?(r=t.stateNode,n=t.memoizedProps,r[Yr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=t,t.stateNode=r)}return null;case 13:return ai(Do),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Vo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ps&&(Ps=3):(0!==Ps&&3!==Ps||(Ps=4),null===Ts||0===(134217727&Is)&&0===(134217727&Ns)||dl(Ts,Os))),(r||n)&&(t.flags|=4),null);case 4:return ko(),null===e&&Cr(t.stateNode.containerInfo),null;case 10:return $i(t),null;case 17:return fi(t.type)&&pi(),null;case 19:if(ai(Do),null===(r=t.memoizedState))return null;if(a=0!==(64&t.flags),null===(l=r.rendering))if(a)ns(r,!1);else{if(0!==Ps||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Io(e))){for(t.flags|=64,ns(r,!1),null!==(a=l.updateQueue)&&(t.updateQueue=a,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return si(Do,1&Do.current|2),t.child}e=e.sibling}null!==r.tail&&Fi()>zs&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432)}else{if(!a)if(null!==(e=Io(l))){if(t.flags|=64,a=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ns(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!Bo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fi()-r.renderingStartTime>zs&&1073741824!==n&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fi(),n.sibling=null,t=Do.current,si(Do,a?1&t|2:1&t),n):null;case 23:case 24:return vl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(s(156,t.tag))}function is(e){switch(e.tag){case 1:fi(e.type)&&pi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(ko(),ai(ui),ai(ci),qo(),0!==(64&(t=e.flags)))throw Error(s(285));return e.flags=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ai(Do),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ai(Do),null;case 4:return ko(),null;case 10:return $i(e),null;case 23:case 24:return vl(),null;default:return null}}function os(e,t){try{var n="",r=t;do{n+=X(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function as(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Oo(Mo.current);var a,s=null;switch(n){case"input":i=ee(e,i),r=ee(e,r),s=[];break;case"option":i=ae(e,i),r=ae(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=le(e,i),r=le(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Nr)}for(h in Ae(n,r),n=null,i)if(!r.hasOwnProperty(h)&&i.hasOwnProperty(h)&&null!=i[h])if("style"===h){var l=i[h];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(c.hasOwnProperty(h)?s||(s=[]):(s=s||[]).push(h,null));for(h in r){var u=r[h];if(l=null!=i?i[h]:void 0,r.hasOwnProperty(h)&&u!==l&&(null!=u||null!=l))if("style"===h)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(h,n)),n=u;else"dangerouslySetInnerHTML"===h?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(h,u)):"children"===h?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(h,""+u):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(c.hasOwnProperty(h)?(null!=u&&"onScroll"===h&&Mr("scroll",e),s||l===u||(s=[])):"object"===typeof u&&null!==u&&u.$$typeof===N?u.toString():(s=s||[]).push(h,u))}n&&(s=s||[]).push("style",n);var h=s;(t.updateQueue=h)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ss="function"===typeof WeakMap?WeakMap:Map;function ls(e,t,n){(n=ao(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,Ws=r),as(0,t)},n}function cs(e,t,n){(n=ao(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return as(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===qs?qs=new Set([this]):qs.add(this),as(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var us="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Dl(e,n)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(s(163))}function fs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(kl(n,e),Rl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&uo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Fr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(s(163))}function ps(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=xe("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ms(e,t){if(wi&&"function"===typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(bi,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))kl(t,n);else{r=t;try{i()}catch(o){Dl(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Dl(t,o)}break;case 5:hs(t);break;case 4:bs(e,t)}}function gs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function vs(e){return 5===e.tag||3===e.tag||4===e.tag}function ys(e){e:{for(var t=e.return;null!==t;){if(vs(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(s(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||vs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Nr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function bs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(s(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var a=e,l=i,c=l;;)if(ms(a,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(a=n,l=i.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ms(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function ws(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ne(n,r),Se(e,i),t=Se(e,r),i=0;i<o.length;i+=2){var a=o[i],l=o[i+1];"style"===a?_e(n,l):"dangerouslySetInnerHTML"===a?ve(n,l):"children"===a?ye(n,l):x(n,a,l,t)}switch(e){case"input":re(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?se(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?se(n,!!r.multiple,r.defaultValue,!0):se(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(s(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,_t(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Fs=Fi(),ps(t.child,!0)),void xs(t);case 19:return void xs(t);case 17:return;case 23:case 24:return void ps(t,null!==t.memoizedState)}throw Error(s(163))}function xs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new us),t.forEach((function(t){var r=Nl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,As=_.ReactCurrentDispatcher,Ss=_.ReactCurrentOwner,Ms=0,Ts=null,Cs=null,Os=0,Rs=0,ks=oi(0),Ps=0,Ls=null,Ds=0,Is=0,Ns=0,js=0,Bs=null,Fs=0,zs=1/0;function Hs(){zs=Fi()+500}var Us,Vs=null,Gs=!1,Ws=null,qs=null,Xs=!1,Ys=null,Ks=90,Qs=[],Zs=[],Js=null,$s=0,el=null,tl=-1,nl=0,rl=0,il=null,ol=!1;function al(){return 0!==(48&Ms)?Fi():-1!==tl?tl:tl=Fi()}function sl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===zi()?1:2;if(0===nl&&(nl=Ds),0!==qi.transition){0!==rl&&(rl=null!==Bs?Bs.pendingLanes:0),e=nl;var t=4186112&~rl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=zi(),0!==(4&Ms)&&98===e?e=zt(12,nl):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),nl),e}function ll(e,t,n){if(50<$s)throw $s=0,el=null,Error(s(185));if(null===(e=cl(e,t)))return null;Vt(e,t,n),e===Ts&&(Ns|=t,4===Ps&&dl(e,Os));var r=zi();1===t?0!==(8&Ms)&&0===(48&Ms)?fl(e):(ul(e,n),0===Ms&&(Hs(),Gi())):(0===(4&Ms)||98!==r&&99!==r||(null===Js?Js=new Set([e]):Js.add(e)),ul(e,n)),Bs=e}function cl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ul(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var l=31-Gt(a),c=1<<l,u=o[l];if(-1===u){if(0===(c&r)||0!==(c&i)){u=t,jt(c);var h=Nt;o[l]=10<=h?u+250:6<=h?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);a&=~c}if(r=Bt(e,e===Ts?Os:0),t=Nt,0===r)null!==n&&(n!==Li&&Ei(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Li&&Ei(n)}15===t?(n=fl.bind(null,e),null===Ii?(Ii=[n],Ni=_i(Ci,Wi)):Ii.push(n),n=Li):14===t?n=Vi(99,fl.bind(null,e)):n=Vi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(s(358,e))}}(t),hl.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function hl(e){if(tl=-1,rl=nl=0,0!==(48&Ms))throw Error(s(327));var t=e.callbackNode;if(Ol()&&e.callbackNode!==t)return null;var n=Bt(e,e===Ts?Os:0);if(0===n)return null;var r=n,i=Ms;Ms|=16;var o=wl();for(Ts===e&&Os===r||(Hs(),yl(e,r));;)try{El();break}catch(l){bl(e,l)}if(Ji(),As.current=o,Ms=i,null!==Cs?r=0:(Ts=null,Os=0,r=Ps),0!==(Ds&Ns))yl(e,0);else if(0!==r){if(2===r&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=Ft(e))&&(r=xl(e,n))),1===r)throw t=Ls,yl(e,0),dl(e,n),ul(e,Fi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(s(345));case 2:Ml(e);break;case 3:if(dl(e,n),(62914560&n)===n&&10<(r=Fs+500-Fi())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){al(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hr(Ml.bind(null,e),r);break}Ml(e);break;case 4:if(dl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var a=31-Gt(n);o=1<<a,(a=r[a])>i&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Fi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Hr(Ml.bind(null,e),n);break}Ml(e);break;case 5:Ml(e);break;default:throw Error(s(329))}}return ul(e,Fi()),e.callbackNode===t?hl.bind(null,e):null}function dl(e,t){for(t&=~js,t&=~Ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function fl(e){if(0!==(48&Ms))throw Error(s(327));if(Ol(),e===Ts&&0!==(e.expiredLanes&Os)){var t=Os,n=xl(e,t);0!==(Ds&Ns)&&(n=xl(e,t=Bt(e,t)))}else n=xl(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=Ft(e))&&(n=xl(e,t))),1===n)throw n=Ls,yl(e,0),dl(e,t),ul(e,Fi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ml(e),ul(e,Fi()),null}function pl(e,t){var n=Ms;Ms|=1;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function ml(e,t){var n=Ms;Ms&=-2,Ms|=8;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function gl(e,t){si(ks,Rs),Rs|=t,Ds|=t}function vl(){Rs=ks.current,ai(ks)}function yl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==Cs)for(n=Cs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&pi();break;case 3:ko(),ai(ui),ai(ci),qo();break;case 5:Lo(r);break;case 4:ko();break;case 13:case 19:ai(Do);break;case 10:$i(r);break;case 23:case 24:vl()}n=n.return}Ts=e,Cs=zl(e.current,null),Os=Rs=Ds=t,Ps=0,Ls=null,js=Ns=Is=0}function bl(e,t){for(;;){var n=Cs;try{if(Ji(),Xo.current=Ca,$o){for(var r=Qo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}$o=!1}if(Ko=0,Jo=Zo=Qo=null,ea=!1,Ss.current=null,null===n||null===n.return){Ps=1,Ls=t,Cs=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Os,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var h=0!==(1&Do.current),d=a;do{var f;if(f=13===d.tag){var p=d.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=d.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!h)}}if(f){var g=d.updateQueue;if(null===g){var v=new Set;v.add(c),d.updateQueue=v}else g.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ao(-1,1);y.tag=2,so(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new ss,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var w=Il.bind(null,o,c,s);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ps&&(Ps=2),l=os(l,s),d=a;do{switch(d.tag){case 3:o=l,d.flags|=4096,t&=-t,d.lanes|=t,lo(d,ls(0,o,t));break e;case 1:o=l;var x=d.type,_=d.stateNode;if(0===(64&d.flags)&&("function"===typeof x.getDerivedStateFromError||null!==_&&"function"===typeof _.componentDidCatch&&(null===qs||!qs.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t,lo(d,cs(d,o,t));break e}}d=d.return}while(null!==d)}Sl(n)}catch(E){t=E,Cs===n&&null!==n&&(Cs=n=n.return);continue}break}}function wl(){var e=As.current;return As.current=Ca,null===e?Ca:e}function xl(t,n){var r=Ms;Ms|=16;var i=wl();for(Ts===t&&Os===n||yl(t,n);;)try{_l();break}catch(e){bl(t,e)}if(Ji(),Ms=r,As.current=i,null!==Cs)throw Error(s(261));return Ts=null,Os=0,Ps}function _l(){for(;null!==Cs;)Al(Cs)}function El(){for(;null!==Cs&&!Ai();)Al(Cs)}function Al(e){var t=Us(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Sl(e):Cs=t,Ss.current=null}function Sl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=rs(n,t,Rs)))return void(Cs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=is(t)))return n.flags&=2047,void(Cs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Cs=t);Cs=t=e}while(null!==t);0===Ps&&(Ps=5)}function Ml(e){var t=zi();return Ui(99,Tl.bind(null,e,t)),null}function Tl(e,t){do{Ol()}while(null!==Ys);if(0!==(48&Ms))throw Error(s(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var a=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Gt(o),u=1<<c;i[c]=0,a[c]=-1,l[c]=-1,o&=~u}if(null!==Js&&0===(24&r)&&Js.has(e)&&Js.delete(e),e===Ts&&(Cs=Ts=null,Os=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ms,Ms|=32,Ss.current=null,jr=Kt,fr(a=dr())){if("selectionStart"in a)l={start:a.selectionStart,end:a.selectionEnd};else e:if(l=(l=a.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(M){l=null;break e}var h=0,d=-1,f=-1,p=0,m=0,g=a,v=null;t:for(;;){for(var y;g!==l||0!==o&&3!==g.nodeType||(d=h+o),g!==c||0!==u&&3!==g.nodeType||(f=h+u),3===g.nodeType&&(h+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===a)break t;if(v===l&&++p===o&&(d=h),v===c&&++m===u&&(f=h),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}l=-1===d||-1===f?null:{start:d,end:f}}else l=null;l=l||{start:0,end:0}}else l=null;Br={focusedElem:a,selectionRange:l},Kt=!1,il=null,ol=!1,Vs=r;do{try{Cl()}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);il=null,Vs=r;do{try{for(a=e;null!==Vs;){var b=Vs.flags;if(16&b&&ye(Vs.stateNode,""),128&b){var w=Vs.alternate;if(null!==w){var x=w.ref;null!==x&&("function"===typeof x?x(null):x.current=null)}}switch(1038&b){case 2:ys(Vs),Vs.flags&=-3;break;case 6:ys(Vs),Vs.flags&=-3,ws(Vs.alternate,Vs);break;case 1024:Vs.flags&=-1025;break;case 1028:Vs.flags&=-1025,ws(Vs.alternate,Vs);break;case 4:ws(Vs.alternate,Vs);break;case 8:bs(a,l=Vs);var _=l.alternate;gs(l),null!==_&&gs(_)}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);if(x=Br,w=dr(),b=x.focusedElem,a=x.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==a&&fr(b)&&(w=a.start,void 0===(x=a.end)&&(x=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(x,b.value.length)):(x=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),l=b.textContent.length,_=Math.min(a.start,l),a=void 0===a.end?_:Math.min(a.end,l),!x.extend&&_>a&&(l=a,a=_,_=l),l=hr(b,_),o=hr(b,a),l&&o&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),_>a?(x.addRange(w),x.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(x=w[b]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Kt=!!jr,Br=jr=null,e.current=n,Vs=r;do{try{for(b=e;null!==Vs;){var E=Vs.flags;if(36&E&&fs(b,Vs.alternate,Vs),128&E){w=void 0;var A=Vs.ref;if(null!==A){var S=Vs.stateNode;switch(Vs.tag){case 5:w=S;break;default:w=S}"function"===typeof A?A(w):A.current=w}}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Di(),Ms=i}else e.current=n;if(Xs)Xs=!1,Ys=e,Ks=t;else for(Vs=r;null!==Vs;)t=Vs.nextEffect,Vs.nextEffect=null,8&Vs.flags&&((E=Vs).sibling=null,E.stateNode=null),Vs=t;if(0===(r=e.pendingLanes)&&(qs=null),1===r?e===el?$s++:($s=0,el=e):$s=0,n=n.stateNode,wi&&"function"===typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(bi,n,void 0,64===(64&n.current.flags))}catch(M){}if(ul(e,Fi()),Gs)throw Gs=!1,e=Ws,Ws=null,e;return 0!==(8&Ms)||Gi(),null}function Cl(){for(;null!==Vs;){var e=Vs.alternate;ol||null===il||(0!==(8&Vs.flags)?et(Vs,il)&&(ol=!0):13===Vs.tag&&_s(e,Vs)&&et(Vs,il)&&(ol=!0));var t=Vs.flags;0!==(256&t)&&ds(e,Vs),0===(512&t)||Xs||(Xs=!0,Vi(97,(function(){return Ol(),null}))),Vs=Vs.nextEffect}}function Ol(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ui(e,Pl)}return!1}function Rl(e,t){Qs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function kl(e,t){Zs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function Pl(){if(null===Ys)return!1;var e=Ys;if(Ys=null,0!==(48&Ms))throw Error(s(331));var t=Ms;Ms|=32;var n=Zs;Zs=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],a=i.destroy;if(i.destroy=void 0,"function"===typeof a)try{a()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(n=Qs,Qs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ms=t,Gi(),!0}function Ll(e,t,n){so(e,t=ls(0,t=os(n,t),1)),t=al(),null!==(e=cl(e,1))&&(Vt(e,1,t),ul(e,t))}function Dl(e,t){if(3===e.tag)Ll(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ll(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r))){var i=cs(n,e=os(t,e),1);if(so(n,i),i=al(),null!==(n=cl(n,1)))Vt(n,1,i),ul(n,i);else if("function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Il(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=al(),e.pingedLanes|=e.suspendedLanes&n,Ts===e&&(Os&n)===n&&(4===Ps||3===Ps&&(62914560&Os)===Os&&500>Fi()-Fs?yl(e,0):js|=n),ul(e,t)}function Nl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===zi()?1:2:(0===nl&&(nl=Ds),0===(t=Ht(62914560&~nl))&&(t=4194304))),n=al(),null!==(e=cl(e,t))&&(Vt(e,t,n),ul(e,n))}function jl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bl(e,t,n,r){return new jl(e,t,n,r)}function Fl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zl(e,t){var n=e.alternate;return null===n?((n=Bl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hl(e,t,n,r,i,o){var a=2;if(r=e,"function"===typeof e)Fl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case S:return Ul(n.children,i,o,t);case j:a=8,i|=16;break;case M:a=8,i|=1;break;case T:return(e=Bl(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=o,e;case k:return(e=Bl(13,n,t,i)).type=k,e.elementType=k,e.lanes=o,e;case P:return(e=Bl(19,n,t,i)).elementType=P,e.lanes=o,e;case B:return Vl(n,i,o,t);case F:return(e=Bl(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:a=10;break e;case O:a=9;break e;case R:a=11;break e;case L:a=14;break e;case D:a=16,r=null;break e;case I:a=22;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Bl(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ul(e,t,n,r){return(e=Bl(7,e,r,t)).lanes=n,e}function Vl(e,t,n,r){return(e=Bl(23,e,r,t)).elementType=B,e.lanes=n,e}function Gl(e,t,n){return(e=Bl(6,e,null,t)).lanes=n,e}function Wl(e,t,n){return(t=Bl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Xl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yl(e,t,n,r){var i=t.current,o=al(),a=sl(i);e:if(n){t:{if(Qe(n=n._reactInternals)!==n||1!==n.tag)throw Error(s(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(fi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(s(171))}if(1===n.tag){var c=n.type;if(fi(c)){n=gi(n,c,l);break e}}n=l}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=ao(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),so(i,t),ll(i,a,o),a}function Kl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zl(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}function Jl(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new ql(e,t,null!=n&&!0===n.hydrate),t=Bl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,io(t),e[Qr]=n.current,Cr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Kl(a);s.call(e)}}Yl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Jl(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var l=i;i=function(){var e=Kl(a);l.call(e)}}ml((function(){Yl(t,a,e,i)}))}return Kl(a)}function tc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$l(t))throw Error(s(200));return Xl(e,t,null,n)}Us=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ui.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Va(t),Go();break;case 5:Po(t);break;case 1:fi(t.type)&&vi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;si(Yi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ya(e,t,n):(si(Do,1&Do.current),null!==(t=ts(e,t,n))?t.sibling:null);si(Do,1&Do.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return es(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),si(Do,Do.current),r)break;return null;case 23:case 24:return t.lanes=0,Ba(e,t,n)}return ts(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,ci.current),to(t,n),i=ra(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,io(t);var a=r.getDerivedStateFromProps;"function"===typeof a&&fo(t,r,a,e),i.updater=po,t.stateNode=i,i._reactInternals=t,yo(t,r,e,n),t=Ua(null,t,r,!0,o,n)}else t.tag=0,Da(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Fl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===R)return 11;if(e===L)return 14}return 2}(i),e=Xi(i,e),o){case 0:t=za(null,t,i,e,n);break e;case 1:t=Ha(null,t,i,e,n);break e;case 11:t=Ia(null,t,i,e,n);break e;case 14:t=Na(null,t,i,Xi(i.type,e),r,n);break e}throw Error(s(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Va(t),r=t.updateQueue,null===e||null===r)throw Error(s(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,oo(e,t),co(t,r,null,n),(r=t.memoizedState.element)===i)Go(),t=ts(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(jo=Gr(t.stateNode.containerInfo.firstChild),No=t,o=Bo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Wo.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(e,t,r,n),Go();t=t.child}return t;case 5:return Po(t),null===e&&Ho(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,zr(r,i)?a=null:null!==o&&zr(r,o)&&(t.flags|=16),Fa(e,t),Da(e,t,a,n),t.child;case 6:return null===e&&Ho(t),null;case 13:return Ya(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Eo(t,null,r,n):Da(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ia(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Da(e,t,t.pendingProps,n),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value;var l=t.type._context;if(si(Yi,l._currentValue),l._currentValue=o,null!==a)if(l=a.value,0===(o=sr(l,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(a.children===i.children&&!ui.current){t=ts(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){a=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!==(u.observedBits&o)){1===l.tag&&((u=ao(-1,n&-n)).tag=2,so(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),eo(l.return,n),c.lanes|=n;break}u=u.next}}else a=10===l.tag&&l.type===t.type?null:l.child;if(null!==a)a.return=l;else for(a=l;null!==a;){if(a===t){a=null;break}if(null!==(l=a.sibling)){l.return=a.return,a=l;break}a=a.return}l=a}Da(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,to(t,n),r=r(i=no(i,o.unstable_observedBits)),t.flags|=1,Da(e,t,r,n),t.child;case 14:return o=Xi(i=t.type,t.pendingProps),Na(e,t,i,o=Xi(i.type,o),r,n);case 15:return ja(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,fi(r)?(e=!0,vi(t)):e=!1,to(t,n),go(t,r,i),yo(t,r,i,n),Ua(null,t,r,!0,e,n);case 19:return es(e,t,n);case 23:case 24:return Ba(e,t,n)}throw Error(s(156,t.tag))},Jl.prototype.render=function(e){Yl(e,this._internalRoot,null,null)},Jl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yl(null,e,null,(function(){t[Qr]=null}))},tt=function(e){13===e.tag&&(ll(e,4,al()),Zl(e,4))},nt=function(e){13===e.tag&&(ll(e,67108864,al()),Zl(e,67108864))},rt=function(e){if(13===e.tag){var t=al(),n=sl(e);ll(e,n,t),Zl(e,n)}},it=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(re(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ti(r);if(!i)throw Error(s(90));J(r),re(r,i)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&se(e,!!n.multiple,t,!1)}},Le=pl,De=function(e,t,n,r,i){var o=Ms;Ms|=4;try{return Ui(98,e.bind(null,t,n,r,i))}finally{0===(Ms=o)&&(Hs(),Gi())}},Ie=function(){0===(49&Ms)&&(function(){if(null!==Js){var e=Js;Js=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ul(e,Fi())}))}Gi()}(),Ol())},Ne=function(e,t){var n=Ms;Ms|=2;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}};var nc={Events:[$r,ei,ti,ke,Pe,Ol,{current:!1}]},rc={findFiberByHostInstance:Jr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},ic={bundleType:rc.bundleType,version:rc.version,rendererPackageName:rc.rendererPackageName,rendererConfig:rc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:rc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{bi=oc.inject(ic),wi=oc}catch(ac){}}n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nc,n.createPortal=tc,n.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw Error(s(268,Object.keys(e)))}return e=null===(e=$e(t))?null:e.stateNode},n.flushSync=function(e,t){var n=Ms;if(0!==(48&n))return e(t);Ms|=1;try{if(e)return Ui(99,e.bind(null,t))}finally{Ms=n,Gi()}},n.hydrate=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!0,n)},n.render=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!1,n)},n.unmountComponentAtNode=function(e){if(!$l(e))throw Error(s(40));return!!e._reactRootContainer&&(ml((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[Qr]=null}))})),!0)},n.unstable_batchedUpdates=pl,n.unstable_createPortal=function(e,t){return tc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},n.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return ec(e,t,n,!1,r)},n.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(302)},function(e,t,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,h=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(d,0),n}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},i=function(e,t){h=setTimeout(e,t)},o=function(){clearTimeout(h)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,y=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,_=x.port2;x.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();w=e+b;try{v(!0,e)?_.postMessage(null):(g=!1,v=null)}catch(n){throw _.postMessage(null),n}}else g=!1},r=function(e){v=e,g||(g=!0,_.postMessage(null))},i=function(e,n){y=f((function(){e(t.unstable_now())}),n)},o=function(){p(y),y=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<M(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>M(a,n))void 0!==l&&0>M(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>M(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],C=[],O=1,R=null,k=3,P=!1,L=!1,D=!1;function I(e){for(var t=A(C);null!==t;){if(null===t.callback)S(C);else{if(!(t.startTime<=e))break;S(C),t.sortIndex=t.expirationTime,E(T,t)}t=A(C)}}function N(e){if(D=!1,I(e),!L)if(null!==A(T))L=!0,r(j);else{var t=A(C);null!==t&&i(N,t.startTime-e)}}function j(e,n){L=!1,D&&(D=!1,o()),P=!0;var r=k;try{for(I(n),R=A(T);null!==R&&(!(R.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=R.callback;if("function"===typeof a){R.callback=null,k=R.priorityLevel;var s=a(R.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?R.callback=s:R===A(T)&&S(T),I(n)}else S(T);R=A(T)}if(null!==R)var l=!0;else{var c=A(C);null!==c&&i(N,c.startTime-n),l=!1}return l}finally{R=null,k=r,P=!1}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||P||(L=!0,r(j))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return A(T)},t.unstable_next=function(e){switch(k){case 1:case 2:case 3:var t=3;break;default:t=k}var n=k;k=t;try{return e()}finally{k=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=k;k=e;try{return t()}finally{k=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:O++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,E(C,e),null===A(T)&&e===A(C)&&(D?o():D=!0,i(N,a-s))):(e.sortIndex=l,E(T,e),L||P||(L=!0,r(j))),e},t.unstable_wrapCallback=function(e){var t=k;return function(){var n=k;k=t;try{return e.apply(this,arguments)}finally{k=n}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e.hasOwnProperty(t)){for(var r={},i=e[t],a=(0,o.default)(t),s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];if(c===t)for(var u=0;u<i.length;u++)r[i[u]+a]=n[t];r[c]=n[c]}return r}return n};var r,i=n(181),o=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,i){for(var o=0,a=e.length;o<a;++o){var s=e[o](t,n,r,i);if(s)return s}}},function(e,t,n){"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)r(e,t[n]);else r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e instanceof Object&&!Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)};var r,i=n(160),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},,,function(e,t,n){"use strict";var r=n(151),i={};function o(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=function(e,t,n){var a=[],s={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)h(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=f(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(o(!(n in c),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return o("DEFINE_MANY_MERGED"===(l.hasOwnProperty(n)?l[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=f(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function u(e,t){var n=s.hasOwnProperty(t)?s[t]:null;y.hasOwnProperty(t)&&o("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&o("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function h(e,n){if(n){o("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),o(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;for(var a in n.hasOwnProperty("mixins")&&c.mixins(e,n.mixins),n)if(n.hasOwnProperty(a)&&"mixins"!==a){var l=n[a],h=r.hasOwnProperty(a);if(u(h,a),c.hasOwnProperty(a))c[a](e,l);else{var d=s.hasOwnProperty(a);if("function"===typeof l&&!d&&!h&&!1!==n.autobind)i.push(a,l),r[a]=l;else if(h){var m=s[a];o(d&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?r[a]=f(r[a],l):"DEFINE_MANY"===m&&(r[a]=p(r[a],l))}else r[a]=l}}}else;}function d(e,t){for(var n in o(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(o(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function f(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return d(i,n),d(i,r),i}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function m(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},v={componentWillUnmount:function(){this.__isMounted=!1}},y={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},b=function(){};return r(b.prototype,e.prototype,y),function(e){var t=function(e,r,a){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=m(e,i)}}(this),this.props=e,this.context=r,this.refs=i,this.updater=a||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;o("object"===typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new b,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],a.forEach(h.bind(null,t)),h(t,g),h(t,e),h(t,v),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),o(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),s)t.prototype[r]||(t.prototype[r]=null);return t}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r=n(313);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t,n){var r=n(179);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n,r){(function(n){t.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){var r=Object.prototype.toString;t.exports=function(e){return e.BYTES_PER_ELEMENT&&"[object ArrayBuffer]"===r.call(e.buffer)||Array.isArray(e)}},{}],2:[function(e,t,n){t.exports=function(e,t){return"number"===typeof e?e:"number"===typeof t?t:0}},{}],3:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,s[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(u(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){"use strict";t.exports={createLink:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");for(var i in r.href=e,r.rel="stylesheet",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}n.appendChild(r)},createStyle:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");for(var i in r.type="text/css",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}r.sheet?(r.innerHTML=e,r.sheet.cssText=e,n.appendChild(r)):r.styleSheet?(n.appendChild(r),r.styleSheet.cssText=e):(r.appendChild(document.createTextNode(e)),n.appendChild(r))}}},{}],5:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e,t){if(r.isBuffer(e)&&r.isBuffer(t)){if("function"===typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}}},{buffer:6}],6:[function(t,r,i){(function(n,r){"use strict";var o=t("base64-js"),a=t("ieee754"),s=t("isarray");function l(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(l()<t)throw new RangeError("Invalid typed array length");return r.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=r.prototype:(null===e&&(e=new r(t)),e.length=t),e}function r(e,t,n){if(!r.TYPED_ARRAY_SUPPORT&&!(this instanceof r))return new r(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),r.TYPED_ARRAY_SUPPORT?(e=t).__proto__=r.prototype:e=f(e,t),e}(e,t,n,i):"string"===typeof t?function(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|m(t,n),o=(e=c(e,i)).write(t,n);return o!==i&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(r.isBuffer(t)){var n=0|p(t.length);return 0===(e=c(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(i=t.length)!==i?c(e,0):f(e,t);if("Buffer"===t.type&&s(t.data))return f(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(h(t),e=c(e,t<0?0:0|p(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=c(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function m(e,t){if(r.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return z(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,i,o){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,o);if("number"===typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function x(e,t,n,r){return U(z(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return _(e,t,n,r)}function A(e,t,n,r){return U(H(t),e,n,r)}function S(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function M(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||N(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||N(e,0,n,8),a.write(e,t,n,r,52,8),n+8}i.Buffer=r,i.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},i.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),i.kMaxLength=l(),r.poolSize=8192,r._augment=function(e){return e.__proto__=r.prototype,e},r.from=function(e,t,n){return u(null,e,t,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?c(e,t):void 0!==n?"string"===typeof r?c(e,t).fill(n,r):c(e,t).fill(n):c(e,t)}(null,e,t,n)},r.allocUnsafe=function(e){return d(null,e)},r.allocUnsafeSlow=function(e){return d(null,e)},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return r.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=r.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!r.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},r.byteLength=m,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},r.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){a=c[h],s=u[h];break}return a<s?-1:s<a?1:0},r.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},r.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},r.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},r.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=r.prototype;else{var o=t-e;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},r.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},r.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,a=i-n;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!r.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=r.isBuffer(e)?e:z(new r(e,i).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},t("buffer").Buffer)},{"base64-js":3,buffer:6,ieee754:29,isarray:35}],7:[function(t,n,r){!function(){if("undefined"!==typeof window)try{var t=new window.CustomEvent("test",{cancelable:!0});if(t.preventDefault(),!0!==t.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var n=function(e,n){var r,i;return(n=n||{}).bubbles=!!n.bubbles,n.cancelable=!!n.cancelable,(r=document.createEvent("CustomEvent")).initCustomEvent(e,n.bubbles,n.cancelable,n.detail),i=r.preventDefault,r.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},r};n.prototype=window.Event.prototype,window.CustomEvent=n}}()},{}],8:[function(t,n,r){function i(){var t;try{t=r.storage.debug}catch(e){}return t}(r=n.exports=t("./debug")).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" "),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var r=0,i=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,n),e},r.save=function(t){try{null==t?r.storage.removeItem("debug"):r.storage.debug=t}catch(e){}},r.load=i,r.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(i())},{"./debug":9}],9:[function(e,t,n){(n=t.exports=function(e){function t(){}function r(){var e=r;null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=i());var t=Array.prototype.slice.call(arguments);t[0]=n.coerce(t[0]),"string"!==typeof t[0]&&(t=["%o"].concat(t));var o=0;t[0]=t[0].replace(/%([a-z%])/g,(function(r,i){if("%%"===r)return r;o++;var a=n.formatters[i];if("function"===typeof a){var s=t[o];r=a.call(e,s),t.splice(o,1),o--}return r})),"function"===typeof n.formatArgs&&(t=n.formatArgs.apply(e,t));var a=r.log||n.log||console.log.bind(console);a.apply(e,t)}t.enabled=!1,r.enabled=!0;var o=n.enabled(e)?r:t;return o.namespace=e,o}).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.names=[],n.skips=[],n.formatters={};var r=0;function i(){return n.colors[r++%n.colors.length]}},{}],10:[function(e,t,n){"use strict";var r=e("is-obj"),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}t.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},{"is-obj":34}],11:[function(t,n,r){"use strict";var i=t("object-keys"),o="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,s=Array.prototype.concat,l=Object.defineProperty,c=l&&function(){var t={};try{for(var n in l(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(e){return!1}}(),u=function(e,t,n,r){var i;(!(t in e)||"function"===typeof(i=r)&&"[object Function]"===a.call(i)&&r())&&(c?l(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},h=function(e,t){var n=arguments.length>2?arguments[2]:{},r=i(t);o&&(r=s.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)u(e,r[a],t[r[a]],n[r[a]])};h.supportsDescriptors=!!c,n.exports=h},{"object-keys":41}],12:[function(t,n,r){!function(t,n,r,i){"use strict";function o(e,t){for(var n=0,r=e.length;n<r;n++)m(e[n],t)}function a(e){return function(t){ne(t)&&(m(t,e),o(t.querySelectorAll(F),e))}}function s(e){var t=oe.call(e,"is"),n=e.nodeName.toUpperCase(),r=H.call(j,t?D+t.toUpperCase():L+n);return t&&-1<r&&!l(n,t)?-1:r}function l(e,t){return-1<F.indexOf(e+'[is="'+t+'"]')}function c(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;me&&(!i||i===t)&&t.attributeChangedCallback&&"style"!==r&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,n===e[T]?null:e.prevValue,n===e[O]?null:e.newValue)}function u(e){var t=a(e);return function(e){g.push(t,e.target)}}function h(e){pe&&(pe=!1,e.currentTarget.removeEventListener(k,h)),o((e.target||n).querySelectorAll(F),e.detail===S?S:A),te&&function(){for(var e,t=0,n=re.length;t<n;t++)e=re[t],z.contains(e)||(n--,re.splice(t--,1),m(e,S))}()}function d(e,t){var n=this;ae.call(n,e,t),v.call(n,{target:n})}function f(e,t){J(e,t),w?w.observe(e,ce):(fe&&(e.setAttribute=d,e[E]=b(e),e.addEventListener(P,v)),e.addEventListener(R,c)),e.createdCallback&&me&&(e.created=!0,e.createdCallback(),e.created=!1)}function p(e){throw new Error("A "+e+" type is already registered")}function m(e,t){var n,r=s(e);-1<r&&(x(e,B[r]),r=0,t!==A||e[A]?t===S&&!e[S]&&(e[A]=!1,e[S]=!0,r=1):(e[S]=!1,e[A]=!0,r=1,te&&H.call(re,e)<0&&re.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}if(!(i in n)){var g,v,y,b,w,x,_,E="__"+i+(1e5*Math.random()>>0),A="attached",S="detached",M="extends",T="ADDITION",C="MODIFICATION",O="REMOVAL",R="DOMAttrModified",k="DOMContentLoaded",P="DOMSubtreeModified",L="<",D="=",I=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,N=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],j=[],B=[],F="",z=n.documentElement,H=j.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},U=r.prototype,V=U.hasOwnProperty,G=U.isPrototypeOf,W=r.defineProperty,q=r.getOwnPropertyDescriptor,X=r.getOwnPropertyNames,Y=r.getPrototypeOf,K=r.setPrototypeOf,Q=!!r.__proto__,Z=r.create||function e(t){return t?(e.prototype=t,new e):this},J=K||(Q?function(e,t){return e.__proto__=t,e}:X&&q?function(){function e(e,t){for(var n,r=X(t),i=0,o=r.length;i<o;i++)n=r[i],V.call(e,n)||W(e,n,q(t,n))}return function(t,n){do{e(t,n)}while((n=Y(n))&&!G.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),$=t.MutationObserver||t.WebKitMutationObserver,ee=(t.HTMLElement||t.Element||t.Node).prototype,te=!G.call(ee,z),ne=te?function(e){return 1===e.nodeType}:function(e){return G.call(ee,e)},re=te&&[],ie=ee.cloneNode,oe=ee.getAttribute,ae=ee.setAttribute,se=ee.removeAttribute,le=n.createElement,ce=$&&{attributes:!0,characterData:!0,attributeOldValue:!0},ue=$||function(e){fe=!1,z.removeEventListener(R,ue)},he=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},de=!1,fe=!0,pe=!0,me=!0;K||Q?(x=function(e,t){G.call(t,e)||f(e,t)},_=f):_=x=function(e,t){e[E]||(e[E]=r(!0),f(e,t))},te?(fe=!1,function(){var t=q(ee,"addEventListener"),n=t.value,r=function(e){var t=new CustomEvent(R,{bubbles:!0});t.attrName=e,t.prevValue=oe.call(this,e),t.newValue=null,t[O]=t.attrChange=2,se.call(this,e),this.dispatchEvent(t)},i=function(t,n){var r=this.hasAttribute(t),i=r&&oe.call(this,t);e=new CustomEvent(R,{bubbles:!0}),ae.call(this,t,n),e.attrName=t,e.prevValue=r?i:null,e.newValue=n,r?e[C]=e.attrChange=1:e[T]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t,n=e.currentTarget,r=n[E],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(R,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[T]=t.attrChange=0:t[C]=t.attrChange=1,n.dispatchEvent(t))};t.value=function(e,t,a){e===R&&this.attributeChangedCallback&&this.setAttribute!==i&&(this[E]={className:{name:"class",value:this.className}},this.setAttribute=i,this.removeAttribute=r,n.call(this,"propertychange",o)),n.call(this,e,t,a)},W(ee,"addEventListener",t)}()):$||(z.addEventListener(R,ue),z.setAttribute(E,1),z.removeAttribute(E),fe&&(v=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[E],i[E]=n=b(i),n){if(!(r in t))return y(0,i,r,t[r],n[r],T);if(n[r]!==t[r])return y(1,i,r,t[r],n[r],C)}for(r in t)if(!(r in n))return y(2,i,r,t[r],n[r],O)}},y=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,c(a)},b=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),n[i]=function(e,t){if(r=e.toUpperCase(),de||(de=!0,$?(w=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new $((function(r){for(var i,o,a,s=0,l=r.length;s<l;s++)"childList"===(i=r[s]).type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,me&&o.attributeChangedCallback&&"style"!==i.attributeName&&(a=oe.call(o,i.attributeName))!==i.oldValue&&o.attributeChangedCallback(i.attributeName,i.oldValue,a))}))}(a(A),a(S))).observe(n,{childList:!0,subtree:!0}):(g=[],he((function e(){for(;g.length;)g.shift().call(null,g.shift());he(e)})),n.addEventListener("DOMNodeInserted",u(A)),n.addEventListener("DOMNodeRemoved",u(S))),n.addEventListener(k,h),n.addEventListener("readystatechange",h),n.createElement=function(e,t){var r=le.apply(n,arguments),i=""+e,o=H.call(j,(t?D:L)+(t||i).toUpperCase()),a=-1<o;return t&&(r.setAttribute("is",t=t.toLowerCase()),a&&(a=l(i.toUpperCase(),t))),me=!n.createElement.innerHTMLHelper,a&&_(r,B[o]),r},ee.cloneNode=function(e){var t=ie.call(this,!!e),n=s(t);return-1<n&&_(t,B[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],_(t,B[s(t)])}(t.querySelectorAll(F)),t}),-2<H.call(j,D+r)+H.call(j,L+r)&&p(e),!I.test(r)||-1<H.call(N,r))throw new Error("The type "+e+" is invalid");var r,i,c=function(){return f?n.createElement(m,r):n.createElement(m)},d=t||U,f=V.call(d,M),m=f?t[M].toUpperCase():r;return f&&-1<H.call(j,L+m)&&p(m),i=j.push((f?D:L)+r)-1,F=F.concat(F.length?",":"",f?m+'[is="'+e.toLowerCase()+'"]':m),c.prototype=B[i]=V.call(d,"prototype")?d.prototype:Z(ee),o(n.querySelectorAll(F),A),c}}}(window,document,Object,"registerElement")},{}],13:[function(e,t,n){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],14:[function(e,t,n){"use strict";var r=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator,o=Object.getPrototypeOf||function(e){return e.__proto__},a=void 0,s="undefined"===typeof Uint8Array?void 0:o(Uint8Array),l={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":i?o([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":a&&i&&Symbol.asyncIterator?a[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"===typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"===typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"===typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"===typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"===typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"===typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"===typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"===typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"===typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"===typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"===typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"===typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"===typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":i?o(o([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"===typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!==typeof Map&&i?o((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"===typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"===typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"===typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"===typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"===typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"===typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"===typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"===typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"===typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"===typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!==typeof Set&&i?o((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"===typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":i?o(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":i?Symbol:void 0,"$ %SymbolPrototype%":i?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":r,"$ %TypedArray%":s,"$ %TypedArrayPrototype%":s?s.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"===typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"===typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"===typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"===typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"===typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"===typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"===typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"===typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"===typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"===typeof WeakSet?void 0:WeakSet.prototype};t.exports=function(e,t){if(arguments.length>1&&"boolean"!==typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in l))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeof l[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return l[n]}},{}],15:[function(e,t,n){"use strict";var r=e("./GetIntrinsic"),i=r("%Object%"),o=r("%TypeError%"),a=r("%String%"),s=e("./helpers/assertRecord"),l=e("./helpers/isNaN"),c=e("./helpers/isFinite"),u=e("./helpers/sign"),h=e("./helpers/mod"),d=e("is-callable"),f=e("es-to-primitive/es5"),p=e("has"),m={ToPrimitive:f,ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return l(t)?0:0!==t&&c(t)?u(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);if(l(t)||0===t||!c(t))return 0;var n=u(t)*Math.floor(Math.abs(t));return h(n,65536)},ToString:function(e){return a(e)},ToObject:function(e){return this.CheckObjectCoercible(e),i(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new o(t||"Cannot call method on "+e);return e},IsCallable:d,SameValue:function(e,t){return e===t?0!==e||1/e===1/t:l(e)&&l(t)},Type:function(e){return null===e?"Null":"undefined"===typeof e?"Undefined":"function"===typeof e||"object"===typeof e?"Object":"number"===typeof e?"Number":"boolean"===typeof e?"Boolean":"string"===typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(p(e,n)&&!t[n])return!1;var r=p(e,"[[Value]]"),i=p(e,"[[Get]]")||p(e,"[[Set]]");if(r&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Get]]")&&!p(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Value]]")&&!p(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"===typeof e)return e;if(s(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new o("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(p(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),p(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),p(e,"value")&&(t["[[Value]]"]=e.value),p(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),p(e,"get")){var n=e.get;if("undefined"!==typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(p(e,"set")){var r=e.set;if("undefined"!==typeof r&&!this.IsCallable(r))throw new o("setter must be a function");t["[[Set]]"]=r}if((p(t,"[[Get]]")||p(t,"[[Set]]"))&&(p(t,"[[Value]]")||p(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}};t.exports=m},{"./GetIntrinsic":14,"./helpers/assertRecord":16,"./helpers/isFinite":17,"./helpers/isNaN":18,"./helpers/mod":19,"./helpers/sign":20,"es-to-primitive/es5":21,has:28,"is-callable":32}],16:[function(e,t,n){"use strict";var r=e("../GetIntrinsic"),i=r("%TypeError%"),o=r("%SyntaxError%"),a=e("has"),s={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(a(t,r)&&!n[r])return!1;var o=a(t,"[[Value]]"),s=a(t,"[[Get]]")||a(t,"[[Set]]");if(o&&s)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}};t.exports=function(e,t,n,r){var a=s[t];if("function"!==typeof a)throw new o("unknown record type: "+t);if(!a(e,r))throw new i(n+" must be a "+t);console.log(a(e,r),r)}},{"../GetIntrinsic":14,has:28}],17:[function(e,t,n){var r=Number.isNaN||function(e){return e!==e};t.exports=Number.isFinite||function(e){return"number"===typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},{}],18:[function(e,t,n){t.exports=Number.isNaN||function(e){return e!==e}},{}],19:[function(e,t,n){t.exports=function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}},{}],20:[function(e,t,n){t.exports=function(e){return e>=0?1:-1}},{}],21:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=e("./helpers/isPrimitive"),o=e("is-callable"),a=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===r.call(e)?String:Number)===String||t===Number){var n,a,s=t===String?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<s.length;++a)if(o(e[s[a]])&&(n=e[s[a]](),i(n)))return n;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};t.exports=function(e){return i(e)?e:arguments.length>1?a(e,arguments[1]):a(e)}},{"./helpers/isPrimitive":22,"is-callable":32}],22:[function(e,t,n){t.exports=function(e){return null===e||"function"!==typeof e&&"object"!==typeof e}},{}],23:[function(e,t,n){var r=e("dtype");t.exports=function(e,t,n){if(!e)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(r(t||"float32"))(c+n));var u=t.length-n;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=n;i<e.length;i++)for(o=0;o<l;o++)t[a++]=null===e[i][o]?NaN:e[i][o]}else if(t&&"string"!==typeof t)t.set(e,n);else{var h=r(t||"float32");if(Array.isArray(e)||"array"===t)for(t=new h(e.length+n),i=0,a=n,s=t.length;a<s;a++,i++)t[a]=null===e[i]?NaN:e[i];else 0===n?t=new h(e):(t=new h(e.length+n)).set(e,n)}return t}},{dtype:13}],24:[function(e,t,n){"use strict";var r=e("is-callable"),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};t.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),"[object Array]"===i.call(e)?a(e,t,o):"string"===typeof e?s(e,t,o):l(e,t,o)}},{"is-callable":32}],25:[function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(e){var t=this;if("function"!==typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(i.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u<l;u++)c.push("$"+u);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n}},{}],26:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":25}],27:[function(e,t,r){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],28:[function(e,t,n){"use strict";var r=e("function-bind");t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":26}],29:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},{}],30:[function(e,t,n){"function"===typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],31:[function(e,t,n){function r(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],32:[function(t,n,r){"use strict";var i=Function.prototype.toString,o=/^\s*class\b/,a=function(t){try{var n=i.call(t);return o.test(n)}catch(e){return!1}},s=Object.prototype.toString,l="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;n.exports=function(t){if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if("function"===typeof t&&!t.prototype)return!0;if(l)return function(t){try{return!a(t)&&(i.call(t),!0)}catch(e){return!1}}(t);if(a(t))return!1;var n=s.call(t);return"[object Function]"===n||"[object GeneratorFunction]"===n}},{}],33:[function(e,t,n){t.exports=function(e){var t=r.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var r=Object.prototype.toString},{}],34:[function(e,t,n){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],35:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],36:[function(e,t,n){var r=e("word-wrapper"),i=e("xtend"),o=e("as-number"),a=["x","e","a","o","n","s","r","c","u","m","v","w","z"],s=["m","w"],l=["H","I","N","E","F","K","L","T","U","V","W","X","Y","Z"],c="\t".charCodeAt(0),u=" ".charCodeAt(0);function h(e){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(e)}function d(e){return new Function(["return function "+e+"() {"," return this._"+e,"}"].join("\n"))()}function f(e,t){if(!e.chars||0===e.chars.length)return null;var n=m(e.chars,t);return n>=0?e.chars[n]:null}function p(e,t,n){if(!e.kernings||0===e.kernings.length)return 0;for(var r=e.kernings,i=0;i<r.length;i++){var o=r[i];if(o.first===t&&o.second===n)return o.amount}return 0}function m(e,t,n){for(var r=n=n||0;r<e.length;r++)if(e[r].id===t)return r;return-1}t.exports=function(e){return new h(e)},h.prototype.update=function(e){if(e=i({measure:this._measure},e),this._opt=e,this._opt.tabSize=o(this._opt.tabSize,4),!e.font)throw new Error("must provide a valid bitmap font");var t=this.glyphs,n=e.text||"",s=e.font;this._setupSpaceGlyphs(s);var c=r.lines(n,e),u=e.width||0;t.length=0;var h=c.reduce((function(e,t){return Math.max(e,t.width,u)}),0),d=0,f=0,g=o(e.lineHeight,s.common.lineHeight),v=s.common.base,y=g-v,b=e.letterSpacing||0,w=g*c.length-y,x=function(e){return"center"===e?1:"right"===e?2:0}(this._opt.align);f-=w,this._width=h,this._height=w,this._descender=g-v,this._baseline=v,this._xHeight=function(e){for(var t=0;t<a.length;t++){var n=a[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._capHeight=function(e){for(var t=0;t<l.length;t++){var n=l[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._lineHeight=g,this._ascender=g-y-this._xHeight;var _=this;c.forEach((function(e,r){for(var i,o=e.start,a=e.end,l=e.width,c=o;c<a;c++){var u=n.charCodeAt(c),m=_.getGlyph(s,u);if(m){i&&(d+=p(s,i.id,m.id));var v=d;1===x?v+=(h-l)/2:2===x&&(v+=h-l),t.push({position:[v,f],data:m,index:c,line:r}),d+=m.xadvance+b,i=m}}f+=g,d=0})),this._linesTotal=c.length},h.prototype._setupSpaceGlyphs=function(e){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,e.chars&&0!==e.chars.length){var t=f(e,u)||function(e){for(var t=0;t<s.length;t++){var n=s[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r]}return 0}(e)||e.chars[0],n=this._opt.tabSize*t.xadvance;this._fallbackSpaceGlyph=t,this._fallbackTabGlyph=i(t,{x:0,y:0,xadvance:n,id:c,xoffset:0,yoffset:0,width:0,height:0})}},h.prototype.getGlyph=function(e,t){var n=f(e,t);return n||(t===c?this._fallbackTabGlyph:t===u?this._fallbackSpaceGlyph:null)},h.prototype.computeMetrics=function(e,t,n,r){var i,o=this._opt.letterSpacing||0,a=this._opt.font,s=0,l=0,c=0;if(!a.chars||0===a.chars.length)return{start:t,end:t,width:0};n=Math.min(e.length,n);for(var u=t;u<n;u++){var h,d=e.charCodeAt(u);if(h=this.getGlyph(a,d)){h.xoffset;var f=(s+=i?p(a,i.id,h.id):0)+h.xadvance+o,m=s+h.width;if(m>=r||f>=r)break;s=f,l=m,i=h}c++}return i&&(l+=i.xoffset),{start:t,end:t+c,width:l}},["width","height","descender","ascender","xHeight","baseline","capHeight","lineHeight"].forEach((function(e){Object.defineProperty(h.prototype,e,{get:d(e),configurable:!0})}))},{"as-number":2,"word-wrapper":69,xtend:72}],37:[function(t,n,r){(function(r){var i=t("xhr"),o=function(){},a=t("parse-bmfont-ascii"),s=t("parse-bmfont-xml"),l=t("parse-bmfont-binary"),c=t("./lib/is-binary"),u=t("xtend"),h=self.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest;n.exports=function(t,n){n="function"===typeof n?n:o,"string"===typeof t?t={uri:t}:t||(t={}),t.binary&&(t=function(e){if(h)return u(e,{responseType:"arraybuffer"});if("undefined"===typeof self.XMLHttpRequest)throw new Error("your browser does not support XHR loading");var t=new self.XMLHttpRequest;return t.overrideMimeType("text/plain; charset=x-user-defined"),u({xhr:t},e)}(t)),i(t,(function(i,u,h){if(i)return n(i);if(!/^2/.test(u.statusCode))return n(new Error("http status code: "+u.statusCode));if(!h)return n(new Error("no body result"));var d,f,p=!1;if(d=h,"[object ArrayBuffer]"===Object.prototype.toString.call(d)){var m=new Uint8Array(h);h=new r(m,"binary")}c(h)&&(p=!0,"string"===typeof h&&(h=new r(h,"binary"))),p||(r.isBuffer(h)&&(h=h.toString(t.encoding)),h=h.trim());try{var g=u.headers["content-type"];f=p?l(h):/json/.test(g)||"{"===h.charAt(0)?JSON.parse(h):/xml/.test(g)||"<"===h.charAt(0)?s(h):a(h)}catch(e){n(new Error("error parsing font "+e.message)),n=o}n(null,f)}))}}).call(this,t("buffer").Buffer)},{"./lib/is-binary":38,buffer:6,"parse-bmfont-ascii":43,"parse-bmfont-binary":44,"parse-bmfont-xml":45,xhr:70,xtend:72}],38:[function(e,t,n){(function(n){var r=e("buffer-equal"),i=new n([66,77,70,3]);t.exports=function(e){return"string"===typeof e?"BMF"===e.substring(0,3):e.length>4&&r(e.slice(0,4),i)}}).call(this,e("buffer").Buffer)},{buffer:6,"buffer-equal":5}],39:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},{}],40:[function(t,n,r){"use strict";var i;if(!Object.keys){var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=t("./isArguments"),l=Object.prototype.propertyIsEnumerable,c=!l.call({toString:null},"toString"),u=l.call((function(){}),"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{d(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();i=function(t){var n=null!==t&&"object"===typeof t,r="[object Function]"===a.call(t),i=s(t),l=n&&"[object String]"===a.call(t),f=[];if(!n&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var m=u&&r;if(l&&t.length>0&&!o.call(t,0))for(var g=0;g<t.length;++g)f.push(String(g));if(i&&t.length>0)for(var v=0;v<t.length;++v)f.push(String(v));else for(var y in t)m&&"prototype"===y||!o.call(t,y)||f.push(String(y));if(c)for(var b=function(t){if("undefined"===typeof window||!p)return d(t);try{return d(t)}catch(e){return!1}}(t),w=0;w<h.length;++w)b&&"constructor"===h[w]||!o.call(t,h[w])||f.push(h[w]);return f}}n.exports=i},{"./isArguments":42}],41:[function(e,t,n){"use strict";var r=Array.prototype.slice,i=e("./isArguments"),o=Object.keys,a=o?function(e){return o(e)}:e("./implementation"),s=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=a,Object.keys||a},t.exports=a},{"./implementation":40,"./isArguments":42}],42:[function(e,t,n){"use strict";var r=Object.prototype.toString;t.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},{}],43:[function(e,t,n){function r(e,t){if(!(e=e.replace(/\t+/g," ").trim()))return null;var n=e.indexOf(" ");if(-1===n)throw new Error("no named row at line "+t);var r=e.substring(0,n);e=(e=(e=(e=e.substring(n+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map((function(e){return e.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)}));for(var o=[],a=0;a<e.length;a++){var s=e[a];0===a?o.push({key:s[0],data:""}):a===e.length-1?o[o.length-1].data=i(s[0]):(o[o.length-1].data=i(s[0]),o.push({key:s[1],data:""}))}var l={key:r,data:{}};return o.forEach((function(e){l.data[e.key]=e.data})),l}function i(e){return e&&0!==e.length?0===e.indexOf('"')||0===e.indexOf("'")?e.substring(1,e.length-1):-1!==e.indexOf(",")?function(e){return e.split(",").map((function(e){return parseInt(e,10)}))}(e):parseInt(e,10):""}t.exports=function(e){if(!e)throw new Error("no data provided");var t={pages:[],chars:[],kernings:[]},n=(e=e.toString().trim()).split(/\r\n?|\n/g);if(0===n.length)throw new Error("no data in BMFont file");for(var i=0;i<n.length;i++){var o=r(n[i],i);if(o)if("page"===o.key){if("number"!==typeof o.data.id)throw new Error("malformed file at line "+i+" -- needs page id=N");if("string"!==typeof o.data.file)throw new Error("malformed file at line "+i+' -- needs page file="path"');t.pages[o.data.id]=o.data.file}else"chars"===o.key||"kernings"===o.key||("char"===o.key?t.chars.push(o.data):"kerning"===o.key?t.kernings.push(o.data):t[o.key]=o.data)}return t}},{}],44:[function(e,t,n){var r=[66,77,70];function i(e,t,n){if(n>t.length-1)return 0;var r=t.readUInt8(n++),i=t.readInt32LE(n);switch(n+=4,r){case 1:e.info=function(e,t){var n={};n.size=e.readInt16LE(t);var r=e.readUInt8(t+2);return n.smooth=r>>7&1,n.unicode=r>>6&1,n.italic=r>>5&1,n.bold=r>>4&1,r>>3&1&&(n.fixedHeight=1),n.charset=e.readUInt8(t+3)||"",n.stretchH=e.readUInt16LE(t+4),n.aa=e.readUInt8(t+6),n.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],n.spacing=[e.readInt8(t+11),e.readInt8(t+12)],n.outline=e.readUInt8(t+13),n.face=function(e,t){return o(e,t).toString("utf8")}(e,t+14),n}(t,n);break;case 2:e.common=function(e,t){var n={};return n.lineHeight=e.readUInt16LE(t),n.base=e.readUInt16LE(t+2),n.scaleW=e.readUInt16LE(t+4),n.scaleH=e.readUInt16LE(t+6),n.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),n.packed=0,n.alphaChnl=e.readUInt8(t+11),n.redChnl=e.readUInt8(t+12),n.greenChnl=e.readUInt8(t+13),n.blueChnl=e.readUInt8(t+14),n}(t,n);break;case 3:e.pages=function(e,t,n){for(var r=[],i=o(e,t),a=i.length+1,s=n/a,l=0;l<s;l++)r[l]=e.slice(t,t+i.length).toString("utf8"),t+=a;return r}(t,n,i);break;case 4:e.chars=function(e,t,n){for(var r=[],i=n/20,o=0;o<i;o++){var a={},s=20*o;a.id=e.readUInt32LE(t+0+s),a.x=e.readUInt16LE(t+4+s),a.y=e.readUInt16LE(t+6+s),a.width=e.readUInt16LE(t+8+s),a.height=e.readUInt16LE(t+10+s),a.xoffset=e.readInt16LE(t+12+s),a.yoffset=e.readInt16LE(t+14+s),a.xadvance=e.readInt16LE(t+16+s),a.page=e.readUInt8(t+18+s),a.chnl=e.readUInt8(t+19+s),r[o]=a}return r}(t,n,i);break;case 5:e.kernings=function(e,t,n){for(var r=[],i=n/10,o=0;o<i;o++){var a={},s=10*o;a.first=e.readUInt32LE(t+0+s),a.second=e.readUInt32LE(t+4+s),a.amount=e.readInt16LE(t+8+s),r[o]=a}return r}(t,n,i)}return 5+i}function o(e,t){for(var n=t;n<e.length&&0!==e[n];n++);return e.slice(t,n)}t.exports=function(e){if(e.length<6)throw new Error("invalid buffer length for BMFont");if(!r.every((function(t,n){return e.readUInt8(n)===t})))throw new Error("BMFont missing BMF byte header");var t=3;if(e.readUInt8(t++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var n={kernings:[],chars:[]},o=0;o<5;o++)t+=i(n,e,t);return n}},{}],45:[function(e,t,n){var r=e("./parse-attribs"),i=e("xml-parse-from-string"),o={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"};function a(e){return function(e){for(var t=[],n=0;n<e.attributes.length;n++)t.push(e.attributes[n]);return t}(e).reduce((function(e,t){var n;return e[(n=t.nodeName,o[n.toLowerCase()]||n)]=t.nodeValue,e}),{})}t.exports=function(e){e=e.toString();var t=i(e),n={pages:[],chars:[],kernings:[]};["info","common"].forEach((function(e){var i=t.getElementsByTagName(e)[0];i&&(n[e]=r(a(i)))}));var o=t.getElementsByTagName("pages")[0];if(!o)throw new Error("malformed file -- no <pages> element");for(var s=o.getElementsByTagName("page"),l=0;l<s.length;l++){var c=s[l],u=parseInt(c.getAttribute("id"),10),h=c.getAttribute("file");if(isNaN(u))throw new Error('malformed file -- page "id" attribute is NaN');if(!h)throw new Error('malformed file -- needs page "file" attribute');n.pages[parseInt(u,10)]=h}return["chars","kernings"].forEach((function(e){var i=t.getElementsByTagName(e)[0];if(i)for(var o=e.substring(0,e.length-1),s=i.getElementsByTagName(o),l=0;l<s.length;l++){var c=s[l];n[e].push(r(a(c)))}})),n}},{"./parse-attribs":46,"xml-parse-from-string":71}],46:[function(e,t,n){t.exports=function(e){for(var t in"chasrset"in e&&(e.charset=e.chasrset,delete e.chasrset),e)"face"!==t&&"charset"!==t&&(e[t]="padding"===t||"spacing"===t?e[t].split(",").map((function(e){return parseInt(e,10)})):parseInt(e[t],10));return e}},{}],47:[function(e,t,n){var r=e("string.prototype.trim"),i=e("for-each");t.exports=function(e){if(!e)return{};var t={};return i(r(e).split("\n"),(function(e){var n,i=e.indexOf(":"),o=r(e.slice(0,i)).toLowerCase(),a=r(e.slice(i+1));"undefined"===typeof t[o]?t[o]=a:(n=t[o],"[object Array]"===Object.prototype.toString.call(n)?t[o].push(a):t[o]=[t[o],a])})),t}},{"for-each":24,"string.prototype.trim":53}],48:[function(e,t,r){(function(e){var n=e.performance||{},r=function(){for(var e=["now","webkitNow","msNow","mozNow","oNow"];e.length;){var t=e.shift();if(t in n)return n[t].bind(n)}var r=Date.now||function(){return(new Date).getTime()},i=(n.timing||{}).navigationStart||r();return function(){return r()-i}}();r.performanceNow=n.now,r.noConflict=function(){n.now=r.performanceNow},r.conflict=function(){n.now=r},r.conflict(),t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],49:[function(t,n,r){var i,o,a=n.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"===typeof setTimeout?setTimeout:s}catch(e){i=s}try{o="function"===typeof clearTimeout?clearTimeout:l}catch(e){o=l}}();var u,h=[],d=!1,f=-1;function p(){d&&u&&(d=!1,u.length?h=u.concat(h):f=-1,h.length&&m())}function m(){if(!d){var t=c(p);d=!0;for(var n=h.length;n;){for(u=h,h=[];++f<n;)u&&u[f].run();f=-1,n=h.length}u=null,d=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(e,t){this.fun=e,this.array=t}function v(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new g(e,t)),1!==h.length||d||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],50:[function(t,n,r){(function(t){!function(r){var i=setTimeout,o="function"===typeof t&&t||function(e){i(e,1)};function a(e,t){return function(){e.apply(t,arguments)}}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],p(e,a(u,this),a(h,this))}function c(t){var n=this;null!==this._state?o((function(){var r=n._state?t.onFulfilled:t.onRejected;if(null!==r){var i;try{i=r(n._value)}catch(e){return void t.reject(e)}t.resolve(i)}else(n._state?t.resolve:t.reject)(n._value)})):this._deferreds.push(t)}function u(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if("function"===typeof n)return void p(a(n,t),a(u,this),a(h,this))}this._state=!0,this._value=t,d.call(this)}catch(e){h.call(this,e)}}function h(e){this._state=!1,this._value=e,d.call(this)}function d(){for(var e=0,t=this._deferreds.length;e<t;e++)c.call(this,this._deferreds[e]);this._deferreds=null}function f(e,t,n,r){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.resolve=n,this.reject=r}function p(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(i){if(r)return;r=!0,n(i)}}l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){var n=this;return new l((function(r,i){c.call(n,new f(e,t,r,i))}))},l.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&s(arguments[0])?arguments[0]:arguments);return new l((function(t,n){if(0===e.length)return t([]);var r=e.length;function i(o,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var s=a.then;if("function"===typeof s)return void s.call(a,(function(e){i(o,e)}),n)}e[o]=a,0===--r&&t(e)}catch(l){n(l)}}for(var o=0;o<e.length;o++)i(o,e[o])}))},l.resolve=function(e){return e&&"object"===typeof e&&e.constructor===l?e:new l((function(t){t(e)}))},l.reject=function(e){return new l((function(t,n){n(e)}))},l.race=function(e){return new l((function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)}))},l._setImmediateFn=function(e){o=e},"undefined"!==typeof n&&n.exports?n.exports=l:r.Promise||(r.Promise=l)}(this)}).call(this,t("timers").setImmediate)},{timers:67}],51:[function(e,t,n){var r=e("dtype"),i=e("an-array"),o=e("is-buffer"),a=[0,2,3],s=[2,1,3];t.exports=function(e,t){e&&(i(e)||o(e))||(t=e||{},e=null);for(var n="string"===typeof(t="number"===typeof t?{count:t}:t||{}).type?t.type:"uint16",l="number"===typeof t.count?t.count:1,c=t.start||0,u=!1!==t.clockwise?a:s,h=u[0],d=u[1],f=u[2],p=6*l,m=e||new(r(n))(p),g=0,v=0;g<p;g+=6,v+=4){var y=g+c;m[y+0]=v+0,m[y+1]=v+1,m[y+2]=v+2,m[y+3]=v+h,m[y+4]=v+d,m[y+5]=v+f}return m}},{"an-array":1,dtype:13,"is-buffer":31}],52:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("es-abstract/es5"),o=r.call(Function.call,String.prototype.replace),a=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var e=i.ToString(i.CheckObjectCoercible(this));return o(o(e,a,""),s,"")}},{"es-abstract/es5":15,"function-bind":26}],53:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("define-properties"),o=e("./implementation"),a=e("./polyfill"),s=e("./shim"),l=r.call(Function.call,a());i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},{"./implementation":52,"./polyfill":54,"./shim":55,"define-properties":11,"function-bind":26}],54:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:r}},{"./implementation":52}],55:[function(e,t,n){"use strict";var r=e("define-properties"),i=e("./polyfill");t.exports=function(){var e=i();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},{"./polyfill":54,"define-properties":11}],56:[function(t,n,r){"use strict";var i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},o={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},a=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],s={CSS:{},springs:{}};function l(e,t,n){return Math.min(Math.max(e,t),n)}function c(e,t){return e.indexOf(t)>-1}function u(e,t){return e.apply(null,t)}var h=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,d=/^rgb/,f=/^hsl/,p={arr:function(e){return Array.isArray(e)},obj:function(e){return c(Object.prototype.toString.call(e),"Object")},pth:function(e){return p.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return"string"===typeof e},fnc:function(e){return"function"===typeof e},und:function(e){return"undefined"===typeof e},hex:function(e){return h.test(e)},rgb:function(e){return d.test(e)},hsl:function(e){return f.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!i.hasOwnProperty(e)&&!o.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}},m=/\(([^)]+)\)/;function g(e){var t=m.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function v(e,t){var n=g(e),r=l(p.und(n[0])?1:n[0],.1,100),i=l(p.und(n[1])?100:n[1],.1,100),o=l(p.und(n[2])?10:n[2],.1,100),a=l(p.und(n[3])?0:n[3],.1,100),c=Math.sqrt(i/r),u=o/(2*Math.sqrt(i*r)),h=u<1?c*Math.sqrt(1-u*u):0,d=u<1?(u*c-a)/h:-a+c;function f(e){var n=t?t*e/1e3:e;return n=u<1?Math.exp(-n*u*c)*(1*Math.cos(h*n)+d*Math.sin(h*n)):(1+d*n)*Math.exp(-n*c),0===e||1===e?e:1-n}return t?f:function(){var t=s.springs[e];if(t)return t;for(var n=0,r=0;;)if(1===f(n+=1/6)){if(++r>=16)break}else r=0;var i=n*(1/6)*1e3;return s.springs[e]=i,i}}function y(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=l(e,1,10),r=l(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-r/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/r)}}function b(e){return void 0===e&&(e=10),function(t){return Math.round(t*e)*(1/e)}}var w=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function n(e){return 3*e}function r(r,i,o){return((e(i,o)*r+t(i,o))*r+n(i))*r}function i(r,i,o){return 3*e(i,o)*r*r+2*t(i,o)*r+n(i)}return function(e,t,n,o){if(0<=e&&e<=1&&0<=n&&n<=1){var a=new Float32Array(11);if(e!==t||n!==o)for(var s=0;s<11;++s)a[s]=r(.1*s,e,n);return function(i){return e===t&&n===o||0===i||1===i?i:r(l(i),t,o)}}function l(t){for(var o=0,s=1;10!==s&&a[s]<=t;++s)o+=.1;--s;var l=o+(t-a[s])/(a[s+1]-a[s])*.1,c=i(l,e,n);return c>=.001?function(e,t,n,o){for(var a=0;a<4;++a){var s=i(t,n,o);if(0===s)return t;t-=(r(t,n,o)-e)/s}return t}(t,l,e,n):0===c?l:function(e,t,n,i,o){var a,s,l=0;do{(a=r(s=t+(n-t)/2,i,o)-e)>0?n=s:t=s}while(Math.abs(a)>1e-7&&++l<10);return s}(t,o,o+.1,e,n)}}}(),x=function(){var e=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],y],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,t){return function(n){return 1-y(e,t)(1-n)}}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,t){return function(n){return n<.5?y(e,t)(2*n)/2:1-y(e,t)(-2*n+2)/2}}]},n={linear:[.25,.25,.75,.75]};for(var r in t)for(var i=0,o=t[r].length;i<o;i++)n["ease"+r+e[i]]=t[r][i];return n}();function _(e,t){if(p.fnc(e))return e;var n=e.split("(")[0],r=x[n],i=g(e);switch(n){case"spring":return v(e,t);case"cubicBezier":return u(w,i);case"steps":return u(b,i);default:return p.fnc(r)?u(r,i):u(w,r)}}function E(t){try{return document.querySelectorAll(t)}catch(e){return}}var A=[];function S(e,t){for(var n=A,r=e.length,i=arguments.length>=2?arguments[1]:void 0,o=0;o<r;o++)if(o in e){var a=e[o];t.call(i,a,o,e)&&n.push(a)}return(A=e).length=0,n}function M(e,t){t||(t=[]);for(var n=0,r=e.length;n<r;n++){var i=e[n];Array.isArray(i)?M(i,t):t.push(i)}return t}function T(e){return p.arr(e)?e:(p.str(e)&&(e=E(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function C(e,t){return e.some((function(e){return e===t}))}function O(e){var t={};for(var n in e)t[n]=e[n];return t}function R(e,t){var n=O(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n}function k(e,t){var n=O(e);for(var r in t)n[r]=p.und(e[r])?t[r]:e[r];return n}var P=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g,L=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,D=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,I=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g,N=/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g;function j(e){return p.rgb(e)?function(e){var t=P.exec(e);return t?"rgba("+t[1]+",1)":e}(e):p.hex(e)?function(e){var t=e.replace(L,(function(e,t,n,r){return t+t+n+n+r+r})),n=D.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):p.hsl(e)?function(e){var t,n,r,i=I.exec(e)||N.exec(e),o=parseInt(i[1],10)/360,a=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100,l=i[4]||1;function c(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(0==a)t=n=r=s;else{var u=s<.5?s*(1+a):s+a-s*a,h=2*s-u;t=c(h,u,o+1/3),n=c(h,u,o),r=c(h,u,o-1/3)}return"rgba("+255*t+","+255*n+","+255*r+","+l+")"}(e):void 0}var B=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;function F(e){var t=B.exec(e);if(t)return t[2]}function z(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function H(e,t){return e.getAttribute(t)}function U(e,t,n){if(C([n,"deg","rad","turn"],F(t)))return t;var r=s.CSS[t+n];if(!p.und(r))return r;var i=document.createElement(e.tagName),o=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;o.appendChild(i),i.style.position="absolute",i.style.width=100+n;var a=100/i.offsetWidth;o.removeChild(i);var l=a*parseFloat(t);return s.CSS[t+n]=l,l}function V(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?U(e,i,n):i}}function G(e,t){return p.dom(e)&&!p.inp(e)&&(H(e,t)||p.svg(e)&&e[t])?"attribute":p.dom(e)&&C(a,t)?"transform":p.dom(e)&&"transform"!==t&&V(e,t)?"css":null!=e[t]?"object":void 0}var W=/(\w+)\(([^)]*)\)/g;function q(e){if(p.dom(e)){for(var t,n=e.style.transform||"",r=new Map;t=W.exec(n);)r.set(t[1],t[2]);return r}}function X(e,t,n,r){var i=c(t,"scale")?1:0+function(e){return c(e,"translate")||"perspective"===e?"px":c(e,"rotate")||c(e,"skew")?"deg":void 0}(t),o=q(e).get(t)||i;return n&&(n.transforms.list.set(t,o),n.transforms.last=t),r?U(e,o,r):o}function Y(e,t,n,r){switch(G(e,t)){case"transform":return X(e,t,r,n);case"css":return V(e,t,n);case"attribute":return H(e,t);default:return e[t]||0}}var K=/^(\*=|\+=|-=)/;function Q(e,t){var n=K.exec(e);if(!n)return e;var r=F(e)||0,i=parseFloat(t),o=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+o+r;case"-":return i-o+r;case"*":return i*o+r}}var Z=/\s/g;function J(e,t){if(p.col(e))return j(e);var n=F(e),r=n?e.substr(0,e.length-n.length):e;return t&&!Z.test(e)?r+t:r}function $(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ee(e){for(var t,n=e.points,r=0,i=0;i<n.numberOfItems;i++){var o=n.getItem(i);i>0&&(r+=$(t,o)),t=o}return r}function te(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*H(e,"r")}(e);case"rect":return function(e){return 2*H(e,"width")+2*H(e,"height")}(e);case"line":return function(e){return $({x:H(e,"x1"),y:H(e,"y1")},{x:H(e,"x2"),y:H(e,"y2")})}(e);case"polyline":return ee(e);case"polygon":return function(e){var t=e.points;return ee(e)+$(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function ne(e,t){var n=t||{},r=n.el||function(e){for(var t=e.parentNode;p.svg(t)&&(t=t.parentNode,p.svg(t.parentNode)););return t}(e),i=r.getBoundingClientRect(),o=H(r,"viewBox"),a=i.width,s=i.height,l=n.viewBox||(o?o.split(" "):[0,0,a,s]);return{el:r,viewBox:l,x:l[0]/1,y:l[1]/1,w:a/l[2],h:s/l[3]}}function re(e,t){function n(n){void 0===n&&(n=0);var r=t+n>=1?t+n:0;return e.el.getPointAtLength(r)}var r=ne(e.el,e.svg),i=n(),o=n(-1),a=n(1);switch(e.property){case"x":return(i.x-r.x)*r.w;case"y":return(i.y-r.y)*r.h;case"angle":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}}var ie=/-?\d*\.?\d+/g;function oe(e,t){var n=J(p.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(ie)?n.match(ie).map(Number):[0],strings:p.str(e)||t?n.split(ie):[]}}function ae(e){return S(e?M(p.arr(e)?e.map(T):T(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function se(e){var t=ae(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:q(e)}}}))}var le=/^spring/;function ce(e,t){var n=O(t);if(le.test(n.easing)&&(n.duration=v(n.easing)),p.arr(e)){var r=e.length;2!==r||p.obj(e[0])?p.fnc(t.duration)||(n.duration=t.duration/r):e={value:e}}var i=p.arr(e)?e:[e];return i.map((function(e,n){var r=p.obj(e)&&!p.pth(e)?e:{value:e};return p.und(r.delay)&&(r.delay=n?0:t.delay),p.und(r.endDelay)&&(r.endDelay=n===i.length-1?t.endDelay:0),r})).map((function(e){return k(e,n)}))}function ue(e,t){var n=[],r=t.keyframes;for(var i in r&&(t=k(function(e){for(var t=S(M(e.map((function(e){return Object.keys(e)}))),(function(e){return p.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},r=function(r){var i=t[r];n[i]=e.map((function(e){var t={};for(var n in e)p.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)r(i);return n}(r),t)),t)p.key(i)&&n.push({name:i,tweens:ce(t[i],e)});return n}function he(e,t){var n;return e.tweens.map((function(r){var i=function(e,t){var n={};for(var r in e){var i=z(e[r],t);p.arr(i)&&1===(i=i.map((function(e){return z(e,t)}))).length&&(i=i[0]),n[r]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(r,t),o=i.value,a=p.arr(o)?o[1]:o,s=F(a),l=Y(t.target,e.name,s,t),c=n?n.to.original:l,u=p.arr(o)?o[0]:c,h=F(u)||F(l),d=s||h;return p.und(a)&&(a=c),i.from=oe(u,d),i.to=oe(Q(a,u),d),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=_(i.easing,i.duration),i.isPath=p.pth(o),i.isColor=p.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}var de={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,i){if(r.list.set(t,n),t===r.last||i){var o="";r.list.forEach((function(e,t){o+=t+"("+e+") "})),e.style.transform=o}}};function fe(e,t){for(var n=se(e),r=0,i=n.length;r<i;r++){var o=n[r];for(var a in t){var s=z(t[a],o),l=o.target,c=F(s),u=Y(l,a,c,o),h=Q(J(s,c||F(u)),u),d=G(l,a);de[d](l,a,h,o.transforms,!0)}}}function pe(e,t){return S(M(e.map((function(e){return t.map((function(t){return function(e,t){var n=G(e.target,t.name);if(n){var r=he(t,e),i=r[r.length-1];return{type:n,property:t.name,animatable:e,tweens:r,duration:i.end,delay:r[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!p.und(e)}))}function me(e,t){var n=e.length,r=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return r(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return r(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return r(e)+e.duration-e.endDelay}))):t.endDelay,i}var ge,ve=0,ye=[],be=[],we=function(){function e(){ge=requestAnimationFrame(t)}function t(t){var n=ye.length;if(n){for(var r=0;r<n;){var i=ye[r];if(i.paused){var o=ye.indexOf(i);o>-1&&(ye.splice(o,1),n=ye.length)}else i.tick(t);r++}e()}else ge=cancelAnimationFrame(ge)}return e}();function xe(e){void 0===e&&(e={});var t,n=0,r=0,a=0,s=0,c=null;function u(){return window.Promise&&new Promise((function(e){return c=e}))}var h=u(),d=function(e){var t=R(i,e),n=R(o,e),r=ue(n,e),a=se(e.targets),s=pe(a,r),l=me(s,n),c=ve;return ve++,k(t,{id:c,children:[],animatables:a,animations:s,duration:l.duration,delay:l.delay,endDelay:l.endDelay})}(e);function f(){d.reversed=!d.reversed;for(var e=0,n=t.length;e<n;e++)t[e].reversed=d.reversed}function p(e){return d.reversed?d.duration-e:e}function m(){n=0,r=p(d.currentTime)*(1/xe.speed)}function g(e,t){t&&t.seek(e-t.timelineOffset)}function v(e){for(var t=0,n=d.animations,r=n.length;t<r;){var i=n[t],o=i.animatable,a=i.tweens,s=a.length-1,c=a[s];s&&(c=S(a,(function(t){return e<t.end}))[0]||c);for(var u=l(e-c.start-c.delay,0,c.duration)/c.duration,h=isNaN(u)?1:c.easing(u),f=c.to.strings,p=c.round,m=[],g=c.to.numbers.length,v=void 0,y=0;y<g;y++){var b=void 0,w=c.to.numbers[y],x=c.from.numbers[y]||0;b=c.isPath?re(c.value,h*w):x+h*(w-x),p&&(c.isColor&&y>2||(b=Math.round(b*p)/p)),m.push(b)}var _=f.length;if(_){v=f[0];for(var E=0;E<_;E++){f[E];var A=f[E+1],M=m[E];isNaN(M)||(v+=A?M+A:M+" ")}}else v=m[0];de[i.type](o.target,i.property,v,o.transforms),i.currentValue=v,t++}}function y(e){d[e]&&!d.passThrough&&d[e](d)}function b(e){var i=d.duration,o=d.delay,m=i-d.endDelay,b=p(e);d.progress=l(b/i*100,0,100),d.reversePlayback=b<d.currentTime,t&&function(e){if(d.reversePlayback)for(var n=s;n--;)g(e,t[n]);else for(var r=0;r<s;r++)g(e,t[r])}(b),!d.began&&d.currentTime>0&&(d.began=!0,y("begin"),y("loopBegin")),b<=o&&0!==d.currentTime&&v(0),(b>=m&&d.currentTime!==i||!i)&&v(i),b>o&&b<m?(d.changeBegan||(d.changeBegan=!0,d.changeCompleted=!1,y("changeBegin")),y("change"),v(b)):d.changeBegan&&(d.changeCompleted=!0,d.changeBegan=!1,y("changeComplete")),d.currentTime=l(b,0,i),d.began&&y("update"),e>=i&&(r=0,d.remaining&&!0!==d.remaining&&d.remaining--,d.remaining?(n=a,y("loopComplete"),y("loopBegin"),"alternate"===d.direction&&f()):(d.paused=!0,d.completed||(d.completed=!0,y("loopComplete"),y("complete"),"Promise"in window&&(c(),h=u()))))}return d.reset=function(){var e=d.direction;d.passThrough=!1,d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.changeBegan=!1,d.completed=!1,d.changeCompleted=!1,d.reversePlayback=!1,d.reversed="reverse"===e,d.remaining=d.loop,t=d.children;for(var n=s=t.length;n--;)d.children[n].reset();(d.reversed&&!0!==d.loop||"alternate"===e&&1===d.loop)&&d.remaining++,v(0)},d.set=function(e,t){return fe(e,t),d},d.tick=function(e){a=e,n||(n=a),b((a+(r-n))*xe.speed)},d.seek=function(e){b(p(e))},d.pause=function(){d.paused=!0,m()},d.play=function(){d.paused&&(d.paused=!1,ye.push(d),m(),ge||we())},d.reverse=function(){f(),m()},d.restart=function(){d.reset(),d.play()},d.finished=h,d.reset(),d.autoplay&&d.play(),d}function _e(e,t){for(var n=t.length;n--;)C(e,t[n].animatable.target)&&t.splice(n,1)}document.addEventListener("visibilitychange",(function(){if(document.hidden){for(var e=0,t=ye.length;e<t;e++)activeInstance[e].pause();be=ye.slice(0),ye=[]}else for(var n=0,r=be.length;n<r;n++)be[n].play()})),xe.version="3.0.0",xe.speed=1,xe.running=ye,xe.remove=function(e){for(var t=ae(e),n=ye.length;n--;){var r=ye[n],i=r.animations,o=r.children;_e(t,i);for(var a=o.length;a--;){var s=o[a],l=s.animations;_e(t,l),l.length||s.children.length||o.splice(a,1)}i.length||o.length||r.pause()}},xe.get=Y,xe.set=fe,xe.convertPx=U,xe.path=function(e,t){var n=p.str(e)?E(e)[0]:e,r=t||100;return function(e){return{property:e,el:n,svg:ne(n),totalLength:te(n)*(r/100)}}},xe.setDashoffset=function(e){var t=te(e);return e.setAttribute("stroke-dasharray",t),t},xe.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",r=t.easing?_(t.easing):null,i=t.grid,o=t.axis,a=t.from||0,s="first"===a,l="center"===a,c="last"===a,u=p.arr(e),h=u?parseFloat(e[0]):parseFloat(e),d=u?parseFloat(e[1]):0,f=F(u?e[1]:e)||0,m=t.start||0+(u?h:0),g=[],v=0;return function(e,t,p){if(s&&(a=0),l&&(a=(p-1)/2),c&&(a=p-1),!g.length){for(var y=0;y<p;y++){if(i){var b=l?(i[0]-1)/2:a%i[0],w=l?(i[1]-1)/2:Math.floor(a/i[0]),x=b-y%i[0],_=w-Math.floor(y/i[0]),E=Math.sqrt(x*x+_*_);"x"===o&&(E=-x),"y"===o&&(E=-_),g.push(E)}else g.push(Math.abs(a-y));v=Math.max.apply(Math,g)}r&&(g=g.map((function(e){return r(e/v)*v}))),"reverse"===n&&(g=g.map((function(e){return o?e<0?-1*e:-e:Math.abs(v-e)})))}return m+(u?(d-h)/v:h)*(Math.round(100*g[t])/100)+f}},xe.timeline=function(e){void 0===e&&(e={});var t=xe(e);return t.duration=0,t.add=function(n,r){var i=ye.indexOf(t),a=t.children;function s(e){e.passThrough=!0}i>-1&&ye.splice(i,1);for(var l=0;l<a.length;l++)s(a[l]);var c=k(n,R(o,e));c.targets=c.targets||e.targets;var u=t.duration;c.autoplay=!1,c.direction=t.direction,c.timelineOffset=p.und(r)?u:Q(r,u),s(t),t.seek(c.timelineOffset);var h=xe(c);s(h),a.push(h);var d=me(a,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},xe.easing=_,xe.penner=x,xe.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},n.exports=xe},{}],57:[function(t,n,r){!function(e,t){t("object"===typeof r&&"undefined"!==typeof n?r:(e="undefined"!==typeof globalThis?globalThis:e||self).THREE={})}(this,(function(t){"use strict";void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype===!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t});var r=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}("object"===typeof n?n.exports:{});try{regeneratorRuntime=r}catch(cu){Function("r","regeneratorRuntime = r")(r)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(){}Object.assign(h.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r<i;r++)n[r].call(this,e)}}}});for(var d=[],f=0;f<256;f++)d[f]=(f<16?"0":"")+f.toString(16);var p,m=1234567,g={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(d[255&e]+d[e>>8&255]+d[e>>16&255]+d[e>>24&255]+"-"+d[255&t]+d[t>>8&255]+"-"+d[t>>16&15|64]+d[t>>24&255]+"-"+d[63&n|128]+d[n>>8&255]+"-"+d[n>>16&255]+d[n>>24&255]+d[255&r]+d[r>>8&255]+d[r>>16&255]+d[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},damp:function(e,t,n,r){return g.lerp(e,t,1-Math.exp(-n*r))},pingpong:function(e,t){return void 0===t&&(t=1),t-Math.abs(g.euclideanModulo(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){return void 0!==e&&(m=e%2147483647),((m=16807*m%2147483647)-1)/2147483646},degToRad:function(e){return e*g.DEG2RAD},radToDeg:function(e){return e*g.RAD2DEG},isPowerOfTwo:function(e){return 0===(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,n,r,i){var o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),c=o((t+r)/2),u=a((t+r)/2),h=o((t-r)/2),d=a((t-r)/2),f=o((r-t)/2),p=a((r-t)/2);switch(i){case"XYX":e.set(s*u,l*h,l*d,s*c);break;case"YZY":e.set(l*d,s*u,l*h,s*c);break;case"ZXZ":e.set(l*h,l*d,s*u,s*c);break;case"XZX":e.set(s*u,l*p,l*f,s*c);break;case"YXY":e.set(l*f,s*u,l*p,s*c);break;case"ZYZ":e.set(l*p,l*f,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}},v=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),Object.defineProperty(this,"isVector2",{value:!0}),this.x=e,this.y=t}var t=e.prototype;return t.set=function(e,t){return this.x=e,this.y=t,this},t.setScalar=function(e){return this.x=e,this.y=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y)},t.copy=function(e){return this.x=e.x,this.y=e.y,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.applyMatrix3=function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.dot=function(e){return this.x*e.x+this.y*e.y},t.cross=function(e){return this.x*e.y-this.y*e.x},t.lengthSq=function(){return this.x*this.x+this.y*this.y},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.angle=function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},t.rotateAround=function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this},a(e,[{key:"width",get:function(){return this.x},set:function(e){this.x=e}},{key:"height",get:function(){return this.y},set:function(e){this.y=e}}]),e}(),y=function(){function e(){Object.defineProperty(this,"isMatrix3",{value:!0}),this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l){var c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this},t.identity=function(){return this.set(1,0,0,0,1,0,0,0,1),this},t.clone=function(){return(new this.constructor).fromArray(this.elements)},t.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},t.extractBasis=function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},t.setFromMatrix4=function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},t.multiply=function(e){return this.multiplyMatrices(this,e)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this},t.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},t.determinant=function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s},t.invert=function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);var p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this},t.transpose=function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},t.getNormalMatrix=function(e){return this.setFromMatrix4(e).copy(this).invert().transpose()},t.transposeIntoArray=function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},t.setUvTransform=function(e,t,n,r,i,o,a){var s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this},t.scale=function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},t.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this},t.translate=function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},t.equals=function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e},e}(),b={getDataURL:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===p&&(p=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),p.width=e.width,p.height=e.height;var n=p.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=p}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},w=0;function x(e,t,n,r,i,o,a,s,l,c){void 0===e&&(e=x.DEFAULT_IMAGE),void 0===t&&(t=x.DEFAULT_MAPPING),void 0===n&&(n=1001),void 0===r&&(r=1001),void 0===i&&(i=1006),void 0===o&&(o=1008),void 0===a&&(a=1023),void 0===s&&(s=1009),void 0===l&&(l=1),void 0===c&&(c=3e3),Object.defineProperty(this,"id",{value:w++}),this.uuid=g.generateUUID(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=s,this.offset=new v(0,0),this.repeat=new v(1,1),this.center=new v(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new y,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}function _(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?b.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}x.DEFAULT_IMAGE=void 0,x.DEFAULT_MAPPING=300,x.prototype=Object.assign(Object.create(h.prototype),{constructor:x,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=g.generateUUID()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var o=0,a=r.length;o<a;o++)r[o].isDataTexture?i.push(_(r[o].image)):i.push(_(r[o]))}else i=_(r);e.images[r.uuid]={uuid:r.uuid,url:i}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(x.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}});var E=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isVector4",{value:!0}),this.x=e,this.y=t,this.z=n,this.w=r}var t=e.prototype;return t.set=function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.setW=function(e){return this.w=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z,this.w)},t.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},t.applyMatrix4=function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.setAxisAngleFromQuaternion=function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},t.setAxisAngleFromRotationMatrix=function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(u+1)/2,v=(p+1)/2,y=(s+c)/4,b=(l+d)/4,w=(h+f)/4;return m>g&&m>v?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):g>v?g<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(g)),i=w/r):v<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(v)),r=w/i),this.set(n,r,i,t),this}var x=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(x)<.001&&(x=1),this.x=(f-h)/x,this.y=(l-d)/x,this.z=(c-s)/x,this.w=Math.acos((a+u+p-1)/2),this},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this},a(e,[{key:"width",get:function(){return this.z},set:function(e){this.z=e}},{key:"height",get:function(){return this.w},set:function(e){this.w=e}}]),e}(),A=function(e){function t(t,n,r){var i;return i=e.call(this)||this,Object.defineProperty(l(i),"isWebGLRenderTarget",{value:!0}),i.width=t,i.height=n,i.scissor=new E(0,0,t,n),i.scissorTest=!1,i.viewport=new E(0,0,t,n),r=r||{},i.texture=new x(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),i.texture.image={},i.texture.image.width=t,i.texture.image.height=n,i.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,i.texture.minFilter=void 0!==r.minFilter?r.minFilter:1006,i.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,i.stencilBuffer=void 0!==r.stencilBuffer&&r.stencilBuffer,i.depthTexture=void 0!==r.depthTexture?r.depthTexture:null,i}s(t,e);var n=t.prototype;return n.setSize=function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},n.clone=function(){return(new this.constructor).copy(this)},n.copy=function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},n.dispose=function(){this.dispatchEvent({type:"dispose"})},t}(h),S=function(e){function t(t,n,r){var i;return i=e.call(this,t,n,r)||this,Object.defineProperty(l(i),"isWebGLMultisampleRenderTarget",{value:!0}),i.samples=4,i}return s(t,e),t.prototype.copy=function(t){return e.prototype.copy.call(this,t),this.samples=t.samples,this},t}(A),M=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isQuaternion",{value:!0}),this._x=e,this._y=t,this._z=n,this._w=r}e.slerp=function(e,t,n,r){return n.copy(e).slerp(t,r)},e.slerpFlat=function(e,t,n,r,i,o,a){var s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3],h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(u!==p||s!==h||l!==d||c!==f){var m=1-a,g=s*h+l*d+c*f+u*p,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),w=Math.atan2(b,g*v);m=Math.sin(m*w)/b,a=Math.sin(a*w)/b}var x=a*v;if(s=s*m+h*x,l=l*m+d*x,c=c*m+f*x,u=u*m+p*x,m===1-a){var _=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=_,l*=_,c*=_,u*=_}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u},e.multiplyQuaternionsFlat=function(e,t,n,r,i,o){var a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e};var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._w)},t.copy=function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},t.setFromEuler=function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this},t.setFromAxisAngle=function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},t.setFromRotationMatrix=function(e){var t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){var d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(c-s)*d,this._y=(i-l)*d,this._z=(o-r)*d}else if(n>a&&n>u){var f=2*Math.sqrt(1+n-a-u);this._w=(c-s)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(i+l)/f}else if(a>u){var p=2*Math.sqrt(1+a-n-u);this._w=(i-l)/p,this._x=(r+o)/p,this._y=.25*p,this._z=(s+c)/p}else{var m=2*Math.sqrt(1+u-n-a);this._w=(o-r)/m,this._x=(i+l)/m,this._y=(s+c)/m,this._z=.25*m}return this._onChangeCallback(),this},t.setFromUnitVectors=function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},t.angleTo=function(e){return 2*Math.acos(Math.abs(g.clamp(this.dot(e),-1,1)))},t.rotateTowards=function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},t.identity=function(){return this.set(0,0,0,1)},t.invert=function(){return this.conjugate()},t.conjugate=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},t.dot=function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},t.lengthSq=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},t.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},t.normalize=function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},t.premultiply=function(e){return this.multiplyQuaternions(e,this)},t.multiplyQuaternions=function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this},t.slerp=function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=1-a*a;if(s<=Number.EPSILON){var l=1-t;return this._w=l*o+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var c=Math.sqrt(s),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=o*h+this._w*d,this._x=n*h+this._x*d,this._y=r*h+this._y*d,this._z=i*h+this._z*d,this._onChangeCallback(),this},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},t.fromArray=function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},t.fromBufferAttribute=function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}]),e}(),T=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),Object.defineProperty(this,"isVector3",{value:!0}),this.x=e,this.y=t,this.z=n}var t=e.prototype;return t.set=function(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.setComponent=function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},t.getComponent=function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z)},t.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},t.add=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},t.sub=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this},t.multiplyVectors=function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},t.applyEuler=function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(O.setFromEuler(e))},t.applyAxisAngle=function(e,t){return this.applyQuaternion(O.setFromAxisAngle(e,t))},t.applyMatrix3=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},t.applyNormalMatrix=function(e){return this.applyMatrix3(e).normalize()},t.applyMatrix4=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},t.applyQuaternion=function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},t.project=function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},t.unproject=function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},t.transformDirection=function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},t.clamp=function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},t.roundToZero=function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this},t.cross=function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},t.crossVectors=function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},t.projectOnVector=function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)},t.projectOnPlane=function(e){return C.copy(this).projectOnVector(e),this.sub(C)},t.reflect=function(e){return this.sub(C.copy(e).multiplyScalar(2*this.dot(e)))},t.angleTo=function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(g.clamp(n,-1,1))},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},t.setFromSpherical=function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},t.setFromSphericalCoords=function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},t.setFromCylindrical=function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},t.setFromCylindricalCoords=function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},t.setFromMatrixPosition=function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},t.setFromMatrixScale=function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},t.setFromMatrixColumn=function(e,t){return this.fromArray(e.elements,4*t)},t.setFromMatrix3Column=function(e,t){return this.fromArray(e.elements,3*t)},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},t.fromBufferAttribute=function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this},e}(),C=new T,O=new M,R=function(){function e(e,t){Object.defineProperty(this,"isBox3",{value:!0}),this.min=void 0!==e?e:new T(1/0,1/0,1/0),this.max=void 0!==t?t:new T(-1/0,-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.setFromArray=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.length;s<l;s+=3){var c=e[s],u=e[s+1],h=e[s+2];c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.setFromBufferAttribute=function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.count;s<l;s++){var c=e.getX(s),u=e.getY(s),h=e.getZ(s);c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=L.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.setFromObject=function(e){return this.makeEmpty(),this.expandByObject(e)},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.makeEmpty=function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.expandByObject=function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),D.copy(t.boundingBox),D.applyMatrix4(e.matrixWorld),this.union(D));for(var n=e.children,r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this},t.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},t.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new T),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},t.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},t.intersectsSphere=function(e){return this.clampPoint(e.center,L),L.distanceToSquared(e.center)<=e.radius*e.radius},t.intersectsPlane=function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},t.intersectsTriangle=function(e){if(this.isEmpty())return!1;this.getCenter(H),U.subVectors(this.max,H),I.subVectors(e.a,H),N.subVectors(e.b,H),j.subVectors(e.c,H),B.subVectors(N,I),F.subVectors(j,N),z.subVectors(I,j);var t=[0,-B.z,B.y,0,-F.z,F.y,0,-z.z,z.y,B.z,0,-B.x,F.z,0,-F.x,z.z,0,-z.x,-B.y,B.x,0,-F.y,F.x,0,-z.y,z.x,0];return!!k(t,I,N,j,U)&&!!k(t=[1,0,0,0,1,0,0,0,1],I,N,j,U)&&(V.crossVectors(B,F),k(t=[V.x,V.y,V.z],I,N,j,U))},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new T),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return L.copy(e).clamp(this.min,this.max).sub(e).length()},t.getBoundingSphere=function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(L).length(),e},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.applyMatrix4=function(e){return this.isEmpty()||(P[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),P[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),P[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),P[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),P[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),P[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),P[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),P[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(P)),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}();function k(e,t,n,r,i){for(var o=0,a=e.length-3;o<=a;o+=3){G.fromArray(e,o);var s=i.x*Math.abs(G.x)+i.y*Math.abs(G.y)+i.z*Math.abs(G.z),l=t.dot(G),c=n.dot(G),u=r.dot(G);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var P=[new T,new T,new T,new T,new T,new T,new T,new T],L=new T,D=new R,I=new T,N=new T,j=new T,B=new T,F=new T,z=new T,H=new T,U=new T,V=new T,G=new T,W=new R,q=function(){function e(e,t){this.center=void 0!==e?e:new T,this.radius=void 0!==t?t:-1}var t=e.prototype;return t.set=function(e,t){return this.center.copy(e),this.radius=t,this},t.setFromPoints=function(e,t){var n=this.center;void 0!==t?n.copy(t):W.setFromPoints(e).getCenter(n);for(var r=0,i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.center.copy(e.center),this.radius=e.radius,this},t.isEmpty=function(){return this.radius<0},t.makeEmpty=function(){return this.center.set(0,0,0),this.radius=-1,this},t.containsPoint=function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},t.distanceToPoint=function(e){return e.distanceTo(this.center)-this.radius},t.intersectsSphere=function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},t.intersectsBox=function(e){return e.intersectsSphere(this)},t.intersectsPlane=function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},t.clampPoint=function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new T),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},t.getBoundingBox=function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new R),this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)},t.applyMatrix4=function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},t.translate=function(e){return this.center.add(e),this},t.equals=function(e){return e.center.equals(this.center)&&e.radius===this.radius},e}(),X=new T,Y=new T,K=new T,Q=new T,Z=new T,J=new T,$=new T,ee=function(){function e(e,t){this.origin=void 0!==e?e:new T,this.direction=void 0!==t?t:new T(0,0,-1)}var t=e.prototype;return t.set=function(e,t){return this.origin.copy(e),this.direction.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new T),t.copy(this.direction).multiplyScalar(e).add(this.origin)},t.lookAt=function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},t.recast=function(e){return this.origin.copy(this.at(e,X)),this},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new T),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},t.distanceToPoint=function(e){return Math.sqrt(this.distanceSqToPoint(e))},t.distanceSqToPoint=function(e){var t=X.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(X.copy(this.direction).multiplyScalar(t).add(this.origin),X.distanceToSquared(e))},t.distanceSqToSegment=function(e,t,n,r){Y.copy(e).add(t).multiplyScalar(.5),K.copy(t).sub(e).normalize(),Q.copy(this.origin).sub(Y);var i,o,a,s,l=.5*e.distanceTo(t),c=-this.direction.dot(K),u=Q.dot(this.direction),h=-Q.dot(K),d=Q.lengthSq(),f=Math.abs(1-c*c);if(f>0)if(o=c*u-h,s=l*f,(i=c*h-u)>=0)if(o>=-s)if(o<=s){var p=1/f;a=(i*=p)*(i+c*(o*=p)+2*u)+o*(c*i+o+2*h)+d}else o=l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o=-l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o<=-s?a=-(i=Math.max(0,-(-c*l+u)))*i+(o=i>0?-l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d:o<=s?(i=0,a=(o=Math.min(Math.max(-l,-h),l))*(o+2*h)+d):a=-(i=Math.max(0,-(c*l+u)))*i+(o=i>0?l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d;else o=c>0?-l:l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(K).multiplyScalar(o).add(Y),a},t.intersectSphere=function(e,t){X.subVectors(e.center,this.origin);var n=X.dot(this.direction),r=X.dot(X)-n*n,i=e.radius*e.radius;if(r>i)return null;var o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)},t.intersectsSphere=function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},t.distanceToPlane=function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},t.intersectPlane=function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},t.intersectsPlane=function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},t.intersectBox=function(e,t){var n,r,i,o,a,s,l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),u>=0?(a=(e.min.z-h.z)*u,s=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,s=(e.min.z-h.z)*u),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},t.intersectsBox=function(e){return null!==this.intersectBox(e,X)},t.intersectTriangle=function(e,t,n,r,i){Z.subVectors(t,e),J.subVectors(n,e),$.crossVectors(Z,J);var o,a=this.direction.dot($);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Q.subVectors(this.origin,e);var s=o*this.direction.dot(J.crossVectors(Q,J));if(s<0)return null;var l=o*this.direction.dot(Z.cross(Q));if(l<0)return null;if(s+l>a)return null;var c=-o*Q.dot($);return c<0?null:this.at(c/a,i)},t.applyMatrix4=function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},t.equals=function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)},e}(),te=function(){function e(){Object.defineProperty(this,"isMatrix4",{value:!0}),this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this},t.identity=function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},t.clone=function(){return(new e).fromArray(this.elements)},t.copy=function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},t.copyPosition=function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},t.setFromMatrix3=function(e){var t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this},t.extractBasis=function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},t.makeBasis=function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},t.extractRotation=function(e){var t=this.elements,n=e.elements,r=1/ne.setFromMatrixColumn(e,0).length(),i=1/ne.setFromMatrixColumn(e,1).length(),o=1/ne.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.makeRotationFromEuler=function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var h=o*c,d=o*u,f=a*c,p=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=d+f*l,t[5]=h-p*l,t[9]=-a*s,t[2]=p-h*l,t[6]=f+d*l,t[10]=o*s}else if("YXZ"===e.order){var m=s*c,g=s*u,v=l*c,y=l*u;t[0]=m+y*a,t[4]=v*a-g,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=g*a-v,t[6]=y+m*a,t[10]=o*s}else if("ZXY"===e.order){var b=s*c,w=s*u,x=l*c,_=l*u;t[0]=b-_*a,t[4]=-o*u,t[8]=x+w*a,t[1]=w+x*a,t[5]=o*c,t[9]=_-b*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){var E=o*c,A=o*u,S=a*c,M=a*u;t[0]=s*c,t[4]=S*l-A,t[8]=E*l+M,t[1]=s*u,t[5]=M*l+E,t[9]=A*l-S,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var T=o*s,C=o*l,O=a*s,R=a*l;t[0]=s*c,t[4]=R-T*u,t[8]=O*u+C,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=C*u+O,t[10]=T-R*u}else if("XZY"===e.order){var k=o*s,P=o*l,L=a*s,D=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=k*u+D,t[5]=o*c,t[9]=P*u-L,t[2]=L*u-P,t[6]=a*c,t[10]=D*u+k}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.makeRotationFromQuaternion=function(e){return this.compose(ie,e,oe)},t.lookAt=function(e,t,n){var r=this.elements;return le.subVectors(e,t),0===le.lengthSq()&&(le.z=1),le.normalize(),ae.crossVectors(n,le),0===ae.lengthSq()&&(1===Math.abs(n.z)?le.x+=1e-4:le.z+=1e-4,le.normalize(),ae.crossVectors(n,le)),ae.normalize(),se.crossVectors(le,ae),r[0]=ae.x,r[4]=se.x,r[8]=le.x,r[1]=ae.y,r[5]=se.y,r[9]=le.y,r[2]=ae.z,r[6]=se.z,r[10]=le.z,this},t.multiply=function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this},t.multiplyScalar=function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},t.determinant=function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)},t.transpose=function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},t.setPosition=function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this},t.invert=function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*h*l+p*s*d-a*m*d-u*s*g+a*h*g,y=f*h*l-c*m*l-f*s*d+o*m*d+c*s*g-o*h*g,b=c*p*l-f*u*l+f*a*d-o*p*d-c*a*g+o*u*g,w=f*u*s-c*p*s-f*a*h+o*p*h+c*a*m-o*u*m,x=t*v+n*y+r*b+i*w;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var _=1/x;return e[0]=v*_,e[1]=(p*h*i-u*m*i-p*r*d+n*m*d+u*r*g-n*h*g)*_,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*_,e[3]=(u*s*i-a*h*i-u*r*l+n*h*l+a*r*d-n*s*d)*_,e[4]=y*_,e[5]=(c*m*i-f*h*i+f*r*d-t*m*d-c*r*g+t*h*g)*_,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*_,e[7]=(o*h*i-c*s*i+c*r*l-t*h*l-o*r*d+t*s*d)*_,e[8]=b*_,e[9]=(f*u*i-c*p*i-f*n*d+t*p*d+c*n*g-t*u*g)*_,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*_,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*d-t*a*d)*_,e[12]=w*_,e[13]=(c*p*r-f*u*r+f*n*h-t*p*h-c*n*m+t*u*m)*_,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*_,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*h+t*a*h)*_,this},t.scale=function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this},t.getMaxScaleOnAxis=function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},t.makeTranslation=function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},t.makeRotationX=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},t.makeRotationY=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},t.makeRotationZ=function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},t.makeRotationAxis=function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},t.makeScale=function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},t.makeShear=function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},t.compose=function(e,t,n){var r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this},t.decompose=function(e,t,n){var r=this.elements,i=ne.set(r[0],r[1],r[2]).length(),o=ne.set(r[4],r[5],r[6]).length(),a=ne.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],re.copy(this);var s=1/i,l=1/o,c=1/a;return re.elements[0]*=s,re.elements[1]*=s,re.elements[2]*=s,re.elements[4]*=l,re.elements[5]*=l,re.elements[6]*=l,re.elements[8]*=c,re.elements[9]*=c,re.elements[10]*=c,t.setFromRotationMatrix(re),n.x=i,n.y=o,n.z=a,this},t.makePerspective=function(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),h=-(o+i)/(o-i),d=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},t.makeOrthographic=function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},t.equals=function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e},e}(),ne=new T,re=new te,ie=new T(0,0,0),oe=new T(1,1,1),ae=new T,se=new T,le=new T,ce=function(){function e(t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=e.DefaultOrder),Object.defineProperty(this,"isEuler",{value:!0}),this._x=t,this._y=n,this._z=r,this._order=i}var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._order)},t.copy=function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},t.setFromRotationMatrix=function(e,t,n){var r=g.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],f=i[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(r(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,f));break;case"XZY":this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==n&&this._onChangeCallback(),this},t.setFromQuaternion=function(e,t,n){return ue.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ue,t,n)},t.setFromVector3=function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},t.reorder=function(e){return he.setFromEuler(this),this.setFromQuaternion(he,e)},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},t.fromArray=function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},t.toVector3=function(e){return e?e.set(this._x,this._y,this._z):new T(this._x,this._y,this._z)},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}]),e}();ce.DefaultOrder="XYZ",ce.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var ue=new te,he=new M,de=function(){function e(){this.mask=1}var t=e.prototype;return t.set=function(e){this.mask=1<<e|0},t.enable=function(e){this.mask|=1<<e|0},t.enableAll=function(){this.mask=-1},t.toggle=function(e){this.mask^=1<<e|0},t.disable=function(e){this.mask&=~(1<<e|0)},t.disableAll=function(){this.mask=0},t.test=function(e){return 0!==(this.mask&e.mask)},e}(),fe=0,pe=new T,me=new M,ge=new te,ve=new T,ye=new T,be=new T,we=new M,xe=new T(1,0,0),_e=new T(0,1,0),Ee=new T(0,0,1),Ae={type:"added"},Se={type:"removed"};function Me(){Object.defineProperty(this,"id",{value:fe++}),this.uuid=g.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Me.DefaultUp.clone();var e=new T,t=new ce,n=new M,r=new T(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new te},normalMatrix:{value:new y}}),this.matrix=new te,this.matrixWorld=new te,this.matrixAutoUpdate=Me.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new de,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}Me.DefaultUp=new T(0,1,0),Me.DefaultMatrixAutoUpdate=!0,Me.prototype=Object.assign(Object.create(h.prototype),{constructor:Me,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.multiply(me),this},rotateOnWorldAxis:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.premultiply(me),this},rotateX:function(e){return this.rotateOnAxis(xe,e)},rotateY:function(e){return this.rotateOnAxis(_e,e)},rotateZ:function(e){return this.rotateOnAxis(Ee,e)},translateOnAxis:function(e,t){return pe.copy(e).applyQuaternion(this.quaternion),this.position.add(pe.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(xe,e)},translateY:function(e){return this.translateOnAxis(_e,e)},translateZ:function(e){return this.translateOnAxis(Ee,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(ge.copy(this.matrixWorld).invert())},lookAt:function(e,t,n){e.isVector3?ve.copy(e):ve.set(e,t,n);var r=this.parent;this.updateWorldMatrix(!0,!1),ye.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ge.lookAt(ye,ve,this.up):ge.lookAt(ve,ye,this.up),this.quaternion.setFromRotationMatrix(ge),r&&(ge.extractRotation(r.matrixWorld),me.setFromRotationMatrix(ge),this.quaternion.premultiply(me.invert()))},add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(Ae)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(Se)),this},clear:function(){for(var e=0;e<this.children.length;e++){var t=this.children[e];t.parent=null,t.dispatchEvent(Se)}return this.children.length=0,this},attach:function(e){return this.updateWorldMatrix(!0,!1),ge.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ge.multiply(e.parent.matrixWorld)),e.applyMatrix4(ge),e.updateWorldMatrix(!1,!1),this.add(e),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new M),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,e,be),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,we,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},updateWorldMatrix:function(e,t){var n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var r=this.children,i=0,o=r.length;i<o;i++)r[i].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);var o=this.geometry.parameters;if(void 0!==o&&void 0!==o.shapes){var a=o.shapes;if(Array.isArray(a))for(var s=0,l=a.length;s<l;s++){var c=a[s];i(e.shapes,c)}else i(e.shapes,a)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){for(var u=[],h=0,d=this.material.length;h<d;h++)u.push(i(e.materials,this.material[h]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(var f=0;f<this.children.length;f++)r.children.push(this.children[f].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(var p=0;p<this.animations.length;p++){var m=this.animations[p];r.animations.push(i(e.animations,m))}}if(t){var g=E(e.geometries),v=E(e.materials),y=E(e.textures),b=E(e.images),w=E(e.shapes),x=E(e.skeletons),_=E(e.animations);g.length>0&&(n.geometries=g),v.length>0&&(n.materials=v),y.length>0&&(n.textures=y),b.length>0&&(n.images=b),w.length>0&&(n.shapes=w),x.length>0&&(n.skeletons=x),_.length>0&&(n.animations=_)}return n.object=r,n;function E(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}});var Te=new T,Ce=new T,Oe=new y,Re=function(){function e(e,t){Object.defineProperty(this,"isPlane",{value:!0}),this.normal=void 0!==e?e:new T(1,0,0),this.constant=void 0!==t?t:0}var t=e.prototype;return t.set=function(e,t){return this.normal.copy(e),this.constant=t,this},t.setComponents=function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},t.setFromNormalAndCoplanarPoint=function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},t.setFromCoplanarPoints=function(e,t,n){var r=Te.subVectors(n,t).cross(Ce.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},t.normalize=function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},t.negate=function(){return this.constant*=-1,this.normal.negate(),this},t.distanceToPoint=function(e){return this.normal.dot(e)+this.constant},t.distanceToSphere=function(e){return this.distanceToPoint(e.center)-e.radius},t.projectPoint=function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new T),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},t.intersectLine=function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new T);var n=e.delta(Te),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?void 0:t.copy(n).multiplyScalar(i).add(e.start)},t.intersectsLine=function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},t.intersectsBox=function(e){return e.intersectsPlane(this)},t.intersectsSphere=function(e){return e.intersectsPlane(this)},t.coplanarPoint=function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new T),e.copy(this.normal).multiplyScalar(-this.constant)},t.applyMatrix4=function(e,t){var n=t||Oe.getNormalMatrix(e),r=this.coplanarPoint(Te).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this},t.translate=function(e){return this.constant-=e.dot(this.normal),this},t.equals=function(e){return e.normal.equals(this.normal)&&e.constant===this.constant},e}(),ke=new T,Pe=new T,Le=new T,De=new T,Ie=new T,Ne=new T,je=new T,Be=new T,Fe=new T,ze=new T,He=function(){function e(e,t,n){this.a=void 0!==e?e:new T,this.b=void 0!==t?t:new T,this.c=void 0!==n?n:new T}e.getNormal=function(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new T),r.subVectors(n,t),ke.subVectors(e,t),r.cross(ke);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)},e.getBarycoord=function(e,t,n,r,i){ke.subVectors(r,t),Pe.subVectors(n,t),Le.subVectors(e,t);var o=ke.dot(ke),a=ke.dot(Pe),s=ke.dot(Le),l=Pe.dot(Pe),c=Pe.dot(Le),u=o*l-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new T),0===u)return i.set(-2,-1,-1);var h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)},e.containsPoint=function(e,t,n,r){return this.getBarycoord(e,t,n,r,De),De.x>=0&&De.y>=0&&De.x+De.y<=1},e.getUV=function(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,De),s.set(0,0),s.addScaledVector(i,De.x),s.addScaledVector(o,De.y),s.addScaledVector(a,De.z),s},e.isFrontFacing=function(e,t,n,r){return ke.subVectors(n,t),Pe.subVectors(e,t),ke.cross(Pe).dot(r)<0};var t=e.prototype;return t.set=function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},t.setFromPointsAndIndices=function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},t.getArea=function(){return ke.subVectors(this.c,this.b),Pe.subVectors(this.a,this.b),.5*ke.cross(Pe).length()},t.getMidpoint=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new T),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},t.getNormal=function(t){return e.getNormal(this.a,this.b,this.c,t)},t.getPlane=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Re),e.setFromCoplanarPoints(this.a,this.b,this.c)},t.getBarycoord=function(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)},t.getUV=function(t,n,r,i,o){return e.getUV(t,this.a,this.b,this.c,n,r,i,o)},t.containsPoint=function(t){return e.containsPoint(t,this.a,this.b,this.c)},t.isFrontFacing=function(t){return e.isFrontFacing(this.a,this.b,this.c,t)},t.intersectsBox=function(e){return e.intersectsTriangle(this)},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new T);var n,r,i=this.a,o=this.b,a=this.c;Ie.subVectors(o,i),Ne.subVectors(a,i),Be.subVectors(e,i);var s=Ie.dot(Be),l=Ne.dot(Be);if(s<=0&&l<=0)return t.copy(i);Fe.subVectors(e,o);var c=Ie.dot(Fe),u=Ne.dot(Fe);if(c>=0&&u<=c)return t.copy(o);var h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return n=s/(s-c),t.copy(i).addScaledVector(Ie,n);ze.subVectors(e,a);var d=Ie.dot(ze),f=Ne.dot(ze);if(f>=0&&d<=f)return t.copy(a);var p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return r=l/(l-f),t.copy(i).addScaledVector(Ne,r);var m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return je.subVectors(a,o),r=(u-c)/(u-c+(d-f)),t.copy(o).addScaledVector(je,r);var g=1/(m+p+h);return n=p*g,r=h*g,t.copy(i).addScaledVector(Ie,n).addScaledVector(Ne,r)},t.equals=function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)},e}(),Ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ve={h:0,s:0,l:0},Ge={h:0,s:0,l:0};function We(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Xe(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var Ye=function(){function e(e,t,n){return Object.defineProperty(this,"isColor",{value:!0}),void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}var t=e.prototype;return t.set=function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this},t.setScalar=function(e){return this.r=e,this.g=e,this.b=e,this},t.setHex=function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},t.setRGB=function(e,t,n){return this.r=e,this.g=t,this.b=n,this},t.setHSL=function(e,t,n){if(e=g.euclideanModulo(e,1),t=g.clamp(t,0,1),n=g.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=We(i,r,e+1/3),this.g=We(i,r,e),this.b=We(i,r,e-1/3)}return this},t.setStyle=function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[4]),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[4]),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,l=parseInt(r[3],10)/100;return t(r[4]),this.setHSL(a,s,l)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){var c=n[1],u=c.length;if(3===u)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},t.setColorName=function(e){var t=Ue[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},t.clone=function(){return new this.constructor(this.r,this.g,this.b)},t.copy=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},t.copyGammaToLinear=function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},t.copyLinearToGamma=function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},t.convertGammaToLinear=function(e){return this.copyGammaToLinear(this,e),this},t.convertLinearToGamma=function(e){return this.copyLinearToGamma(this,e),this},t.copySRGBToLinear=function(e){return this.r=qe(e.r),this.g=qe(e.g),this.b=qe(e.b),this},t.copyLinearToSRGB=function(e){return this.r=Xe(e.r),this.g=Xe(e.g),this.b=Xe(e.b),this},t.convertSRGBToLinear=function(){return this.copySRGBToLinear(this),this},t.convertLinearToSRGB=function(){return this.copyLinearToSRGB(this),this},t.getHex=function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},t.getHexString=function(){return("000000"+this.getHex().toString(16)).slice(-6)},t.getHSL=function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(s+a)/2;if(s===a)t=0,n=0;else{var c=a-s;switch(n=l<=.5?c/(a+s):c/(2-a-s),a){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return e.h=t,e.s=n,e.l=l,e},t.getStyle=function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},t.offsetHSL=function(e,t,n){return this.getHSL(Ve),Ve.h+=e,Ve.s+=t,Ve.l+=n,this.setHSL(Ve.h,Ve.s,Ve.l),this},t.add=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},t.addColors=function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},t.addScalar=function(e){return this.r+=e,this.g+=e,this.b+=e,this},t.sub=function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},t.multiply=function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},t.multiplyScalar=function(e){return this.r*=e,this.g*=e,this.b*=e,this},t.lerp=function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},t.lerpColors=function(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this},t.lerpHSL=function(e,t){this.getHSL(Ve),e.getHSL(Ge);var n=g.lerp(Ve.h,Ge.h,t),r=g.lerp(Ve.s,Ge.s,t),i=g.lerp(Ve.l,Ge.l,t);return this.setHSL(n,r,i),this},t.equals=function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},t.fromArray=function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},t.toArray=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},t.fromBufferAttribute=function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this},t.toJSON=function(){return this.getHex()},e}();Ye.NAMES=Ue,Ye.prototype.r=1,Ye.prototype.g=1,Ye.prototype.b=1;var Ke=function(){function e(e,t,n,r,i,o){void 0===o&&(o=0),this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new T,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new Ye,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=o}var t=e.prototype;return t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var r=0,i=e.vertexColors.length;r<i;r++)this.vertexColors[r]=e.vertexColors[r].clone();return this},e}(),Qe=0;function Ze(){Object.defineProperty(this,"id",{value:Qe++}),this.uuid=g.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function Je(e){Ze.call(this),this.type="MeshBasicMaterial",this.color=new Ye(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.setValues(e)}Ze.prototype=Object.assign(Object.create(h.prototype),{constructor:Ze,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),o=r(e.images);i.length>0&&(n.textures=i),o.length>0&&(n.images=o)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ze.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Je.prototype=Object.create(Ze.prototype),Je.prototype.constructor=Je,Je.prototype.isMeshBasicMaterial=!0,Je.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this};var $e=new T,et=new v;function tt(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}function nt(e,t,n){tt.call(this,new Int8Array(e),t,n)}function rt(e,t,n){tt.call(this,new Uint8Array(e),t,n)}function it(e,t,n){tt.call(this,new Uint8ClampedArray(e),t,n)}function ot(e,t,n){tt.call(this,new Int16Array(e),t,n)}function at(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function st(e,t,n){tt.call(this,new Int32Array(e),t,n)}function lt(e,t,n){tt.call(this,new Uint32Array(e),t,n)}function ct(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function ut(e,t,n){tt.call(this,new Float32Array(e),t,n)}function ht(e,t,n){tt.call(this,new Float64Array(e),t,n)}function dt(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Object.defineProperty(tt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(tt.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new Ye),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),o=new v),t[n++]=o.x,t[n++]=o.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new T),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new E),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},applyMatrix3:function(e){if(2===this.itemSize)for(var t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXY(t,et.x,et.y);else if(3===this.itemSize)for(var r=0,i=this.count;r<i;r++)$e.fromBufferAttribute(this,r),$e.applyMatrix3(e),this.setXYZ(r,$e.x,$e.y,$e.z);return this},applyMatrix4:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyMatrix4(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},applyNormalMatrix:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyNormalMatrix(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},transformDirection:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.transformDirection(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),nt.prototype=Object.create(tt.prototype),nt.prototype.constructor=nt,rt.prototype=Object.create(tt.prototype),rt.prototype.constructor=rt,it.prototype=Object.create(tt.prototype),it.prototype.constructor=it,ot.prototype=Object.create(tt.prototype),ot.prototype.constructor=ot,at.prototype=Object.create(tt.prototype),at.prototype.constructor=at,st.prototype=Object.create(tt.prototype),st.prototype.constructor=st,lt.prototype=Object.create(tt.prototype),lt.prototype.constructor=lt,ct.prototype=Object.create(tt.prototype),ct.prototype.constructor=ct,ct.prototype.isFloat16BufferAttribute=!0,ut.prototype=Object.create(tt.prototype),ut.prototype.constructor=ut,ht.prototype=Object.create(tt.prototype),ht.prototype.constructor=ht;var ft={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function pt(e,t){return new ft[e](t)}var mt=0,gt=new te,vt=new Me,yt=new T,bt=new R,wt=new R,xt=new T;function _t(){Object.defineProperty(this,"id",{value:mt++}),this.uuid=g.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}_t.prototype=Object.assign(Object.create(h.prototype),{constructor:_t,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){return Array.isArray(e)?this.index=new(dt(e)>65535?lt:at)(e,1):this.index=e,this},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},hasAttribute:function(e){return void 0!==this.attributes[e]},addGroup:function(e,t,n){void 0===n&&(n=0),this.groups.push({start:e,count:t,materialIndex:n})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new y).getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return gt.makeRotationX(e),this.applyMatrix4(gt),this},rotateY:function(e){return gt.makeRotationY(e),this.applyMatrix4(gt),this},rotateZ:function(e){return gt.makeRotationZ(e),this.applyMatrix4(gt),this},translate:function(e,t,n){return gt.makeTranslation(e,t,n),this.applyMatrix4(gt),this},scale:function(e,t,n){return gt.makeScale(e,t,n),this.applyMatrix4(gt),this},lookAt:function(e){return vt.lookAt(e),vt.updateMatrix(),this.applyMatrix4(vt.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(yt).negate(),this.translate(yt.x,yt.y,yt.z),this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new ut(t,3)),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new R);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new T(-1/0,-1/0,-1/0),new T(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n<r;n++){var i=t[n];bt.setFromBufferAttribute(i),this.morphTargetsRelative?(xt.addVectors(this.boundingBox.min,bt.min),this.boundingBox.expandByPoint(xt),xt.addVectors(this.boundingBox.max,bt.max),this.boundingBox.expandByPoint(xt)):(this.boundingBox.expandByPoint(bt.min),this.boundingBox.expandByPoint(bt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new q);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new T,1/0);if(e){var n=this.boundingSphere.center;if(bt.setFromBufferAttribute(e),t)for(var r=0,i=t.length;r<i;r++){var o=t[r];wt.setFromBufferAttribute(o),this.morphTargetsRelative?(xt.addVectors(bt.min,wt.min),bt.expandByPoint(xt),xt.addVectors(bt.max,wt.max),bt.expandByPoint(xt)):(bt.expandByPoint(wt.min),bt.expandByPoint(wt.max))}bt.getCenter(n);for(var a=0,s=0,l=e.count;s<l;s++)xt.fromBufferAttribute(e,s),a=Math.max(a,n.distanceToSquared(xt));if(t)for(var c=0,u=t.length;c<u;c++)for(var h=t[c],d=this.morphTargetsRelative,f=0,p=h.count;f<p;f++)xt.fromBufferAttribute(h,f),d&&(yt.fromBufferAttribute(e,f),xt.add(yt)),a=Math.max(a,n.distanceToSquared(xt));this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}},computeFaceNormals:function(){},computeTangents:function(){var e=this.index,t=this.attributes;if(null!==e&&void 0!==t.position&&void 0!==t.normal&&void 0!==t.uv){var n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new tt(new Float32Array(4*a),4));for(var s=t.tangent.array,l=[],c=[],u=0;u<a;u++)l[u]=new T,c[u]=new T;var h=new T,d=new T,f=new T,p=new v,m=new v,g=new v,y=new T,b=new T,w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(var x=0,_=w.length;x<_;++x)for(var E=w[x],A=E.start,S=A,M=A+E.count;S<M;S+=3)B(n[S+0],n[S+1],n[S+2]);for(var C=new T,O=new T,R=new T,k=new T,P=0,L=w.length;P<L;++P)for(var D=w[P],I=D.start,N=I,j=I+D.count;N<j;N+=3)F(n[N+0]),F(n[N+1]),F(n[N+2])}else console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");function B(e,t,n){h.fromArray(r,3*e),d.fromArray(r,3*t),f.fromArray(r,3*n),p.fromArray(o,2*e),m.fromArray(o,2*t),g.fromArray(o,2*n),d.sub(h),f.sub(h),m.sub(p),g.sub(p);var i=1/(m.x*g.y-g.x*m.y);isFinite(i)&&(y.copy(d).multiplyScalar(g.y).addScaledVector(f,-m.y).multiplyScalar(i),b.copy(f).multiplyScalar(m.x).addScaledVector(d,-g.x).multiplyScalar(i),l[e].add(y),l[t].add(y),l[n].add(y),c[e].add(b),c[t].add(b),c[n].add(b))}function F(e){R.fromArray(i,3*e),k.copy(R);var t=l[e];C.copy(t),C.sub(R.multiplyScalar(R.dot(t))).normalize(),O.crossVectors(k,t);var n=O.dot(c[e])<0?-1:1;s[4*e]=C.x,s[4*e+1]=C.y,s[4*e+2]=C.z,s[4*e+3]=n}},computeVertexNormals:function(){var e=this.index,t=this.getAttribute("position");if(void 0!==t){var n=this.getAttribute("normal");if(void 0===n)n=new tt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(var r=0,i=n.count;r<i;r++)n.setXYZ(r,0,0,0);var o=new T,a=new T,s=new T,l=new T,c=new T,u=new T,h=new T,d=new T;if(e)for(var f=0,p=e.count;f<p;f+=3){var m=e.getX(f+0),g=e.getX(f+1),v=e.getX(f+2);o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),s.fromBufferAttribute(t,v),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),u.fromBufferAttribute(n,v),l.add(h),c.add(h),u.add(h),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z),n.setXYZ(v,u.x,u.y,u.z)}else for(var y=0,b=t.count;y<b;y+=3)o.fromBufferAttribute(t,y+0),a.fromBufferAttribute(t,y+1),s.fromBufferAttribute(t,y+2),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),n.setXYZ(y+0,h.x,h.y,h.z),n.setXYZ(y+1,h.x,h.y,h.z),n.setXYZ(y+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s),c=0,u=s;c<l;c++,u++)i[u]=a[c];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,n=e.count;t<n;t++)xt.fromBufferAttribute(e,t),xt.normalize(),e.setXYZ(t,xt.x,xt.y,xt.z)},toNonIndexed:function(){function e(e,t){for(var n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r),a=0,s=0,l=0,c=t.length;l<c;l++){a=t[l]*r;for(var u=0;u<r;u++)o[s++]=n[a++]}return new tt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;var t=new _t,n=this.index.array,r=this.attributes;for(var i in r){var o=e(r[i],n);t.setAttribute(i,o)}var a=this.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++){var d=e(c[u],n);l.push(d)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;for(var f=this.groups,p=0,m=f.length;p<m;p++){var g=f[p];t.addGroup(g.start,g.count,g.materialIndex)}return t},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var o in i){var a=i[o],s=a.toJSON(e.data);""!==a.name&&(s.name=a.name),e.data.attributes[o]=s}var l={},c=!1;for(var u in this.morphAttributes){for(var h=this.morphAttributes[u],d=[],f=0,p=h.length;f<p;f++){var m=h[f],g=m.toJSON(e.data);""!==m.name&&(g.name=m.name),d.push(g)}d.length>0&&(l[u]=d,c=!0)}c&&(e.data.morphAttributes=l,e.data.morphTargetsRelative=this.morphTargetsRelative);var v=this.groups;v.length>0&&(e.data.groups=JSON.parse(JSON.stringify(v)));var y=this.boundingSphere;return null!==y&&(e.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),e},clone:function(){return(new _t).copy(this)},copy:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var n=e.index;null!==n&&this.setIndex(n.clone(t));var r=e.attributes;for(var i in r){var o=r[i];this.setAttribute(i,o.clone(t))}var a=e.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++)l.push(c[u].clone(t));this.morphAttributes[s]=l}this.morphTargetsRelative=e.morphTargetsRelative;for(var d=e.groups,f=0,p=d.length;f<p;f++){var m=d[f];this.addGroup(m.start,m.count,m.materialIndex)}var g=e.boundingBox;null!==g&&(this.boundingBox=g.clone());var v=e.boundingSphere;return null!==v&&(this.boundingSphere=v.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Et=new te,At=new ee,St=new q,Mt=new T,Tt=new T,Ct=new T,Ot=new T,Rt=new T,kt=new T,Pt=new T,Lt=new T,Dt=new T,It=new v,Nt=new v,jt=new v,Bt=new T,Ft=new T;function zt(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new Je),Me.call(this),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}function Ht(e,t,n,r,i,o,a,s,l,c,u,h){Mt.fromBufferAttribute(i,c),Tt.fromBufferAttribute(i,u),Ct.fromBufferAttribute(i,h);var d=e.morphTargetInfluences;if(t.morphTargets&&o&&d){Pt.set(0,0,0),Lt.set(0,0,0),Dt.set(0,0,0);for(var f=0,p=o.length;f<p;f++){var m=d[f],g=o[f];0!==m&&(Ot.fromBufferAttribute(g,c),Rt.fromBufferAttribute(g,u),kt.fromBufferAttribute(g,h),a?(Pt.addScaledVector(Ot,m),Lt.addScaledVector(Rt,m),Dt.addScaledVector(kt,m)):(Pt.addScaledVector(Ot.sub(Mt),m),Lt.addScaledVector(Rt.sub(Tt),m),Dt.addScaledVector(kt.sub(Ct),m)))}Mt.add(Pt),Tt.add(Lt),Ct.add(Dt)}e.isSkinnedMesh&&(e.boneTransform(c,Mt),e.boneTransform(u,Tt),e.boneTransform(h,Ct));var y=function(e,t,n,r,i,o,a,s){if(null===(1===t.side?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,2!==t.side,s)))return null;Ft.copy(s),Ft.applyMatrix4(e.matrixWorld);var l=n.ray.origin.distanceTo(Ft);return l<n.near||l>n.far?null:{distance:l,point:Ft.clone(),object:e}}(e,t,n,r,Mt,Tt,Ct,Bt);if(y){s&&(It.fromBufferAttribute(s,c),Nt.fromBufferAttribute(s,u),jt.fromBufferAttribute(s,h),y.uv=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v)),l&&(It.fromBufferAttribute(l,c),Nt.fromBufferAttribute(l,u),jt.fromBufferAttribute(l,h),y.uv2=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v));var b=new Ke(c,u,h);He.getNormal(Mt,Tt,Ct,b.normal),y.face=b}return y}zt.prototype=Object.assign(Object.create(Me.prototype),{constructor:zt,isMesh:!0,copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var n,r=this.geometry,i=this.material,o=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),St.copy(r.boundingSphere),St.applyMatrix4(o),!1!==e.ray.intersectsSphere(St)&&(Et.copy(o).invert(),At.copy(e.ray).applyMatrix4(Et),null===r.boundingBox||!1!==At.intersectsBox(r.boundingBox))))if(r.isBufferGeometry){var a=r.index,s=r.attributes.position,l=r.morphAttributes.position,c=r.morphTargetsRelative,u=r.attributes.uv,h=r.attributes.uv2,d=r.groups,f=r.drawRange;if(null!==a)if(Array.isArray(i))for(var p=0,m=d.length;p<m;p++)for(var g=d[p],v=i[g.materialIndex],y=Math.max(g.start,f.start),b=Math.min(g.start+g.count,f.start+f.count);y<b;y+=3){var w=a.getX(y),x=a.getX(y+1),_=a.getX(y+2);(n=Ht(this,v,e,At,s,l,c,u,h,w,x,_))&&(n.faceIndex=Math.floor(y/3),n.face.materialIndex=g.materialIndex,t.push(n))}else for(var E=Math.max(0,f.start),A=Math.min(a.count,f.start+f.count);E<A;E+=3){var S=a.getX(E),M=a.getX(E+1),T=a.getX(E+2);(n=Ht(this,i,e,At,s,l,c,u,h,S,M,T))&&(n.faceIndex=Math.floor(E/3),t.push(n))}else if(void 0!==s)if(Array.isArray(i))for(var C=0,O=d.length;C<O;C++)for(var R=d[C],k=i[R.materialIndex],P=Math.max(R.start,f.start),L=Math.min(R.start+R.count,f.start+f.count);P<L;P+=3)(n=Ht(this,k,e,At,s,l,c,u,h,P,P+1,P+2))&&(n.faceIndex=Math.floor(P/3),n.face.materialIndex=R.materialIndex,t.push(n));else for(var D=Math.max(0,f.start),I=Math.min(s.count,f.start+f.count);D<I;D+=3)(n=Ht(this,i,e,At,s,l,c,u,h,D,D+1,D+2))&&(n.faceIndex=Math.floor(D/3),t.push(n))}else r.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}});var Ut=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),void 0===o&&(o=1),void 0===a&&(a=1),(s=e.call(this)||this).type="BoxGeometry",s.parameters={width:t,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:a};var c=l(s);i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);var u=[],h=[],d=[],f=[],p=0,m=0;function g(e,t,n,r,i,o,a,s,l,g,v){for(var y=o/l,b=a/g,w=o/2,x=a/2,_=s/2,E=l+1,A=g+1,S=0,M=0,C=new T,O=0;O<A;O++)for(var R=O*b-x,k=0;k<E;k++){var P=k*y-w;C[e]=P*r,C[t]=R*i,C[n]=_,h.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=s>0?1:-1,d.push(C.x,C.y,C.z),f.push(k/l),f.push(1-O/g),S+=1}for(var L=0;L<g;L++)for(var D=0;D<l;D++){var I=p+D+E*L,N=p+D+E*(L+1),j=p+(D+1)+E*(L+1),B=p+(D+1)+E*L;u.push(I,N,B),u.push(N,j,B),M+=6}c.addGroup(m,M,v),m+=M,p+=S}return g("z","y","x",-1,-1,r,n,t,a,o,0),g("z","y","x",1,-1,r,n,-t,a,o,1),g("x","z","y",1,1,t,r,n,i,a,2),g("x","z","y",1,-1,t,r,-n,i,a,3),g("x","y","z",1,-1,t,n,r,i,o,4),g("x","y","z",-1,-1,t,n,-r,i,o,5),s.setIndex(u),s.setAttribute("position",new ut(h,3)),s.setAttribute("normal",new ut(d,3)),s.setAttribute("uv",new ut(f,2)),s}return s(t,e),t}(_t);function Vt(e){var t={};for(var n in e)for(var r in t[n]={},e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}return t}function Gt(e){for(var t={},n=0;n<e.length;n++){var r=Vt(e[n]);for(var i in r)t[i]=r[i]}return t}var Wt={clone:Vt,merge:Gt};function qt(e){Ze.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function Xt(){Me.call(this),this.type="Camera",this.matrixWorldInverse=new te,this.projectionMatrix=new te,this.projectionMatrixInverse=new te}function Yt(e,t,n,r){void 0===e&&(e=50),void 0===t&&(t=1),void 0===n&&(n=.1),void 0===r&&(r=2e3),Xt.call(this),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Kt(e,t,n){if(Me.call(this),this.type="CubeCamera",!0===n.isWebGLCubeRenderTarget){this.renderTarget=n;var r=new Yt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new T(1,0,0)),this.add(r);var i=new Yt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new T(-1,0,0)),this.add(i);var o=new Yt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new T(0,1,0)),this.add(o);var a=new Yt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new T(0,-1,0)),this.add(a);var s=new Yt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new T(0,0,1)),this.add(s);var l=new Yt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new T(0,0,-1)),this.add(l),this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;var h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}else console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.")}function Qt(e,t,n,r,i,o,a,s,l,c){e=void 0!==e?e:[],t=void 0!==t?t:301,a=void 0!==a?a:1022,x.call(this,e,t,n,r,i,o,a,s,l,c),this.flipY=!1,this._needsFlipEnvMap=!0}qt.prototype=Object.create(Ze.prototype),qt.prototype.constructor=qt,qt.prototype.isShaderMaterial=!0,qt.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Vt(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this},qt.prototype.toJSON=function(e){var t=Ze.prototype.toJSON.call(this,e);for(var n in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){var r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var o in this.extensions)!0===this.extensions[o]&&(i[o]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},Xt.prototype=Object.assign(Object.create(Me.prototype),{constructor:Xt,isCamera:!0,copy:function(e,t){return Me.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){Me.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()},updateWorldMatrix:function(e,t){Me.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()},clone:function(){return(new this.constructor).copy(this)}}),Yt.prototype=Object.assign(Object.create(Xt.prototype),{constructor:Yt,isPerspectiveCamera:!0,copy:function(e,t){return Xt.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*g.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*g.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*g.RAD2DEG*Math.atan(Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),Kt.prototype=Object.create(Me.prototype),Kt.prototype.constructor=Kt,Qt.prototype=Object.create(x.prototype),Qt.prototype.constructor=Qt,Qt.prototype.isCubeTexture=!0,Object.defineProperty(Qt.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Zt=function(e){function t(t,n,r){var i;return Number.isInteger(n)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),n=r),i=e.call(this,t,t,n)||this,Object.defineProperty(l(i),"isWebGLCubeRenderTarget",{value:!0}),n=n||{},i.texture=new Qt(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),i.texture._needsFlipEnvMap=!1,i}s(t,e);var n=t.prototype;return n.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=1023,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;var n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",o=new Ut(5,5,5),a=new qt({name:"CubemapFromEquirect",uniforms:Vt(n),vertexShader:r,fragmentShader:i,side:1,blending:0});a.uniforms.tEquirect.value=t;var s=new zt(o,a),l=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new Kt(1,10,this).update(e,s),t.minFilter=l,s.geometry.dispose(),s.material.dispose(),this},n.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)},t}(A);function Jt(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Jt.prototype=Object.create(x.prototype),Jt.prototype.constructor=Jt,Jt.prototype.isDataTexture=!0;var $t=new q,en=new T,tn=function(){function e(e,t,n,r,i,o){this.planes=[void 0!==e?e:new Re,void 0!==t?t:new Re,void 0!==n?n:new Re,void 0!==r?r:new Re,void 0!==i?i:new Re,void 0!==o?o:new Re]}var t=e.prototype;return t.set=function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},t.setFromProjectionMatrix=function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this},t.intersectsObject=function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),$t.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.intersectsSprite=function(e){return $t.center.set(0,0,0),$t.radius=.7071067811865476,$t.applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.intersectsSphere=function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++)if(t[i].distanceToPoint(n)<r)return!1;return!0},t.intersectsBox=function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];if(en.x=r.normal.x>0?e.max.x:e.min.x,en.y=r.normal.y>0?e.max.y:e.min.y,en.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(en)<0)return!1}return!0},t.containsPoint=function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0},e}();function nn(){var e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function rn(e,t){var n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){var o=r.get(t);(!o||o.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version})}else{t.isInterleavedBufferAttribute&&(t=t.data);var a=r.get(t);void 0===a?r.set(t,function(t,r){var i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();var s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,r,i){var o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(a.buffer,t,i),a.version=t.version)}}}}var on=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),(o=e.call(this)||this).type="PlaneGeometry",o.parameters={width:t,height:n,widthSegments:r,heightSegments:i};for(var a=t/2,s=n/2,l=Math.floor(r),c=Math.floor(i),u=l+1,h=c+1,d=t/l,f=n/c,p=[],m=[],g=[],v=[],y=0;y<h;y++)for(var b=y*f-s,w=0;w<u;w++){var x=w*d-a;m.push(x,-b,0),g.push(0,0,1),v.push(w/l),v.push(1-y/c)}for(var _=0;_<c;_++)for(var E=0;E<l;E++){var A=E+u*_,S=E+u*(_+1),M=E+1+u*(_+1),T=E+1+u*_;p.push(A,S,T),p.push(S,M,T)}return o.setIndex(p),o.setAttribute("position",new ut(m,3)),o.setAttribute("normal",new ut(g,3)),o.setAttribute("uv",new ut(v,2)),o}return s(t,e),t}(_t),an={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor.xyz *= color.xyz;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(\t\t0, 1,\t\t0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <transmissionmap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <transmissionmap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},sn={common:{diffuse:{value:new Ye(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new y},uv2Transform:{value:new y},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ye(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ye(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}},sprite:{diffuse:{value:new Ye(15658734)},opacity:{value:1},center:{value:new v(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}}},ln={basic:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.fog]),vertexShader:an.meshbasic_vert,fragmentShader:an.meshbasic_frag},lambert:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshlambert_vert,fragmentShader:an.meshlambert_frag},phong:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},specular:{value:new Ye(1118481)},shininess:{value:30}}]),vertexShader:an.meshphong_vert,fragmentShader:an.meshphong_frag},standard:{uniforms:Gt([sn.common,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.roughnessmap,sn.metalnessmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},toon:{uniforms:Gt([sn.common,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.gradientmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshtoon_vert,fragmentShader:an.meshtoon_frag},matcap:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,{matcap:{value:null}}]),vertexShader:an.meshmatcap_vert,fragmentShader:an.meshmatcap_frag},points:{uniforms:Gt([sn.points,sn.fog]),vertexShader:an.points_vert,fragmentShader:an.points_frag},dashed:{uniforms:Gt([sn.common,sn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:an.linedashed_vert,fragmentShader:an.linedashed_frag},depth:{uniforms:Gt([sn.common,sn.displacementmap]),vertexShader:an.depth_vert,fragmentShader:an.depth_frag},normal:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,{opacity:{value:1}}]),vertexShader:an.normal_vert,fragmentShader:an.normal_frag},sprite:{uniforms:Gt([sn.sprite,sn.fog]),vertexShader:an.sprite_vert,fragmentShader:an.sprite_frag},background:{uniforms:{uvTransform:{value:new y},t2D:{value:null}},vertexShader:an.background_vert,fragmentShader:an.background_frag},cube:{uniforms:Gt([sn.envmap,{opacity:{value:1}}]),vertexShader:an.cube_vert,fragmentShader:an.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:an.equirect_vert,fragmentShader:an.equirect_frag},distanceRGBA:{uniforms:Gt([sn.common,sn.displacementmap,{referencePosition:{value:new T},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:an.distanceRGBA_vert,fragmentShader:an.distanceRGBA_frag},shadow:{uniforms:Gt([sn.lights,sn.fog,{color:{value:new Ye(0)},opacity:{value:1}}]),vertexShader:an.shadow_vert,fragmentShader:an.shadow_frag}};function cn(e,t,n,r,i){var o,a,s=new Ye(0),l=0,c=null,u=0,h=null;function d(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return s},setClearColor:function(e,t){void 0===t&&(t=1),s.set(e),d(s,l=t)},getClearAlpha:function(){return l},setClearAlpha:function(e){d(s,l=e)},render:function(n,i,f,p){var m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));var g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?d(s,l):m&&m.isColor&&(d(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.isWebGLCubeRenderTarget||306===m.mapping)?(void 0===a&&((a=new zt(new Ut(1,1,1),new qt({name:"BackgroundCubeMaterial",uniforms:Vt(ln.cube.uniforms),vertexShader:ln.cube.vertexShader,fragmentShader:ln.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(a)),m.isWebGLCubeRenderTarget&&(m=m.texture),a.material.uniforms.envMap.value=m,a.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,c===m&&u===m.version&&h===e.toneMapping||(a.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null)):m&&m.isTexture&&(void 0===o&&((o=new zt(new on(2,2),new qt({name:"BackgroundMaterial",uniforms:Vt(ln.background.uniforms),vertexShader:ln.background.vertexShader,fragmentShader:ln.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),o.material.uniforms.uvTransform.value.copy(m.matrix),c===m&&u===m.version&&h===e.toneMapping||(o.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null))}}}function un(e,t,n,r){var i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null),c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){for(var t=[],n=[],r=[],o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){for(var e=c.newAttributes,t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){var o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function g(){for(var t=c.newAttributes,n=c.enabledAttributes,r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&u((c=l).object)}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){var w=!1;if(a){var x=function(t,n,i){var a=!0===i.wireframe,l=s[t.id];void 0===l&&(l={},s[t.id]=l);var c=l[n.id];void 0===c&&(c={},l[n.id]=c);var u=c[a];return void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u),u}(y,h,l);c!==x&&u((c=x).object),(w=function(e,t){var n=c.attributes,r=e.attributes,i=0;for(var o in r){var a=n[o],s=r[o];if(void 0===a)return!0;if(a.attribute!==s)return!0;if(a.data!==s.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b))&&function(e,t){var n={},r=e.attributes,i=0;for(var o in r){var a=r[o],s={};s.attribute=a,a.data&&(s.data=a.data),n[o]=s,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{var _=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===_||(c.geometry=y.id,c.program=h.id,c.wireframe=_,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(function(i,o,a,s){if(!1!==r.isWebGL2||!i.isInstancedMesh&&!s.isInstancedBufferGeometry||null!==t.get("ANGLE_instanced_arrays")){f();var l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(var h in c){var d=c[h];if(d>=0){var y=l[h];if(void 0!==y){var b=y.normalized,w=y.itemSize,x=n.get(y);if(void 0===x)continue;var _=x.buffer,E=x.type,A=x.bytesPerElement;if(y.isInterleavedBufferAttribute){var S=y.data,M=S.stride,T=y.offset;S&&S.isInstancedInterleavedBuffer?(m(d,S.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=S.meshPerAttribute*S.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,M*A,T*A)}else y.isInstancedBufferAttribute?(m(d,y.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=y.meshPerAttribute*y.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,0,0)}else if("instanceMatrix"===h){var C=n.get(i.instanceMatrix);if(void 0===C)continue;var O=C.buffer,R=C.type;m(d+0,1),m(d+1,1),m(d+2,1),m(d+3,1),e.bindBuffer(34962,O),e.vertexAttribPointer(d+0,4,R,!1,64,0),e.vertexAttribPointer(d+1,4,R,!1,64,16),e.vertexAttribPointer(d+2,4,R,!1,64,32),e.vertexAttribPointer(d+3,4,R,!1,64,48)}else if("instanceColor"===h){var k=n.get(i.instanceColor);if(void 0===k)continue;var P=k.buffer,L=k.type;m(d,1),e.bindBuffer(34962,P),e.vertexAttribPointer(d,3,L,!1,12,0)}else if(void 0!==u){var D=u[h];if(void 0!==D)switch(D.length){case 2:e.vertexAttrib2fv(d,D);break;case 3:e.vertexAttrib3fv(d,D);break;case 4:e.vertexAttrib4fv(d,D);break;default:e.vertexAttrib1fv(d,D)}}}}g()}}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){for(var e in y(),s){var t=s[e];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0!==s[e.id]){var t=s[e.id];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e.id]}},releaseStatesOfProgram:function(e){for(var t in s){var n=s[t];if(void 0!==n[e.id]){var r=n[e.id];for(var i in r)h(r[i].object),delete r[i];delete n[e.id]}}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function hn(e,t,n,r){var i,o=r.isWebGL2;this.setMode=function(e){i=e},this.render=function(t,r){e.drawArrays(i,t,r),n.update(r,i,1)},this.renderInstances=function(r,a,s){if(0!==s){var l,c;if(o)l=e,c="drawArraysInstanced";else if(c="drawArraysInstancedANGLE",null===(l=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](i,r,a,s),n.update(a,i,s)}}}function dn(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var l=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),u=e.getParameter(35660),h=e.getParameter(3379),d=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=o||!!t.get("OES_texture_float");return{isWebGL2:o,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:h,maxCubemapSize:d,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function fn(e){var t=this,n=null,r=0,i=!1,o=!1,a=new Re,s=new y,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){var o=null!==e?e.length:0,c=null;if(0!==o){if(c=l.value,!0!==i||null===c){var u=r+4*o,h=n.matrixWorldInverse;s.getNormalMatrix(h),(null===c||c.length<u)&&(c=new Float32Array(u));for(var d=0,f=r;d!==o;++d,f+=4)a.copy(e[d]).applyMatrix4(h,s),a.normal.toArray(c,f),c[f+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){var a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){var h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{var m=o?0:r,g=4*m,v=p.clippingState||null;l.value=v,v=u(h,a,g,s);for(var y=0;y!==g;++y)v[y]=n[y];p.clippingState=v,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=m}}}function pn(e){var t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){var o=i.mapping;if(303===o||304===o){if(t.has(i))return n(t.get(i).texture,i.mapping);var a=i.image;if(a&&a.height>0){var s=e.getRenderList(),l=e.getRenderTarget(),c=new Zt(a.height/2);return c.fromEquirectangularTexture(e,i),t.set(i,c),e.setRenderTarget(l),e.setRenderList(s),i.addEventListener("dispose",r),n(c.texture,i.mapping)}return null}}return i},dispose:function(){t=new WeakMap}}}function mn(e){var t={};function n(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){var t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function gn(e,t,n,r){var i={},o=new WeakMap;function a(e){var s=e.target;for(var l in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[l]);s.removeEventListener("dispose",a),delete i[s.id];var c=o.get(s);c&&(t.remove(c),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){var n=[],r=e.index,i=e.attributes.position,a=0;if(null!==r){var s=r.array;a=r.version;for(var l=0,c=s.length;l<c;l+=3){var u=s[l+0],h=s[l+1],d=s[l+2];n.push(u,h,h,d,d,u)}}else{var f=i.array;a=i.version;for(var p=0,m=f.length/3-1;p<m;p+=3){var g=p+0,v=p+1,y=p+2;n.push(g,v,v,y,y,g)}}var b=new(dt(n)>65535?lt:at)(n,1);b.version=a;var w=o.get(e);w&&t.remove(w),o.set(e,b)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){var n=e.attributes;for(var r in n)t.update(n[r],34962);var i=e.morphAttributes;for(var o in i)for(var a=i[o],s=0,l=a.length;s<l;s++)t.update(a[s],34962)},getWireframeAttribute:function(e){var t=o.get(e);if(t){var n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function vn(e,t,n,r){var i,o,a,s=r.isWebGL2;this.setMode=function(e){i=e},this.setIndex=function(e){o=e.type,a=e.bytesPerElement},this.render=function(t,r){e.drawElements(i,r,o,t*a),n.update(r,i,1)},this.renderInstances=function(r,l,c){if(0!==c){var u,h;if(s)u=e,h="drawElementsInstanced";else if(h="drawElementsInstancedANGLE",null===(u=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](i,l,o,r*a,c),n.update(l,i,c)}}}function yn(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function bn(e,t){return e[0]-t[0]}function wn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function xn(e){for(var t={},n=new Float32Array(8),r=[],i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){var l=i.morphTargetInfluences,c=void 0===l?0:l.length,u=t[o.id];if(void 0===u){u=[];for(var h=0;h<c;h++)u[h]=[h,0];t[o.id]=u}for(var d=0;d<c;d++){var f=u[d];f[0]=d,f[1]=l[d]}u.sort(wn);for(var p=0;p<8;p++)p<c&&u[p][1]?(r[p][0]=u[p][0],r[p][1]=u[p][1]):(r[p][0]=Number.MAX_SAFE_INTEGER,r[p][1]=0);r.sort(bn);for(var m=a.morphTargets&&o.morphAttributes.position,g=a.morphNormals&&o.morphAttributes.normal,v=0,y=0;y<8;y++){var b=r[y],w=b[0],x=b[1];w!==Number.MAX_SAFE_INTEGER&&x?(m&&o.getAttribute("morphTarget"+y)!==m[w]&&o.setAttribute("morphTarget"+y,m[w]),g&&o.getAttribute("morphNormal"+y)!==g[w]&&o.setAttribute("morphNormal"+y,g[w]),n[y]=x,v+=x):(m&&!0===o.hasAttribute("morphTarget"+y)&&o.deleteAttribute("morphTarget"+y),g&&!0===o.hasAttribute("morphNormal"+y)&&o.deleteAttribute("morphNormal"+y),n[y]=0)}var _=o.morphTargetsRelative?1:1-v;s.getUniforms().setValue(e,"morphTargetBaseInfluence",_),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function _n(e,t,n,r){var i=new WeakMap;function o(e){var t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){var a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}function En(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function An(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}ln.physical={uniforms:Gt([ln.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new v(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ye(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},En.prototype=Object.create(x.prototype),En.prototype.constructor=En,En.prototype.isDataTexture2DArray=!0,An.prototype=Object.create(x.prototype),An.prototype.constructor=An,An.prototype.isDataTexture3D=!0;var Sn=new x,Mn=new En,Tn=new An,Cn=new Qt,On=[],Rn=[],kn=new Float32Array(16),Pn=new Float32Array(9),Ln=new Float32Array(4);function Dn(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=On[i];if(void 0===o&&(o=new Float32Array(i),On[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function In(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Nn(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n]}function jn(e,t){var n=Rn[t];void 0===n&&(n=new Int32Array(t),Rn[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Bn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Fn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(In(n,t))return;e.uniform2fv(this.addr,t),Nn(n,t)}}function zn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(In(n,t))return;e.uniform3fv(this.addr,t),Nn(n,t)}}function Hn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(In(n,t))return;e.uniform4fv(this.addr,t),Nn(n,t)}}function Un(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Ln.set(r),e.uniformMatrix2fv(this.addr,!1,Ln),Nn(n,r)}}function Vn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Pn.set(r),e.uniformMatrix3fv(this.addr,!1,Pn),Nn(n,r)}}function Gn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;kn.set(r),e.uniformMatrix4fv(this.addr,!1,kn),Nn(n,r)}}function Wn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Sn,i)}function qn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Mn,i)}function Xn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Tn,i)}function Yn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||Cn,i)}function Kn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Qn(e,t){var n=this.cache;In(n,t)||(e.uniform2iv(this.addr,t),Nn(n,t))}function Zn(e,t){var n=this.cache;In(n,t)||(e.uniform3iv(this.addr,t),Nn(n,t))}function Jn(e,t){var n=this.cache;In(n,t)||(e.uniform4iv(this.addr,t),Nn(n,t))}function $n(e,t){var n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function er(e,t){e.uniform1fv(this.addr,t)}function tr(e,t){e.uniform1iv(this.addr,t)}function nr(e,t){e.uniform2iv(this.addr,t)}function rr(e,t){e.uniform3iv(this.addr,t)}function ir(e,t){e.uniform4iv(this.addr,t)}function or(e,t){var n=Dn(t,this.size,2);e.uniform2fv(this.addr,n)}function ar(e,t){var n=Dn(t,this.size,3);e.uniform3fv(this.addr,n)}function sr(e,t){var n=Dn(t,this.size,4);e.uniform4fv(this.addr,n)}function lr(e,t){var n=Dn(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function cr(e,t){var n=Dn(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ur(e,t){var n=Dn(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function hr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTexture2D(t[o]||Sn,i[o])}function dr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTextureCube(t[o]||Cn,i[o])}function fr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Bn;case 35664:return Fn;case 35665:return zn;case 35666:return Hn;case 35674:return Un;case 35675:return Vn;case 35676:return Gn;case 5124:case 35670:return Kn;case 35667:case 35671:return Qn;case 35668:case 35672:return Zn;case 35669:case 35673:return Jn;case 5125:return $n;case 35678:case 36198:case 36298:case 36306:case 35682:return Wn;case 35679:case 36299:case 36307:return Xn;case 35680:case 36300:case 36308:case 36293:return Yn;case 36289:case 36303:case 36311:case 36292:return qn}}(t.type)}function pr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return er;case 35664:return or;case 35665:return ar;case 35666:return sr;case 35674:return lr;case 35675:return cr;case 35676:return ur;case 5124:case 35670:return tr;case 35667:case 35671:return nr;case 35668:case 35672:return rr;case 35669:case 35673:return ir;case 35678:case 36198:case 36298:case 36306:case 35682:return hr;case 35680:case 36300:case 36308:case 36293:return dr}}(t.type)}function mr(e){this.id=e,this.seq=[],this.map={}}pr.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Nn(t,e)},mr.prototype.setValue=function(e,t,n){for(var r=this.seq,i=0,o=r.length;i!==o;++i){var a=r[i];a.setValue(e,t[a.id],n)}};var gr=/(\w+)(\])?(\[|\.)?/g;function vr(e,t){e.seq.push(t),e.map[t.id]=t}function yr(e,t,n){var r=e.name,i=r.length;for(gr.lastIndex=0;;){var o=gr.exec(r),a=gr.lastIndex,s=o[1],l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){vr(n,void 0===c?new fr(s,e,t):new pr(s,e,t));break}var u=n.map[s];void 0===u&&vr(n,u=new mr(s)),n=u}}function br(e,t){this.seq=[],this.map={};for(var n=e.getProgramParameter(t,35718),r=0;r<n;++r){var i=e.getActiveUniform(t,r);yr(i,e.getUniformLocation(t,i.name),this)}}function wr(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}br.prototype.setValue=function(e,t,n,r){var i=this.map[t];void 0!==i&&i.setValue(e,n,r)},br.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},br.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}},br.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var xr=0;function _r(e){switch(e){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Er(e,t,n){var r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Ar(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Sr(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Mr(e,t){var n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Tr(e){return""!==e}function Cr(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Or(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var Rr=/^[ \t]*#include +<([\w\d./]+)>/gm;function kr(e){return e.replace(Rr,Pr)}function Pr(e,t){var n=an[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return kr(n)}var Lr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Dr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ir(e){return e.replace(Dr,jr).replace(Lr,Nr)}function Nr(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jr(0,t,n,r)}function jr(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function Br(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Fr(e,t,n,r){var i,o,a=e.getContext(),s=n.defines,l=n.vertexShader,c=n.fragmentShader,u=function(e){var t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),h=function(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),d=function(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),f=function(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),p=e.gammaFactor>0?e.gammaFactor:1,m=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Tr).join("\n")}(n),g=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(s),v=a.createProgram(),y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?((i=[g].filter(Tr).join("\n")).length>0&&(i+="\n"),(o=[m,g].filter(Tr).join("\n")).length>0&&(o+="\n")):(i=[Br(n),"#define SHADER_NAME "+n.shaderName,g,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Tr).join("\n"),o=[m,Br(n),"#define SHADER_NAME "+n.shaderName,g,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.envMap?"#define "+d:"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?an.tonemapping_pars_fragment:"",0!==n.toneMapping?Mr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",an.encodings_pars_fragment,n.map?Ar("mapTexelToLinear",n.mapEncoding):"",n.matcap?Ar("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Ar("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Ar("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Ar("lightMapTexelToLinear",n.lightMapEncoding):"",Sr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Tr).join("\n")),l=Or(l=Cr(l=kr(l),n),n),c=Or(c=Cr(c=kr(c),n),n),l=Ir(l),c=Ir(c),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",i=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,o=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+o);var b,w,x=y+o+c,_=wr(a,35633,y+i+l),E=wr(a,35632,x);if(a.attachShader(v,_),a.attachShader(v,E),void 0!==n.index0AttributeName?a.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),e.debug.checkShaderErrors){var A=a.getProgramInfoLog(v).trim(),S=a.getShaderInfoLog(_).trim(),M=a.getShaderInfoLog(E).trim(),T=!0,C=!0;if(!1===a.getProgramParameter(v,35714)){T=!1;var O=Er(a,_,"vertex"),R=Er(a,E,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(v,35715),"gl.getProgramInfoLog",A,O,R)}else""!==A?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",A):""!==S&&""!==M||(C=!1);C&&(this.diagnostics={runnable:T,programLog:A,vertexShader:{log:S,prefix:i},fragmentShader:{log:M,prefix:o}})}return a.deleteShader(_),a.deleteShader(E),this.getUniforms=function(){return void 0===b&&(b=new br(a,v)),b},this.getAttributes=function(){return void 0===w&&(w=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i<r;i++){var o=e.getActiveAttrib(t,i).name;n[o]=e.getAttribLocation(t,o)}return n}(a,v)),w},this.destroy=function(){r.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=n.shaderName,this.id=xr++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=_,this.fragmentShader=E,this}function zr(e,t,n,r,i,o){var a=[],s=r.isWebGL2,l=r.logarithmicDepthBuffer,c=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,d=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},p=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function m(e){var t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,a,p,g,v){var y,b,w=g.fog,x=i.isMeshStandardMaterial?g.environment:null,_=t.get(i.envMap||x),E=f[i.type],A=v.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(c)return 1024;var n=u,r=Math.floor((n-20)/4),i=Math.min(r,t.length);return i<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+i+"."),0):i}(v):0;if(null!==i.precision&&(d=r.getMaxPrecision(i.precision))!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",d,"instead."),E){var S=ln[E];y=S.vertexShader,b=S.fragmentShader}else y=i.vertexShader,b=i.fragmentShader;var M=e.getRenderTarget();return{isWebGL2:s,shaderID:E,shaderName:i.type,vertexShader:y,fragmentShader:b,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:d,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null!==M?m(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:m(i.map),matcap:!!i.matcap,matcapEncoding:m(i.matcap),envMap:!!_,envMapMode:_&&_.mapping,envMapEncoding:m(_),envMapCubeUV:!!_&&(306===_.mapping||307===_.mapping),lightMap:!!i.lightMap,lightMapEncoding:m(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:m(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmissionMap:!!i.transmissionMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmissionMap)&&!!i.displacementMap,fog:!!w,useFog:i.fog,fogExp2:w&&w.isFogExp2,flatShading:i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:l,skinning:i.skinning&&A>0,maxBones:A,useVertexTexture:c,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&p.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:1===i.side,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);if(!1===t.isRawShaderMaterial){for(var i=0;i<p.length;i++)n.push(t[p[i]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){var t,n=f[e.type];if(n){var r=ln[n];t=Wt.clone(r.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){for(var r,o=0,s=a.length;o<s;o++){var l=a[o];if(l.cacheKey===n){++(r=l).usedTimes;break}}return void 0===r&&(r=new Fr(e,n,t,i),a.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){var t=a.indexOf(e);a[t]=a[a.length-1],a.pop(),e.destroy()}},programs:a}}function Hr(){var e=new WeakMap;return{get:function(t){var n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Ur(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Vr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Gr(e){var t=[],n=0,r=[],i=[],o={id:-1};function a(r,i,a,s,l,c){var u=t[n],h=e.get(a);return void 0===u?(u={id:r.id,object:r,geometry:i,material:a,program:h.program||o,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=a,u.program=h.program||o,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transparent:i,init:function(){n=0,r.length=0,i.length=0},push:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).push(c)},unshift:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).unshift(c)},finish:function(){for(var e=n,r=t.length;e<r;e++){var i=t[e];if(null===i.id)break;i.id=null,i.object=null,i.geometry=null,i.material=null,i.program=null,i.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Ur),i.length>1&&i.sort(t||Vr)}}}function Wr(e){var t=new WeakMap;return{get:function(n,r){var i,o=t.get(n);return void 0===o?(i=new Gr(e),t.set(n,new WeakMap),t.get(n).set(r,i)):void 0===(i=o.get(r))&&(i=new Gr(e),o.set(r,i)),i},dispose:function(){t=new WeakMap}}}function qr(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new T,color:new Ye};break;case"SpotLight":n={position:new T,direction:new T,color:new Ye,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new T,color:new Ye,distance:0,decay:0};break;case"HemisphereLight":n={direction:new T,skyColor:new Ye,groundColor:new Ye};break;case"RectAreaLight":n={color:new Ye,position:new T,halfWidth:new T,halfHeight:new T}}return e[t.id]=n,n}}}var Xr=0;function Yr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Kr(e,t){for(var n=new qr,r=function(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},o=0;o<9;o++)i.probe.push(new T);var a=new T,s=new te,l=new te;return{setup:function(o){for(var a=0,s=0,l=0,c=0;c<9;c++)i.probe[c].set(0,0,0);var u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0;o.sort(Yr);for(var y=0,b=o.length;y<b;y++){var w=o[y],x=w.color,_=w.intensity,E=w.distance,A=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)a+=x.r*_,s+=x.g*_,l+=x.b*_;else if(w.isLightProbe)for(var S=0;S<9;S++)i.probe[S].addScaledVector(w.sh.coefficients[S],_);else if(w.isDirectionalLight){var M=n.get(w);if(M.color.copy(w.color).multiplyScalar(w.intensity),w.castShadow){var T=w.shadow,C=r.get(w);C.shadowBias=T.bias,C.shadowNormalBias=T.normalBias,C.shadowRadius=T.radius,C.shadowMapSize=T.mapSize,i.directionalShadow[u]=C,i.directionalShadowMap[u]=A,i.directionalShadowMatrix[u]=w.shadow.matrix,m++}i.directional[u]=M,u++}else if(w.isSpotLight){var O=n.get(w);if(O.position.setFromMatrixPosition(w.matrixWorld),O.color.copy(x).multiplyScalar(_),O.distance=E,O.coneCos=Math.cos(w.angle),O.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),O.decay=w.decay,w.castShadow){var R=w.shadow,k=r.get(w);k.shadowBias=R.bias,k.shadowNormalBias=R.normalBias,k.shadowRadius=R.radius,k.shadowMapSize=R.mapSize,i.spotShadow[d]=k,i.spotShadowMap[d]=A,i.spotShadowMatrix[d]=w.shadow.matrix,v++}i.spot[d]=O,d++}else if(w.isRectAreaLight){var P=n.get(w);P.color.copy(x).multiplyScalar(_),P.halfWidth.set(.5*w.width,0,0),P.halfHeight.set(0,.5*w.height,0),i.rectArea[f]=P,f++}else if(w.isPointLight){var L=n.get(w);if(L.color.copy(w.color).multiplyScalar(w.intensity),L.distance=w.distance,L.decay=w.decay,w.castShadow){var D=w.shadow,I=r.get(w);I.shadowBias=D.bias,I.shadowNormalBias=D.normalBias,I.shadowRadius=D.radius,I.shadowMapSize=D.mapSize,I.shadowCameraNear=D.camera.near,I.shadowCameraFar=D.camera.far,i.pointShadow[h]=I,i.pointShadowMap[h]=A,i.pointShadowMatrix[h]=w.shadow.matrix,g++}i.point[h]=L,h++}else if(w.isHemisphereLight){var N=n.get(w);N.skyColor.copy(w.color).multiplyScalar(_),N.groundColor.copy(w.groundColor).multiplyScalar(_),i.hemi[p]=N,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=sn.LTC_FLOAT_1,i.rectAreaLTC2=sn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=sn.LTC_HALF_1,i.rectAreaLTC2=sn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;var j=i.hash;j.directionalLength===u&&j.pointLength===h&&j.spotLength===d&&j.rectAreaLength===f&&j.hemiLength===p&&j.numDirectionalShadows===m&&j.numPointShadows===g&&j.numSpotShadows===v||(i.directional.length=u,i.spot.length=d,i.rectArea.length=f,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotShadowMatrix.length=v,j.directionalLength=u,j.pointLength=h,j.spotLength=d,j.rectAreaLength=f,j.hemiLength=p,j.numDirectionalShadows=m,j.numPointShadows=g,j.numSpotShadows=v,i.version=Xr++)},setupView:function(e,t){for(var n=0,r=0,o=0,c=0,u=0,h=t.matrixWorldInverse,d=0,f=e.length;d<f;d++){var p=e[d];if(p.isDirectionalLight){var m=i.directional[n];m.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),m.direction.sub(a),m.direction.transformDirection(h),n++}else if(p.isSpotLight){var g=i.spot[o];g.position.setFromMatrixPosition(p.matrixWorld),g.position.applyMatrix4(h),g.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),g.direction.sub(a),g.direction.transformDirection(h),o++}else if(p.isRectAreaLight){var v=i.rectArea[c];v.position.setFromMatrixPosition(p.matrixWorld),v.position.applyMatrix4(h),l.identity(),s.copy(p.matrixWorld),s.premultiply(h),l.extractRotation(s),v.halfWidth.set(.5*p.width,0,0),v.halfHeight.set(0,.5*p.height,0),v.halfWidth.applyMatrix4(l),v.halfHeight.applyMatrix4(l),c++}else if(p.isPointLight){var y=i.point[r];y.position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(h),r++}else if(p.isHemisphereLight){var b=i.hemi[u];b.direction.setFromMatrixPosition(p.matrixWorld),b.direction.transformDirection(h),b.direction.normalize(),u++}}},state:i}}function Qr(e,t){var n=new Kr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Zr(e,t){var n=new WeakMap;return{get:function(r,i){var o;return void 0===i&&(i=0),!1===n.has(r)?(o=new Qr(e,t),n.set(r,[]),n.get(r).push(o)):i>=n.get(r).length?(o=new Qr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}function Jr(e){Ze.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}function $r(e){Ze.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new T,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}function ei(e,t,n){var r=new tn,i=new v,o=new v,a=new E,s=[],l=[],c={},u={0:1,1:0,2:2},h=new qt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new v},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;var f=new _t;f.setAttribute("position",new tt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var p=new zt(f,h),m=this;function g(n,r){var i=t.update(p);h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,p,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,d,p,null)}function y(e,t,n){var r=e<<0|t<<1|n<<2,i=s[r];return void 0===i&&(i=new Jr({depthPacking:3201,morphTargets:e,skinning:t}),s[r]=i),i}function b(e,t,n){var r=e<<0|t<<1|n<<2,i=l[r];return void 0===i&&(i=new $r({morphTargets:e,skinning:t}),l[r]=i),i}function w(t,n,r,i,o,a,s){var l=null,h=y,d=t.customDepthMaterial;if(!0===i.isPointLight&&(h=b,d=t.customDistanceMaterial),void 0===d){var f=!1;!0===r.morphTargets&&(f=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);var p=!1;!0===t.isSkinnedMesh&&(!0===r.skinning?p=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),l=h(f,p,!0===t.isInstancedMesh)}else l=d;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var m=l.uuid,g=r.uuid,v=c[m];void 0===v&&(v={},c[m]=v);var w=v[g];void 0===w&&(w=l.clone(),v[g]=w),l=w}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function x(n,i,o,a,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var l=t.update(n),c=n.material;if(Array.isArray(c))for(var u=l.groups,h=0,d=u.length;h<d;h++){var f=u[h],p=c[f.materialIndex];if(p&&p.visible){var m=w(n,l,p,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,m,n,f)}}else if(c.visible){var g=w(n,l,c,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,g,n,null)}}for(var v=n.children,y=0,b=v.length;y<b;y++)x(v[y],i,o,a,s)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,s,l){if(!1!==m.enabled&&(!1!==m.autoUpdate||!1!==m.needsUpdate)&&0!==t.length){var c=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var f=0,p=t.length;f<p;f++){var v=t[f],y=v.shadow;if(void 0!==y){if(!1!==y.autoUpdate||!1!==y.needsUpdate){i.copy(y.mapSize);var b=y.getFrameExtents();if(i.multiply(b),o.copy(y.mapSize),(i.x>n||i.y>n)&&(i.x>n&&(o.x=Math.floor(n/b.x),i.x=o.x*b.x,y.mapSize.x=o.x),i.y>n&&(o.y=Math.floor(n/b.y),i.y=o.y*b.y,y.mapSize.y=o.y)),null===y.map&&!y.isPointLightShadow&&3===this.type){var w={minFilter:1006,magFilter:1006,format:1023};y.map=new A(i.x,i.y,w),y.map.texture.name=v.name+".shadowMap",y.mapPass=new A(i.x,i.y,w),y.camera.updateProjectionMatrix()}if(null===y.map){var _={minFilter:1003,magFilter:1003,format:1023};y.map=new A(i.x,i.y,_),y.map.texture.name=v.name+".shadowMap",y.camera.updateProjectionMatrix()}e.setRenderTarget(y.map),e.clear();for(var E=y.getViewportCount(),S=0;S<E;S++){var M=y.getViewport(S);a.set(o.x*M.x,o.y*M.y,o.x*M.z,o.y*M.w),d.viewport(a),y.updateMatrices(v,S),r=y.getFrustum(),x(s,l,y.camera,v,this.type)}y.isPointLightShadow||3!==this.type||g(y,l),y.needsUpdate=!1}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}m.needsUpdate=!1,e.setRenderTarget(c,u,h)}}}function ti(e,t,n){var r,i,o=n.isWebGL2,a=new function(){var t=!1,n=new E,r=null,i=new E(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},s=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(e){e?N(2929):j(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case 0:e.depthFunc(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},l=new function(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?N(2960):j(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}},c={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,M=e.getParameter(35661),T=!1,C=0,O=e.getParameter(7938);-1!==O.indexOf("WebGL")?(C=parseFloat(/^WebGL (\d)/.exec(O)[1]),T=C>=1):-1!==O.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),T=C>=2);var R=null,k={},P=new E,L=new E;function D(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}var I={};function N(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function j(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}I[3553]=D(3553,3553,1),I[34067]=D(34067,34069,6),a.setClear(0,0,0,1),s.setClear(1),l.setClear(0),N(2929),s.setFunc(3),U(!1),V(1),N(2884),H(0);var B=((r={})[100]=32774,r[101]=32778,r[102]=32779,r);if(o)B[103]=32775,B[104]=32776;else{var F=t.get("EXT_blend_minmax");null!==F&&(B[103]=F.MIN_EXT,B[104]=F.MAX_EXT)}var z=((i={})[200]=0,i[201]=1,i[202]=768,i[204]=770,i[210]=776,i[208]=774,i[206]=772,i[203]=769,i[205]=771,i[209]=775,i[207]=773,i);function H(t,n,r,i,o,a,s,l){if(0!==t){if(h||(N(3042),h=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(B[n],B[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(z[r],z[i],z[a],z[s]),p=r,m=i,v=a,y=s),d=t,b=null;else if(t!==d||l!==b){if(100===f&&100===g||(e.blendEquation(32774),f=100,g=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}p=null,m=null,v=null,y=null,d=t,b=l}}else h&&(j(3042),h=!1)}function U(t){w!==t&&(t?e.frontFace(2304):e.frontFace(2305),w=t)}function V(t){0!==t?(N(2884),t!==x&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):j(2884),x=t}function G(t,n,r){t?(N(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):j(32823)}function W(t){void 0===t&&(t=33984+M-1),R!==t&&(e.activeTexture(t),R=t)}return{buffers:{color:a,depth:s,stencil:l},enable:N,disable:j,useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:H,setMaterial:function(e,t){2===e.side?j(2884):N(2884);var n=1===e.side;t&&(n=!n),U(n),1===e.blending&&!1===e.transparent?H(0):H(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),s.setFunc(e.depthFunc),s.setTest(e.depthTest),s.setMask(e.depthWrite),a.setMask(e.colorWrite);var r=e.stencilWrite;l.setTest(r),r&&(l.setMask(e.stencilWriteMask),l.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),l.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),G(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:U,setCullFace:V,setLineWidth:function(t){t!==_&&(T&&e.lineWidth(t),_=t)},setPolygonOffset:G,setScissorTest:function(e){e?N(3089):j(3089)},activeTexture:W,bindTexture:function(t,n){null===R&&W();var r=k[R];void 0===r&&(r={type:void 0,texture:void 0},k[R]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||I[t]),r.type=t,r.texture=n)},unbindTexture:function(){var t=k[R];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===P.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),P.copy(t))},viewport:function(t){!1===L.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),L.copy(t))},reset:function(){c={},R=null,k={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,a.reset(),s.reset(),l.reset()}}}function ni(e,t,n,r,i,o,a){var s,l,c,u=i.isWebGL2,h=i.maxTextures,d=i.maxCubemapSize,f=i.maxTextureSize,p=i.maxSamples,m=new WeakMap,v=!1;try{v="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(H){}function y(e,t){return v?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function b(e,t,n,r){var i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var o=t?g.floorPowerOfTwo:Math.floor,a=o(i*e.width),s=o(i*e.height);void 0===c&&(c=y(a,s));var l=n?y(a,s):c;return l.width=a,l.height=s,l.getContext("2d").drawImage(e,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+s+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function w(e){return g.isPowerOfTwo(e.width)&&g.isPowerOfTwo(e.height)}function x(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function _(t,n,i,o){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function E(n,r,i){if(!1===u)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}var o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function A(e){return 1003===e||1004===e||1005===e?9728:9729}function S(t){var n=t.target;n.removeEventListener("dispose",S),function(t){var n=r.get(t);void 0!==n.__webglInit&&(e.deleteTexture(n.__webglTexture),r.remove(t))}(n),n.isVideoTexture&&m.delete(n),a.memory.textures--}function M(t){var n=t.target;n.removeEventListener("dispose",M),function(t){var n=r.get(t),i=r.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer&&e.deleteRenderbuffer(n.__webglColorRenderbuffer),n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer);r.remove(t.texture),r.remove(t)}}(n),a.memory.textures--}var T=0;function C(e,t){var i=r.get(e);if(e.isVideoTexture&&function(e){var t=a.render.frame;m.get(e)!==t&&(m.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){var o=e.image;if(void 0===o)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==o.complete)return void D(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function O(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6===r.image.length){L(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);for(var a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,l=[],c=0;c<6;c++)l[c]=a||s?s?r.image[c].image:r.image[c]:b(r.image[c],!1,!0,d);var h,f=l[0],p=w(f)||u,m=o.convert(r.format),g=o.convert(r.type),v=E(r.internalFormat,m,g);if(P(34067,r,p),a){for(var y=0;y<6;y++){h=l[y].mipmaps;for(var A=0;A<h.length;A++){var S=h[A];1023!==r.format&&1022!==r.format?null!==m?n.compressedTexImage2D(34069+y,A,v,S.width,S.height,0,S.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+y,A,v,S.width,S.height,0,m,g,S.data)}}t.__maxMipLevel=h.length-1}else{h=r.mipmaps;for(var M=0;M<6;M++)if(s){n.texImage2D(34069+M,0,v,l[M].width,l[M].height,0,m,g,l[M].data);for(var T=0;T<h.length;T++){var C=h[T].image[M].image;n.texImage2D(34069+M,T+1,v,C.width,C.height,0,m,g,C.data)}}else{n.texImage2D(34069+M,0,v,m,g,l[M]);for(var O=0;O<h.length;O++){var R=h[O];n.texImage2D(34069+M,O+1,v,m,g,R.image[M])}}t.__maxMipLevel=h.length}x(r,p)&&_(34067,r,f.width,f.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}var R=((s={})[1e3]=10497,s[1001]=33071,s[1002]=33648,s),k=((l={})[1003]=9728,l[1004]=9984,l[1005]=9986,l[1006]=9729,l[1007]=9985,l[1008]=9987,l);function P(n,o,a){a?(e.texParameteri(n,10242,R[o.wrapS]),e.texParameteri(n,10243,R[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,R[o.wrapR]),e.texParameteri(n,10240,k[o.magFilter]),e.texParameteri(n,10241,k[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,A(o.magFilter)),e.texParameteri(n,10241,A(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));var s=t.get("EXT_texture_filter_anisotropic");if(s){if(1015===o.type&&null===t.get("OES_texture_float_linear"))return;if(1016===o.type&&null===(u||t.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function L(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",S),t.__webglTexture=e.createTexture(),a.memory.textures++)}function D(t,r,i){var a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),L(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);var s,l=function(e){return!u&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter)}(r)&&!1===w(r.image),c=b(r.image,l,!1,f),h=w(c)||u,d=o.convert(r.format),p=o.convert(r.type),m=E(r.internalFormat,d,p);P(a,r,h);var g=r.mipmaps;if(r.isDepthTexture)m=6402,u?m=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===m&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,p=o.convert(r.type)),1027===r.format&&6402===m&&(m=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,p=o.convert(r.type))),n.texImage2D(3553,0,m,c.width,c.height,0,d,p,null);else if(r.isDataTexture)if(g.length>0&&h){for(var v=0,y=g.length;v<y;v++)s=g[v],n.texImage2D(3553,v,m,s.width,s.height,0,d,p,s.data);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,c.width,c.height,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(var A=0,S=g.length;A<S;A++)s=g[A],1023!==r.format&&1022!==r.format?null!==d?n.compressedTexImage2D(3553,A,m,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,A,m,s.width,s.height,0,d,p,s.data);t.__maxMipLevel=g.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(g.length>0&&h){for(var M=0,T=g.length;M<T;M++)s=g[M],n.texImage2D(3553,M,m,d,p,s);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,d,p,c),t.__maxMipLevel=0;x(r,h)&&_(a,r,c.width,c.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function I(t,i,a,s){var l=o.convert(i.texture.format),c=o.convert(i.texture.type),u=E(i.texture.internalFormat,l,c);n.texImage2D(s,0,u,i.width,i.height,0,l,c,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function N(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){var i=33189;if(r){var a=n.depthTexture;a&&a.isDepthTexture&&(1015===a.type?i=36012:1014===a.type&&(i=33190));var s=B(n);e.renderbufferStorageMultisample(36161,s,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){var l=B(n);e.renderbufferStorageMultisample(36161,l,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var c=o.convert(n.texture.format),u=o.convert(n.texture.type),h=E(n.texture.internalFormat,c,u);if(r){var d=B(n);e.renderbufferStorageMultisample(36161,d,h,n.width,n.height)}else e.renderbufferStorage(36161,h,n.width,n.height)}e.bindRenderbuffer(36161,null)}function j(t){var n=r.get(t),i=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),C(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,i,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,i,0)}}(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(36160,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),N(n.__webglDepthbuffer[o],t,!1)}else e.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),N(n.__webglDepthbuffer,t,!1);e.bindFramebuffer(36160,null)}function B(e){return u&&e.isWebGLMultisampleRenderTarget?Math.min(p,e.samples):0}var F=!1,z=!1;this.allocateTextureUnit=function(){var e=T;return e>=h&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+h),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=C,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=O,this.setupRenderTarget=function(t){var i=r.get(t),s=r.get(t.texture);t.addEventListener("dispose",M),s.__webglTexture=e.createTexture(),a.memory.textures++;var l=!0===t.isWebGLCubeRenderTarget,c=!0===t.isWebGLMultisampleRenderTarget,h=w(t)||u;if(!u||1022!==t.texture.format||1015!==t.texture.type&&1016!==t.texture.type||(t.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),l){i.__webglFramebuffer=[];for(var d=0;d<6;d++)i.__webglFramebuffer[d]=e.createFramebuffer()}else if(i.__webglFramebuffer=e.createFramebuffer(),c)if(u){i.__webglMultisampledFramebuffer=e.createFramebuffer(),i.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,i.__webglColorRenderbuffer);var f=o.convert(t.texture.format),p=o.convert(t.texture.type),m=E(t.texture.internalFormat,f,p),g=B(t);e.renderbufferStorageMultisample(36161,g,m,t.width,t.height),e.bindFramebuffer(36160,i.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,i.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(i.__webglDepthRenderbuffer=e.createRenderbuffer(),N(i.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){n.bindTexture(34067,s.__webglTexture),P(34067,t.texture,h);for(var v=0;v<6;v++)I(i.__webglFramebuffer[v],t,36064,34069+v);x(t.texture,h)&&_(34067,t.texture,t.width,t.height),n.bindTexture(34067,null)}else n.bindTexture(3553,s.__webglTexture),P(3553,t.texture,h),I(i.__webglFramebuffer,t,36064,3553),x(t.texture,h)&&_(3553,t.texture,t.width,t.height),n.bindTexture(3553,null);t.depthBuffer&&j(t)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(x(t,w(e)||u)){var i=e.isWebGLCubeRenderTarget?34067:3553,o=r.get(t).__webglTexture;n.bindTexture(i,o),_(i,t,e.width,e.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(u){var n=r.get(t);e.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,n.__webglFramebuffer);var i=t.width,o=t.height,a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),e.bindFramebuffer(36160,n.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),F=!0),e=e.texture),C(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)}}function ri(e,t,n){var r=n.isWebGL2;return{convert:function(e){var n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:null!==(n=t.get("OES_texture_half_float"))?n.HALF_FLOAT_OES:null;if(1021===e)return 6406;if(1022===e)return 6407;if(1023===e)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(null===(n=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(null===(n=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return null!==(n=t.get("WEBGL_compressed_texture_etc1"))?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&null!==(n=t.get("WEBGL_compressed_texture_etc"))){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?null!==(n=t.get("WEBGL_compressed_texture_astc"))?e:null:36492===e?null!==(n=t.get("EXT_texture_compression_bptc"))?e:null:1020===e?r?34042:null!==(n=t.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function ii(){Me.call(this),this.type="Group"}function oi(e){void 0===e&&(e=[]),Yt.call(this),this.cameras=e}Jr.prototype=Object.create(Ze.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshDepthMaterial=!0,Jr.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},$r.prototype=Object.create(Ze.prototype),$r.prototype.constructor=$r,$r.prototype.isMeshDistanceMaterial=!0,$r.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},ii.prototype=Object.assign(Object.create(Me.prototype),{constructor:ii,isGroup:!0}),oi.prototype=Object.assign(Object.create(Yt.prototype),{constructor:oi,isArrayCamera:!0});var ai=new T,si=new T;function li(e){var t,n,r=this,i=null,o=null,a=null,s=[],l=new te,c=new te,u=1,h="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",x,!1));var d=new te,f=new M,p=new T,m=new Yt;m.viewport=new E,m.layers.enable(1);var g=new Yt;g.viewport=new E,g.layers.enable(2);var y=new oi([m,g]);y.layers.enable(1),y.layers.enable(2);var b,w=new v;function x(){if(r.isPresenting=null!==i&&!0===i.isPresenting){var o=i.getEyeParameters("left");t=2*o.renderWidth*u,n=o.renderHeight*u,b=e.getPixelRatio(),e.getSize(w),e.setDrawingBufferSize(t,n,1),m.viewport.set(0,0,t/2,n),g.viewport.set(t/2,0,t/2,n),O.start(),r.dispatchEvent({type:"sessionstart"})}else r.enabled&&e.setDrawingBufferSize(w.width,w.height,b),O.stop(),r.dispatchEvent({type:"sessionend"})}var _=[],A=[];function S(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,r=t.length;n<r;n++){var i=t[n];if(i&&("Daydream Controller"===i.id||"Gear VR Controller"===i.id||"Oculus Go Controller"===i.id||"OpenVR Gamepad"===i.id||i.id.startsWith("Oculus Touch")||i.id.startsWith("HTC Vive Focus")||i.id.startsWith("Spatial Controller"))){var o=i.hand;if(0===e&&(""===o||"right"===o))return i;if(1===e&&"left"===o)return i}}}function C(e,r){null!==r&&4===r.length&&e.set(r[0]*t,r[1]*n,r[2]*t,r[3]*n)}this.enabled=!1,this.getController=function(e){var t=s[e];return void 0===t&&((t=new ii).matrixAutoUpdate=!1,t.visible=!1,s[e]=t),t},this.getDevice=function(){return i},this.setDevice=function(e){void 0!==e&&(i=e),O.setContext(e)},this.setFramebufferScaleFactor=function(e){u=e},this.setReferenceSpaceType=function(e){h=e},this.setPoseTarget=function(e){void 0!==e&&(a=e)},this.getCamera=function(e){var t="local-floor"===h?1.6:0;if(i.depthNear=e.near,i.depthFar=e.far,i.getFrameData(o),"local-floor"===h){var n=i.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,t,0)}var r=o.pose,u=null!==a?a:e;u.matrix.copy(l),u.matrix.decompose(u.position,u.quaternion,u.scale),null!==r.orientation&&(f.fromArray(r.orientation),u.quaternion.multiply(f)),null!==r.position&&(f.setFromRotationMatrix(l),p.fromArray(r.position),p.applyQuaternion(f),u.position.add(p)),u.updateMatrixWorld();for(var v=u.children,b=0,w=v.length;b<w;b++)v[b].updateMatrixWorld(!0);m.near=e.near,g.near=e.near,m.far=e.far,g.far=e.far,m.matrixWorldInverse.fromArray(o.leftViewMatrix),g.matrixWorldInverse.fromArray(o.rightViewMatrix),c.getInverse(l),"local-floor"===h&&(m.matrixWorldInverse.multiply(c),g.matrixWorldInverse.multiply(c));var x=u.parent;null!==x&&(d.getInverse(x.matrixWorld),m.matrixWorldInverse.multiply(d),g.matrixWorldInverse.multiply(d)),m.matrixWorld.getInverse(m.matrixWorldInverse),g.matrixWorld.getInverse(g.matrixWorldInverse),m.projectionMatrix.fromArray(o.leftProjectionMatrix),g.projectionMatrix.fromArray(o.rightProjectionMatrix),function(e,t,n){ai.setFromMatrixPosition(t.matrixWorld),si.setFromMatrixPosition(n.matrixWorld);var r=ai.distanceTo(si),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(y,m,g);var E=i.getLayers();if(E.length){var M=E[0];C(m.viewport,M.leftBounds),C(g.viewport,M.rightBounds)}return function(){for(var e=0;e<s.length;e++){var t=s[e],n=S(e);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var r=n.pose;!1===r.hasPosition&&t.position.set(.2,-.6,-.05),null!==r.position&&t.position.fromArray(r.position),null!==r.orientation&&t.quaternion.fromArray(r.orientation),t.matrix.compose(t.position,t.quaternion,t.scale),t.matrix.premultiply(l),t.matrix.decompose(t.position,t.quaternion,t.scale),t.matrixWorldNeedsUpdate=!0,t.visible=!0;var i="Daydream Controller"===n.id?0:1;void 0===_[e]&&(_[e]=!1),_[e]!==n.buttons[i].pressed&&(_[e]=n.buttons[i].pressed,!0===_[e]?t.dispatchEvent({type:"selectstart"}):(t.dispatchEvent({type:"selectend"}),t.dispatchEvent({type:"select"}))),i=2,void 0===A[e]&&(A[e]=!1),void 0!==n.buttons[i]&&A[e]!==n.buttons[i].pressed&&(A[e]=n.buttons[i].pressed,!0===A[e]?t.dispatchEvent({type:"squeezestart"}):(t.dispatchEvent({type:"squeezeend"}),t.dispatchEvent({type:"squeeze"})))}else t.visible=!1}}(),y},this.getStandingMatrix=function(){return l},this.isPresenting=!1;var O=new nn;this.setAnimationLoop=function(e){O.setAnimationLoop(e),this.isPresenting&&O.start()},this.submitFrame=function(){this.isPresenting&&i.submitFrame()},this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",x)},this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function ci(){this._targetRay=null,this._grip=null,this._hand=null}function ui(e,t){var n,r=this,o=null,a=1,s=null,l="local-floor",c=null,u=null,h=[],d=new Map,f=[],p=new Yt;p.layers.enable(1),p.viewport=new E;var m=new Yt;m.layers.enable(2),m.viewport=new E;var g=[p,m],v=new oi;v.layers.enable(1),v.layers.enable(2);var y=null,b=null;function w(e){var t=d.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){d.forEach((function(e,t){e.disconnect(t)})),d.clear(),y=null,b=null,e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),O.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function _(e){for(var t=o.inputSources,n=0;n<h.length;n++)d.set(t[n],h[n]);for(var r=0;r<e.removed.length;r++){var i=e.removed[r],a=d.get(i);a&&(a.dispatchEvent({type:"disconnected",data:i}),d.delete(i))}for(var s=0;s<e.added.length;s++){var l=e.added[s],c=d.get(l);c&&c.dispatchEvent({type:"connected",data:l})}}this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.getCameraPose=function(){return c},this.getController=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getGripSpace()},this.getHand=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){l=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getSession=function(){return o},this.setSession=function(){var e,c=(e=regeneratorRuntime.mark((function e(i){var c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(o=i)){e.next=24;break}if(o.addEventListener("select",w),o.addEventListener("selectstart",w),o.addEventListener("selectend",w),o.addEventListener("squeeze",w),o.addEventListener("squeezestart",w),o.addEventListener("squeezeend",w),o.addEventListener("end",x),o.addEventListener("inputsourceschange",_),!0===(c=t.getContextAttributes()).xrCompatible){e.next=14;break}return e.next=14,t.makeXRCompatible();case 14:return u={antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:a},n=new XRWebGLLayer(o,t,u),window.XRWebGLBinding&&this.layersEnabled?this.addLayer(n):o.updateRenderState({baseLayer:n}),e.next=19,o.requestReferenceSpace(l);case 19:s=e.sent,O.setContext(o),O.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"});case 24:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))});return function(e){return c.apply(this,arguments)}}(),this.addLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.push(e),o.updateRenderState({layers:f}))},this.removeLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.splice(f.indexOf(e),1),o.updateRenderState({layers:f}))};var A=new T,S=new T;function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.setPoseTarget=function(e){void 0!==e&&(u=e)},this.getCamera=function(e){v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(o.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);var t=e.parent,n=v.cameras,r=u||e;M(v,t);for(var i=0;i<n.length;i++)M(n[i],t);r.matrixWorld.copy(v.matrixWorld);for(var a=r.children,s=0,l=a.length;s<l;s++)a[s].updateMatrixWorld(!0);return 2===n.length?function(e,t,n){A.setFromMatrixPosition(t.matrixWorld),S.setFromMatrixPosition(n.matrixWorld);var r=A.distanceTo(S),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix),v};var C=null,O=new nn;O.setAnimationLoop((function(t,r){if(null!==(c=r.getViewerPose(s))){var i=c.views;e.setFramebuffer(n.framebuffer);var a=!1;i.length!==v.cameras.length&&(v.cameras.length=0,a=!0);for(var l=0;l<i.length;l++){var u=i[l],d=n.getViewport(u),f=g[l];f.matrix.fromArray(u.transform.matrix),f.projectionMatrix.fromArray(u.projectionMatrix),f.viewport.set(d.x,d.y,d.width,d.height),0===l&&v.matrix.copy(f.matrix),!0===a&&v.cameras.push(f)}}for(var p=o.inputSources,m=0;m<h.length;m++){var y=h[m],b=p[m];y.update(b,r,s)}C&&C(t,r)})),this.setAnimationLoop=function(e){C=e},this.dispose=function(){}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);var r,i,o=e.get(n).envMap;if(o){t.envMap.value=o,t.flipEnvMap.value=o.isCubeTexture&&o._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;var a=e.get(o).__maxMipLevel;void 0!==a&&(t.maxMipLevel.value=a)}n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(r=n.clearcoatRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),n.aoMap?i=n.aoMap:n.lightMap&&(i=n.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uv2Transform.value.copy(i.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate()),e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap)}(e,r):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){var i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e){var t=void 0!==(e=e||{}).canvas?e.canvas:function(){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,r=void 0!==e.alpha&&e.alpha,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,a=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,h=null,d=null,f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p=this,m=!1,y=null,b=0,w=0,x=null,_=null,A=-1,S=null,M=new E,C=new E,O=null,R=t.width,k=t.height,P=1,L=null,D=null,I=new E(0,0,R,k),N=new E(0,0,R,k),j=!1,B=new tn,F=!1,z=!1,H=new te,U=new T,V={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function G(){return null===x?P:1}var W,q,X,Y,K,Q,Z,J,$,ee,ne,re,ie,oe,ae,se,le,ce,ue,he,de,fe=n;function pe(e,n){for(var r=0;r<e.length;r++){var i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{var me={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if(t.addEventListener("webglcontextlost",we,!1),t.addEventListener("webglcontextrestored",xe,!1),null===fe){var ge=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&ge.shift(),null===(fe=pe(ge,me)))throw pe(ge)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===fe.getShaderPrecisionFormat&&(fe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ke){throw console.error("THREE.WebGLRenderer: "+ke.message),ke}function ve(){W=new mn(fe),q=new dn(fe,W,e),W.init(q),he=new ri(fe,W,q),(X=new ti(fe,W,q)).scissor(C.copy(N).multiplyScalar(P).floor()),X.viewport(M.copy(I).multiplyScalar(P).floor()),Y=new yn(fe),K=new Hr,Q=new ni(fe,W,X,K,q,he,Y),Z=new pn(p),J=new rn(fe,q),de=new un(fe,W,J,q),$=new gn(fe,J,Y,de),ee=new _n(fe,$,J,Y),le=new xn(fe),ae=new fn(K),ne=new zr(p,Z,W,q,de,ae),re=new hi(K),ie=new Wr(K),oe=new Zr(W,q),se=new cn(p,Z,X,ee,s),ce=new hn(fe,W,Y,q),ue=new vn(fe,W,Y,q),Y.programs=ne.programs,p.capabilities=q,p.extensions=W,p.properties=K,p.renderLists=ie,p.state=X,p.info=Y}ve();var ye="undefined"!==typeof navigator&&"xr"in navigator?new ui(p,fe):new li(p);this.xr=ye;var be=new ei(p,ee,q.maxTextureSize);function we(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function xe(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1,ve()}function _e(e){var t=e.target;t.removeEventListener("dispose",_e),function(e){Ee(e),K.remove(e)}(t)}function Ee(e){var t=K.get(e).program;void 0!==t&&ne.releaseProgram(t)}this.shadowMap=be,this.getContext=function(){return fe},this.getContextAttributes=function(){return fe.getContextAttributes()},this.forceContextLoss=function(){var e=W.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=W.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(e){void 0!==e&&(P=e,this.setSize(R,k,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new v),e.set(R,k)},this.setSize=function(e,n,r){ye.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,k=n,t.width=Math.floor(e*P),t.height=Math.floor(n*P),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new v),e.set(R*P,k*P).floor()},this.setDrawingBufferSize=function(e,n,r){R=e,k=n,P=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new E),e.copy(M)},this.getViewport=function(e){return e.copy(I)},this.setViewport=function(e,t,n,r){e.isVector4?I.set(e.x,e.y,e.z,e.w):I.set(e,t,n,r),X.viewport(M.copy(I).multiplyScalar(P).floor())},this.getScissor=function(e){return e.copy(N)},this.setScissor=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),X.scissor(C.copy(N).multiplyScalar(P).floor())},this.getScissorTest=function(){return j},this.setScissorTest=function(e){X.setScissorTest(j=e)},this.setOpaqueSort=function(e){L=e},this.setTransparentSort=function(e){D=e},this.getClearColor=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),e=new Ye),e.copy(se.getClearColor())},this.setClearColor=function(){se.setClearColor.apply(se,arguments)},this.getClearAlpha=function(){return se.getClearAlpha()},this.setClearAlpha=function(){se.setClearAlpha.apply(se,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),fe.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",we,!1),t.removeEventListener("webglcontextrestored",xe,!1),ie.dispose(),oe.dispose(),K.dispose(),Z.dispose(),ee.dispose(),de.dispose(),ye.dispose(),Se.stop()},this.renderBufferImmediate=function(e,t){de.initAttributes();var n=K.get(e);e.hasPositions&&!n.position&&(n.position=fe.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=fe.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=fe.createBuffer()),e.hasColors&&!n.color&&(n.color=fe.createBuffer());var r=t.getAttributes();e.hasPositions&&(fe.bindBuffer(34962,n.position),fe.bufferData(34962,e.positionArray,35048),de.enableAttribute(r.position),fe.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(fe.bindBuffer(34962,n.normal),fe.bufferData(34962,e.normalArray,35048),de.enableAttribute(r.normal),fe.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(fe.bindBuffer(34962,n.uv),fe.bufferData(34962,e.uvArray,35048),de.enableAttribute(r.uv),fe.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(fe.bindBuffer(34962,n.color),fe.bufferData(34962,e.colorArray,35048),de.enableAttribute(r.color),fe.vertexAttribPointer(r.color,3,5126,!1,0,0)),de.disableUnusedAttributes(),fe.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=V);var a=i.isMesh&&i.matrixWorld.determinant()<0,s=Re(e,t,r,i);X.setMaterial(r,a);var l=n.index,c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;var u,h=1;!0===r.wireframe&&(l=$.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&le.update(i,n,r,s),de.setup(i,r,s,n,l);var d=ce;null!==l&&(u=J.get(l),(d=ue).setIndex(u));var f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(X.setLineWidth(r.wireframeLinewidth*G()),d.setMode(1)):d.setMode(4);else if(i.isLine){var x=r.linewidth;void 0===x&&(x=1),X.setLineWidth(x*G()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){var _=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,_)}else d.render(y,w)}},this.compile=function(e,t){(d=oe.get(e)).init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights();var n=new WeakMap;e.traverse((function(t){var r=t.material;if(r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var o=r[i];!1===n.has(o)&&(Oe(o,e,t),n.set(o))}else!1===n.has(r)&&(Oe(r,e,t),n.set(r))}))};var Ae=null,Se=new nn;function Me(e,t,n,r){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||B.intersectsSprite(e)){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var i=ee.update(e),o=e.material;o.visible&&h.push(e,i,o,n,U.z,null)}}else if(e.isImmediateRenderObject)r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H),h.push(e,null,e.material,n,U.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==Y.render.frame&&(e.skeleton.update(),e.skeleton.frame=Y.render.frame),!e.frustumCulled||B.intersectsObject(e))){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var a=ee.update(e),s=e.material;if(Array.isArray(s))for(var l=a.groups,c=0,u=l.length;c<u;c++){var f=l[c],p=s[f.materialIndex];p&&p.visible&&h.push(e,a,p,n,U.z,f)}else s.visible&&h.push(e,a,s,n,U.z,null)}for(var m=e.children,g=0,v=m.length;g<v;g++)Me(m[g],t,n,r)}}function Te(e,t,n){for(var r=!0===t.isScene?t.overrideMaterial:null,i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,l=a.geometry,c=null===r?a.material:r,u=a.group;if(n.isArrayCamera)for(var h=n.cameras,f=0,p=h.length;f<p;f++){var m=h[f];s.layers.test(m.layers)&&(X.viewport(M.copy(m.viewport)),d.setupLightsView(m),Ce(s,t,m,l,c,u))}else Ce(s,t,n,l,c,u)}}function Ce(e,t,n,r,i,o){if(e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=Re(n,t,i,e);X.setMaterial(i),de.reset(),function(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}(e,a)}else p.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(p,t,n,r,i,o)}function Oe(e,t,n){!0!==t.isScene&&(t=V);var r=K.get(e),i=d.state.lights,o=d.state.shadowsArray,a=i.state.version,s=ne.getParameters(e,i.state,o,t,n),l=ne.getProgramCacheKey(s),c=r.program,u=!0;if(r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=Z.get(e.envMap||r.environment),void 0===c)e.addEventListener("dispose",_e);else if(c.cacheKey!==l)Ee(e);else if(r.lightsStateVersion!==a)u=!1;else{if(void 0!==s.shaderID)return;u=!1}u&&(s.uniforms=ne.getUniforms(e),e.onBeforeCompile(s,p),c=ne.acquireProgram(s,l),r.program=c,r.uniforms=s.uniforms,r.outputEncoding=s.outputEncoding);var h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ae.numPlanes,r.numIntersection=ae.numIntersection,h.clippingPlanes=ae.uniform),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);var f=r.program.getUniforms(),m=br.seqWithValue(f.seq,h);r.uniformsList=m}function Re(e,t,n,r){!0!==t.isScene&&(t=V),Q.resetTextureUnits();var i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?p.outputEncoding:x.texture.encoding,s=Z.get(n.envMap||o),l=K.get(n),c=d.state.lights;if(!0===F&&(!0===z||e!==S)){var u=e===S&&n.id===A;ae.setState(n,e,u)}n.version===l.__version?n.fog&&l.fog!==i||l.environment!==o||l.needsLights&&l.lightsStateVersion!==c.state.version?Oe(n,t,r):void 0===l.numClippingPlanes||l.numClippingPlanes===ae.numPlanes&&l.numIntersection===ae.numIntersection?(l.outputEncoding!==a||l.envMap!==s)&&Oe(n,t,r):Oe(n,t,r):(Oe(n,t,r),l.__version=n.version);var h=!1,f=!1,m=!1,v=l.program,y=v.getUniforms(),b=l.uniforms;if(X.useProgram(v.program)&&(h=!0,f=!0,m=!0),n.id!==A&&(A=n.id,f=!0),h||S!==e){if(y.setValue(fe,"projectionMatrix",e.projectionMatrix),q.logarithmicDepthBuffer&&y.setValue(fe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),S!==e&&(S=e,f=!0,m=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){var w=y.map.cameraPosition;void 0!==w&&w.setValue(fe,U.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(fe,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&y.setValue(fe,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){y.setOptional(fe,r,"bindMatrix"),y.setOptional(fe,r,"bindMatrixInverse");var _=r.skeleton;if(_){var E=_.bones;if(q.floatVertexTextures){if(null===_.boneTexture){var M=Math.sqrt(4*E.length);M=g.ceilPowerOfTwo(M),M=Math.max(M,4);var T=new Float32Array(M*M*4);T.set(_.boneMatrices);var C=new Jt(T,M,M,1023,1015);_.boneMatrices=T,_.boneTexture=C,_.boneTextureSize=M}y.setValue(fe,"boneTexture",_.boneTexture,Q),y.setValue(fe,"boneTextureSize",_.boneTextureSize)}else y.setOptional(fe,_,"boneMatrices")}}return(f||l.receiveShadow!==r.receiveShadow)&&(l.receiveShadow=r.receiveShadow,y.setValue(fe,"receiveShadow",r.receiveShadow)),f&&(y.setValue(fe,"toneMappingExposure",p.toneMappingExposure),l.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,m),i&&n.fog&&re.refreshFogUniforms(b,i),re.refreshMaterialUniforms(b,n,P,k),br.upload(fe,l.uniformsList,b,Q)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(br.upload(fe,l.uniformsList,b,Q),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(fe,"center",r.center),y.setValue(fe,"modelViewMatrix",r.modelViewMatrix),y.setValue(fe,"normalMatrix",r.normalMatrix),y.setValue(fe,"modelMatrix",r.matrixWorld),v}Se.setAnimationLoop((function(e){ye.isPresenting||Ae&&Ae(e)})),"undefined"!==typeof window&&Se.setContext(window),this.setAnimationLoop=function(e){Ae=e,ye.setAnimationLoop(e),null===e?Se.stop():Se.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),void 0===t||!0===t.isCamera){if(!0!==m){de.resetDefaultState(),A=-1,S=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===ye.enabled&&!0===ye.isPresenting&&(t=ye.getCamera(t)),!0===e.isScene&&e.onBeforeRender(p,e,t,n||x),(d=oe.get(e,f.length)).init(),f.push(d),H.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),B.setFromProjectionMatrix(H),z=this.localClippingEnabled,F=ae.init(this.clippingPlanes,z,t),(h=ie.get(e,t)).init(),Me(e,t,0,p.sortObjects),h.finish(),!0===p.sortObjects&&h.sort(L,D),!0===F&&ae.beginShadows();var i=d.state.shadowsArray;be.render(i,e,t),d.setupLights(),d.setupLightsView(t),!0===F&&ae.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),se.render(h,e,t,r);var o=h.opaque,a=h.transparent;o.length>0&&Te(o,e,t),a.length>0&&Te(a,e,t),!0===e.isScene&&e.onAfterRender(p,e,t),null!==x&&(Q.updateRenderTargetMipmap(x),Q.updateMultisampleRenderTarget(x)),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1),ye.enabled&&ye.submitFrame&&ye.submitFrame(),f.pop(),d=f.length>0?f[f.length-1]:null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setTexture2D=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTarget&&(e||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),Q.setTexture2D(t,n)}}(),this.setFramebuffer=function(e){y!==e&&null===x&&fe.bindFramebuffer(36160,e),y=e},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderList=function(){return h},this.setRenderList=function(e){h=e},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),x=e,b=t,w=n,e&&void 0===K.get(e).__webglFramebuffer&&Q.setupRenderTarget(e);var r=y,i=!1;if(e){var o=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=o[t],i=!0):r=e.isWebGLMultisampleRenderTarget?K.get(e).__webglMultisampledFramebuffer:o,M.copy(e.viewport),C.copy(e.scissor),O=e.scissorTest}else M.copy(I).multiplyScalar(P).floor(),C.copy(N).multiplyScalar(P).floor(),O=j;if(_!==r&&(fe.bindFramebuffer(36160,r),_=r),X.viewport(M),X.scissor(C),X.setScissorTest(O),i){var a=K.get(e.texture);fe.framebufferTexture2D(36160,36064,34069+t,a.__webglTexture,n)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(e&&e.isWebGLRenderTarget){var s=K.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){var l=!1;s!==_&&(fe.bindFramebuffer(36160,s),l=!0);try{var c=e.texture,u=c.format,h=c.type;if(1023!==u&&he.convert(u)!==fe.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");var d=1016===h&&(W.has("EXT_color_buffer_half_float")||q.isWebGL2&&W.has("EXT_color_buffer_float"));if(1009!==h&&he.convert(h)!==fe.getParameter(35738)&&(1015!==h||!(q.isWebGL2||W.has("OES_texture_float")||W.has("WEBGL_color_buffer_float")))&&!d)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===fe.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&fe.readPixels(t,n,r,i,he.convert(u),he.convert(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{l&&fe.bindFramebuffer(36160,_)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r),a=he.convert(t.format);Q.setTexture2D(t,0),fe.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),X.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){void 0===r&&(r=0);var i=t.image.width,o=t.image.height,a=he.convert(n.format),s=he.convert(n.type);Q.setTexture2D(n,0),fe.pixelStorei(37440,n.flipY),fe.pixelStorei(37441,n.premultiplyAlpha),fe.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?fe.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?fe.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):fe.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&fe.generateMipmap(3553),X.unbindTexture()},this.initTexture=function(e){Q.setTexture2D(e,0),X.unbindTexture()},this.resetState=function(){X.reset(),de.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function fi(e){di.call(this,e)}Object.assign(li.prototype,h.prototype),Object.assign(ci.prototype,{constructor:ci,getHandSpace:function(){return null===this._hand&&(this._hand=new ii,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand},getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new ii,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new ii,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this},disconnect:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this},update:function(e,t,n){var r=null,i=null,o=null,a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(l&&e.hand){o=!0;for(var c,h=u(e.hand.values());!(c=h()).done;){var d=c.value,f=t.getJointPose(d,n);if(void 0===l.joints[d.jointName]){var p=new ii;p.matrixAutoUpdate=!1,p.visible=!1,l.joints[d.jointName]=p,l.add(p)}var m=l.joints[d.jointName];null!==f&&(m.matrix.fromArray(f.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=f.radius),m.visible=null!==f}var g=l.joints["index-finger-tip"],v=l.joints["thumb-tip"],y=g.position.distanceTo(v.position);l.inputState.pinching&&y>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&y<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&null!==(r=t.getPose(e.targetRaySpace,n))&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale)),null!==s&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}),Object.assign(ui.prototype,h.prototype),fi.prototype=Object.assign(Object.create(di.prototype),{constructor:fi,isWebGL1Renderer:!0});var pi=function(){function e(e,t){Object.defineProperty(this,"isFogExp2",{value:!0}),this.name="",this.color=new Ye(e),this.density=void 0!==t?t:25e-5}var t=e.prototype;return t.clone=function(){return new e(this.color,this.density)},t.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},e}(),mi=function(){function e(e,t,n){Object.defineProperty(this,"isFog",{value:!0}),this.name="",this.color=new Ye(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}var t=e.prototype;return t.clone=function(){return new e(this.color,this.near,this.far)},t.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},e}(),gi=function(e){function t(){var t;return t=e.call(this)||this,Object.defineProperty(l(t),"isScene",{value:!0}),t.type="Scene",t.background=null,t.environment=null,t.fog=null,t.overrideMaterial=null,t.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:l(t)})),t}s(t,e);var n=t.prototype;return n.copy=function(t,n){return e.prototype.copy.call(this,t,n),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},n.toJSON=function(t){var n=e.prototype.toJSON.call(this,t);return null!==this.background&&(n.object.background=this.background.toJSON(t)),null!==this.environment&&(n.object.environment=this.environment.toJSON(t)),null!==this.fog&&(n.object.fog=this.fog.toJSON()),n},t}(Me);function vi(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=g.generateUUID()}Object.defineProperty(vi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(vi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);var t=new vi(new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),this.stride);return t.setUsage(this.usage),t},onUpload:function(e){return this.onUploadCallback=e,this},toJSON:function(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var yi,bi=new T;function wi(e,t,n,r){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function xi(e){Ze.call(this),this.type="SpriteMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.defineProperties(wi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(e){this.data.needsUpdate=e}}}),Object.assign(wi.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,n=this.data.count;t<n;t++)bi.x=this.getX(t),bi.y=this.getY(t),bi.z=this.getZ(t),bi.applyMatrix4(e),this.setXYZ(t,bi.x,bi.y,bi.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this},clone:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return new tt(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new wi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}),xi.prototype=Object.create(Ze.prototype),xi.prototype.constructor=xi,xi.prototype.isSpriteMaterial=!0,xi.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var _i=new T,Ei=new T,Ai=new T,Si=new v,Mi=new v,Ti=new te,Ci=new T,Oi=new T,Ri=new T,ki=new v,Pi=new v,Li=new v;function Di(e){if(Me.call(this),this.type="Sprite",void 0===yi){yi=new _t;var t=new vi(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);yi.setIndex([0,1,2,0,2,3]),yi.setAttribute("position",new wi(t,3,0,!1)),yi.setAttribute("uv",new wi(t,2,3,!1))}this.geometry=yi,this.material=void 0!==e?e:new xi,this.center=new v(.5,.5)}function Ii(e,t,n,r,i,o){Si.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Mi.x=o*Si.x-i*Si.y,Mi.y=i*Si.x+o*Si.y):Mi.copy(Si),e.copy(t),e.x+=Mi.x,e.y+=Mi.y,e.applyMatrix4(Ti)}Di.prototype=Object.assign(Object.create(Me.prototype),{constructor:Di,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ei.setFromMatrixScale(this.matrixWorld),Ti.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ai.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Ei.multiplyScalar(-Ai.z);var n,r,i=this.material.rotation;0!==i&&(r=Math.cos(i),n=Math.sin(i));var o=this.center;Ii(Ci.set(-.5,-.5,0),Ai,o,Ei,n,r),Ii(Oi.set(.5,-.5,0),Ai,o,Ei,n,r),Ii(Ri.set(.5,.5,0),Ai,o,Ei,n,r),ki.set(0,0),Pi.set(1,0),Li.set(1,1);var a=e.ray.intersectTriangle(Ci,Oi,Ri,!1,_i);if(null!==a||(Ii(Oi.set(-.5,.5,0),Ai,o,Ei,n,r),Pi.set(0,1),null!==(a=e.ray.intersectTriangle(Ci,Ri,Oi,!1,_i)))){var s=e.ray.origin.distanceTo(_i);s<e.near||s>e.far||t.push({distance:s,point:_i.clone(),uv:He.getUV(_i,Ci,Oi,Ri,ki,Pi,Li,new v),face:null,object:this})}},copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}});var Ni=new T,ji=new T;function Bi(){Me.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}Bi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Bi,isLOD:!0,copy:function(e){Me.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);var n,r=this.levels;for(n=0;n<r.length&&!(t<r[n].distance);n++);return r.splice(n,0,{distance:t,object:e}),this.add(e),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(e){var t=this.levels;if(t.length>0){var n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null},raycast:function(e,t){if(this.levels.length>0){Ni.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(Ni);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){Ni.setFromMatrixPosition(e.matrixWorld),ji.setFromMatrixPosition(this.matrixWorld);var n,r,i=Ni.distanceTo(ji)/e.zoom;for(t[0].object.visible=!0,n=1,r=t.length;n<r&&i>=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(this._currentLevel=n-1;n<r;n++)t[n].object.visible=!1}},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}});var Fi=new T,zi=new E,Hi=new E,Ui=new T,Vi=new te;function Gi(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),zt.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new te,this.bindMatrixInverse=new te}function Wi(){Me.call(this),this.type="Bone"}Gi.prototype=Object.assign(Object.create(zt.prototype),{constructor:Gi,isSkinnedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new E,t=this.geometry.attributes.skinWeight,n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);var i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){zt.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(e,t){var n=this.skeleton,r=this.geometry;zi.fromBufferAttribute(r.attributes.skinIndex,e),Hi.fromBufferAttribute(r.attributes.skinWeight,e),Fi.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(var i=0;i<4;i++){var o=Hi.getComponent(i);if(0!==o){var a=zi.getComponent(i);Vi.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(Ui.copy(Fi).applyMatrix4(Vi),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}),Wi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Wi,isBone:!0});var qi=new te,Xi=new te;function Yi(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.uuid=g.generateUUID(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}Object.assign(Yi.prototype,{init:function(){var e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new te)}},calculateInverses:function(){this.boneInverses.length=0;for(var e=0,t=this.bones.length;e<t;e++){var n=new te;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}},pose:function(){for(var e=0,t=this.bones.length;e<t;e++){var n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(var r=0,i=this.bones.length;r<i;r++){var o=this.bones[r];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}},update:function(){for(var e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture,i=0,o=e.length;i<o;i++){var a=e[i]?e[i].matrixWorld:Xi;qi.multiplyMatrices(a,t[i]),qi.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)},clone:function(){return new Yi(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}},dispose:function(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)},fromJSON:function(e,t){this.uuid=e.uuid;for(var n=0,r=e.bones.length;n<r;n++){var i=e.bones[n],o=t[i];void 0===o&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),o=new Wi),this.bones.push(o),this.boneInverses.push((new te).fromArray(e.boneInverses[n]))}return this.init(),this},toJSON:function(){var e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;for(var t=this.bones,n=this.boneInverses,r=0,i=t.length;r<i;r++){var o=t[r];e.bones.push(o.uuid);var a=n[r];e.boneInverses.push(a.toArray())}return e}});var Ki=new te,Qi=new te,Zi=[],Ji=new zt;function $i(e,t,n){zt.call(this,e,t),this.instanceMatrix=new tt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}function eo(e){Ze.call(this),this.type="LineBasicMaterial",this.color=new Ye(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}$i.prototype=Object.assign(Object.create(zt.prototype),{constructor:$i,isInstancedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this},getColorAt:function(e,t){t.fromArray(this.instanceColor.array,3*e)},getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var n=this.matrixWorld,r=this.count;if(Ji.geometry=this.geometry,Ji.material=this.material,void 0!==Ji.material)for(var i=0;i<r;i++){this.getMatrixAt(i,Ki),Qi.multiplyMatrices(n,Ki),Ji.matrixWorld=Qi,Ji.raycast(e,Zi);for(var o=0,a=Zi.length;o<a;o++){var s=Zi[o];s.instanceId=i,s.object=this,t.push(s)}Zi.length=0}},setColorAt:function(e,t){null===this.instanceColor&&(this.instanceColor=new tt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){},dispose:function(){this.dispatchEvent({type:"dispose"})}}),eo.prototype=Object.create(Ze.prototype),eo.prototype.constructor=eo,eo.prototype.isLineBasicMaterial=!0,eo.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this};var to=new T,no=new T,ro=new te,io=new ee,oo=new q;function ao(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new eo),Me.call(this),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}ao.prototype=Object.assign(Object.create(Me.prototype),{constructor:ao,isLine:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;r<i;r++)to.fromBufferAttribute(t,r-1),no.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=to.distanceTo(no);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),oo.copy(n.boundingSphere),oo.applyMatrix4(r),oo.radius+=i,!1!==e.ray.intersectsSphere(oo)){ro.copy(r).invert(),io.copy(e.ray).applyMatrix4(ro);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,s=new T,l=new T,c=new T,u=new T,h=this.isLineSegments?2:1;if(n.isBufferGeometry){var d=n.index,f=n.attributes.position;if(null!==d)for(var p=d.array,m=0,g=p.length-1;m<g;m+=h){var v=p[m],y=p[m+1];if(s.fromBufferAttribute(f,v),l.fromBufferAttribute(f,y),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var b=e.ray.origin.distanceTo(u);b<e.near||b>e.far||t.push({distance:b,point:c.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else for(var w=0,x=f.count-1;w<x;w+=h)if(s.fromBufferAttribute(f,w),l.fromBufferAttribute(f,w+1),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var _=e.ray.origin.distanceTo(u);_<e.near||_>e.far||t.push({distance:_,point:c.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});var so=new T,lo=new T;function co(e,t){ao.call(this,e,t),this.type="LineSegments"}function uo(e,t){ao.call(this,e,t),this.type="LineLoop"}function ho(e){Ze.call(this),this.type="PointsMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}co.prototype=Object.assign(Object.create(ao.prototype),{constructor:co,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r<i;r+=2)so.fromBufferAttribute(t,r),lo.fromBufferAttribute(t,r+1),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+so.distanceTo(lo);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}),uo.prototype=Object.assign(Object.create(ao.prototype),{constructor:uo,isLineLoop:!0}),ho.prototype=Object.create(Ze.prototype),ho.prototype.constructor=ho,ho.prototype.isPointsMaterial=!0,ho.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var fo=new te,po=new ee,mo=new q,go=new T;function vo(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new ho),Me.call(this),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}function yo(e,t,n,r,i,o,a){var s=po.distanceSqToPoint(e);if(s<n){var l=new T;po.closestPointToPoint(e,l),l.applyMatrix4(r);var c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}function bo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==i?i:1006,this.generateMipmaps=!1;var c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}function wo(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function xo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}function _o(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),x.call(this,null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}vo.prototype=Object.assign(Object.create(Me.prototype),{constructor:vo,isPoints:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),mo.copy(n.boundingSphere),mo.applyMatrix4(r),mo.radius+=i,!1!==e.ray.intersectsSphere(mo)){fo.copy(r).invert(),po.copy(e.ray).applyMatrix4(fo);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o;if(n.isBufferGeometry){var s=n.index,l=n.attributes.position;if(null!==s)for(var c=s.array,u=0,h=c.length;u<h;u++){var d=c[u];go.fromBufferAttribute(l,d),yo(go,d,a,r,e,t,this)}else for(var f=0,p=l.count;f<p;f++)go.fromBufferAttribute(l,f),yo(go,f,a,r,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),bo.prototype=Object.assign(Object.create(x.prototype),{constructor:bo,clone:function(){return new this.constructor(this.image).copy(this)},isVideoTexture:!0,update:function(){var e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),wo.prototype=Object.create(x.prototype),wo.prototype.constructor=wo,wo.prototype.isCompressedTexture=!0,xo.prototype=Object.create(x.prototype),xo.prototype.constructor=xo,xo.prototype.isCanvasTexture=!0,_o.prototype=Object.create(x.prototype),_o.prototype.constructor=_o,_o.prototype.isDepthTexture=!0;var Eo=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="CircleGeometry",o.parameters={radius:t,segments:n,thetaStart:r,thetaLength:i},n=Math.max(3,n);var a=[],s=[],l=[],c=[],u=new T,h=new v;s.push(0,0,0),l.push(0,0,1),c.push(.5,.5);for(var d=0,f=3;d<=n;d++,f+=3){var p=r+d/n*i;u.x=t*Math.cos(p),u.y=t*Math.sin(p),s.push(u.x,u.y,u.z),l.push(0,0,1),h.x=(s[f]/t+1)/2,h.y=(s[f+1]/t+1)/2,c.push(h.x,h.y)}for(var m=1;m<=n;m++)a.push(m,m+1,0);return o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("normal",new ut(l,3)),o.setAttribute("uv",new ut(c,2)),o}return s(t,e),t}(_t),Ao=function(e){function t(t,n,r,i,o,a,s,c){var u;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===c&&(c=2*Math.PI),(u=e.call(this)||this).type="CylinderGeometry",u.parameters={radiusTop:t,radiusBottom:n,height:r,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c};var h=l(u);i=Math.floor(i),o=Math.floor(o);var d=[],f=[],p=[],m=[],g=0,y=[],b=r/2,w=0;function x(e){for(var r=g,o=new v,a=new T,l=0,u=!0===e?t:n,y=!0===e?1:-1,x=1;x<=i;x++)f.push(0,b*y,0),p.push(0,y,0),m.push(.5,.5),g++;for(var _=g,E=0;E<=i;E++){var A=E/i*c+s,S=Math.cos(A),M=Math.sin(A);a.x=u*M,a.y=b*y,a.z=u*S,f.push(a.x,a.y,a.z),p.push(0,y,0),o.x=.5*S+.5,o.y=.5*M*y+.5,m.push(o.x,o.y),g++}for(var C=0;C<i;C++){var O=r+C,R=_+C;!0===e?d.push(R,R+1,O):d.push(R+1,R,O),l+=3}h.addGroup(w,l,!0===e?1:2),w+=l}return function(){for(var e=new T,a=new T,l=0,u=(n-t)/r,v=0;v<=o;v++){for(var x=[],_=v/o,E=_*(n-t)+t,A=0;A<=i;A++){var S=A/i,M=S*c+s,C=Math.sin(M),O=Math.cos(M);a.x=E*C,a.y=-_*r+b,a.z=E*O,f.push(a.x,a.y,a.z),e.set(C,u,O).normalize(),p.push(e.x,e.y,e.z),m.push(S,1-_),x.push(g++)}y.push(x)}for(var R=0;R<i;R++)for(var k=0;k<o;k++){var P=y[k][R],L=y[k+1][R],D=y[k+1][R+1],I=y[k][R+1];d.push(P,L,I),d.push(L,D,I),l+=6}h.addGroup(w,l,0),w+=l}(),!1===a&&(t>0&&x(!0),n>0&&x(!1)),u.setIndex(d),u.setAttribute("position",new ut(f,3)),u.setAttribute("normal",new ut(p,3)),u.setAttribute("uv",new ut(m,2)),u}return s(t,e),t}(_t),So=function(e){function t(t,n,r,i,o,a,s){var l;return void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=2*Math.PI),(l=e.call(this,0,t,n,r,i,o,a,s)||this).type="ConeGeometry",l.parameters={radius:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},l}return s(t,e),t}(Ao),Mo=function(e){function t(t,n,r,i){var o;void 0===r&&(r=1),void 0===i&&(i=0),(o=e.call(this)||this).type="PolyhedronGeometry",o.parameters={vertices:t,indices:n,radius:r,detail:i};var a=[],s=[];function l(e,t,n,r){for(var i=r+1,o=[],a=0;a<=i;a++){o[a]=[];for(var s=e.clone().lerp(n,a/i),l=t.clone().lerp(n,a/i),u=i-a,h=0;h<=u;h++)o[a][h]=0===h&&a===i?s:s.clone().lerp(l,h/u)}for(var d=0;d<i;d++)for(var f=0;f<2*(i-d)-1;f++){var p=Math.floor(f/2);f%2===0?(c(o[d][p+1]),c(o[d+1][p]),c(o[d][p])):(c(o[d][p+1]),c(o[d+1][p+1]),c(o[d+1][p]))}}function c(e){a.push(e.x,e.y,e.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function h(e,t,n,r){r<0&&1===e.x&&(s[t]=e.x-1),0===n.x&&0===n.z&&(s[t]=r/2/Math.PI+.5)}function d(e){return Math.atan2(e.z,-e.x)}return function(e){for(var t=new T,r=new T,i=new T,o=0;o<n.length;o+=3)u(n[o+0],t),u(n[o+1],r),u(n[o+2],i),l(t,r,i,e)}(i),function(e){for(var t=new T,n=0;n<a.length;n+=3)t.x=a[n+0],t.y=a[n+1],t.z=a[n+2],t.normalize().multiplyScalar(e),a[n+0]=t.x,a[n+1]=t.y,a[n+2]=t.z}(r),function(){for(var e=new T,t=0;t<a.length;t+=3){e.x=a[t+0],e.y=a[t+1],e.z=a[t+2];var n=d(e)/2/Math.PI+.5,r=(i=e,Math.atan2(-i.y,Math.sqrt(i.x*i.x+i.z*i.z))/Math.PI+.5);s.push(n,1-r)}var i;(function(){for(var e=new T,t=new T,n=new T,r=new T,i=new v,o=new v,l=new v,c=0,u=0;c<a.length;c+=9,u+=6){e.set(a[c+0],a[c+1],a[c+2]),t.set(a[c+3],a[c+4],a[c+5]),n.set(a[c+6],a[c+7],a[c+8]),i.set(s[u+0],s[u+1]),o.set(s[u+2],s[u+3]),l.set(s[u+4],s[u+5]),r.copy(e).add(t).add(n).divideScalar(3);var f=d(r);h(i,u+0,e,f),h(o,u+2,t,f),h(l,u+4,n,f)}})(),function(){for(var e=0;e<s.length;e+=6){var t=s[e+0],n=s[e+2],r=s[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),o.setAttribute("position",new ut(a,3)),o.setAttribute("normal",new ut(a.slice(),3)),o.setAttribute("uv",new ut(s,2)),0===i?o.computeVertexNormals():o.normalizeNormals(),o}return s(t,e),t}(_t),To=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=1/i,a=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-o,-i,0,-o,i,0,o,-i,0,o,i,-o,-i,0,-o,i,0,o,-i,0,o,i,0,-i,0,-o,i,0,-o,-i,0,o,i,0,o];return(r=e.call(this,a,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,n)||this).type="DodecahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),Co=new T,Oo=new T,Ro=new T,ko=new He,Po=function(e){function t(t,n){var r;if((r=e.call(this)||this).type="EdgesGeometry",r.parameters={thresholdAngle:n},n=void 0!==n?n:1,!0===t.isGeometry)return console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(r);for(var i=Math.pow(10,4),o=Math.cos(g.DEG2RAD*n),a=t.getIndex(),s=t.getAttribute("position"),c=a?a.count:s.count,u=[0,0,0],h=["a","b","c"],d=new Array(3),f={},p=[],m=0;m<c;m+=3){a?(u[0]=a.getX(m),u[1]=a.getX(m+1),u[2]=a.getX(m+2)):(u[0]=m,u[1]=m+1,u[2]=m+2);var v=ko.a,y=ko.b,b=ko.c;if(v.fromBufferAttribute(s,u[0]),y.fromBufferAttribute(s,u[1]),b.fromBufferAttribute(s,u[2]),ko.getNormal(Ro),d[0]=Math.round(v.x*i)+","+Math.round(v.y*i)+","+Math.round(v.z*i),d[1]=Math.round(y.x*i)+","+Math.round(y.y*i)+","+Math.round(y.z*i),d[2]=Math.round(b.x*i)+","+Math.round(b.y*i)+","+Math.round(b.z*i),d[0]!==d[1]&&d[1]!==d[2]&&d[2]!==d[0])for(var w=0;w<3;w++){var x=(w+1)%3,_=d[w],E=d[x],A=ko[h[w]],S=ko[h[x]],M=_+"_"+E,T=E+"_"+_;T in f&&f[T]?(Ro.dot(f[T].normal)<=o&&(p.push(A.x,A.y,A.z),p.push(S.x,S.y,S.z)),f[T]=null):M in f||(f[M]={index0:u[w],index1:u[x],normal:Ro.clone()})}}for(var C in f)if(f[C]){var O=f[C],R=O.index0,k=O.index1;Co.fromBufferAttribute(s,R),Oo.fromBufferAttribute(s,k),p.push(Co.x,Co.y,Co.z),p.push(Oo.x,Oo.y,Oo.z)}return r.setAttribute("position",new ut(p,3)),r}return s(t,e),t}(_t),Lo=function(e,t,n){n=n||2;var r,i,o,a,s,l,c,u=t&&t.length,h=u?t[0]*n:e.length,d=Do(e,0,h,n,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(e,t,n,r){var i,o,a,s,l,c=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,(l=Do(e,a,s,r,!1))===l.next&&(l.steiner=!0),c.push(Wo(l));for(c.sort(Ho),i=0;i<c.length;i++)Uo(c[i],n),n=Io(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var p=n;p<h;p+=n)(s=e[p])<r&&(r=s),(l=e[p+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?1/c:0}return No(d,f,n,r,i,c),f};function Do(e,t,n,r,i){var o,a;if(i===function(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)a=ta(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ta(o,e[o],e[o+1],a);return a&&Ko(a,a.next)&&(na(a),a=a.next),a}function Io(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Ko(r,r.next)&&0!==Yo(r.prev,r,r.next))r=r.next;else{if(na(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function No(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=Go(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Bo(e,r,i,o):jo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),na(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?No(e=Fo(Io(e),t,n),t,n,r,i,o,2):2===a&&zo(e,t,n,r,i,o):No(Io(e),t,n,r,i,o,1);break}}}function jo(e){var t=e.prev,n=e,r=e.next;if(Yo(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(qo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Yo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Bo(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Yo(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=Go(s,l,t,n,r),d=Go(c,u,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Fo(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Ko(i,o)&&Qo(i,r,r.next,o)&&$o(i,o)&&$o(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),na(r),na(r.next),r=e=o),r=r.next}while(r!==e);return Io(r)}function zo(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Xo(a,s)){var l=ea(a,s);return a=Io(a,a.next),l=Io(l,l.next),No(a,t,n,r,i,o),void No(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function Ho(e,t){return e.x-t.x}function Uo(e,t){if(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&qo(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),$o(r,e)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&Vo(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(e,t)){var n=ea(t,e);Io(t,t.next),Io(n,n.next)}}function Vo(e,t){return Yo(e.prev,e,t.prev)<0&&Yo(t.next,e,e.next)<0}function Go(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Wo(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function qo(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Xo(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Qo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&($o(e,t)&&$o(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Yo(e.prev,e,t.prev)||Yo(e,t.prev,t))||Ko(e,t)&&Yo(e.prev,e,e.next)>0&&Yo(t.prev,t,t.next)>0)}function Yo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Ko(e,t){return e.x===t.x&&e.y===t.y}function Qo(e,t,n,r){var i=Jo(Yo(e,t,n)),o=Jo(Yo(e,t,r)),a=Jo(Yo(n,r,e)),s=Jo(Yo(n,r,t));return i!==o&&a!==s||!(0!==i||!Zo(e,n,t))||!(0!==o||!Zo(e,r,t))||!(0!==a||!Zo(n,e,r))||!(0!==s||!Zo(n,t,r))}function Zo(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Jo(e){return e>0?1:e<0?-1:0}function $o(e,t){return Yo(e.prev,e,e.next)<0?Yo(e,t,e.next)>=0&&Yo(e,e.prev,t)>=0:Yo(e,t,e.prev)<0||Yo(e,e.next,t)<0}function ea(e,t){var n=new ra(e.i,e.x,e.y),r=new ra(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function ta(e,t,n,r){var i=new ra(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function na(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function ra(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var ia={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return ia.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];oa(e),aa(n,e);var o=e.length;t.forEach(oa);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,aa(n,t[a]);for(var s=Lo(n,r),l=0;l<s.length;l+=3)i.push(s.slice(l,l+3));return i}};function oa(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function aa(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}var sa=function(e){function t(t,n){var r;(r=e.call(this)||this).type="ExtrudeGeometry",r.parameters={shapes:t,options:n},t=Array.isArray(t)?t:[t];for(var i=l(r),o=[],a=[],s=0,c=t.length;s<c;s++)u(t[s]);function u(e){var t=[],r=void 0!==n.curveSegments?n.curveSegments:12,s=void 0!==n.steps?n.steps:1,l=void 0!==n.depth?n.depth:100,c=void 0===n.bevelEnabled||n.bevelEnabled,u=void 0!==n.bevelThickness?n.bevelThickness:6,h=void 0!==n.bevelSize?n.bevelSize:u-2,d=void 0!==n.bevelOffset?n.bevelOffset:0,f=void 0!==n.bevelSegments?n.bevelSegments:3,p=n.extrudePath,m=void 0!==n.UVGenerator?n.UVGenerator:la;void 0!==n.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=n.amount);var g,y,b,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,y=p.computeFrenetFrames(s,!1),b=new T,w=new T,x=new T),c||(f=0,u=0,h=0,d=0);var E=e.extractPoints(r),A=E.shape,S=E.holes;if(!ia.isClockWise(A)){A=A.reverse();for(var M=0,C=S.length;M<C;M++){var O=S[M];ia.isClockWise(O)&&(S[M]=O.reverse())}}for(var R=ia.triangulateShape(A,S),k=A,P=0,L=S.length;P<L;P++){var D=S[P];A=A.concat(D)}function I(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var N=A.length,j=R.length;function B(e,t,n){var r,i,o,a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(u),f=Math.sqrt(l*l+c*c),p=t.x-s/d,m=t.y+a/d,g=((n.x-c/f-p)*c-(n.y+l/f-m)*l)/(a*c-s*l),y=(r=p+a*g-e.x)*r+(i=m+s*g-e.y)*i;if(y<=2)return new v(r,i);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?l>Number.EPSILON&&(b=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(c)&&(b=!0),b?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new v(r/o,i/o)}for(var F=[],z=0,H=k.length,U=H-1,V=z+1;z<H;z++,U++,V++)U===H&&(U=0),V===H&&(V=0),F[z]=B(k[z],k[U],k[V]);for(var G,W=[],q=F.concat(),X=0,Y=S.length;X<Y;X++){var K=S[X];G=[];for(var Q=0,Z=K.length,J=Z-1,$=Q+1;Q<Z;Q++,J++,$++)J===Z&&(J=0),$===Z&&($=0),G[Q]=B(K[Q],K[J],K[$]);W.push(G),q=q.concat(G)}for(var ee=0;ee<f;ee++){for(var te=ee/f,ne=u*Math.cos(te*Math.PI/2),re=h*Math.sin(te*Math.PI/2)+d,ie=0,oe=k.length;ie<oe;ie++){var ae=I(k[ie],F[ie],re);Le(ae.x,ae.y,-ne)}for(var se=0,le=S.length;se<le;se++){var ce=S[se];G=W[se];for(var ue=0,he=ce.length;ue<he;ue++){var de=I(ce[ue],G[ue],re);Le(de.x,de.y,-ne)}}}for(var fe=h+d,pe=0;pe<N;pe++){var me=c?I(A[pe],q[pe],fe):A[pe];_?(w.copy(y.normals[0]).multiplyScalar(me.x),b.copy(y.binormals[0]).multiplyScalar(me.y),x.copy(g[0]).add(w).add(b),Le(x.x,x.y,x.z)):Le(me.x,me.y,0)}for(var ge=1;ge<=s;ge++)for(var ve=0;ve<N;ve++){var ye=c?I(A[ve],q[ve],fe):A[ve];_?(w.copy(y.normals[ge]).multiplyScalar(ye.x),b.copy(y.binormals[ge]).multiplyScalar(ye.y),x.copy(g[ge]).add(w).add(b),Le(x.x,x.y,x.z)):Le(ye.x,ye.y,l/s*ge)}for(var be=f-1;be>=0;be--){for(var we=be/f,xe=u*Math.cos(we*Math.PI/2),_e=h*Math.sin(we*Math.PI/2)+d,Ee=0,Ae=k.length;Ee<Ae;Ee++){var Se=I(k[Ee],F[Ee],_e);Le(Se.x,Se.y,l+xe)}for(var Me=0,Te=S.length;Me<Te;Me++){var Ce=S[Me];G=W[Me];for(var Oe=0,Re=Ce.length;Oe<Re;Oe++){var ke=I(Ce[Oe],G[Oe],_e);_?Le(ke.x,ke.y+g[s-1].y,g[s-1].x+xe):Le(ke.x,ke.y,l+xe)}}}function Pe(e,t){for(var n=e.length;--n>=0;){var r=n,i=n-1;i<0&&(i=e.length-1);for(var o=0,a=s+2*f;o<a;o++){var l=N*o,c=N*(o+1);Ie(t+r+l,t+i+l,t+i+c,t+r+c)}}}function Le(e,n,r){t.push(e),t.push(n),t.push(r)}function De(e,t,n){Ne(e),Ne(t),Ne(n);var r=o.length/3,a=m.generateTopUV(i,o,r-3,r-2,r-1);je(a[0]),je(a[1]),je(a[2])}function Ie(e,t,n,r){Ne(e),Ne(t),Ne(r),Ne(t),Ne(n),Ne(r);var a=o.length/3,s=m.generateSideWallUV(i,o,a-6,a-3,a-2,a-1);je(s[0]),je(s[1]),je(s[3]),je(s[1]),je(s[2]),je(s[3])}function Ne(e){o.push(t[3*e+0]),o.push(t[3*e+1]),o.push(t[3*e+2])}function je(e){a.push(e.x),a.push(e.y)}!function(){var e=o.length/3;if(c){for(var t=0,n=N*t,r=0;r<j;r++){var a=R[r];De(a[2]+n,a[1]+n,a[0]+n)}n=N*(t=s+2*f);for(var l=0;l<j;l++){var u=R[l];De(u[0]+n,u[1]+n,u[2]+n)}}else{for(var h=0;h<j;h++){var d=R[h];De(d[2],d[1],d[0])}for(var p=0;p<j;p++){var m=R[p];De(m[0]+N*s,m[1]+N*s,m[2]+N*s)}}i.addGroup(e,o.length/3-e,0)}(),function(){var e=o.length/3,t=0;Pe(k,t),t+=k.length;for(var n=0,r=S.length;n<r;n++){var a=S[n];Pe(a,t),t+=a.length}i.addGroup(e,o.length/3-e,1)}()}return r.setAttribute("position",new ut(o,3)),r.setAttribute("uv",new ut(a,2)),r.computeVertexNormals(),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(var r=0,i=e.length;r<i;r++){var o=e[r];n.shapes.push(o.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)},t}(_t),la={generateTopUV:function(e,t,n,r,i){var o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new v(o,a),new v(s,l),new v(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){var a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],y=t[3*o+2];return Math.abs(s-u)<.01?[new v(a,1-l),new v(c,1-h),new v(d,1-p),new v(m,1-y)]:[new v(s,1-l),new v(u,1-h),new v(f,1-p),new v(g,1-y)]}},ca=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];return(r=e.call(this,o,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,n)||this).type="IcosahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),ua=function(e){function t(t,n,r,i){var o;void 0===n&&(n=12),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="LatheGeometry",o.parameters={points:t,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=g.clamp(i,0,2*Math.PI);for(var a=[],s=[],l=[],c=1/n,u=new T,h=new v,d=0;d<=n;d++)for(var f=r+d*c*i,p=Math.sin(f),m=Math.cos(f),y=0;y<=t.length-1;y++)u.x=t[y].x*p,u.y=t[y].y,u.z=t[y].x*m,s.push(u.x,u.y,u.z),h.x=d/n,h.y=y/(t.length-1),l.push(h.x,h.y);for(var b=0;b<n;b++)for(var w=0;w<t.length-1;w++){var x=w+b*t.length,_=x,E=x+t.length,A=x+t.length+1,S=x+1;a.push(_,E,S),a.push(E,A,S)}if(o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("uv",new ut(l,2)),o.computeVertexNormals(),i===2*Math.PI)for(var M=o.attributes.normal.array,C=new T,O=new T,R=new T,k=n*t.length*3,P=0,L=0;P<t.length;P++,L+=3)C.x=M[L+0],C.y=M[L+1],C.z=M[L+2],O.x=M[k+L+0],O.y=M[k+L+1],O.z=M[k+L+2],R.addVectors(C,O).normalize(),M[L+0]=M[k+L+0]=R.x,M[L+1]=M[k+L+1]=R.y,M[L+2]=M[k+L+2]=R.z;return o}return s(t,e),t}(_t),ha=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,n)||this).type="OctahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo);function da(e,t,n){_t.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};var r=[],i=[],o=[],a=[],s=1e-5,l=new T,c=new T,u=new T,h=new T,d=new T;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var f=t+1,p=0;p<=n;p++)for(var m=p/n,g=0;g<=t;g++){var v=g/t;e(v,m,c),i.push(c.x,c.y,c.z),v-s>=0?(e(v-s,m,u),h.subVectors(c,u)):(e(v+s,m,u),h.subVectors(u,c)),m-s>=0?(e(v,m-s,u),d.subVectors(c,u)):(e(v,m+s,u),d.subVectors(u,c)),l.crossVectors(h,d).normalize(),o.push(l.x,l.y,l.z),a.push(v,m)}for(var y=0;y<n;y++)for(var b=0;b<t;b++){var w=y*f+b,x=y*f+b+1,_=(y+1)*f+b+1,E=(y+1)*f+b;r.push(w,x,E),r.push(x,_,E)}this.setIndex(r),this.setAttribute("position",new ut(i,3)),this.setAttribute("normal",new ut(o,3)),this.setAttribute("uv",new ut(a,2))}da.prototype=Object.create(_t.prototype),da.prototype.constructor=da;var fa=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=.5),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=2*Math.PI),(s=e.call(this)||this).type="RingGeometry",s.parameters={innerRadius:t,outerRadius:n,thetaSegments:r,phiSegments:i,thetaStart:o,thetaLength:a},r=Math.max(3,r);for(var l=[],c=[],u=[],h=[],d=t,f=(n-t)/(i=Math.max(1,i)),p=new T,m=new v,g=0;g<=i;g++){for(var y=0;y<=r;y++){var b=o+y/r*a;p.x=d*Math.cos(b),p.y=d*Math.sin(b),c.push(p.x,p.y,p.z),u.push(0,0,1),m.x=(p.x/n+1)/2,m.y=(p.y/n+1)/2,h.push(m.x,m.y)}d+=f}for(var w=0;w<i;w++)for(var x=w*(r+1),_=0;_<r;_++){var E=_+x,A=E,S=E+r+1,M=E+r+2,C=E+1;l.push(A,S,C),l.push(S,M,C)}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),pa=function(e){function t(t,n){var r;void 0===n&&(n=12),(r=e.call(this)||this).type="ShapeGeometry",r.parameters={shapes:t,curveSegments:n};var i=[],o=[],a=[],s=[],l=0,c=0;if(!1===Array.isArray(t))h(t);else for(var u=0;u<t.length;u++)h(t[u]),r.addGroup(l,c,u),l+=c,c=0;function h(e){var t=o.length/3,r=e.extractPoints(n),l=r.shape,u=r.holes;!1===ia.isClockWise(l)&&(l=l.reverse());for(var h=0,d=u.length;h<d;h++){var f=u[h];!0===ia.isClockWise(f)&&(u[h]=f.reverse())}for(var p=ia.triangulateShape(l,u),m=0,g=u.length;m<g;m++){var v=u[m];l=l.concat(v)}for(var y=0,b=l.length;y<b;y++){var w=l[y];o.push(w.x,w.y,0),a.push(0,0,1),s.push(w.x,w.y)}for(var x=0,_=p.length;x<_;x++){var E=p[x],A=E[0]+t,S=E[1]+t,M=E[2]+t;i.push(A,S,M),c+=3}}return r.setIndex(i),r.setAttribute("position",new ut(o,3)),r.setAttribute("normal",new ut(a,3)),r.setAttribute("uv",new ut(s,2)),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)},t}(_t),ma=function(e){function t(t,n,r,i,o,a,s){var l;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=6),void 0===i&&(i=0),void 0===o&&(o=2*Math.PI),void 0===a&&(a=0),void 0===s&&(s=Math.PI),(l=e.call(this)||this).type="SphereGeometry",l.parameters={radius:t,widthSegments:n,heightSegments:r,phiStart:i,phiLength:o,thetaStart:a,thetaLength:s},n=Math.max(3,Math.floor(n)),r=Math.max(2,Math.floor(r));for(var c=Math.min(a+s,Math.PI),u=0,h=[],d=new T,f=new T,p=[],m=[],g=[],v=[],y=0;y<=r;y++){var b=[],w=y/r,x=0;0==y&&0==a?x=.5/n:y==r&&c==Math.PI&&(x=-.5/n);for(var _=0;_<=n;_++){var E=_/n;d.x=-t*Math.cos(i+E*o)*Math.sin(a+w*s),d.y=t*Math.cos(a+w*s),d.z=t*Math.sin(i+E*o)*Math.sin(a+w*s),m.push(d.x,d.y,d.z),f.copy(d).normalize(),g.push(f.x,f.y,f.z),v.push(E+x,1-w),b.push(u++)}h.push(b)}for(var A=0;A<r;A++)for(var S=0;S<n;S++){var M=h[A][S+1],C=h[A][S],O=h[A+1][S],R=h[A+1][S+1];(0!==A||a>0)&&p.push(M,C,R),(A!==r-1||c<Math.PI)&&p.push(C,O,R)}return l.setIndex(p),l.setAttribute("position",new ut(m,3)),l.setAttribute("normal",new ut(g,3)),l.setAttribute("uv",new ut(v,2)),l}return s(t,e),t}(_t),ga=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,n)||this).type="TetrahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),va=function(e){function t(t,n){var r;void 0===n&&(n={});var i=n.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new _t||l(r);var o=i.generateShapes(t,n.size);return n.depth=void 0!==n.height?n.height:50,void 0===n.bevelThickness&&(n.bevelThickness=10),void 0===n.bevelSize&&(n.bevelSize=8),void 0===n.bevelEnabled&&(n.bevelEnabled=!1),(r=e.call(this,o,n)||this).type="TextGeometry",r}return s(t,e),t}(sa),ya=function(e){function t(t,n,r,i,o){var a;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=8),void 0===i&&(i=6),void 0===o&&(o=2*Math.PI),(a=e.call(this)||this).type="TorusGeometry",a.parameters={radius:t,tube:n,radialSegments:r,tubularSegments:i,arc:o},r=Math.floor(r),i=Math.floor(i);for(var s=[],l=[],c=[],u=[],h=new T,d=new T,f=new T,p=0;p<=r;p++)for(var m=0;m<=i;m++){var g=m/i*o,v=p/r*Math.PI*2;d.x=(t+n*Math.cos(v))*Math.cos(g),d.y=(t+n*Math.cos(v))*Math.sin(g),d.z=n*Math.sin(v),l.push(d.x,d.y,d.z),h.x=t*Math.cos(g),h.y=t*Math.sin(g),f.subVectors(d,h).normalize(),c.push(f.x,f.y,f.z),u.push(m/i),u.push(p/r)}for(var y=1;y<=r;y++)for(var b=1;b<=i;b++){var w=(i+1)*y+b-1,x=(i+1)*(y-1)+b-1,_=(i+1)*(y-1)+b,E=(i+1)*y+b;s.push(w,x,E),s.push(x,_,E)}return a.setIndex(s),a.setAttribute("position",new ut(l,3)),a.setAttribute("normal",new ut(c,3)),a.setAttribute("uv",new ut(u,2)),a}return s(t,e),t}(_t),ba=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=64),void 0===i&&(i=8),void 0===o&&(o=2),void 0===a&&(a=3),(s=e.call(this)||this).type="TorusKnotGeometry",s.parameters={radius:t,tube:n,tubularSegments:r,radialSegments:i,p:o,q:a},r=Math.floor(r),i=Math.floor(i);for(var l=[],c=[],u=[],h=[],d=new T,f=new T,p=new T,m=new T,g=new T,v=new T,y=new T,b=0;b<=r;++b){var w=b/r*o*Math.PI*2;P(w,o,a,t,p),P(w+.01,o,a,t,m),v.subVectors(m,p),y.addVectors(m,p),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize();for(var x=0;x<=i;++x){var _=x/i*Math.PI*2,E=-n*Math.cos(_),A=n*Math.sin(_);d.x=p.x+(E*y.x+A*g.x),d.y=p.y+(E*y.y+A*g.y),d.z=p.z+(E*y.z+A*g.z),c.push(d.x,d.y,d.z),f.subVectors(d,p).normalize(),u.push(f.x,f.y,f.z),h.push(b/r),h.push(x/i)}}for(var S=1;S<=r;S++)for(var M=1;M<=i;M++){var C=(i+1)*(S-1)+(M-1),O=(i+1)*S+(M-1),R=(i+1)*S+M,k=(i+1)*(S-1)+M;l.push(C,O,k),l.push(O,R,k)}function P(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*a*.5,i.z=r*Math.sin(s)*.5}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),wa=function(e){function t(t,n,r,i,o){var a;void 0===n&&(n=64),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=!1),(a=e.call(this)||this).type="TubeGeometry",a.parameters={path:t,tubularSegments:n,radius:r,radialSegments:i,closed:o};var s=t.computeFrenetFrames(n,o);a.tangents=s.tangents,a.normals=s.normals,a.binormals=s.binormals;var l=new T,c=new T,u=new v,h=new T,d=[],f=[],p=[],m=[];function g(e){h=t.getPointAt(e/n,h);for(var o=s.normals[e],a=s.binormals[e],u=0;u<=i;u++){var p=u/i*Math.PI*2,m=Math.sin(p),g=-Math.cos(p);c.x=g*o.x+m*a.x,c.y=g*o.y+m*a.y,c.z=g*o.z+m*a.z,c.normalize(),f.push(c.x,c.y,c.z),l.x=h.x+r*c.x,l.y=h.y+r*c.y,l.z=h.z+r*c.z,d.push(l.x,l.y,l.z)}}return function(){for(var e=0;e<n;e++)g(e);g(!1===o?n:0),function(){for(var e=0;e<=n;e++)for(var t=0;t<=i;t++)u.x=e/n,u.y=t/i,p.push(u.x,u.y)}(),function(){for(var e=1;e<=n;e++)for(var t=1;t<=i;t++){var r=(i+1)*(e-1)+(t-1),o=(i+1)*e+(t-1),a=(i+1)*e+t,s=(i+1)*(e-1)+t;m.push(r,o,s),m.push(o,a,s)}}()}(),a.setIndex(m),a.setAttribute("position",new ut(d,3)),a.setAttribute("normal",new ut(f,3)),a.setAttribute("uv",new ut(p,2)),a}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},t}(_t),xa=function(e){function t(t){var n;if((n=e.call(this)||this).type="WireframeGeometry",!0===t.isGeometry)return console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(n);var r=[],i=[0,0],o={},a=new T;if(null!==t.index){var s=t.attributes.position,c=t.index,u=t.groups;0===u.length&&(u=[{start:0,count:c.count,materialIndex:0}]);for(var h=0,d=u.length;h<d;++h)for(var f=u[h],p=f.start,m=p,g=p+f.count;m<g;m+=3)for(var v=0;v<3;v++){var y=c.getX(m+v),b=c.getX(m+(v+1)%3);i[0]=Math.min(y,b),i[1]=Math.max(y,b);var w=i[0]+","+i[1];void 0===o[w]&&(o[w]={index1:i[0],index2:i[1]})}for(var x in o){var _=o[x];a.fromBufferAttribute(s,_.index1),r.push(a.x,a.y,a.z),a.fromBufferAttribute(s,_.index2),r.push(a.x,a.y,a.z)}}else for(var E=t.attributes.position,A=0,S=E.count/3;A<S;A++)for(var M=0;M<3;M++){var C=3*A+M;a.fromBufferAttribute(E,C),r.push(a.x,a.y,a.z);var O=3*A+(M+1)%3;a.fromBufferAttribute(E,O),r.push(a.x,a.y,a.z)}return n.setAttribute("position",new ut(r,3)),n}return s(t,e),t}(_t),_a=Object.freeze({__proto__:null,BoxGeometry:Ut,BoxBufferGeometry:Ut,CircleGeometry:Eo,CircleBufferGeometry:Eo,ConeGeometry:So,ConeBufferGeometry:So,CylinderGeometry:Ao,CylinderBufferGeometry:Ao,DodecahedronGeometry:To,DodecahedronBufferGeometry:To,EdgesGeometry:Po,ExtrudeGeometry:sa,ExtrudeBufferGeometry:sa,IcosahedronGeometry:ca,IcosahedronBufferGeometry:ca,LatheGeometry:ua,LatheBufferGeometry:ua,OctahedronGeometry:ha,OctahedronBufferGeometry:ha,ParametricGeometry:da,ParametricBufferGeometry:da,PlaneGeometry:on,PlaneBufferGeometry:on,PolyhedronGeometry:Mo,PolyhedronBufferGeometry:Mo,RingGeometry:fa,RingBufferGeometry:fa,ShapeGeometry:pa,ShapeBufferGeometry:pa,SphereGeometry:ma,SphereBufferGeometry:ma,TetrahedronGeometry:ga,TetrahedronBufferGeometry:ga,TextGeometry:va,TextBufferGeometry:va,TorusGeometry:ya,TorusBufferGeometry:ya,TorusKnotGeometry:ba,TorusKnotBufferGeometry:ba,TubeGeometry:wa,TubeBufferGeometry:wa,WireframeGeometry:xa});function Ea(e){Ze.call(this),this.type="ShadowMaterial",this.color=new Ye(0),this.transparent=!0,this.setValues(e)}function Aa(e){qt.call(this,e),this.type="RawShaderMaterial"}function Sa(e){Ze.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ye(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.vertexTangents=!1,this.setValues(e)}function Ma(e){Sa.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new v(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=g.clamp(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(e)}function Ta(e){Ze.call(this),this.type="MeshPhongMaterial",this.color=new Ye(16777215),this.specular=new Ye(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ca(e){Ze.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ye(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Oa(e){Ze.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ra(e){Ze.call(this),this.type="MeshLambertMaterial",this.color=new Ye(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ka(e){Ze.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ye(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Pa(e){eo.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Ea.prototype=Object.create(Ze.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isShadowMaterial=!0,Ea.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this},Aa.prototype=Object.create(qt.prototype),Aa.prototype.constructor=Aa,Aa.prototype.isRawShaderMaterial=!0,Sa.prototype=Object.create(Ze.prototype),Sa.prototype.constructor=Sa,Sa.prototype.isMeshStandardMaterial=!0,Sa.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.vertexTangents=e.vertexTangents,this},Ma.prototype=Object.create(Sa.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isMeshPhysicalMaterial=!0,Ma.prototype.copy=function(e){return Sa.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Ye).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this},Ta.prototype=Object.create(Ze.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshPhongMaterial=!0,Ta.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ca.prototype=Object.create(Ze.prototype),Ca.prototype.constructor=Ca,Ca.prototype.isMeshToonMaterial=!0,Ca.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Oa.prototype=Object.create(Ze.prototype),Oa.prototype.constructor=Oa,Oa.prototype.isMeshNormalMaterial=!0,Oa.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ra.prototype=Object.create(Ze.prototype),Ra.prototype.constructor=Ra,Ra.prototype.isMeshLambertMaterial=!0,Ra.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ka.prototype=Object.create(Ze.prototype),ka.prototype.constructor=ka,ka.prototype.isMeshMatcapMaterial=!0,ka.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Pa.prototype=Object.create(eo.prototype),Pa.prototype.constructor=Pa,Pa.prototype.isLineDashedMaterial=!0,Pa.prototype.copy=function(e){return eo.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var La=Object.freeze({__proto__:null,ShadowMaterial:Ea,SpriteMaterial:xi,RawShaderMaterial:Aa,ShaderMaterial:qt,PointsMaterial:ho,MeshPhysicalMaterial:Ma,MeshStandardMaterial:Sa,MeshPhongMaterial:Ta,MeshToonMaterial:Ca,MeshNormalMaterial:Oa,MeshLambertMaterial:Ra,MeshDepthMaterial:Jr,MeshDistanceMaterial:$r,MeshBasicMaterial:Je,MeshMatcapMaterial:ka,LineDashedMaterial:Pa,LineBasicMaterial:eo,Material:Ze}),Da={arraySlice:function(e,t,n){return Da.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*t,l=0;l!==t;++l)i[a++]=e[s+l];return i},flattenJSON:function(e,t,n,r){for(var i=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{void 0!==(a=o[r])&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{void 0!==(a=o[r])&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{void 0!==(a=o[r])&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)}},subclip:function(e,t,n,r,i){void 0===i&&(i=30);var o=e.clone();o.name=t;for(var a=[],s=0;s<o.tracks.length;++s){for(var l=o.tracks[s],c=l.getValueSize(),u=[],h=[],d=0;d<l.times.length;++d){var f=l.times[d]*i;if(!(f<n||f>=r)){u.push(l.times[d]);for(var p=0;p<c;++p)h.push(l.values[d*c+p])}}0!==u.length&&(l.times=Da.convertArray(u,l.times.constructor),l.values=Da.convertArray(h,l.values.constructor),a.push(l))}o.tracks=a;for(var m=1/0,g=0;g<o.tracks.length;++g)m>o.tracks[g].times[0]&&(m=o.tracks[g].times[0]);for(var v=0;v<o.tracks.length;++v)o.tracks[v].shift(-1*m);return o.resetDuration(),o},makeClipAdditive:function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e),void 0===r&&(r=30),r<=0&&(r=30);for(var i=n.tracks.length,o=t/r,a=function(t){var r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)return"continue";var a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)return"continue";var s=0,l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);var c=0,u=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);var h=r.times.length-1,d=void 0;if(o<=r.times[0]){var f=s,p=l-s;d=Da.arraySlice(r.values,f,p)}else if(o>=r.times[h]){var m=h*l+s,g=m+l-s;d=Da.arraySlice(r.values,m,g)}else{var v=r.createInterpolant(),y=s,b=l-s;v.evaluate(o),d=Da.arraySlice(v.resultBuffer,y,b)}"quaternion"===i&&(new M).fromArray(d).normalize().conjugate().toArray(d);for(var w=a.times.length,x=0;x<w;++x){var _=x*u+c;if("quaternion"===i)M.multiplyQuaternionsFlat(a.values,_,d,0,a.values,_);else for(var E=u-2*c,A=0;A<E;++A)a.values[_+A]-=d[A]}},s=0;s<i;++s)a(s);return e.blendMode=2501,e}};function Ia(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function Na(e,t,n,r){Ia.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ja(e,t,n,r){Ia.call(this,e,t,n,r)}function Ba(e,t,n,r){Ia.call(this,e,t,n,r)}function Fa(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Da.convertArray(t,this.TimeBufferType),this.values=Da.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function za(e,t,n){Fa.call(this,e,t,n)}function Ha(e,t,n,r){Fa.call(this,e,t,n,r)}function Ua(e,t,n,r){Fa.call(this,e,t,n,r)}function Va(e,t,n,r){Ia.call(this,e,t,n,r)}function Ga(e,t,n,r){Fa.call(this,e,t,n,r)}function Wa(e,t,n,r){Fa.call(this,e,t,n,r)}function qa(e,t,n,r){Fa.call(this,e,t,n,r)}function Xa(e,t,n,r){void 0===t&&(t=-1),void 0===r&&(r=2500),this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=g.generateUUID(),this.duration<0&&this.resetDuration()}function Ya(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ua;case"vector":case"vector2":case"vector3":case"vector4":return qa;case"color":return Ha;case"quaternion":return Ga;case"bool":case"boolean":return za;case"string":return Wa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){var n=[],r=[];Da.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}Object.assign(Ia.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,e<(r=t[++n]))break t}o=t.length;break n}if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(var l=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===l)break;if(r=i,e>=(i=t[--n-1]))break t}o=n,n=0}for(;n<o;){var c=n+o>>>1;e<t[c]?o=c:n=c+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Ia.prototype,{beforeStart_:Ia.prototype.copySampleValue_,afterEnd_:Ia.prototype.copySampleValue_}),Na.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Na,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:i=e,a=2*t-n;break;case 2402:a=t+r[i=r.length-2]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:o=e,s=2*n-t;break;case 2402:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}var l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p,w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}),ja.prototype=Object.assign(Object.create(Ia.prototype),{constructor:ja,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c,h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}),Ba.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Ba,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(Fa,{toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:Da.convertArray(e.times,Array),values:Da.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}),Object.assign(Fa.prototype,{constructor:Fa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new Ba(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new ja(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Na(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(i=(o=Math.max(o,1))-1);var a=this.getValueSize();this.times=Da.arraySlice(n,i,o),this.values=Da.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"===typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),e=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),e=!1;break}o=s}if(void 0!==r&&Da.isTypedArray(r))for(var l=0,c=r.length;l!==c;++l){var u=r[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),e=!1;break}}return e},optimize:function(){for(var e=Da.arraySlice(this.times),t=Da.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1,o=1,a=1;a<i;++a){var s=!1,l=e[a];if(l!==e[a+1]&&(1!==a||l!==e[0]))if(r)s=!0;else for(var c=a*n,u=c-n,h=c+n,d=0;d!==n;++d){var f=t[c+d];if(f!==t[u+d]||f!==t[h+d]){s=!0;break}}if(s){if(a!==o){e[o]=e[a];for(var p=a*n,m=o*n,g=0;g!==n;++g)t[m+g]=t[p+g]}++o}}if(i>0){e[o]=e[i];for(var v=i*n,y=o*n,b=0;b!==n;++b)t[y+b]=t[v+b];++o}return o!==e.length?(this.times=Da.arraySlice(e,0,o),this.values=Da.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this},clone:function(){var e=Da.arraySlice(this.times,0),t=Da.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),za.prototype=Object.assign(Object.create(Fa.prototype),{constructor:za,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ha.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ha,ValueTypeName:"color"}),Ua.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ua,ValueTypeName:"number"}),Va.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Va,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t),l=e*a,c=l+a;l!==c;l+=4)M.slerpFlat(i,0,o,l-a,o,l,s);return i}}),Ga.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ga,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Va(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Wa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Wa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),qa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:qa,ValueTypeName:"vector"}),Object.assign(Xa,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(Ya(n[i]).scale(r));var a=new Xa(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode},i=0,o=n.length;i!==o;++i)t.push(Fa.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],l=[];s.push((a+i-1)%i,a,(a+1)%i),l.push(0,1,0);var c=Da.getKeyframeOrder(s);s=Da.sortedArray(s,1,c),l=Da.sortedArray(l,1,c),r||0!==s[0]||(s.push(i),l.push(l[0])),o.push(new Ua(".morphTargetInfluences["+t[a].name+"]",s,l).scale(1/n))}return new Xa(e,-1,o)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var r=e;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=e.length;o<a;o++){var s=e[o],l=s.name.match(i);if(l&&l.length>1){var c=l[1],u=r[c];u||(r[c]=u=[]),u.push(s)}}var h=[];for(var d in r)h.push(Xa.CreateFromMorphTargetSequence(d,r[d],t,n));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var o=[],a=[];Da.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode,s=e.length||-1,l=e.hierarchy||[],c=0;c<l.length;c++){var u=l[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){var h={},d=void 0;for(d=0;d<u.length;d++)if(u[d].morphTargets)for(var f=0;f<u[d].morphTargets.length;f++)h[u[d].morphTargets[f]]=-1;for(var p in h){for(var m=[],g=[],v=0;v!==u[d].morphTargets.length;++v){var y=u[d];m.push(y.time),g.push(y.morphTarget===p?1:0)}r.push(new Ua(".morphTargetInfluence["+p+"]",m,g))}s=h.length*(o||1)}else{var b=".bones["+t[c].name+"]";n(qa,b+".position",u,"pos",r),n(Ga,b+".quaternion",u,"rot",r),n(qa,b+".scale",u,"scl",r)}}return 0===r.length?null:new Xa(i,s,r,a)}}),Object.assign(Xa.prototype,{resetDuration:function(){for(var e=0,t=0,n=this.tracks.length;t!==n;++t){var r=this.tracks[t];e=Math.max(e,r.times[r.times.length-1])}return this.duration=e,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new Xa(this.name,this.duration,e,this.blendMode)},toJSON:function(){return Xa.toJSON(this)}});var Ka={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Qa(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0,l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){var t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(var t=0,n=l.length;t<n;t+=2){var r=l[t],i=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return i}return null}}var Za=new Qa;function Ja(e){this.manager=void 0!==e?e:Za,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(Ja.prototype,{load:function(){},loadAsync:function(e,t){var n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}});var $a={};function es(e){Ja.call(this,e)}function ts(e){Ja.call(this,e)}function ns(e){Ja.call(this,e)}function rs(e){Ja.call(this,e)}function is(e){Ja.call(this,e)}function os(e){Ja.call(this,e)}function as(e){Ja.call(this,e)}function ss(){this.type="Curve",this.arcLengthDivisions=200}function ls(e,t,n,r,i,o,a,s){ss.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function cs(e,t,n,r,i,o){ls.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function us(){var e=0,t=0,n=0,r=0;function i(i,o,a,s){e=i,t=a,n=-3*i+3*o-2*a-s,r=2*i-2*o+a+s}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,a,s){var l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,l*=a,c*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}es.prototype=Object.assign(Object.create(Ja.prototype),{constructor:es,load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;if(void 0===$a[e]){var a,s=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){var l=s[1],c=!!s[2],u=s[3];u=decodeURIComponent(u),c&&(u=atob(u));try{var h,d=(this.responseType||"").toLowerCase();switch(d){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),p=0;p<u.length;p++)f[p]=u.charCodeAt(p);h="blob"===d?new Blob([f.buffer],{type:l}):f.buffer;break;case"document":var m=new DOMParser;h=m.parseFromString(u,l);break;case"json":h=JSON.parse(u);break;default:h=u}setTimeout((function(){t&&t(h),i.manager.itemEnd(e)}),0)}catch(v){setTimeout((function(){r&&r(v),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{for(var g in $a[e]=[],$a[e].push({onLoad:t,onProgress:n,onError:r}),(a=new XMLHttpRequest).open("GET",e,!0),a.addEventListener("load",(function(t){var n=this.response,r=$a[e];if(delete $a[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Ka.add(e,n);for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(var l=0,c=r.length;l<c;l++){var u=r[l];u.onError&&u.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),a.addEventListener("progress",(function(t){for(var n=$a[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}}),!1),a.addEventListener("error",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),a.addEventListener("abort",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(a.responseType=this.responseType),void 0!==this.withCredentials&&(a.withCredentials=this.withCredentials),a.overrideMimeType&&a.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)a.setRequestHeader(g,this.requestHeader[g]);a.send(null)}return i.manager.itemStart(e),a}$a[e].push({onLoad:t,onProgress:n,onError:r})},setResponseType:function(e){return this.responseType=e,this},setMimeType:function(e){return this.mimeType=e,this}}),ts.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ts,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){for(var t=[],n=0;n<e.length;n++){var r=Xa.parse(e[n]);t.push(r)}return t}}),ns.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ns,load:function(e,t,n,r){var i=this,o=[],a=new wo,s=new es(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);var l=0;function c(c){s.load(e[c],(function(e){var n=i.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(a.minFilter=1006),a.image=o,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(var u=0,h=e.length;u<h;++u)c(u);else s.load(e,(function(e){var n=i.parse(e,!0);if(n.isCubemap){for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var l=0;l<n.mipmapCount;l++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+l]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}a.image=o}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=1006),a.format=n.format,a.needsUpdate=!0,t&&t(a)}),n,r);return a}}),rs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:rs,load:function(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Ka.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}),is.prototype=Object.assign(Object.create(Ja.prototype),{constructor:is,load:function(e,t,n,r){var i=new Qt,o=new rs(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);var a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,6===++a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(var l=0;l<e.length;++l)s(l);return i}}),os.prototype=Object.assign(Object.create(Ja.prototype),{constructor:os,load:function(e,t,n,r){var i=this,o=new Jt,a=new es(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(e,(function(e){var n=i.parse(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:1001,o.wrapT=void 0!==n.wrapT?n.wrapT:1001,o.magFilter=void 0!==n.magFilter?n.magFilter:1006,o.minFilter=void 0!==n.minFilter?n.minFilter:1006,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=1008),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}),as.prototype=Object.assign(Object.create(Ja.prototype),{constructor:as,load:function(e,t,n,r){var i=new x,o=new rs(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;var r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(ss.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n=[],r=this.getPoint(0),i=0;n.push(0);for(var o=1;o<=e;o++)i+=(t=this.getPoint(o/e)).distanceTo(r),n.push(i),r=t;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,l=o-1;s<=l;)if((a=r[i=Math.floor(s+(l-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(o-1);var c=r[i];return(i+(n-c)/(r[i+1]-c))/(o-1)},getTangent:function(e,t){var n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new v:new T);return a.copy(o).sub(i).normalize(),a},getTangentAt:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)},computeFrenetFrames:function(e,t){for(var n=new T,r=[],i=[],o=[],a=new T,s=new te,l=0;l<=e;l++){var c=l/e;r[l]=this.getTangentAt(c,new T),r[l].normalize()}i[0]=new T,o[0]=new T;var u=Number.MAX_VALUE,h=Math.abs(r[0].x),d=Math.abs(r[0].y),f=Math.abs(r[0].z);h<=u&&(u=h,n.set(1,0,0)),d<=u&&(u=d,n.set(0,1,0)),f<=u&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(var p=1;p<=e;p++){if(i[p]=i[p-1].clone(),o[p]=o[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();var m=Math.acos(g.clamp(r[p-1].dot(r[p]),-1,1));i[p].applyMatrix4(s.makeRotationAxis(a,m))}o[p].crossVectors(r[p],i[p])}if(!0===t){var v=Math.acos(g.clamp(i[0].dot(i[e]),-1,1));v/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(v=-v);for(var y=1;y<=e;y++)i[y].applyMatrix4(s.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],i[y])}return{tangents:r,normals:i,binormals:o}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),ls.prototype=Object.create(ss.prototype),ls.prototype.constructor=ls,ls.prototype.isEllipseCurve=!0,ls.prototype.getPoint=function(e,t){for(var n=t||new v,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,o=Math.abs(i)<Number.EPSILON;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);var a=this.aStartAngle+e*i,s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),h=s-this.aX,d=l-this.aY;s=h*c-d*u+this.aX,l=h*u+d*c+this.aY}return n.set(s,l)},ls.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},ls.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},ls.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},cs.prototype=Object.create(ls.prototype),cs.prototype.constructor=cs,cs.prototype.isArcCurve=!0;var hs=new T,ds=new us,fs=new us,ps=new us;function ms(e,t,n,r){void 0===e&&(e=[]),void 0===t&&(t=!1),void 0===n&&(n="centripetal"),void 0===r&&(r=.5),ss.call(this),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}function gs(e,t,n,r,i){var o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function vs(e,t,n,r){return function(e,t){var n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function ys(e,t,n,r,i){return function(e,t){var n=1-e;return n*n*n*t}(e,t)+function(e,t){var n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}function bs(e,t,n,r){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),void 0===r&&(r=new v),ss.call(this),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function ws(e,t,n,r){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),void 0===r&&(r=new T),ss.call(this),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function xs(e,t){void 0===e&&(e=new v),void 0===t&&(t=new v),ss.call(this),this.type="LineCurve",this.v1=e,this.v2=t}function _s(e,t){void 0===e&&(e=new T),void 0===t&&(t=new T),ss.call(this),this.type="LineCurve3",this.v1=e,this.v2=t}function Es(e,t,n){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),ss.call(this),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}function As(e,t,n){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),ss.call(this),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}function Ss(e){void 0===e&&(e=[]),ss.call(this),this.type="SplineCurve",this.points=e}ms.prototype=Object.create(ss.prototype),ms.prototype.constructor=ms,ms.prototype.isCatmullRomCurve3=!0,ms.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n,r,i=t,o=this.points,a=o.length,s=(a-(this.closed?0:1))*e,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===c&&l===a-1&&(l=a-2,c=1),this.closed||l>0?n=o[(l-1)%a]:(hs.subVectors(o[0],o[1]).add(o[0]),n=hs);var u=o[l%a],h=o[(l+1)%a];if(this.closed||l+2<a?r=o[(l+2)%a]:(hs.subVectors(o[a-1],o[a-2]).add(o[a-1]),r=hs),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,f=Math.pow(n.distanceToSquared(u),d),p=Math.pow(u.distanceToSquared(h),d),m=Math.pow(h.distanceToSquared(r),d);p<1e-4&&(p=1),f<1e-4&&(f=p),m<1e-4&&(m=p),ds.initNonuniformCatmullRom(n.x,u.x,h.x,r.x,f,p,m),fs.initNonuniformCatmullRom(n.y,u.y,h.y,r.y,f,p,m),ps.initNonuniformCatmullRom(n.z,u.z,h.z,r.z,f,p,m)}else"catmullrom"===this.curveType&&(ds.initCatmullRom(n.x,u.x,h.x,r.x,this.tension),fs.initCatmullRom(n.y,u.y,h.y,r.y,this.tension),ps.initCatmullRom(n.z,u.z,h.z,r.z,this.tension));return i.set(ds.calc(c),fs.calc(c),ps.calc(c)),i},ms.prototype.copy=function(e){ss.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},ms.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},ms.prototype.fromJSON=function(e){ss.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new T).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},bs.prototype=Object.create(ss.prototype),bs.prototype.constructor=bs,bs.prototype.isCubicBezierCurve=!0,bs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y)),n},bs.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},bs.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},bs.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},ws.prototype=Object.create(ss.prototype),ws.prototype.constructor=ws,ws.prototype.isCubicBezierCurve3=!0,ws.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y),ys(e,r.z,i.z,o.z,a.z)),n},ws.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},ws.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},ws.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},xs.prototype=Object.create(ss.prototype),xs.prototype.constructor=xs,xs.prototype.isLineCurve=!0,xs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},xs.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},xs.prototype.getTangent=function(e,t){var n=t||new v;return n.copy(this.v2).sub(this.v1).normalize(),n},xs.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},xs.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},xs.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},_s.prototype=Object.create(ss.prototype),_s.prototype.constructor=_s,_s.prototype.isLineCurve3=!0,_s.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},_s.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},_s.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},_s.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},_s.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Es.prototype=Object.create(ss.prototype),Es.prototype.constructor=Es,Es.prototype.isQuadraticBezierCurve=!0,Es.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y)),n},Es.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Es.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Es.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},As.prototype=Object.create(ss.prototype),As.prototype.constructor=As,As.prototype.isQuadraticBezierCurve3=!0,As.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y),vs(e,r.z,i.z,o.z)),n},As.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},As.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},As.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ss.prototype=Object.create(ss.prototype),Ss.prototype.constructor=Ss,Ss.prototype.isSplineCurve=!0,Ss.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(gs(a,s.x,l.x,c.x,u.x),gs(a,s.y,l.y,c.y,u.y)),n},Ss.prototype.copy=function(e){ss.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},Ss.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},Ss.prototype.fromJSON=function(e){ss.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new v).fromArray(r))}return this};var Ms=Object.freeze({__proto__:null,ArcCurve:cs,CatmullRomCurve3:ms,CubicBezierCurve:bs,CubicBezierCurve3:ws,EllipseCurve:ls,LineCurve:xs,LineCurve3:_s,QuadraticBezierCurve:Es,QuadraticBezierCurve3:As,SplineCurve:Ss});function Ts(){ss.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Cs(e){Ts.call(this),this.type="Path",this.currentPoint=new v,e&&this.setFromPoints(e)}function Os(e){Cs.call(this,e),this.uuid=g.generateUUID(),this.type="Shape",this.holes=[]}function Rs(e,t){void 0===t&&(t=1),Me.call(this),this.type="Light",this.color=new Ye(e),this.intensity=t}function ks(e,t,n){Rs.call(this,e,n),this.type="HemisphereLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.groundColor=new Ye(t)}function Ps(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new v(512,512),this.map=null,this.mapPass=null,this.matrix=new te,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new tn,this._frameExtents=new v(1,1),this._viewportCount=1,this._viewports=[new E(0,0,1,1)]}function Ls(){Ps.call(this,new Yt(50,1,.5,500)),this.focus=1}function Ds(e,t,n,r,i,o){Rs.call(this,e,t),this.type="SpotLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Ls}function Is(){Ps.call(this,new Yt(90,1,.5,500)),this._frameExtents=new v(4,2),this._viewportCount=6,this._viewports=[new E(2,1,1,1),new E(0,1,1,1),new E(3,1,1,1),new E(1,1,1,1),new E(3,0,1,1),new E(1,0,1,1)],this._cubeDirections=[new T(1,0,0),new T(-1,0,0),new T(0,0,1),new T(0,0,-1),new T(0,1,0),new T(0,-1,0)],this._cubeUps=[new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,0,1),new T(0,0,-1)]}function Ns(e,t,n,r){Rs.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Is}function js(e,t,n,r,i,o){void 0===e&&(e=-1),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=-1),void 0===i&&(i=.1),void 0===o&&(o=2e3),Xt.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}function Bs(){Ps.call(this,new js(-5,5,5,-5,.5,500))}function Fs(e,t){Rs.call(this,e,t),this.type="DirectionalLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,this.shadow=new Bs}function zs(e,t){Rs.call(this,e,t),this.type="AmbientLight"}function Hs(e,t,n,r){Rs.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}Ts.prototype=Object.assign(Object.create(ss.prototype),{constructor:Ts,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new xs(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){void 0===e&&(e=12);for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),l=0;l<s.length;l++){var c=s[l];t&&t.equals(c)||(n.push(c),t=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){ss.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=ss.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){ss.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new Ms[r.type]).fromJSON(r))}return this}}),Cs.prototype=Object.assign(Object.create(Ts.prototype),{constructor:Cs,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var n=new xs(this.currentPoint.clone(),new v(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,n,r){var i=new Es(this.currentPoint.clone(),new v(e,t),new v(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this},bezierCurveTo:function(e,t,n,r,i,o){var a=new bs(this.currentPoint.clone(),new v(e,t),new v(n,r),new v(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this},splineThru:function(e){var t=new Ss([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this},absarc:function(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this},ellipse:function(e,t,n,r,i,o,a,s){var l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this},absellipse:function(e,t,n,r,i,o,a,s){var l=new ls(e,t,n,r,i,o,a,s);if(this.curves.length>0){var c=l.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(l);var u=l.getPoint(1);return this.currentPoint.copy(u),this},copy:function(e){return Ts.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Ts.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Ts.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Os.prototype=Object.assign(Object.create(Cs.prototype),{constructor:Os,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){Cs.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=Cs.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){Cs.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new Cs).fromJSON(r))}return this}}),Rs.prototype=Object.assign(Object.create(Me.prototype),{constructor:Rs,isLight:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),ks.prototype=Object.assign(Object.create(Rs.prototype),{constructor:ks,isHemisphereLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(Ps.prototype,{_projScreenMatrix:new te,_lightPositionWorld:new T,_lookTarget:new T,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,n=this.matrix,r=this._projScreenMatrix,i=this._lookTarget,o=this._lightPositionWorld;o.setFromMatrixPosition(e.matrixWorld),t.position.copy(o),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),r.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(r),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),Ls.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Ls,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,n=2*g.RAD2DEG*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),Ps.prototype.updateMatrices.call(this,e)}}),Ds.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ds,isSpotLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Is.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Is,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var n=this.camera,r=this.matrix,i=this._lightPositionWorld,o=this._lookTarget,a=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),n.position.copy(i),o.copy(n.position),o.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(o),n.updateMatrixWorld(),r.makeTranslation(-i.x,-i.y,-i.z),a.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(a)}}),Ns.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ns,isPointLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),js.prototype=Object.assign(Object.create(Xt.prototype),{constructor:js,isOrthographicCamera:!0,copy:function(e,t){return Xt.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var l=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o=(i+=l*this.view.offsetX)+l*this.view.width,s=(a-=c*this.view.offsetY)-c*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Bs.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Bs,isDirectionalLightShadow:!0,updateMatrices:function(e){Ps.prototype.updateMatrices.call(this,e)}}),Fs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Fs,isDirectionalLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),zs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:zs,isAmbientLight:!0}),Hs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Hs,isRectAreaLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}});var Us=function(){function e(){Object.defineProperty(this,"isSphericalHarmonics3",{value:!0}),this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new T)}var t=e.prototype;return t.set=function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},t.zero=function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},t.getAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t},t.getIrradianceAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t},t.add=function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},t.addScaledSH=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this},t.scale=function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},t.lerp=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this},t.equals=function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},t.copy=function(e){return this.set(e.coefficients)},t.clone=function(){return(new this.constructor).copy(this)},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].toArray(e,t+3*r);return e},e.getBasisAt=function(e,t){var n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)},e}();function Vs(e,t){Rs.call(this,void 0,t),this.type="LightProbe",this.sh=void 0!==e?e:new Us}function Gs(e){Ja.call(this,e),this.textures={}}Vs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Vs,isLightProbe:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.sh.copy(e.sh),this},fromJSON:function(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.sh=this.sh.toArray(),t}}),Gs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Gs,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){var t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var r=new La[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=(new Ye).setHex(e.sheen)),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(r.morphNormals=e.morphNormals),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.vertexTangents&&(r.vertexTangents=e.vertexTangents),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"===typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var i in e.uniforms){var o=e.uniforms[i];switch(r.uniforms[i]={},o.type){case"t":r.uniforms[i].value=n(o.value);break;case"c":r.uniforms[i].value=(new Ye).setHex(o.value);break;case"v2":r.uniforms[i].value=(new v).fromArray(o.value);break;case"v3":r.uniforms[i].value=(new T).fromArray(o.value);break;case"v4":r.uniforms[i].value=(new E).fromArray(o.value);break;case"m3":r.uniforms[i].value=(new y).fromArray(o.value);break;case"m4":r.uniforms[i].value=(new te).fromArray(o.value);break;default:r.uniforms[i].value=o.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var a in e.extensions)r.extensions[a]=e.extensions[a];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),r.normalScale=(new v).fromArray(s)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new v).fromArray(e.clearcoatNormalScale)),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),r},setTextures:function(e){return this.textures=e,this}});var Ws={decodeText:function(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);for(var n="",r=0,i=t.length;r<i;r++)n+=String.fromCharCode(t[r]);try{return decodeURIComponent(escape(n))}catch(e){return n}},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};function qs(){_t.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function Xs(e,t,n,r){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),tt.call(this,e,t,n),this.meshPerAttribute=r||1}function Ys(e){Ja.call(this,e)}qs.prototype=Object.assign(Object.create(_t.prototype),{constructor:qs,isInstancedBufferGeometry:!0,copy:function(e){return _t.prototype.copy.call(this,e),this.instanceCount=e.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=_t.prototype.toJSON.call(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}),Xs.prototype=Object.assign(Object.create(tt.prototype),{constructor:Xs,isInstancedBufferAttribute:!0,copy:function(e){return tt.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=tt.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Ys.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Ys,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){var t={},n={};function r(e,r){if(void 0!==t[r])return t[r];var i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];var r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),a=new vi(pt(i.type,o),i.stride);return a.uuid=i.uuid,t[r]=a,a}var i=e.isInstancedBufferGeometry?new qs:new _t,o=e.data.index;if(void 0!==o){var a=pt(o.type,o.array);i.setIndex(new tt(a,1))}var s=e.data.attributes;for(var l in s){var c=s[l],u=void 0;if(c.isInterleavedBufferAttribute)u=new wi(r(e.data,c.data),c.itemSize,c.offset,c.normalized);else{var h=pt(c.type,c.array);u=new(c.isInstancedBufferAttribute?Xs:tt)(h,c.itemSize,c.normalized)}void 0!==c.name&&(u.name=c.name),i.setAttribute(l,u)}var d=e.data.morphAttributes;if(d)for(var f in d){for(var p=d[f],m=[],g=0,v=p.length;g<v;g++){var y=p[g],b=void 0;b=y.isInterleavedBufferAttribute?new wi(r(e.data,y.data),y.itemSize,y.offset,y.normalized):new tt(pt(y.type,y.array),y.itemSize,y.normalized),void 0!==y.name&&(b.name=y.name),m.push(b)}i.morphAttributes[f]=m}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);var w=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==w)for(var x=0,_=w.length;x!==_;++x){var E=w[x];i.addGroup(E.start,E.count,E.materialIndex)}var A=e.data.boundingSphere;if(void 0!==A){var S=new T;void 0!==A.center&&S.fromArray(A.center),i.boundingSphere=new q(S,A.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}});var Ks=function(e){function t(t){return e.call(this,t)||this}s(t,e);var n=t.prototype;return n.load=function(e,t,n,r){var i=this,o=""===this.path?Ws.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;var a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){var o=null;try{o=JSON.parse(n)}catch(s){return void 0!==r&&r(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.message)}var a=o.metadata;void 0!==a&&void 0!==a.type&&"geometry"!==a.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)}),n,r)},n.parse=function(e,t){var n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),a=this.parseTextures(e.textures,o),s=this.parseMaterials(e.materials,a),l=this.parseObject(e.object,i,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){var u=!1;for(var h in o)if(o[h]instanceof HTMLImageElement){u=!0;break}!1===u&&t(l)}return l},n.parseShapes=function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new Os).fromJSON(e[n]);t[i.uuid]=i}return t},n.parseSkeletons=function(e,t){var n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=(new Yi).fromJSON(e[i],r);n[a.uuid]=a}return n},n.parseGeometries=function(e,t){var n,r={};if(void 0!==e)for(var i=new Ys,o=0,a=e.length;o<a;o++){var s=void 0,l=e[o];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new _a[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":s=new _a[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new _a[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new _a[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new _a[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new _a[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new _a[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new _a[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"TubeGeometry":case"TubeBufferGeometry":s=new _a[l.type]((new Ms[l.path.type]).fromJSON(l.path),l.tubularSegments,l.radius,l.radialSegments,l.closed);break;case"LatheGeometry":case"LatheBufferGeometry":s=new _a[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new _a[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":n=[];for(var c=0,u=l.shapes.length;c<u;c++){var h=t[l.shapes[c]];n.push(h)}s=new _a[l.type](n,l.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":n=[];for(var d=0,f=l.shapes.length;d<f;d++){var p=t[l.shapes[d]];n.push(p)}var m=l.options.extrudePath;void 0!==m&&(l.options.extrudePath=(new Ms[m.type]).fromJSON(m)),s=new _a[l.type](n,l.options);break;case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":"THREE"in window&&"LegacyJSONLoader"in THREE?s=(new THREE.LegacyJSONLoader).parse(l,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}s.uuid=l.uuid,void 0!==l.name&&(s.name=l.name),!0===s.isBufferGeometry&&void 0!==l.userData&&(s.userData=l.userData),r[l.uuid]=s}return r},n.parseMaterials=function(e,t){var n={},r={};if(void 0!==e){var i=new Gs;i.setTextures(t);for(var o=0,a=e.length;o<a;o++){var s=e[o];if("MultiMaterial"===s.type){for(var l=[],c=0;c<s.materials.length;c++){var u=s.materials[c];void 0===n[u.uuid]&&(n[u.uuid]=i.parse(u)),l.push(n[u.uuid])}r[s.uuid]=l}else void 0===n[s.uuid]&&(n[s.uuid]=i.parse(s)),r[s.uuid]=n[s.uuid]}}return r},n.parseAnimations=function(e){var t={};if(void 0!==e)for(var n=0;n<e.length;n++){var r=e[n],i=Xa.parse(r);t[i.uuid]=i}return t},n.parseImages=function(e,t){var n,r=this,i={};function o(e){if("string"===typeof e){var t=e;return function(e){return r.manager.itemStart(e),n.load(e,(function(){r.manager.itemEnd(e)}),void 0,(function(){r.manager.itemError(e),r.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:r.resourcePath+t)}return e.data?{data:pt(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){var a=new Qa(t);(n=new rs(a)).setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s<l;s++){var c=e[s],u=c.url;if(Array.isArray(u)){i[c.uuid]=[];for(var h=0,d=u.length;h<d;h++){var f=o(u[h]);null!==f&&(f instanceof HTMLImageElement?i[c.uuid].push(f):i[c.uuid].push(new Jt(f.data,f.width,f.height)))}}else{var p=o(c.url);null!==p&&(i[c.uuid]=p)}}}return i},n.parseTextures=function(e,t){function n(e,t){return"number"===typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var r={};if(void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=void 0,l=t[a.image];Array.isArray(l)?(s=new Qt(l),6===l.length&&(s.needsUpdate=!0)):(s=l&&l.data?new Jt(l.data,l.width,l.height):new x(l),l&&(s.needsUpdate=!0)),s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Qs)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],Zs),s.wrapT=n(a.wrap[1],Zs)),void 0!==a.format&&(s.format=a.format),void 0!==a.type&&(s.type=a.type),void 0!==a.encoding&&(s.encoding=a.encoding),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Js)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Js)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),void 0!==a.premultiplyAlpha&&(s.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(s.unpackAlignment=a.unpackAlignment),r[a.uuid]=s}return r},n.parseObject=function(e,t,n,r){var i,o,a;function s(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function l(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],r=0,i=e.length;r<i;r++){var o=e[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),t.push(n[o])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}switch(e.type){case"Scene":i=new gi,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new Ye(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new mi(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new pi(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new Yt(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new js(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new zs(e.color,e.intensity);break;case"DirectionalLight":i=new Fs(e.color,e.intensity);break;case"PointLight":i=new Ns(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new Hs(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new Ds(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new ks(e.color,e.groundColor,e.intensity);break;case"LightProbe":i=(new Vs).fromJSON(e);break;case"SkinnedMesh":i=new Gi(o=s(e.geometry),a=l(e.material)),void 0!==e.bindMode&&(i.bindMode=e.bindMode),void 0!==e.bindMatrix&&i.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(i.skeleton=e.skeleton);break;case"Mesh":i=new zt(o=s(e.geometry),a=l(e.material));break;case"InstancedMesh":o=s(e.geometry),a=l(e.material);var c=e.count,u=e.instanceMatrix;(i=new $i(o,a,c)).instanceMatrix=new tt(new Float32Array(u.array),16);break;case"LOD":i=new Bi;break;case"Line":i=new ao(s(e.geometry),l(e.material));break;case"LineLoop":i=new uo(s(e.geometry),l(e.material));break;case"LineSegments":i=new co(s(e.geometry),l(e.material));break;case"PointCloud":case"Points":i=new vo(s(e.geometry),l(e.material));break;case"Sprite":i=new Di(l(e.material));break;case"Group":i=new ii;break;case"Bone":i=new Wi;break;default:i=new Me}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(i.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,d=0;d<h.length;d++)i.add(this.parseObject(h[d],t,n,r));if(void 0!==e.animations)for(var f=e.animations,p=0;p<f.length;p++){var m=f[p];i.animations.push(r[m])}if("LOD"===e.type){void 0!==e.autoUpdate&&(i.autoUpdate=e.autoUpdate);for(var g=e.levels,v=0;v<g.length;v++){var y=g[v],b=i.getObjectByProperty("uuid",y.object);void 0!==b&&i.addLevel(b,y.distance)}}return i},n.bindSkeletons=function(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){var n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))},n.setTexturePath=function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)},t}(Ja),Qs={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zs={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Js={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008};function $s(e){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),Ja.call(this,e),this.options={premultiplyAlpha:"none"}}function el(){this.type="ShapePath",this.color=new Ye,this.subPaths=[],this.currentPath=null}$s.prototype=Object.assign(Object.create(Ja.prototype),{constructor:$s,isImageBitmapLoader:!0,setOptions:function(e){return this.options=e,this},load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,i.options)})).then((function(n){Ka.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}),Object.assign(el.prototype,{moveTo:function(e,t){return this.currentPath=new Cs,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this},bezierCurveTo:function(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new Os;o.curves=i.curves,t.push(o)}return t}function r(e,t){for(var n=t.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=t[i],s=t[o],l=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=t[o],l=-l,s=t[i],c=-c),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var u=c*(e.x-a.x)-l*(e.y-a.y);if(0===u)return!0;if(u<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r}var i,o,a,s=ia.isClockWise,l=this.subPaths;if(0===l.length)return[];if(!0===t)return n(l);var c=[];if(1===l.length)return o=l[0],(a=new Os).curves=o.curves,c.push(a),c;var u=!s(l[0].getPoints());u=e?!u:u;var h,d,f=[],p=[],m=[],g=0;p[g]=void 0,m[g]=[];for(var v=0,y=l.length;v<y;v++)i=s(h=(o=l[v]).getPoints()),(i=e?!i:i)?(!u&&p[g]&&g++,p[g]={s:new Os,p:h},p[g].s.curves=o.curves,u&&g++,m[g]=[]):m[g].push({h:o,p:h[0]});if(!p[0])return n(l);if(p.length>1){for(var b=!1,w=[],x=0,_=p.length;x<_;x++)f[x]=[];for(var E=0,A=p.length;E<A;E++)for(var S=m[E],M=0;M<S.length;M++){for(var T=S[M],C=!0,O=0;O<p.length;O++)r(T.p,p[O].p)&&(E!==O&&w.push({froms:E,tos:O,hole:M}),C?(C=!1,f[O].push(T)):b=!0);C&&f[E].push(T)}w.length>0&&(b||(m=f))}for(var R=0,k=p.length;R<k;R++){a=p[R].s,c.push(a);for(var P=0,L=(d=m[R]).length;P<L;P++)a.holes.push(d[P].h)}return c}});var tl,nl=function(){function e(e){Object.defineProperty(this,"isFont",{value:!0}),this.type="Font",this.data=e}return e.prototype.generateShapes=function(e,t){void 0===t&&(t=100);for(var n=[],r=function(e,t,n){for(var r=Array.from?Array.from(e):String(e).split(""),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[],s=0,l=0,c=0;c<r.length;c++){var u=r[c];if("\n"===u)s=0,l-=o;else{var h=rl(u,i,s,l,n);s+=h.offsetX,a.push(h.path)}}return a}(e,t,this.data),i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n},e}();function rl(e,t,n,r,i){var o=i.glyphs[e]||i.glyphs["?"];if(o){var a,s,l,c,u,h,d,f,p=new el;if(o.o)for(var m=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),g=0,v=m.length;g<v;)switch(m[g++]){case"m":a=m[g++]*t+n,s=m[g++]*t+r,p.moveTo(a,s);break;case"l":a=m[g++]*t+n,s=m[g++]*t+r,p.lineTo(a,s);break;case"q":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,p.quadraticCurveTo(u,h,l,c);break;case"b":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,d=m[g++]*t+n,f=m[g++]*t+r,p.bezierCurveTo(u,h,d,f,l,c)}return{offsetX:o.ha*t,path:p}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function il(e){Ja.call(this,e)}il.prototype=Object.assign(Object.create(Ja.prototype),{constructor:il,load:function(t,n,r,i){var o=this,a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(t){var r;try{r=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),r=JSON.parse(t.substring(65,t.length-2))}var i=o.parse(r);n&&n(i)}),r,i)},parse:function(e){return new nl(e)}});var ol={getContext:function(){return void 0===tl&&(tl=new(window.AudioContext||window.webkitAudioContext)),tl},setContext:function(e){tl=e}};function al(e){Ja.call(this,e)}function sl(e,t,n){Vs.call(this,void 0,n);var r=(new Ye).set(e),i=(new Ye).set(t),o=new T(r.r,r.g,r.b),a=new T(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}function ll(e,t){Vs.call(this,void 0,t);var n=(new Ye).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}al.prototype=Object.assign(Object.create(Ja.prototype),{constructor:al,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setResponseType("arraybuffer"),a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{var a=r.slice(0);ol.getContext().decodeAudioData(a,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}),sl.prototype=Object.assign(Object.create(Vs.prototype),{constructor:sl,isHemisphereLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}}),ll.prototype=Object.assign(Object.create(Vs.prototype),{constructor:ll,isAmbientLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}});var cl=new te,ul=new te;function hl(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Yt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Yt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}Object.assign(hl.prototype,{update:function(e){var t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;var n,r,i=e.projectionMatrix.clone(),o=t.eyeSep/2,a=o*t.near/t.focus,s=t.near*Math.tan(g.DEG2RAD*t.fov*.5)/t.zoom;ul.elements[12]=-o,cl.elements[12]=o,n=-s*t.aspect+a,r=s*t.aspect+a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(i),n=-s*t.aspect-a,r=s*t.aspect-a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(i)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ul),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(cl)}});var dl=function(){function e(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}var t=e.prototype;return t.start=function(){this.startTime=fl(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},t.stop=function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},t.getElapsedTime=function(){return this.getDelta(),this.elapsedTime},t.getDelta=function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=fl();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e},e}();function fl(){return("undefined"===typeof performance?Date:performance).now()}var pl=new T,ml=new M,gl=new T,vl=new T,yl=function(e){function t(){var t;return(t=e.call(this)||this).type="AudioListener",t.context=ol.getContext(),t.gain=t.context.createGain(),t.gain.connect(t.context.destination),t.filter=null,t.timeDelta=0,t._clock=new dl,t}s(t,e);var n=t.prototype;return n.getInput=function(){return this.gain},n.removeFilter=function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},n.getFilter=function(){return this.filter},n.setFilter=function(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},n.getMasterVolume=function(){return this.gain.gain.value},n.setMasterVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},n.updateMatrixWorld=function(t){e.prototype.updateMatrixWorld.call(this,t);var n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(pl,ml,gl),vl.set(0,0,-1).applyQuaternion(ml),n.positionX){var i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(pl.x,i),n.positionY.linearRampToValueAtTime(pl.y,i),n.positionZ.linearRampToValueAtTime(pl.z,i),n.forwardX.linearRampToValueAtTime(vl.x,i),n.forwardY.linearRampToValueAtTime(vl.y,i),n.forwardZ.linearRampToValueAtTime(vl.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(pl.x,pl.y,pl.z),n.setOrientation(vl.x,vl.y,vl.z,r.x,r.y,r.z)},t}(Me),bl=function(e){function t(t){var n;return(n=e.call(this)||this).type="Audio",n.listener=t,n.context=t.context,n.gain=n.context.createGain(),n.gain.connect(t.getInput()),n.autoplay=!1,n.buffer=null,n.detune=0,n.loop=!1,n.loopStart=0,n.loopEnd=0,n.offset=0,n.duration=void 0,n.playbackRate=1,n.isPlaying=!1,n.hasPlaybackControl=!0,n.source=null,n.sourceType="empty",n._startedAt=0,n._progress=0,n._connected=!1,n.filters=[],n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.gain},n.setNodeSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},n.setMediaElementSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},n.setMediaStreamSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},n.setBuffer=function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},n.play=function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},n.pause=function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.stop=function(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},n.connect=function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this},n.disconnect=function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this},n.getFilters=function(){return this.filters},n.setFilters=function(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this},n.setDetune=function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},n.getDetune=function(){return this.detune},n.getFilter=function(){return this.getFilters()[0]},n.setFilter=function(e){return this.setFilters(e?[e]:[])},n.setPlaybackRate=function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.getPlaybackRate=function(){return this.playbackRate},n.onEnded=function(){this.isPlaying=!1},n.getLoop=function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},n.setLoop=function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.setLoopStart=function(e){return this.loopStart=e,this},n.setLoopEnd=function(e){return this.loopEnd=e,this},n.getVolume=function(){return this.gain.gain.value},n.setVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},t}(Me),wl=new T,xl=new M,_l=new T,El=new T,Al=function(e){function t(t){var n;return(n=e.call(this,t)||this).panner=n.context.createPanner(),n.panner.panningModel="HRTF",n.panner.connect(n.gain),n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.panner},n.getRefDistance=function(){return this.panner.refDistance},n.setRefDistance=function(e){return this.panner.refDistance=e,this},n.getRolloffFactor=function(){return this.panner.rolloffFactor},n.setRolloffFactor=function(e){return this.panner.rolloffFactor=e,this},n.getDistanceModel=function(){return this.panner.distanceModel},n.setDistanceModel=function(e){return this.panner.distanceModel=e,this},n.getMaxDistance=function(){return this.panner.maxDistance},n.setMaxDistance=function(e){return this.panner.maxDistance=e,this},n.setDirectionalCone=function(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this},n.updateMatrixWorld=function(t){if(e.prototype.updateMatrixWorld.call(this,t),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(wl,xl,_l),El.set(0,0,1).applyQuaternion(xl);var n=this.panner;if(n.positionX){var r=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime(wl.x,r),n.positionY.linearRampToValueAtTime(wl.y,r),n.positionZ.linearRampToValueAtTime(wl.z,r),n.orientationX.linearRampToValueAtTime(El.x,r),n.orientationY.linearRampToValueAtTime(El.y,r),n.orientationZ.linearRampToValueAtTime(El.z,r)}else n.setPosition(wl.x,wl.y,wl.z),n.setOrientation(El.x,El.y,El.z)}},t}(bl),Sl=function(){function e(e,t){void 0===t&&(t=2048),this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}var t=e.prototype;return t.getFrequencyData=function(){return this.analyser.getByteFrequencyData(this.data),this.data},t.getAverageFrequency=function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length},e}();function Ml(e,t,n){var r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}Object.assign(Ml.prototype,{accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=t}else{var s=t/(o+=t);this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},accumulateAdditive:function(e){var t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){var s=t*this._origIndex;this._mixBufferRegion(n,r,s,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(var l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_setAdditiveIdentityNumeric:function(){for(var e=this._addIndex*this.valueSize,t=e+this.valueSize,n=e;n<t;n++)this.buffer[n]=0},_setAdditiveIdentityQuaternion:function(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1},_setAdditiveIdentityOther:function(){for(var e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize,n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]},_select:function(e,t,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)e[t+o]=e[n+o]},_slerp:function(e,t,n,r){M.slerpFlat(e,t,e,t,e,n,r)},_slerpAdditive:function(e,t,n,r,i){var o=this._workIndex*i;M.multiplyQuaternionsFlat(e,o,e,t,e,n),M.slerpFlat(e,t,e,t,e,o,r)},_lerp:function(e,t,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=t+a;e[s]=e[s]*o+e[n+a]*r}},_lerpAdditive:function(e,t,n,r,i){for(var o=0;o!==i;++o){var a=t+o;e[a]=e[a]+e[n+o]*r}}});var Tl=new RegExp("[\\[\\]\\.:\\/]","g"),Cl="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ol=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Rl=/(WCOD+)?/.source.replace("WCOD",Cl),kl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Pl=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ll=new RegExp("^"+Ol+Rl+kl+Pl+"$"),Dl=["material","materials","bones"];function Il(e,t,n){var r=n||Nl.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function Nl(e,t,n){this.path=t,this.parsedPath=n||Nl.parseTrackName(t),this.node=Nl.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function jl(){this.uuid=g.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}Object.assign(Il.prototype,{getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),Object.assign(Nl,{Composite:Il,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new Nl.Composite(e,t,n):new Nl(e,t,n)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(Tl,"")},parseTrackName:function(e){var t=Ll.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==Dl.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n},findNode:function(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var r=function e(n){for(var r=0;r<n.length;r++){var i=n[r];if(i.name===t||i.uuid===t)return i;var o=e(i.children);if(o)return o}return null}(e.children);if(r)return r}return null}}),Object.assign(Nl.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=Nl.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(n){var o=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var a=0;a<e.length;a++)if(e[a].name===o){o=a;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==o){if(void 0===e[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[o]}}var s=e[r];if(void 0!==s){var l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var c=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}else{var u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(Nl.prototype,{_getValue_unbound:Nl.prototype.getValue,_setValue_unbound:Nl.prototype.setValue}),Object.assign(jl.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length,a=void 0,s=e.length,l=this.nCachedObjects_,c=0,u=arguments.length;c!==u;++c){var h=arguments[c],d=h.uuid,f=t[d];if(void 0===f){f=s++,t[d]=f,e.push(h);for(var p=0,m=o;p!==m;++p)i[p].push(new Nl(h,n[p],r[p]))}else if(f<l){a=e[f];var g=--l,v=e[g];t[v.uuid]=f,e[f]=v,t[d]=g,e[g]=h;for(var y=0,b=o;y!==b;++y){var w=i[y],x=w[g],_=w[f];w[f]=x,void 0===_&&(_=new Nl(h,n[y],r[y])),w[g]=_}}else e[f]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l},remove:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],l=s.uuid,c=t[l];if(void 0!==c&&c>=i){var u=i++,h=e[u];t[h.uuid]=c,e[c]=h,t[l]=u,e[u]=s;for(var d=0,f=r;d!==f;++d){var p=n[d],m=p[u],g=p[c];p[c]=m,p[u]=g}}}this.nCachedObjects_=i},uncache:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=e.length,a=0,s=arguments.length;a!==s;++a){var l=arguments[a],c=l.uuid,u=t[c];if(void 0!==u)if(delete t[c],u<i){var h=--i,d=e[h],f=--o,p=e[f];t[d.uuid]=u,e[u]=d,t[p.uuid]=h,e[h]=p,e.pop();for(var m=0,g=r;m!==g;++m){var v=n[m],y=v[h],b=v[f];v[u]=y,v[h]=b,v.pop()}}else{var w=--o,x=e[w];w>0&&(t[x.uuid]=u),e[u]=x,e.pop();for(var _=0,E=r;_!==E;++_){var A=n[_];A[u]=A[w],A.pop()}}}this.nCachedObjects_=i},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(var h=c,d=s.length;h!==d;++h){var f=s[h];u[h]=new Nl(f,e,t)}return u},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}});var Bl=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=t.blendMode),this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;for(var i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400},l=0;l!==o;++l){var c=i[l].createInterpolant(null);a[l]=c,c.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}var t=e.prototype;return t.play=function(){return this._mixer._activateAction(this),this},t.stop=function(){return this._mixer._deactivateAction(this),this.reset()},t.reset=function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},t.isRunning=function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},t.isScheduled=function(){return this._mixer._isActiveAction(this)},t.startAt=function(e){return this._startTime=e,this},t.setLoop=function(e,t){return this.loop=e,this.repetitions=t,this},t.setEffectiveWeight=function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},t.getEffectiveWeight=function(){return this._effectiveWeight},t.fadeIn=function(e){return this._scheduleFading(e,0,1)},t.fadeOut=function(e){return this._scheduleFading(e,1,0)},t.crossFadeFrom=function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,o=i/r,a=r/i;e.warp(1,o,t),this.warp(a,1,t)}return this},t.crossFadeTo=function(e,t,n){return e.crossFadeFrom(this,t,n)},t.stopFading=function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.setEffectiveTimeScale=function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},t.getEffectiveTimeScale=function(){return this._effectiveTimeScale},t.setDuration=function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},t.syncWith=function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},t.halt=function(e){return this.warp(this._effectiveTimeScale,0,e)},t.warp=function(e,t,n){var r=this._mixer,i=r.time,o=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this},t.stopWarping=function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.getMixer=function(){return this._mixer},t.getClip=function(){return this._clip},t.getRoot=function(){return this._localRoot||this._mixer._root},t._update=function(e,t,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(e-i)*n;if(o<0||0===n)return;this._startTime=null,t=n*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0){var l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case 2501:for(var u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case 2500:default:for(var d=0,f=l.length;d!==f;++d)l[d].evaluate(a),c[d].accumulate(r,s)}}}else this._updateWeight(e)},t._updateWeight=function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},t._updateTimeScale=function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t},t._updateTime=function(e){var t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){var a=Math.floor(r/t);r-=t*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&1===(1&i))return t-r}return r},t._setEndings=function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},t._scheduleFading=function(e,t,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this},e}();function Fl(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}Fl.prototype=Object.assign(Object.create(h.prototype),{constructor:Fl,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,c=l[s];void 0===c&&(c={},l[s]=c);for(var u=0;u!==i;++u){var h=r[u],d=h.name,f=c[d];if(void 0!==f)o[u]=f;else{if(void 0!==(f=o[u])){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,s,d));continue}var p=t&&t._propertyBindings[u].binding.parsedPath;++(f=new Ml(Nl.create(n,d,p),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(f,s,d),o[u]=f}a[u].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=this._bindings,o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&((n=new ja(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t,n){var r=t||this._root,i=r.uuid,o="string"===typeof e?Xa.findByName(r,e):e,a=null!==o?o.uuid:e,s=this._actionsByClip[a],l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){var c=s.actionByRoot[i];if(void 0!==c&&c.blendMode===n)return c;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;var u=new Bl(this,o,t,n);return this._bindAction(u,l),this._addInactiveAction(u,a,i),u},existingAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"===typeof e?Xa.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){for(var e=this._actions,t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1,a=0;a!==n;++a)t[a]._update(r,e,i,o);for(var s=this._bindings,l=this._nActiveBindings,c=0;c!==l;++c)s[c].apply(o);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var l=o[a];this._deactivateAction(l);var c=l._cacheIndex,u=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,u._cacheIndex=c,t[c]=u,t.pop(),this._removeInactiveBindingsForAction(l)}delete r[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[t];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}});var zl=function(){function e(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}return e.prototype.clone=function(){return new e(void 0===this.value.clone?this.value:this.value.clone())},e}();function Hl(e,t,n){vi.call(this,e,t),this.meshPerAttribute=n||1}function Ul(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}function Vl(e,t,n,r){this.ray=new ee(e,t),this.near=n||0,this.far=r||1/0,this.camera=null,this.layers=new de,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Gl(e,t){return e.distance-t.distance}function Wl(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r)for(var i=e.children,o=0,a=i.length;o<a;o++)Wl(i[o],t,n,!0)}Hl.prototype=Object.assign(Object.create(vi.prototype),{constructor:Hl,isInstancedInterleavedBuffer:!0,copy:function(e){return vi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},clone:function(e){var t=vi.prototype.clone.call(this,e);return t.meshPerAttribute=this.meshPerAttribute,t},toJSON:function(e){var t=vi.prototype.toJSON.call(this,e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}),Object.defineProperty(Ul.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Ul.prototype,{isGLBufferAttribute:!0,setBuffer:function(e){return this.buffer=e,this},setType:function(e,t){return this.type=e,this.elementSize=t,this},setItemSize:function(e){return this.itemSize=e,this},setCount:function(e){return this.count=e,this}}),Object.assign(Vl.prototype,{set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)},intersectObject:function(e,t,n){var r=n||[];return Wl(e,this,r,t),r.sort(Gl),r},intersectObjects:function(e,t,n){var r=n||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=e.length;i<o;i++)Wl(e[i],this,r,t);return r.sort(Gl),r}});var ql=function(){function e(e,t,n){return void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),this.radius=e,this.phi=t,this.theta=n,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},t.makeSafe=function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(g.clamp(t/this.radius,-1,1))),this},e}(),Xl=function(){function e(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this},e}(),Yl=new v,Kl=function(){function e(e,t){Object.defineProperty(this,"isBox2",{value:!0}),this.min=void 0!==e?e:new v(1/0,1/0),this.max=void 0!==t?t:new v(-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=Yl.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.makeEmpty=function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},t.containsBox=function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new v),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},t.intersectsBox=function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new v),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return Yl.copy(e).clamp(this.min,this.max).sub(e).length()},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}(),Ql=new T,Zl=new T,Jl=function(){function e(e,t){this.start=void 0!==e?e:new T,this.end=void 0!==t?t:new T}var t=e.prototype;return t.set=function(e,t){return this.start.copy(e),this.end.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.start.copy(e.start),this.end.copy(e.end),this},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new T),e.addVectors(this.start,this.end).multiplyScalar(.5)},t.delta=function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new T),e.subVectors(this.end,this.start)},t.distanceSq=function(){return this.start.distanceToSquared(this.end)},t.distance=function(){return this.start.distanceTo(this.end)},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new T),this.delta(t).multiplyScalar(e).add(this.start)},t.closestPointToPointParameter=function(e,t){Ql.subVectors(e,this.start),Zl.subVectors(this.end,this.start);var n=Zl.dot(Zl),r=Zl.dot(Ql)/n;return t&&(r=g.clamp(r,0,1)),r},t.closestPointToPoint=function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new T),this.delta(n).multiplyScalar(r).add(this.start)},t.applyMatrix4=function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},t.equals=function(e){return e.start.equals(this.start)&&e.end.equals(this.end)},e}();function $l(e){Me.call(this),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}$l.prototype=Object.create(Me.prototype),$l.prototype.constructor=$l,$l.prototype.isImmediateRenderObject=!0;var ec=new T,tc=function(e){function t(t,n){var r;(r=e.call(this)||this).light=t,r.light.updateMatrixWorld(),r.matrix=t.matrixWorld,r.matrixAutoUpdate=!1,r.color=n;for(var i=new _t,o=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],a=0,s=1;a<32;a++,s++){var l=a/32*Math.PI*2,c=s/32*Math.PI*2;o.push(Math.cos(l),Math.sin(l),1,Math.cos(c),Math.sin(c),1)}i.setAttribute("position",new ut(o,3));var u=new eo({fog:!1,toneMapped:!1});return r.cone=new co(i,u),r.add(r.cone),r.update(),r}s(t,e);var n=t.prototype;return n.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},n.update=function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),ec.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(ec),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)},t}(Me),nc=new T,rc=new te,ic=new te,oc=function(e){function t(t){for(var n,r=function e(t){var n=[];t&&t.isBone&&n.push(t);for(var r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(t),i=new _t,o=[],a=[],s=new Ye(0,0,1),l=new Ye(0,1,0),c=0;c<r.length;c++){var u=r[c];u.parent&&u.parent.isBone&&(o.push(0,0,0),o.push(0,0,0),a.push(s.r,s.g,s.b),a.push(l.r,l.g,l.b))}i.setAttribute("position",new ut(o,3)),i.setAttribute("color",new ut(a,3));var h=new eo({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});return(n=e.call(this,i,h)||this).type="SkeletonHelper",n.isSkeletonHelper=!0,n.root=t,n.bones=r,n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.bones,r=this.geometry,i=r.getAttribute("position");ic.copy(this.root.matrixWorld).invert();for(var o=0,a=0;o<n.length;o++){var s=n[o];s.parent&&s.parent.isBone&&(rc.multiplyMatrices(ic,s.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a,nc.x,nc.y,nc.z),rc.multiplyMatrices(ic,s.parent.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a+1,nc.x,nc.y,nc.z),a+=2)}r.getAttribute("position").needsUpdate=!0,e.prototype.updateMatrixWorld.call(this,t)},t}(co),ac=function(e){function t(t,n,r){var i,o=new ma(n,4,2),a=new Je({wireframe:!0,fog:!1,toneMapped:!1});return(i=e.call(this,o,a)||this).light=t,i.light.updateMatrixWorld(),i.color=r,i.type="PointLightHelper",i.matrix=i.light.matrixWorld,i.matrixAutoUpdate=!1,i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.geometry.dispose(),this.material.dispose()},n.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},t}(zt),sc=new T,lc=new Ye,cc=new Ye,uc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r;var o=new ha(n);o.rotateY(.5*Math.PI),i.material=new Je({wireframe:!0,fog:!1,toneMapped:!1}),void 0===i.color&&(i.material.vertexColors=!0);var a=o.getAttribute("position"),s=new Float32Array(3*a.count);return o.setAttribute("color",new tt(s,3)),i.add(new zt(o,i.material)),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},n.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");lc.copy(this.light.color),cc.copy(this.light.groundColor);for(var n=0,r=t.count;n<r;n++){var i=n<r/2?lc:cc;t.setXYZ(n,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(sc.setFromMatrixPosition(this.light.matrixWorld).negate())},t}(Me),hc=function(e){function t(t,n,r,i){var o;void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r=4473924),void 0===i&&(i=8947848),r=new Ye(r),i=new Ye(i);for(var a=n/2,s=t/n,l=t/2,c=[],u=[],h=0,d=0,f=-l;h<=n;h++,f+=s){c.push(-l,0,f,l,0,f),c.push(f,0,-l,f,0,l);var p=h===a?r:i;p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3}var m=new _t;m.setAttribute("position",new ut(c,3)),m.setAttribute("color",new ut(u,3));var g=new eo({vertexColors:!0,toneMapped:!1});return(o=e.call(this,m,g)||this).type="GridHelper",o}return s(t,e),t}(co),dc=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=10),void 0===n&&(n=16),void 0===r&&(r=8),void 0===i&&(i=64),void 0===o&&(o=4473924),void 0===a&&(a=8947848),o=new Ye(o),a=new Ye(a);for(var l=[],c=[],u=0;u<=n;u++){var h=u/n*(2*Math.PI),d=Math.sin(h)*t,f=Math.cos(h)*t;l.push(0,0,0),l.push(d,0,f);var p=1&u?o:a;c.push(p.r,p.g,p.b),c.push(p.r,p.g,p.b)}for(var m=0;m<=r;m++)for(var g=1&m?o:a,v=t-t/r*m,y=0;y<i;y++){var b=y/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v;l.push(w,0,x),c.push(g.r,g.g,g.b),b=(y+1)/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v,l.push(w,0,x),c.push(g.r,g.g,g.b)}var _=new _t;_.setAttribute("position",new ut(l,3)),_.setAttribute("color",new ut(c,3));var E=new eo({vertexColors:!0,toneMapped:!1});return(s=e.call(this,_,E)||this).type="PolarGridHelper",s}return s(t,e),t}(co),fc=new T,pc=new T,mc=new T,gc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r,void 0===n&&(n=1);var o=new _t;o.setAttribute("position",new ut([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));var a=new eo({fog:!1,toneMapped:!1});return i.lightPlane=new ao(o,a),i.add(i.lightPlane),(o=new _t).setAttribute("position",new ut([0,0,0,0,0,1],3)),i.targetLine=new ao(o,a),i.add(i.targetLine),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},n.update=function(){fc.setFromMatrixPosition(this.light.matrixWorld),pc.setFromMatrixPosition(this.light.target.matrixWorld),mc.subVectors(pc,fc),this.lightPlane.lookAt(pc),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(pc),this.targetLine.scale.z=mc.length()},t}(Me),vc=new T,yc=new Xt,bc=function(e){function t(t){var n,r=new _t,i=new eo({color:16777215,vertexColors:!0,toneMapped:!1}),o=[],a=[],s={},l=new Ye(16755200),c=new Ye(16711680),u=new Ye(43775),h=new Ye(16777215),d=new Ye(3355443);function f(e,t,n){p(e,n),p(t,n)}function p(e,t){o.push(0,0,0),a.push(t.r,t.g,t.b),void 0===s[e]&&(s[e]=[]),s[e].push(o.length/3-1)}return f("n1","n2",l),f("n2","n4",l),f("n4","n3",l),f("n3","n1",l),f("f1","f2",l),f("f2","f4",l),f("f4","f3",l),f("f3","f1",l),f("n1","f1",l),f("n2","f2",l),f("n3","f3",l),f("n4","f4",l),f("p","n1",c),f("p","n2",c),f("p","n3",c),f("p","n4",c),f("u1","u2",u),f("u2","u3",u),f("u3","u1",u),f("c","t",h),f("p","c",d),f("cn1","cn2",d),f("cn3","cn4",d),f("cf1","cf2",d),f("cf3","cf4",d),r.setAttribute("position",new ut(o,3)),r.setAttribute("color",new ut(a,3)),(n=e.call(this,r,i)||this).type="CameraHelper",n.camera=t,n.camera.updateProjectionMatrix&&n.camera.updateProjectionMatrix(),n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n.pointMap=s,n.update(),n}return s(t,e),t.prototype.update=function(){var e=this.geometry,t=this.pointMap;yc.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),wc("c",t,e,yc,0,0,-1),wc("t",t,e,yc,0,0,1),wc("n1",t,e,yc,-1,-1,-1),wc("n2",t,e,yc,1,-1,-1),wc("n3",t,e,yc,-1,1,-1),wc("n4",t,e,yc,1,1,-1),wc("f1",t,e,yc,-1,-1,1),wc("f2",t,e,yc,1,-1,1),wc("f3",t,e,yc,-1,1,1),wc("f4",t,e,yc,1,1,1),wc("u1",t,e,yc,.7,1.1,-1),wc("u2",t,e,yc,-.7,1.1,-1),wc("u3",t,e,yc,0,2,-1),wc("cf1",t,e,yc,-1,0,1),wc("cf2",t,e,yc,1,0,1),wc("cf3",t,e,yc,0,-1,1),wc("cf4",t,e,yc,0,1,1),wc("cn1",t,e,yc,-1,0,-1),wc("cn2",t,e,yc,1,0,-1),wc("cn3",t,e,yc,0,-1,-1),wc("cn4",t,e,yc,0,1,-1),e.getAttribute("position").needsUpdate=!0},t}(co);function wc(e,t,n,r,i,o,a){vc.set(i,o,a).unproject(r);var s=t[e];if(void 0!==s)for(var l=n.getAttribute("position"),c=0,u=s.length;c<u;c++)l.setXYZ(s[c],vc.x,vc.y,vc.z)}var xc,_c,Ec,Ac=new R,Sc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),o=new Float32Array(24),a=new _t;return a.setIndex(new tt(i,1)),a.setAttribute("position",new tt(o,3)),(r=e.call(this,a,new eo({color:n,toneMapped:!1}))||this).object=t,r.type="BoxHelper",r.matrixAutoUpdate=!1,r.update(),r}s(t,e);var n=t.prototype;return n.update=function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Ac.setFromObject(this.object),!Ac.isEmpty()){var t=Ac.min,n=Ac.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}},n.setFromObject=function(e){return this.object=e,this.update(),this},n.copy=function(e){return co.prototype.copy.call(this,e),this.object=e.object,this},t}(co),Mc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),o=new _t;return o.setIndex(new tt(i,1)),o.setAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),(r=e.call(this,o,new eo({color:n,toneMapped:!1}))||this).box=t,r.type="Box3Helper",r.geometry.computeBoundingSphere(),r}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),e.prototype.updateMatrixWorld.call(this,t))},t}(co),Tc=function(e){function t(t,n,r){var i;void 0===n&&(n=1),void 0===r&&(r=16776960);var o=r,a=new _t;a.setAttribute("position",new ut([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),a.computeBoundingSphere(),(i=e.call(this,a,new eo({color:o,toneMapped:!1}))||this).type="PlaneHelper",i.plane=t,i.size=n;var s=new _t;return s.setAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),i.add(new zt(s,new Je({color:o,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1}))),i}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=-this.plane.constant;Math.abs(n)<1e-8&&(n=1e-8),this.scale.set(.5*this.size,.5*this.size,n),this.children[0].material.side=n<0?1:0,this.lookAt(this.plane.normal),e.prototype.updateMatrixWorld.call(this,t)},t}(ao),Cc=new T,Oc=function(e){function t(t,n,r,i,o,a){var s;return(s=e.call(this)||this).type="ArrowHelper",void 0===t&&(t=new T(0,0,1)),void 0===n&&(n=new T(0,0,0)),void 0===r&&(r=1),void 0===i&&(i=16776960),void 0===o&&(o=.2*r),void 0===a&&(a=.2*o),void 0===xc&&((xc=new _t).setAttribute("position",new ut([0,0,0,0,1,0],3)),(_c=new Ao(0,.5,1,5,1)).translate(0,-.5,0)),s.position.copy(n),s.line=new ao(xc,new eo({color:i,toneMapped:!1})),s.line.matrixAutoUpdate=!1,s.add(s.line),s.cone=new zt(_c,new Je({color:i,toneMapped:!1})),s.cone.matrixAutoUpdate=!1,s.add(s.cone),s.setDirection(t),s.setLength(r,o,a),s}s(t,e);var n=t.prototype;return n.setDirection=function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Cc.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Cc,t)}},n.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},n.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},n.copy=function(t){return e.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},t}(Me),Rc=function(e){function t(t){var n;void 0===t&&(t=1);var r=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=new _t;i.setAttribute("position",new ut(r,3)),i.setAttribute("color",new ut([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var o=new eo({vertexColors:!0,toneMapped:!1});return(n=e.call(this,i,o)||this).type="AxesHelper",n}return s(t,e),t}(co),kc=new Float32Array(1),Pc=new Int32Array(kc.buffer),Lc={toHalfFloat:function(e){kc[0]=e;var t=Pc[0],n=t>>16&32768,r=t>>12&2047,i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t):i<113?n|=((r|=2048)>>114-i)+(r>>113-i&1):(n|=i-112<<10|r>>1,n+=1&r)}},Dc=Math.pow(2,8),Ic=[.125,.215,.35,.446,.526,.582],Nc=5+Ic.length,jc=((Ec={})[3e3]=0,Ec[3001]=1,Ec[3002]=2,Ec[3004]=3,Ec[3005]=4,Ec[3006]=5,Ec[3007]=6,Ec),Bc=new Je({side:1,depthWrite:!1,depthTest:!1}),Fc=new zt(new Ut,Bc),zc=new js,Hc=$c(),Uc=Hc._lodPlanes,Vc=Hc._sizeLods,Gc=Hc._sigmas,Wc=new Ye,qc=null,Xc=(1+Math.sqrt(5))/2,Yc=1/Xc,Kc=[new T(1,1,1),new T(-1,1,1),new T(1,1,-1),new T(-1,1,-1),new T(0,Xc,Yc),new T(0,Xc,-Yc),new T(Yc,0,Xc),new T(-Yc,0,Xc),new T(Xc,Yc,0),new T(-Xc,Yc,0)];function Qc(e){var t=Math.max(e.r,e.g,e.b),n=Math.min(Math.max(Math.ceil(Math.log2(t)),-128),127);return e.multiplyScalar(Math.pow(2,-n)),(n+128)/255}var Zc=function(){function e(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){var t=new Float32Array(e),n=new T(0,1,0);return new Aa({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(20),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}var t=e.prototype;return t.fromScene=function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=.1),void 0===r&&(r=100),qc=this._renderer.getRenderTarget();var i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i},t.fromEquirectangular=function(e){return this._fromTexture(e)},t.fromCubemap=function(e){return this._fromTexture(e)},t.compileCubemapShader=function(){null===this._cubemapShader&&(this._cubemapShader=ru(),this._compileMaterial(this._cubemapShader))},t.compileEquirectangularShader=function(){null===this._equirectShader&&(this._equirectShader=nu(),this._compileMaterial(this._equirectShader))},t.dispose=function(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(var e=0;e<Uc.length;e++)Uc[e].dispose()},t._cleanup=function(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(qc),e.scissorTest=!1,tu(e,0,0,e.width,e.height)},t._fromTexture=function(e){qc=this._renderer.getRenderTarget();var t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t},t._allocateTargets=function(e){var t={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:1009,format:1023,encoding:Jc(e)?e.encoding:3002,depthBuffer:!1},n=eu(t);return n.depthBuffer=!e,this._pingPongRenderTarget=eu(t),n},t._compileMaterial=function(e){var t=new zt(Uc[0],e);this._renderer.compile(t,zc)},t._sceneToCubeUV=function(e,t,n,r){var i=new Yt(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.outputEncoding,u=s.toneMapping;s.getClearColor(Wc),s.toneMapping=0,s.outputEncoding=3e3,s.autoClear=!1;var h=!1,d=e.background;if(d){if(d.isColor){Bc.color.copy(d).convertSRGBToLinear(),e.background=null;var f=Qc(Bc.color);Bc.opacity=f,h=!0}}else{Bc.color.copy(Wc).convertSRGBToLinear();var p=Qc(Bc.color);Bc.opacity=p,h=!0}for(var m=0;m<6;m++){var g=m%3;0==g?(i.up.set(0,o[m],0),i.lookAt(a[m],0,0)):1==g?(i.up.set(0,0,o[m]),i.lookAt(0,a[m],0)):(i.up.set(0,o[m],0),i.lookAt(0,0,a[m])),tu(r,g*Dc,m>2?Dc:0,Dc,Dc),s.setRenderTarget(r),h&&s.render(Fc,i),s.render(e,i)}s.toneMapping=u,s.outputEncoding=c,s.autoClear=l},t._textureToCubeUV=function(e,t){var n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=ru()):null==this._equirectShader&&(this._equirectShader=nu());var r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new zt(Uc[0],r),o=r.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=jc[e.encoding],o.outputEncoding.value=jc[t.texture.encoding],tu(t,0,0,3*Dc,2*Dc),n.setRenderTarget(t),n.render(i,zc)},t._applyPMREM=function(e){var t=this._renderer,n=t.autoClear;t.autoClear=!1;for(var r=1;r<Nc;r++){var i=Math.sqrt(Gc[r]*Gc[r]-Gc[r-1]*Gc[r-1]),o=Kc[(r-1)%Kc.length];this._blur(e,r-1,r,i,o)}t.autoClear=n},t._blur=function(e,t,n,r,i){var o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)},t._halfBlur=function(e,t,n,r,i,o,a){var s=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");var c=new zt(Uc[r],l),u=l.uniforms,h=Vc[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,f=i/d,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn("sigmaRadians, "+i+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");for(var m=[],g=0,v=0;v<20;++v){var y=v/f,b=Math.exp(-y*y/2);m.push(b),0==v?g+=b:v<p&&(g+=2*b)}for(var w=0;w<m.length;w++)m[w]=m[w]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===o,a&&(u.poleAxis.value=a),u.dTheta.value=d,u.mipInt.value=8-n,u.inputEncoding.value=jc[e.texture.encoding],u.outputEncoding.value=jc[e.texture.encoding];var x=Vc[r];tu(t,3*Math.max(0,Dc-2*x),(0===r?0:2*Dc)+2*x*(r>4?r-8+4:0),3*x,2*x),s.setRenderTarget(t),s.render(c,zc)},e}();function Jc(e){return void 0!==e&&1009===e.type&&(3e3===e.encoding||3001===e.encoding||3007===e.encoding)}function $c(){for(var e=[],t=[],n=[],r=8,i=0;i<Nc;i++){var o=Math.pow(2,r);t.push(o);var a=1/o;i>4?a=Ic[i-8+4-1]:0==i&&(a=0),n.push(a);for(var s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=new Float32Array(108),d=new Float32Array(72),f=new Float32Array(36),p=0;p<6;p++){var m=p%3*2/3-1,g=p>2?0:-1,v=[m,g,0,m+2/3,g,0,m+2/3,g+1,0,m,g,0,m+2/3,g+1,0,m,g+1,0];h.set(v,18*p),d.set(u,12*p);var y=[p,p,p,p,p,p];f.set(y,6*p)}var b=new _t;b.setAttribute("position",new tt(h,3)),b.setAttribute("uv",new tt(d,2)),b.setAttribute("faceIndex",new tt(f,1)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function eu(e){var t=new A(3*Dc,3*Dc,e);return t.texture.mapping=306,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function tu(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function nu(){return new Aa({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:new v(1,1)},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function ru(){return new Aa({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function iu(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom",this.closed=!0}function ou(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}function au(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}ss.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(ss.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Cs.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),iu.prototype=Object.create(ms.prototype),ou.prototype=Object.create(ms.prototype),au.prototype=Object.create(ms.prototype),Object.assign(au.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),hc.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},oc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ja.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ws.extractUrlBase(e)}}),Ja.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(Kl.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(R.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(q.prototype,{empty:function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()}}),tn.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Jl.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(g,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),g.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),g.ceilPowerOfTwo(e)}}),Object.assign(y.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},getInverse:function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Object.assign(te.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new T).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},getInverse:function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Re.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Object.assign(M.prototype,{multiplyVector3:function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},inverse:function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()}}),Object.assign(ee.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(He.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(He,{barycoordFromPoint:function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),He.getBarycoord(e,t,n,r,i)},normal:function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),He.getNormal(e,t,n,r)}}),Object.assign(Os.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new sa(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new pa(this,e)}}),Object.assign(v.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(E.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Me.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(Me.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(zt.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),Object.defineProperties(zt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(Bi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Yi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Gi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(ss.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),Yt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Rs.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(tt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),Object.assign(tt.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(_t.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new tt(arguments[1],arguments[2])))},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(_t.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(qs.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(e){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=e}}}),Object.defineProperties(Vl.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(e){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=e}}}),Object.defineProperties(vi.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),35048===this.usage},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),Object.assign(vi.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(sa.prototype,{getArrays:function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")}}),Object.assign(gi.prototype,{dispose:function(){console.error("THREE.Scene: .dispose() has been removed.")}}),Object.defineProperties(zl.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Ze.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ye}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Ta.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Ma.prototype,{transparency:{get:function(){return console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission},set:function(e){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission=e}}}),Object.defineProperties(qt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(di.prototype,{clearTarget:function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ei.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(A.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(bl.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new al).load(e,(function(e){t.setBuffer(e)})),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),Sl.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Kt.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Kt.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)};var su={merge:function(e,t,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}};b.crossOrigin=void 0,b.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new as;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new is;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},b.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var lu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"125"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="125"),t.ACESFilmicToneMapping=4,t.AddEquation=100,t.AddOperation=2,t.AdditiveAnimationBlendMode=2501,t.AdditiveBlending=2,t.AlphaFormat=1021,t.AlwaysDepth=1,t.AlwaysStencilFunc=519,t.AmbientLight=zs,t.AmbientLightProbe=ll,t.AnimationClip=Xa,t.AnimationLoader=ts,t.AnimationMixer=Fl,t.AnimationObjectGroup=jl,t.AnimationUtils=Da,t.ArcCurve=cs,t.ArrayCamera=oi,t.ArrowHelper=Oc,t.Audio=bl,t.AudioAnalyser=Sl,t.AudioContext=ol,t.AudioListener=yl,t.AudioLoader=al,t.AxesHelper=Rc,t.AxisHelper=function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Rc(e)},t.BackSide=1,t.BasicDepthPacking=3200,t.BasicShadowMap=0,t.BinaryTextureLoader=function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new os(e)},t.Bone=Wi,t.BooleanKeyframeTrack=za,t.BoundingBoxHelper=function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Sc(e,t)},t.Box2=Kl,t.Box3=R,t.Box3Helper=Mc,t.BoxBufferGeometry=Ut,t.BoxGeometry=Ut,t.BoxHelper=Sc,t.BufferAttribute=tt,t.BufferGeometry=_t,t.BufferGeometryLoader=Ys,t.ByteType=1010,t.Cache=Ka,t.Camera=Xt,t.CameraHelper=bc,t.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},t.CanvasTexture=xo,t.CatmullRomCurve3=ms,t.CineonToneMapping=3,t.CircleBufferGeometry=Eo,t.CircleGeometry=Eo,t.ClampToEdgeWrapping=1001,t.Clock=dl,t.ClosedSplineCurve3=iu,t.Color=Ye,t.ColorKeyframeTrack=Ha,t.CompressedTexture=wo,t.CompressedTextureLoader=ns,t.ConeBufferGeometry=So,t.ConeGeometry=So,t.CubeCamera=Kt,t.CubeReflectionMapping=301,t.CubeRefractionMapping=302,t.CubeTexture=Qt,t.CubeTextureLoader=is,t.CubeUVReflectionMapping=306,t.CubeUVRefractionMapping=307,t.CubicBezierCurve=bs,t.CubicBezierCurve3=ws,t.CubicInterpolant=Na,t.CullFaceBack=1,t.CullFaceFront=2,t.CullFaceFrontBack=3,t.CullFaceNone=0,t.Curve=ss,t.CurvePath=Ts,t.CustomBlending=5,t.CustomToneMapping=5,t.CylinderBufferGeometry=Ao,t.CylinderGeometry=Ao,t.Cylindrical=Xl,t.DataTexture=Jt,t.DataTexture2DArray=En,t.DataTexture3D=An,t.DataTextureLoader=os,t.DataUtils=Lc,t.DecrementStencilOp=7683,t.DecrementWrapStencilOp=34056,t.DefaultLoadingManager=Za,t.DepthFormat=1026,t.DepthStencilFormat=1027,t.DepthTexture=_o,t.DirectionalLight=Fs,t.DirectionalLightHelper=gc,t.DiscreteInterpolant=Ba,t.DodecahedronBufferGeometry=To,t.DodecahedronGeometry=To,t.DoubleSide=2,t.DstAlphaFactor=206,t.DstColorFactor=208,t.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new tt(e,t).setUsage(35048)},t.DynamicCopyUsage=35050,t.DynamicDrawUsage=35048,t.DynamicReadUsage=35049,t.EdgesGeometry=Po,t.EdgesHelper=function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new co(new Po(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.EllipseCurve=ls,t.EqualDepth=4,t.EqualStencilFunc=514,t.EquirectangularReflectionMapping=303,t.EquirectangularRefractionMapping=304,t.Euler=ce,t.EventDispatcher=h,t.ExtrudeBufferGeometry=sa,t.ExtrudeGeometry=sa,t.Face3=Ke,t.Face4=function(e,t,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Ke(e,t,n,i,o,a)},t.FaceColors=1,t.FileLoader=es,t.FlatShading=1,t.Float16BufferAttribute=ct,t.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ut(e,t)},t.Float32BufferAttribute=ut,t.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ht(e,t)},t.Float64BufferAttribute=ht,t.FloatType=1015,t.Fog=mi,t.FogExp2=pi,t.Font=nl,t.FontLoader=il,t.FrontSide=0,t.Frustum=tn,t.GLBufferAttribute=Ul,t.GLSL1="100",t.GLSL3="300 es",t.GammaEncoding=3007,t.GeometryUtils=su,t.GreaterDepth=6,t.GreaterEqualDepth=5,t.GreaterEqualStencilFunc=518,t.GreaterStencilFunc=516,t.GridHelper=hc,t.Group=ii,t.HalfFloatType=1016,t.HemisphereLight=ks,t.HemisphereLightHelper=uc,t.HemisphereLightProbe=sl,t.IcosahedronBufferGeometry=ca,t.IcosahedronGeometry=ca,t.ImageBitmapLoader=$s,t.ImageLoader=rs,t.ImageUtils=b,t.ImmediateRenderObject=$l,t.IncrementStencilOp=7682,t.IncrementWrapStencilOp=34055,t.InstancedBufferAttribute=Xs,t.InstancedBufferGeometry=qs,t.InstancedInterleavedBuffer=Hl,t.InstancedMesh=$i,t.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new ot(e,t)},t.Int16BufferAttribute=ot,t.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new st(e,t)},t.Int32BufferAttribute=st,t.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new nt(e,t)},t.Int8BufferAttribute=nt,t.IntType=1013,t.InterleavedBuffer=vi,t.InterleavedBufferAttribute=wi,t.Interpolant=Ia,t.InterpolateDiscrete=2300,t.InterpolateLinear=2301,t.InterpolateSmooth=2302,t.InvertStencilOp=5386,t.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")},t.KeepStencilOp=7680,t.KeyframeTrack=Fa,t.LOD=Bi,t.LatheBufferGeometry=ua,t.LatheGeometry=ua,t.Layers=de,t.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")},t.LessDepth=2,t.LessEqualDepth=3,t.LessEqualStencilFunc=515,t.LessStencilFunc=513,t.Light=Rs,t.LightProbe=Vs,t.Line=ao,t.Line3=Jl,t.LineBasicMaterial=eo,t.LineCurve=xs,t.LineCurve3=_s,t.LineDashedMaterial=Pa,t.LineLoop=uo,t.LinePieces=1,t.LineSegments=co,t.LineStrip=0,t.LinearEncoding=3e3,t.LinearFilter=1006,t.LinearInterpolant=ja,t.LinearMipMapLinearFilter=1008,t.LinearMipMapNearestFilter=1007,t.LinearMipmapLinearFilter=1008,t.LinearMipmapNearestFilter=1007,t.LinearToneMapping=1,t.Loader=Ja,t.LoaderUtils=Ws,t.LoadingManager=Qa,t.LogLuvEncoding=3003,t.LoopOnce=2200,t.LoopPingPong=2202,t.LoopRepeat=2201,t.LuminanceAlphaFormat=1025,t.LuminanceFormat=1024,t.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},t.Material=Ze,t.MaterialLoader=Gs,t.Math=g,t.MathUtils=g,t.Matrix3=y,t.Matrix4=te,t.MaxEquation=104,t.Mesh=zt,t.MeshBasicMaterial=Je,t.MeshDepthMaterial=Jr,t.MeshDistanceMaterial=$r,t.MeshFaceMaterial=function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},t.MeshLambertMaterial=Ra,t.MeshMatcapMaterial=ka,t.MeshNormalMaterial=Oa,t.MeshPhongMaterial=Ta,t.MeshPhysicalMaterial=Ma,t.MeshStandardMaterial=Sa,t.MeshToonMaterial=Ca,t.MinEquation=103,t.MirroredRepeatWrapping=1002,t.MixOperation=1,t.MultiMaterial=function(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e},t.MultiplyBlending=4,t.MultiplyOperation=0,t.NearestFilter=1003,t.NearestMipMapLinearFilter=1005,t.NearestMipMapNearestFilter=1004,t.NearestMipmapLinearFilter=1005,t.NearestMipmapNearestFilter=1004,t.NeverDepth=0,t.NeverStencilFunc=512,t.NoBlending=0,t.NoColors=0,t.NoToneMapping=0,t.NormalAnimationBlendMode=2500,t.NormalBlending=1,t.NotEqualDepth=7,t.NotEqualStencilFunc=517,t.NumberKeyframeTrack=Ua,t.Object3D=Me,t.ObjectLoader=Ks,t.ObjectSpaceNormalMap=1,t.OctahedronBufferGeometry=ha,t.OctahedronGeometry=ha,t.OneFactor=201,t.OneMinusDstAlphaFactor=207,t.OneMinusDstColorFactor=209,t.OneMinusSrcAlphaFactor=205,t.OneMinusSrcColorFactor=203,t.OrthographicCamera=js,t.PCFShadowMap=1,t.PCFSoftShadowMap=2,t.PMREMGenerator=Zc,t.ParametricBufferGeometry=da,t.ParametricGeometry=da,t.Particle=function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Di(e)},t.ParticleBasicMaterial=function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.ParticleSystem=function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new vo(e,t)},t.ParticleSystemMaterial=function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.Path=Cs,t.PerspectiveCamera=Yt,t.Plane=Re,t.PlaneBufferGeometry=on,t.PlaneGeometry=on,t.PlaneHelper=Tc,t.PointCloud=function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new vo(e,t)},t.PointCloudMaterial=function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.PointLight=Ns,t.PointLightHelper=ac,t.Points=vo,t.PointsMaterial=ho,t.PolarGridHelper=dc,t.PolyhedronBufferGeometry=Mo,t.PolyhedronGeometry=Mo,t.PositionalAudio=Al,t.PropertyBinding=Nl,t.PropertyMixer=Ml,t.QuadraticBezierCurve=Es,t.QuadraticBezierCurve3=As,t.Quaternion=M,t.QuaternionKeyframeTrack=Ga,t.QuaternionLinearInterpolant=Va,t.REVISION="125",t.RGBADepthPacking=3201,t.RGBAFormat=1023,t.RGBAIntegerFormat=1033,t.RGBA_ASTC_10x10_Format=37819,t.RGBA_ASTC_10x5_Format=37816,t.RGBA_ASTC_10x6_Format=37817,t.RGBA_ASTC_10x8_Format=37818,t.RGBA_ASTC_12x10_Format=37820,t.RGBA_ASTC_12x12_Format=37821,t.RGBA_ASTC_4x4_Format=37808,t.RGBA_ASTC_5x4_Format=37809,t.RGBA_ASTC_5x5_Format=37810,t.RGBA_ASTC_6x5_Format=37811,t.RGBA_ASTC_6x6_Format=37812,t.RGBA_ASTC_8x5_Format=37813,t.RGBA_ASTC_8x6_Format=37814,t.RGBA_ASTC_8x8_Format=37815,t.RGBA_BPTC_Format=36492,t.RGBA_ETC2_EAC_Format=37496,t.RGBA_PVRTC_2BPPV1_Format=35843,t.RGBA_PVRTC_4BPPV1_Format=35842,t.RGBA_S3TC_DXT1_Format=33777,t.RGBA_S3TC_DXT3_Format=33778,t.RGBA_S3TC_DXT5_Format=33779,t.RGBDEncoding=3006,t.RGBEEncoding=3002,t.RGBEFormat=1023,t.RGBFormat=1022,t.RGBIntegerFormat=1032,t.RGBM16Encoding=3005,t.RGBM7Encoding=3004,t.RGB_ETC1_Format=36196,t.RGB_ETC2_Format=37492,t.RGB_PVRTC_2BPPV1_Format=35841,t.RGB_PVRTC_4BPPV1_Format=35840,t.RGB_S3TC_DXT1_Format=33776,t.RGFormat=1030,t.RGIntegerFormat=1031,t.RawShaderMaterial=Aa,t.Ray=ee,t.Raycaster=Vl,t.RectAreaLight=Hs,t.RedFormat=1028,t.RedIntegerFormat=1029,t.ReinhardToneMapping=2,t.RepeatWrapping=1e3,t.ReplaceStencilOp=7681,t.ReverseSubtractEquation=102,t.RingBufferGeometry=fa,t.RingGeometry=fa,t.SRGB8_ALPHA8_ASTC_10x10_Format=37851,t.SRGB8_ALPHA8_ASTC_10x5_Format=37848,t.SRGB8_ALPHA8_ASTC_10x6_Format=37849,t.SRGB8_ALPHA8_ASTC_10x8_Format=37850,t.SRGB8_ALPHA8_ASTC_12x10_Format=37852,t.SRGB8_ALPHA8_ASTC_12x12_Format=37853,t.SRGB8_ALPHA8_ASTC_4x4_Format=37840,t.SRGB8_ALPHA8_ASTC_5x4_Format=37841,t.SRGB8_ALPHA8_ASTC_5x5_Format=37842,t.SRGB8_ALPHA8_ASTC_6x5_Format=37843,t.SRGB8_ALPHA8_ASTC_6x6_Format=37844,t.SRGB8_ALPHA8_ASTC_8x5_Format=37845,t.SRGB8_ALPHA8_ASTC_8x6_Format=37846,t.SRGB8_ALPHA8_ASTC_8x8_Format=37847,t.Scene=gi,t.SceneUtils=lu,t.ShaderChunk=an,t.ShaderLib=ln,t.ShaderMaterial=qt,t.ShadowMaterial=Ea,t.Shape=Os,t.ShapeBufferGeometry=pa,t.ShapeGeometry=pa,t.ShapePath=el,t.ShapeUtils=ia,t.ShortType=1011,t.Skeleton=Yi,t.SkeletonHelper=oc,t.SkinnedMesh=Gi,t.SmoothShading=2,t.Sphere=q,t.SphereBufferGeometry=ma,t.SphereGeometry=ma,t.Spherical=ql,t.SphericalHarmonics3=Us,t.Spline=au,t.SplineCurve=Ss,t.SplineCurve3=ou,t.SpotLight=Ds,t.SpotLightHelper=tc,t.Sprite=Di,t.SpriteMaterial=xi,t.SrcAlphaFactor=204,t.SrcAlphaSaturateFactor=210,t.SrcColorFactor=202,t.StaticCopyUsage=35046,t.StaticDrawUsage=35044,t.StaticReadUsage=35045,t.StereoCamera=hl,t.StreamCopyUsage=35042,t.StreamDrawUsage=35040,t.StreamReadUsage=35041,t.StringKeyframeTrack=Wa,t.SubtractEquation=101,t.SubtractiveBlending=3,t.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},t.TangentSpaceNormalMap=0,t.TetrahedronBufferGeometry=ga,t.TetrahedronGeometry=ga,t.TextBufferGeometry=va,t.TextGeometry=va,t.Texture=x,t.TextureLoader=as,t.TorusBufferGeometry=ya,t.TorusGeometry=ya,t.TorusKnotBufferGeometry=ba,t.TorusKnotGeometry=ba,t.Triangle=He,t.TriangleFanDrawMode=2,t.TriangleStripDrawMode=1,t.TrianglesDrawMode=0,t.TubeBufferGeometry=wa,t.TubeGeometry=wa,t.UVMapping=300,t.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new at(e,t)},t.Uint16BufferAttribute=at,t.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new lt(e,t)},t.Uint32BufferAttribute=lt,t.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new rt(e,t)},t.Uint8BufferAttribute=rt,t.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new it(e,t)},t.Uint8ClampedBufferAttribute=it,t.Uniform=zl,t.UniformsLib=sn,t.UniformsUtils=Wt,t.UnsignedByteType=1009,t.UnsignedInt248Type=1020,t.UnsignedIntType=1014,t.UnsignedShort4444Type=1017,t.UnsignedShort5551Type=1018,t.UnsignedShort565Type=1019,t.UnsignedShortType=1012,t.VSMShadowMap=3,t.Vector2=v,t.Vector3=T,t.Vector4=E,t.VectorKeyframeTrack=qa,t.Vertex=function(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new T(e,t,n)},t.VertexColors=2,t.VideoTexture=bo,t.WebGL1Renderer=fi,t.WebGLCubeRenderTarget=Zt,t.WebGLMultisampleRenderTarget=S,t.WebGLRenderTarget=A,t.WebGLRenderTargetCube=function(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Zt(e,n)},t.WebGLRenderer=di,t.WebGLUtils=ri,t.WireframeGeometry=xa,t.WireframeHelper=function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new co(new xa(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.WrapAroundEnding=2402,t.XHRLoader=function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new es(e)},t.ZeroCurvatureEnding=2400,t.ZeroFactor=200,t.ZeroSlopeEnding=2401,t.ZeroStencilOp=0,t.sRGBEncoding=3001,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],58:[function(e,t,n){THREE.DRACOLoader=function(e){THREE.Loader.call(this,e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}},THREE.DRACOLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.DRACOLoader,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(e,t,n,r){var i=new THREE.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{var n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)},decodeDracoFile:function(e,t,n,r){var i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)},decodeGeometry:function(e,t){for(var n in t.attributeTypes){var r=t.attributeTypes[n];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[n]=r.name)}var i,o=JSON.stringify(t);if(THREE.DRACOLoader.taskCache.has(e)){var a=THREE.DRACOLoader.taskCache.get(e);if(a.key===o)return a.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var s=this.workerNextTaskID++,l=e.byteLength,c=this._getWorker(s,l).then(n=>(i=n,new Promise((n,r)=>{i._callbacks[s]={resolve:n,reject:r},i.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return c.catch(()=>!0).then(()=>{i&&s&&this._releaseTask(i,s)}),THREE.DRACOLoader.taskCache.set(e,{key:o,promise:c}),c},_createGeometry:function(e){var t=new THREE.BufferGeometry;e.index&&t.setIndex(new THREE.BufferAttribute(e.index.array,1));for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n],i=r.name,o=r.array,a=r.itemSize;t.setAttribute(i,new THREE.BufferAttribute(o,a))}return t},_loadLibrary:function(e,t){var n=new THREE.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((t,r)=>{n.load(e,t,void 0,r)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e="object"!==typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{var n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=THREE.DRACOLoader.DRACOWorker.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then(()=>{var n;return this.workerPool.length<this.workerLimit?((n=new Worker(this.workerSourceURL))._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:"init",decoderConfig:this.decoderConfig}),n.onmessage=function(e){var t=e.data;switch(t.type){case"decode":n._callbacks[t.id].resolve(t);break;case"error":n._callbacks[t.id].reject(t);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+t.type+'"')}},this.workerPool.push(n)):this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1})),(n=this.workerPool[this.workerPool.length-1])._taskCosts[e]=t,n._taskLoad+=t,n})},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),THREE.DRACOLoader.DRACOWorker=function(){var e,t;function n(e,t,n,r,i,o){var a=o.num_components(),s=n.num_points()*a,l=s*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);var h=new i(e.HEAPF32.buffer,u,s).slice();return e._free(u),{name:r,array:h,itemSize:a}}onmessage=function(r){var i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":var o=i.buffer,a=i.taskConfig;t.then(e=>{var t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(o),o.byteLength);try{var l=function(e,t,r,i){var o,a,s=i.attributeIDs,l=i.attributeTypes,c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,a=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,o)}if(!a.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());var u={index:null,attributes:[]};for(var h in s){var d,f,p=self[l[h]];if(i.useUniqueIDs)f=s[h],d=t.GetAttributeByUniqueId(o,f);else{if(-1===(f=t.GetAttributeId(o,e[s[h]])))continue;d=t.GetAttribute(o,f)}u.attributes.push(n(e,t,o,h,p,d))}return c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){var r=3*n.num_faces(),i=4*r,o=e._malloc(i);t.GetTrianglesUInt32Array(n,i,o);var a=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:a,itemSize:1}}(e,t,o)),e.destroy(o),u}(t,r,s,a),c=l.attributes.map(e=>e.array.buffer);l.index&&c.push(l.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:l},c)}catch(u){console.error(u),self.postMessage({type:"error",id:i.id,error:u.message})}finally{t.destroy(s),t.destroy(r)}})}}},THREE.DRACOLoader.taskCache=new WeakMap,THREE.DRACOLoader.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},THREE.DRACOLoader.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},THREE.DRACOLoader.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},THREE.DRACOLoader.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")}},{}],59:[function(t,n,r){THREE.GLTFLoader=function(){function t(e){THREE.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new s(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new o(e)})),this.register((function(e){return new h(e)}))}function n(){var e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}t.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:t,load:function(t,n,r,i){var o,a=this;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),this.manager.itemStart(t);var s=function(e){i?i(e):console.error(e),a.manager.itemError(t),a.manager.itemEnd(t)},l=new THREE.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,(function(r){try{a.parse(r,o,(function(e){n(e),a.manager.itemEnd(t)}),s)}catch(e){s(e)}}),r,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},setKTX2Loader:function(e){return this.ktx2Loader=e,this},setMeshoptDecoder:function(e){return this.meshoptDecoder=e,this},register:function(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this},unregister:function(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this},parse:function(e,t,n,o){var s,l={},c={};if("string"===typeof e)s=e;else if(THREE.LoaderUtils.decodeText(new Uint8Array(e,0,4))===d){try{l[r.KHR_BINARY_GLTF]=new m(e)}catch(_){return void(o&&o(_))}s=l[r.KHR_BINARY_GLTF].content}else s=THREE.LoaderUtils.decodeText(new Uint8Array(e));var u=JSON.parse(s);if(void 0===u.asset||u.asset.version[0]<2)o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));else{var h=new W(u,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});h.fileLoader.setRequestHeader(this.requestHeader);for(var f=0;f<this.pluginCallbacks.length;f++){var p=this.pluginCallbacks[f](h);c[p.name]=p,l[p.name]=!0}if(u.extensionsUsed)for(f=0;f<u.extensionsUsed.length;++f){var y=u.extensionsUsed[f],x=u.extensionsRequired||[];switch(y){case r.KHR_MATERIALS_UNLIT:l[y]=new a;break;case r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:l[y]=new b;break;case r.KHR_DRACO_MESH_COMPRESSION:l[y]=new g(u,this.dracoLoader);break;case r.MSFT_TEXTURE_DDS:l[y]=new i(this.ddsLoader);break;case r.KHR_TEXTURE_TRANSFORM:l[y]=new v;break;case r.KHR_MESH_QUANTIZATION:l[y]=new w;break;default:x.indexOf(y)>=0&&void 0===c[y]&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}h.setExtensions(l),h.setPlugins(c),h.parse(n,o)}}});var r={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function i(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=r.MSFT_TEXTURE_DDS,this.ddsLoader=e}function o(e){this.parser=e,this.name=r.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}function a(){this.name=r.KHR_MATERIALS_UNLIT}function s(e){this.parser=e,this.name=r.KHR_MATERIALS_CLEARCOAT}function l(e){this.parser=e,this.name=r.KHR_MATERIALS_TRANSMISSION}function c(e){this.parser=e,this.name=r.KHR_TEXTURE_BASISU}function u(e){this.parser=e,this.name=r.EXT_TEXTURE_WEBP,this.isSupported=null}function h(e){this.name=r.EXT_MESHOPT_COMPRESSION,this.parser=e}o.prototype._markDefs=function(){for(var e=this.parser,t=this.parser.json.nodes||[],n=0,r=t.length;n<r;n++){var i=t[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&e._addNodeRef(this.cache,i.extensions[this.name].light)}},o.prototype._loadLight=function(e){var t=this.parser,n="light:"+e,r=t.cache.get(n);if(r)return r;var i,o=t.json,a=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e],s=new THREE.Color(16777215);void 0!==a.color&&s.fromArray(a.color);var l=void 0!==a.range?a.range:0;switch(a.type){case"directional":(i=new THREE.DirectionalLight(s)).target.position.set(0,0,-1),i.add(i.target);break;case"point":(i=new THREE.PointLight(s)).distance=l;break;case"spot":(i=new THREE.SpotLight(s)).distance=l,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,i.angle=a.spot.outerConeAngle,i.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,i.target.position.set(0,0,-1),i.add(i.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return i.position.set(0,0,0),i.decay=2,void 0!==a.intensity&&(i.intensity=a.intensity),i.name=t.createUniqueName(a.name||"light_"+e),r=Promise.resolve(i),t.cache.add(n,r),r},o.prototype.createNodeAttachment=function(e){var t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))},a.prototype.getMaterialType=function(){return THREE.MeshBasicMaterial},a.prototype.extendParams=function(e,t,n){var r=[];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;e.color.fromArray(o),e.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture))}return Promise.all(r)},s.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},s.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){var a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new THREE.Vector2(a,-a)}return Promise.all(i)},l.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},l.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)},c.prototype.loadTexture=function(e){var t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;var i=r.extensions[this.name],o=n.images[i.source],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o,a)},u.prototype.loadTexture=function(e){var t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;var o=i.extensions[t],a=r.images[o.source],s=a.uri?n.options.manager.getHandler(a.uri):n.textureLoader;return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))},u.prototype.detectSupport=function(){return this.isSupported||(this.isSupported=new Promise((function(e){var t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported},h.prototype.loadBufferView=function(e){var t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){var r=n.extensions[this.name],i=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return Promise.all([i,o.ready]).then((function(e){var t=r.byteOffset||0,n=r.byteLength||0,i=r.count,a=r.byteStride,s=new ArrayBuffer(i*a),l=new Uint8Array(e[0],t,n);return o.decodeGltfBuffer(new Uint8Array(s),i,a,l,r.mode,r.filter),s}))}return null};var d="glTF",f=1313821514,p=5130562;function m(e){this.name=r.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,12);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==d)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=this.header.length-12,i=new DataView(e,12),o=0;o<n;){var a=i.getUint32(o,!0);o+=4;var s=i.getUint32(o,!0);if(o+=4,s===f){var l=new Uint8Array(e,12+o,a);this.content=THREE.LoaderUtils.decodeText(l)}else if(s===p){var c=12+o;this.body=e.slice(c,c+a)}o+=a}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}function g(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=r.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}function v(){this.name=r.KHR_TEXTURE_TRANSFORM}function y(e){THREE.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),a={specular:{value:(new THREE.Color).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=a,this.onBeforeCompile=function(e){for(var s in a)e.uniforms[s]=a[s];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return a.specular.value},set:function(e){a.specular.value=e}},specularMap:{get:function(){return a.specularMap.value},set:function(e){a.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return a.glossiness.value},set:function(e){a.glossiness.value=e}},glossinessMap:{get:function(){return a.glossinessMap.value},set:function(e){a.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}function b(){return{name:r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return y},extendParams:function(e,t,n){var r=t.extensions[this.name];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=[];if(Array.isArray(r.diffuseFactor)){var o=r.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new THREE.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var a=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",a)),i.push(n.assignTexture(e,"specularMap",a))}return Promise.all(i)},createMaterial:function(e){var t=new y(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=THREE.TangentSpaceNormalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}}function w(){this.name=r.KHR_MESH_QUANTIZATION}function x(e,t,n,r){THREE.Interpolant.call(this,e,t,n,r)}g.prototype.decodePrimitive=function(e,t){var n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},s={},l={};for(var c in o){var u=L[c]||c.toLowerCase();a[u]=o[c]}for(c in e.attributes)if(u=L[c]||c.toLowerCase(),void 0!==o[c]){var h=n.accessors[e.attributes[c]],d=O[h.componentType];l[u]=d,s[u]=!0===h.normalized}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(var n in e.attributes){var r=e.attributes[n],i=s[n];void 0!==i&&(r.normalized=i)}t(e)}),a,l)}))}))},v.prototype.extendTexture=function(e,t){return e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e},y.prototype=Object.create(THREE.MeshStandardMaterial.prototype),y.prototype.constructor=y,y.prototype.copy=function(e){return THREE.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this},x.prototype=Object.create(THREE.Interpolant.prototype),x.prototype.constructor=x,x.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,o=0;o!==r;o++)t[o]=n[i+o];return t},x.prototype.beforeStart_=x.prototype.copySampleValue_,x.prototype.afterEnd_=x.prototype.copySampleValue_,x.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,l=3*a,c=r-t,u=(n-t)/c,h=u*u,d=h*u,f=e*l,p=f-l,m=-2*d+3*h,g=d-h,v=1-m,y=g-h+u,b=0;b!==a;b++){var w=o[p+b+a],x=o[p+b+s]*c,_=o[f+b+a],E=o[f+b]*c;i[b]=v*w+y*x+m*_+g*E}return i};var _=0,E=1,A=2,S=3,M=4,T=5,C=6,O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},R={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipmapNearestFilter,9985:THREE.LinearMipmapNearestFilter,9986:THREE.NearestMipmapLinearFilter,9987:THREE.LinearMipmapLinearFilter},k={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},P={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},D={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I={CUBICSPLINE:void 0,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},N="OPAQUE",j="MASK",B="BLEND";function F(e,t){return"string"!==typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function z(e,t,n){for(var r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function H(e,t){void 0!==t.extras&&("object"===typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function U(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length)for(e.morphTargetDictionary={},n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n;else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function V(e){var t=e.extensions&&e.extensions[r.KHR_DRACO_MESH_COMPRESSION];return t?"draco:"+t.bufferView+":"+t.indices+":"+G(t.attributes):e.indices+":"+G(e.attributes)+":"+e.mode}function G(e){for(var t="",n=Object.keys(e).sort(),r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function W(e,t){this.json=e||{},this.extensions={},this.plugins={},this.options=t||{},this.cache=new n,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.nodeNamesUsed={},"undefined"!==typeof createImageBitmap&&!1===/Firefox/.test(navigator.userAgent)?this.textureLoader=new THREE.ImageBitmapLoader(this.options.manager):this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}function q(e,t,n){var r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(var a in r){var s=L[a]||a.toLowerCase();s in e.attributes||i.push(o(r[a],s))}if(void 0!==t.indices&&!e.index){var l=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(l)}return H(e,t),function(e,t,n){var r=t.attributes,i=new THREE.Box3;if(void 0!==r.POSITION){var o=(d=n.json.accessors[r.POSITION]).min,a=d.max;if(void 0!==o&&void 0!==a){i.set(new THREE.Vector3(o[0],o[1],o[2]),new THREE.Vector3(a[0],a[1],a[2]));var s=t.targets;if(void 0!==s){for(var l=new THREE.Vector3,c=new THREE.Vector3,u=0,h=s.length;u<h;u++){var d,f=s[u];void 0!==f.POSITION&&(o=(d=n.json.accessors[f.POSITION]).min,a=d.max,void 0!==o&&void 0!==a?(c.setX(Math.max(Math.abs(o[0]),Math.abs(a[0]))),c.setY(Math.max(Math.abs(o[1]),Math.abs(a[1]))),c.setZ(Math.max(Math.abs(o[2]),Math.abs(a[2]))),l.max(c)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION."))}i.expandByVector(l)}e.boundingBox=i;var p=new THREE.Sphere;i.getCenter(p.center),p.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=p}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){for(var r=!1,i=!1,o=0,a=t.length;o<a&&(void 0!==(c=t[o]).POSITION&&(r=!0),void 0!==c.NORMAL&&(i=!0),!r||!i);o++);if(!r&&!i)return Promise.resolve(e);var s=[],l=[];for(o=0,a=t.length;o<a;o++){var c=t[o];if(r){var u=void 0!==c.POSITION?n.getDependency("accessor",c.POSITION):e.attributes.position;s.push(u)}i&&(u=void 0!==c.NORMAL?n.getDependency("accessor",c.NORMAL):e.attributes.normal,l.push(u))}return Promise.all([Promise.all(s),Promise.all(l)]).then((function(t){var n=t[0],o=t[1];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=o),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function X(e,t){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2===0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(s),l}return W.prototype.setExtensions=function(e){this.extensions=e},W.prototype.setPlugins=function(e){this.plugins=e},W.prototype.parse=function(e,t){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then((function(t){var o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};z(i,o,r),H(o,r),e(o)})).catch(t)},W.prototype._markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r=0,i=t.length;r<i;r++)for(var o=t[r].joints,a=0,s=o.length;a<s;a++)e[o[a]].isBone=!0;for(var l=0,c=e.length;l<c;l++){var u=e[l];void 0!==u.mesh&&(this._addNodeRef(this.meshCache,u.mesh),void 0!==u.skin&&(n[u.mesh].isSkinnedMesh=!0)),void 0!==u.camera&&this._addNodeRef(this.cameraCache,u.camera)}},W.prototype._addNodeRef=function(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)},W.prototype._getNodeRef=function(e,t,n){if(e.refs[t]<=1)return n;var r=n.clone();return r.name+="_instance_"+e.uses[t]++,r},W.prototype._invokeOne=function(e){var t=Object.values(this.plugins);t.push(this);for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}},W.prototype._invokeAll=function(e){var t=Object.values(this.plugins);t.unshift(this);for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);i&&n.push(i)}return n},W.prototype.getDependency=function(e,t){var n=e+":"+t,r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r},W.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t},W.prototype.loadBuffer=function(e){var t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[r.KHR_BINARY_GLTF].body);var i=this.options;return new Promise((function(e,r){n.load(F(t.uri,i.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))},W.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){var n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))},W.prototype.loadAccessor=function(e){var t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){var i,o,a=e[0],s=P[r.type],l=O[r.componentType],c=l.BYTES_PER_ELEMENT,u=c*s,h=r.byteOffset||0,d=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,f=!0===r.normalized;if(d&&d!==u){var p=Math.floor(h/d),m="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+p+":"+r.count,g=t.cache.get(m);g||(i=new l(a,p*d,r.count*d/c),g=new THREE.InterleavedBuffer(i,d/c),t.cache.add(m,g)),o=new THREE.InterleavedBufferAttribute(g,s,h%d/c,f)}else i=null===a?new l(r.count*s):new l(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,f);if(void 0!==r.sparse){var v=P.SCALAR,y=O[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,w=r.sparse.values.byteOffset||0,x=new y(e[1],b,r.sparse.count*v),_=new l(e[2],w,r.sparse.count*s);null!==a&&(o=new THREE.BufferAttribute(o.array.slice(),o.itemSize,o.normalized));for(var E=0,A=x.length;E<A;E++){var S=x[E];if(o.setX(S,_[E*s]),s>=2&&o.setY(S,_[E*s+1]),s>=3&&o.setZ(S,_[E*s+2]),s>=4&&o.setW(S,_[E*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))},W.prototype.loadTexture=function(e){var t,n,i=this.json,o=this.options,a=i.textures[e],s=a.extensions||{};return(t=s[r.MSFT_TEXTURE_DDS]?i.images[s[r.MSFT_TEXTURE_DDS].source]:i.images[a.source]).uri&&(n=o.manager.getHandler(t.uri)),n||(n=s[r.MSFT_TEXTURE_DDS]?this.extensions[r.MSFT_TEXTURE_DDS].ddsLoader:this.textureLoader),this.loadTextureImage(e,t,n)},W.prototype.loadTextureImage=function(e,t,n){var r=this,i=this.json,o=this.options,a=i.textures[e],s=self.URL||self.webkitURL,l=t.uri,c=!1,u=!0;return"image/jpeg"===t.mimeType&&(u=!1),void 0!==t.bufferView&&(l=r.getDependency("bufferView",t.bufferView).then((function(e){if("image/png"===t.mimeType){var n=new DataView(e,25,1).getUint8(0,!1);u=6===n||4===n||3===n}c=!0;var r=new Blob([e],{type:t.mimeType});return l=s.createObjectURL(r)}))),Promise.resolve(l).then((function(e){return new Promise((function(t,r){var i=t;!0===n.isImageBitmapLoader&&(i=function(e){t(new THREE.CanvasTexture(e))}),n.load(F(e,o.path),i,void 0,r)}))})).then((function(t){!0===c&&s.revokeObjectURL(l),t.flipY=!1,a.name&&(t.name=a.name),u||(t.format=THREE.RGBFormat);var n=(i.samplers||{})[a.sampler]||{};return t.magFilter=R[n.magFilter]||THREE.LinearFilter,t.minFilter=R[n.minFilter]||THREE.LinearMipmapLinearFilter,t.wrapS=k[n.wrapS]||THREE.RepeatWrapping,t.wrapT=k[n.wrapT]||THREE.RepeatWrapping,r.associations.set(t,{type:"textures",index:e}),t}))},W.prototype.assignTexture=function(e,t,n){var i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),i.extensions[r.KHR_TEXTURE_TRANSFORM]){var a=void 0!==n.extensions?n.extensions[r.KHR_TEXTURE_TRANSFORM]:void 0;if(a){var s=i.associations.get(o);o=i.extensions[r.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),i.associations.set(o,s)}}e[t]=o}))},W.prototype.assignFinalMaterial=function(e){var t=e.geometry,n=e.material,r=void 0!==t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal,a=!0===e.isSkinnedMesh,s=Object.keys(t.morphAttributes).length>0,l=s&&void 0!==t.morphAttributes.normal;if(e.isPoints){var c="PointsMaterial:"+n.uuid,u=this.cache.get(c);u||(u=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(u,n),u.color.copy(n.color),u.map=n.map,u.sizeAttenuation=!1,this.cache.add(c,u)),n=u}else if(e.isLine){c="LineBasicMaterial:"+n.uuid;var h=this.cache.get(c);h||(h=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(h,n),h.color.copy(n.color),this.cache.add(c,h)),n=h}if(r||i||o||a||s){c="ClonedMaterial:"+n.uuid+":",n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),a&&(c+="skinning:"),r&&(c+="vertex-tangents:"),i&&(c+="vertex-colors:"),o&&(c+="flat-shading:"),s&&(c+="morph-targets:"),l&&(c+="morph-normals:");var d=this.cache.get(c);d||(d=n.clone(),a&&(d.skinning=!0),i&&(d.vertexColors=!0),o&&(d.flatShading=!0),s&&(d.morphTargets=!0),l&&(d.morphNormals=!0),r&&(d.vertexTangents=!0,n.normalScale&&(n.normalScale.y*=-1),n.clearcoatNormalScale&&(n.clearcoatNormalScale.y*=-1)),this.cache.add(c,d),this.associations.set(d,this.associations.get(n))),n=d}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n},W.prototype.getMaterialType=function(){return THREE.MeshStandardMaterial},W.prototype.loadMaterial=function(e){var t,n=this,i=this.json,o=this.extensions,a=i.materials[e],s={},l=a.extensions||{},c=[];if(l[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var u=o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];t=u.getMaterialType(),c.push(u.extendParams(s,a,n))}else if(l[r.KHR_MATERIALS_UNLIT]){var h=o[r.KHR_MATERIALS_UNLIT];t=h.getMaterialType(),c.push(h.extendParams(s,a,n))}else{var d=a.pbrMetallicRoughness||{};if(s.color=new THREE.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var f=d.baseColorFactor;s.color.fromArray(f),s.opacity=f[3]}void 0!==d.baseColorTexture&&c.push(n.assignTexture(s,"map",d.baseColorTexture)),s.metalness=void 0!==d.metallicFactor?d.metallicFactor:1,s.roughness=void 0!==d.roughnessFactor?d.roughnessFactor:1,void 0!==d.metallicRoughnessTexture&&(c.push(n.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture))),t=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),c.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===a.doubleSided&&(s.side=THREE.DoubleSide);var p=a.alphaMode||N;return p===B?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,p===j&&(s.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new THREE.Vector2(1,-1),void 0!==a.normalTexture.scale&&s.normalScale.set(a.normalTexture.scale,-a.normalTexture.scale)),void 0!==a.occlusionTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(s.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==THREE.MeshBasicMaterial&&(s.emissive=(new THREE.Color).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&t!==THREE.MeshBasicMaterial&&c.push(n.assignTexture(s,"emissiveMap",a.emissiveTexture)),Promise.all(c).then((function(){var i;return i=t===y?o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new t(s),a.name&&(i.name=a.name),i.map&&(i.map.encoding=THREE.sRGBEncoding),i.emissiveMap&&(i.emissiveMap.encoding=THREE.sRGBEncoding),H(i,a),n.associations.set(i,{type:"materials",index:e}),a.extensions&&z(o,i,a),i}))},W.prototype.createUniqueName=function(e){for(var t=THREE.PropertyBinding.sanitizeNodeName(e||""),n=t,r=1;this.nodeNamesUsed[n];++r)n=t+"_"+r;return this.nodeNamesUsed[n]=!0,n},W.prototype.loadGeometries=function(e){var t=this,n=this.extensions,i=this.primitiveCache;function o(e){return n[r.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return q(n,e,t)}))}for(var a=[],s=0,l=e.length;s<l;s++){var c,u=e[s],h=V(u),d=i[h];d?a.push(d.promise):(c=u.extensions&&u.extensions[r.KHR_DRACO_MESH_COMPRESSION]?o(u):q(new THREE.BufferGeometry,u,t),i[h]={primitive:u,promise:c},a.push(c))}return Promise.all(a)},W.prototype.loadMesh=function(e){for(var t,n=this,r=this.json,i=this.extensions,o=r.meshes[e],a=o.primitives,s=[],l=0,c=a.length;l<c;l++){var u=void 0===a[l].material?(void 0===(t=this.cache).DefaultMaterial&&(t.DefaultMaterial=new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide})),t.DefaultMaterial):this.getDependency("material",a[l].material);s.push(u)}return s.push(n.loadGeometries(a)),Promise.all(s).then((function(t){for(var r=t.slice(0,t.length-1),s=t[t.length-1],l=[],c=0,u=s.length;c<u;c++){var h,d=s[c],f=a[c],p=r[c];if(f.mode===M||f.mode===T||f.mode===C||void 0===f.mode)h=!0===o.isSkinnedMesh?new THREE.SkinnedMesh(d,p):new THREE.Mesh(d,p),!0===p.isMeshStandardMaterial&&p.side===THREE.DoubleSide&&null!==d.getIndex()&&!0===d.hasAttribute("position")&&!0===d.hasAttribute("normal")&&!0===d.hasAttribute("uv")&&!1===d.hasAttribute("tangent")&&(d.computeTangents(),p.vertexTangents=!0),!0!==h.isSkinnedMesh||h.geometry.attributes.skinWeight.normalized||h.normalizeSkinWeights(),f.mode===T?h.geometry=X(h.geometry,THREE.TriangleStripDrawMode):f.mode===C&&(h.geometry=X(h.geometry,THREE.TriangleFanDrawMode));else if(f.mode===E)h=new THREE.LineSegments(d,p);else if(f.mode===S)h=new THREE.Line(d,p);else if(f.mode===A)h=new THREE.LineLoop(d,p);else{if(f.mode!==_)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+f.mode);h=new THREE.Points(d,p)}Object.keys(h.geometry.morphAttributes).length>0&&U(h,o),h.name=n.createUniqueName(o.name||"mesh_"+e),H(h,o),f.extensions&&z(i,h,f),n.assignFinalMaterial(h),l.push(h)}if(1===l.length)return l[0];var m=new THREE.Group;for(c=0,u=l.length;c<u;c++)m.add(l[c]);return m}))},W.prototype.loadCamera=function(e){var t,n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new THREE.PerspectiveCamera(THREE.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new THREE.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),H(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")},W.prototype.loadSkin=function(e){var t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))},W.prototype.loadAnimation=function(e){for(var t=this.json.animations[e],n=[],r=[],i=[],o=[],a=[],s=0,l=t.channels.length;s<l;s++){var c=t.channels[s],u=t.samplers[c.sampler],h=c.target,d=void 0!==h.node?h.node:h.id,f=void 0!==t.parameters?t.parameters[u.input]:u.input,p=void 0!==t.parameters?t.parameters[u.output]:u.output;n.push(this.getDependency("node",d)),r.push(this.getDependency("accessor",f)),i.push(this.getDependency("accessor",p)),o.push(u),a.push(h)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(a)]).then((function(n){for(var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=[],c=0,u=r.length;c<u;c++){var h=r[c],d=i[c],f=o[c],p=a[c],m=s[c];if(void 0!==h){var g;switch(h.updateMatrix(),h.matrixAutoUpdate=!0,D[m.path]){case D.weights:g=THREE.NumberKeyframeTrack;break;case D.rotation:g=THREE.QuaternionKeyframeTrack;break;case D.position:case D.scale:default:g=THREE.VectorKeyframeTrack}var v=h.name?h.name:h.uuid,y=void 0!==p.interpolation?I[p.interpolation]:THREE.InterpolateLinear,b=[];D[m.path]===D.weights?h.traverse((function(e){!0===e.isMesh&&e.morphTargetInfluences&&b.push(e.name?e.name:e.uuid)})):b.push(v);var w=f.array;if(f.normalized){var _;if(w.constructor===Int8Array)_=1/127;else if(w.constructor===Uint8Array)_=1/255;else if(w.constructor==Int16Array)_=1/32767;else{if(w.constructor!==Uint16Array)throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");_=1/65535}for(var E=new Float32Array(w.length),A=0,S=w.length;A<S;A++)E[A]=w[A]*_;w=E}for(A=0,S=b.length;A<S;A++){var M=new g(b[A]+"."+D[m.path],d.array,w,y);"CUBICSPLINE"===p.interpolation&&(M.createInterpolant=function(e){return new x(this.times,this.values,this.getValueSize()/3,e)},M.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(M)}}}var T=t.name?t.name:"animation_"+e;return new THREE.AnimationClip(T,void 0,l)}))},W.prototype.loadNode=function(e){var t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){var t=[];return void 0!==i.mesh&&t.push(r.getDependency("mesh",i.mesh).then((function(e){var t=r._getNodeRef(r.meshCache,i.mesh,e);return void 0!==i.weights&&t.traverse((function(e){if(e.isMesh)for(var t=0,n=i.weights.length;t<n;t++)e.morphTargetInfluences[t]=i.weights[t]})),t}))),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){var a;if((a=!0===i.isBone?new THREE.Bone:t.length>1?new THREE.Group:1===t.length?t[0]:new THREE.Object3D)!==t[0])for(var s=0,l=t.length;s<l;s++)a.add(t[s]);if(i.name&&(a.userData.name=i.name,a.name=o),H(a,i),i.extensions&&z(n,a,i),void 0!==i.matrix){var c=new THREE.Matrix4;c.fromArray(i.matrix),a.applyMatrix4(c)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);return r.associations.set(a,{type:"nodes",index:e}),a}))},W.prototype.loadScene=function(){function e(t,n,r,i){var o=r.nodes[t];return i.getDependency("node",t).then((function(e){return void 0===o.skin?e:i.getDependency("skin",o.skin).then((function(e){for(var n=[],r=0,o=(t=e).joints.length;r<o;r++)n.push(i.getDependency("node",t.joints[r]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(e.isMesh){for(var r=[],i=[],o=0,a=n.length;o<a;o++){var s=n[o];if(s){r.push(s);var l=new THREE.Matrix4;void 0!==t.inverseBindMatrices&&l.fromArray(t.inverseBindMatrices.array,16*o),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[o])}e.bind(new THREE.Skeleton(r,i),e.matrixWorld)}})),e}));var t})).then((function(t){n.add(t);var a=[];if(o.children)for(var s=o.children,l=0,c=s.length;l<c;l++){var u=s[l];a.push(e(u,t,r,i))}return Promise.all(a)}))}return function(t){var n=this.json,r=this.extensions,i=this.json.scenes[t],o=new THREE.Group;i.name&&(o.name=this.createUniqueName(i.name)),H(o,i),i.extensions&&z(r,o,i);for(var a=i.nodes||[],s=[],l=0,c=a.length;l<c;l++)s.push(e(a[l],o,n,this));return Promise.all(s).then((function(){return o}))}}(),t}()},{}],60:[function(t,n,r){THREE.MTLLoader=function(e){THREE.Loader.call(this,e)},THREE.MTLLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.MTLLoader,load:function(t,n,r,i){var o=this,a=""===this.path?THREE.LoaderUtils.extractUrlBase(t):this.path,s=new THREE.FileLoader(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(r){try{n(o.parse(r,a))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterialOptions:function(e){return this.materialOptions=e,this},parse:function(e,t){for(var n=e.split("\n"),r={},i=/\s+/,o={},a=0;a<n.length;a++){var s=n[a];if(0!==(s=s.trim()).length&&"#"!==s.charAt(0)){var l=s.indexOf(" "),c=l>=0?s.substring(0,l):s;c=c.toLowerCase();var u=l>=0?s.substring(l+1):"";if(u=u.trim(),"newmtl"===c)r={name:u},o[u]=r;else if("ka"===c||"kd"===c||"ks"===c||"ke"===c){var h=u.split(i,3);r[c]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else r[c]=u}}var d=new THREE.MTLLoader.MaterialCreator(this.resourcePath||t,this.materialOptions);return d.setCrossOrigin(this.crossOrigin),d.setManager(this.manager),d.setMaterials(o),d}}),THREE.MTLLoader.MaterialCreator=function(e,t){this.baseUrl=e||"",this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"anonymous",setCrossOrigin:function(e){return this.crossOrigin=e,this},setManager:function(e){this.manager=e},setMaterials:function(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(e){if(!this.options)return e;var t={};for(var n in e){var r=e[n],i={};for(var o in t[n]=i,r){var a=!0,s=r[o],l=o.toLowerCase();switch(l){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[l]=s)}}return t},preload:function(){for(var e in this.materialsInfo)this.create(e)},getIndex:function(e){return this.nameLookup[e]},getAsArray:function(){var e=0;for(var t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray},create:function(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]},createMaterial_:function(e){var t=this,n=this.materialsInfo[e],r={name:e,side:this.side};function i(e,n){if(!r[e]){var i,o,a=t.getTextureParams(n,r),s=t.loadTexture((i=t.baseUrl,"string"!==typeof(o=a.url)||""===o?"":/^https?:\/\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,r[e]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"ke":r.emissive=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"map_ke":i("emissiveMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"map_d":i("alphaMap",s),r.transparent=!0;break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[e]=new THREE.MeshPhongMaterial(r),this.materials[e]},getTextureParams:function(e,t){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=e.split(/\s+/);return(n=i.indexOf("-bm"))>=0&&(t.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(e,t,n,r,i){var o,a=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager,s=a.getHandler(e);return null===s&&(s=new THREE.TextureLoader(a)),s.setCrossOrigin&&s.setCrossOrigin(this.crossOrigin),o=s.load(e,n,r,i),void 0!==t&&(o.mapping=t),o}}},{}],61:[function(t,n,r){THREE.OBJLoader=function(){var t=/^[og]\s*(.+)?/,n=/^mtllib /,r=/^usemtl /,i=/^usemap /,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(){var e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);var n=this.object&&"function"===typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){var t={index:"number"===typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"===typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){var n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){var r=this.vertices,i=this.object.geometry.normals;o.fromArray(r,e),a.fromArray(r,t),s.fromArray(r,n),c.subVectors(s,a),l.subVectors(o,a),c.cross(l),c.normalize(),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z)},addColor:function(e,t,n){var r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){var e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,o,a,s,l){var c=this.vertices.length,u=this.parseVertexIndex(e,c),h=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(u,h,d),this.addColor(u,h,d),void 0!==a&&""!==a){var f=this.normals.length;u=this.parseNormalIndex(a,f),h=this.parseNormalIndex(s,f),d=this.parseNormalIndex(l,f),this.addNormal(u,h,d)}else this.addFaceNormal(u,h,d);if(void 0!==r&&""!==r){var p=this.uvs.length;u=this.parseUVIndex(r,p),h=this.parseUVIndex(i,p),d=this.parseUVIndex(o,p),this.addUV(u,h,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";for(var t=this.vertices.length,n=0,r=e.length;n<r;n++){var i=this.parseVertexIndex(e[n],t);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=e.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(e[i],n));var a=0;for(o=t.length;a<o;a++)this.addUVLine(this.parseUVIndex(t[a],r))}};return e.startObject("",!1),e}function h(e){THREE.Loader.call(this,e),this.materials=null}return h.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:h,load:function(t,n,r,i){var o=this,a=new THREE.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{n(o.parse(r))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterials:function(e){return this.materials=e,this},parse:function(e){var o=new u;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var a=e.split("\n"),s="",l="",c=[],h="function"===typeof"".trimLeft,d=0,f=a.length;d<f;d++)if(s=a[d],0!==(s=h?s.trimLeft():s.trim()).length&&"#"!==(l=s.charAt(0)))if("v"===l){var p=s.split(/\s+/);switch(p[0]){case"v":o.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?o.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6])):o.colors.push(void 0,void 0,void 0);break;case"vn":o.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":o.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===l){for(var m=s.substr(1).trim().split(/\s+/),g=[],v=0,y=m.length;v<y;v++){var b=m[v];if(b.length>0){var w=b.split("/");g.push(w)}}var x=g[0];for(v=1,y=g.length-1;v<y;v++){var _=g[v],E=g[v+1];o.addFace(x[0],_[0],E[0],x[1],_[1],E[1],x[2],_[2],E[2])}}else if("l"===l){var A=s.substring(1).trim().split(" "),S=[],M=[];if(-1===s.indexOf("/"))S=A;else for(var T=0,C=A.length;T<C;T++){var O=A[T].split("/");""!==O[0]&&S.push(O[0]),""!==O[1]&&M.push(O[1])}o.addLineGeometry(S,M)}else if("p"===l){var R=s.substr(1).trim().split(" ");o.addPointGeometry(R)}else if(null!==(c=t.exec(s))){var k=(" "+c[0].substr(1).trim()).substr(1);o.startObject(k)}else if(r.test(s))o.object.startMaterial(s.substring(7).trim(),o.materialLibraries);else if(n.test(s))o.materialLibraries.push(s.substring(7).trim());else if(i.test(s))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===l){if((c=s.split(" ")).length>1){var P=c[1].trim().toLowerCase();o.object.smooth="0"!==P&&"off"!==P}else o.object.smooth=!0;(W=o.object.currentMaterial())&&(W.smooth=o.object.smooth)}else{if("\0"===s)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+s+'"')}o.finalize();var L=new THREE.Group;if(L.materialLibraries=[].concat(o.materialLibraries),!0===!(1===o.objects.length&&0===o.objects[0].geometry.vertices.length))for(d=0,f=o.objects.length;d<f;d++){var D=o.objects[d],I=D.geometry,N=D.materials,j="Line"===I.type,B="Points"===I.type,F=!1;if(0!==I.vertices.length){(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(I.vertices,3)),I.normals.length>0&&K.setAttribute("normal",new THREE.Float32BufferAttribute(I.normals,3)),I.colors.length>0&&(F=!0,K.setAttribute("color",new THREE.Float32BufferAttribute(I.colors,3))),!0===I.hasUVIndices&&K.setAttribute("uv",new THREE.Float32BufferAttribute(I.uvs,2));for(var z,H=[],U=0,V=N.length;U<V;U++){var G=(Y=N[U]).name+"_"+Y.smooth+"_"+F,W=o.materials[G];if(null!==this.materials)if(W=this.materials.create(Y.name),!j||!W||W instanceof THREE.LineBasicMaterial){if(B&&W&&!(W instanceof THREE.PointsMaterial)){var q=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});THREE.Material.prototype.copy.call(q,W),q.color.copy(W.color),q.map=W.map,W=q}}else{var X=new THREE.LineBasicMaterial;THREE.Material.prototype.copy.call(X,W),X.color.copy(W.color),W=X}void 0===W&&((W=j?new THREE.LineBasicMaterial:B?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=Y.name,W.flatShading=!Y.smooth,W.vertexColors=F,o.materials[G]=W),H.push(W)}if(H.length>1){for(U=0,V=N.length;U<V;U++){var Y=N[U];K.addGroup(Y.groupStart,Y.groupCount,U)}z=j?new THREE.LineSegments(K,H):B?new THREE.Points(K,H):new THREE.Mesh(K,H)}else z=j?new THREE.LineSegments(K,H[0]):B?new THREE.Points(K,H[0]):new THREE.Mesh(K,H[0]);z.name=D.name,L.add(z)}}else if(o.vertices.length>0){var K;W=new THREE.PointsMaterial({size:1,sizeAttenuation:!1}),(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(o.vertices,3)),o.colors.length>0&&void 0!==o.colors[0]&&(K.setAttribute("color",new THREE.Float32BufferAttribute(o.colors,3)),W.vertexColors=!0);var Q=new THREE.Points(K,W);L.add(Q)}return L}}),h}()},{}],62:[function(e,t,n){THREE.BufferGeometryUtils={computeTangents:function(e){e.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(e,t){for(var n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),o={},a={},s=e[0].morphTargetsRelative,l=new THREE.BufferGeometry,c=0,u=0;u<e.length;++u){var h=e[u],d=0;if(n!==(null!==h.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var f in h.attributes){if(!r.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+'. All geometries must have compatible attributes; make sure "'+f+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[f]&&(o[f]=[]),o[f].push(h.attributes[f]),d++}if(d!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var f in h.morphAttributes){if(!i.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[f]&&(a[f]=[]),a[f].push(h.morphAttributes[f])}if(l.userData.mergedUserData=l.userData.mergedUserData||[],l.userData.mergedUserData.push(h.userData),t){var p;if(n)p=h.index.count;else{if(void 0===h.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". The geometry must have either an index or a position attribute"),null;p=h.attributes.position.count}l.addGroup(c,p,u),c+=p}}if(n){var m=0,g=[];for(u=0;u<e.length;++u){for(var v=e[u].index,y=0;y<v.count;++y)g.push(v.getX(y)+m);m+=e[u].attributes.position.count}l.setIndex(g)}for(var f in o){var b=this.mergeBufferAttributes(o[f]);if(!b)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" attribute."),null;l.setAttribute(f,b)}for(var f in a){var w=a[f][0].length;if(0===w)break;for(l.morphAttributes=l.morphAttributes||{},l.morphAttributes[f]=[],u=0;u<w;++u){var x=[];for(y=0;y<a[f].length;++y)x.push(a[f][y][u]);var _=this.mergeBufferAttributes(x);if(!_)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" morphAttribute."),null;l.morphAttributes[f].push(_)}}return l},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}var s=new t(i),l=0;for(o=0;o<e.length;++o)s.set(e[o].array,l),l+=e[o].array.length;return new THREE.BufferAttribute(s,n,r)},interleaveAttributes:function(e){for(var t,n=0,r=0,i=0,o=e.length;i<o;++i){var a=e[i];if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=a.array.length,r+=a.itemSize}var s=new THREE.InterleavedBuffer(new t(n),r),l=0,c=[],u=["getX","getY","getZ","getW"],h=["setX","setY","setZ","setW"],d=0;for(o=e.length;d<o;d++){var f=(a=e[d]).itemSize,p=a.count,m=new THREE.InterleavedBufferAttribute(s,f,l,a.normalized);c.push(m),l+=f;for(var g=0;g<p;g++)for(var v=0;v<f;v++)m[h[v]](g,a[u[v]](g))}return c},estimateBytesUsed:function(e){var t=0;for(var n in e.attributes){var r=e.getAttribute(n);t+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}var i=e.getIndex();return t+=i?i.count*i.itemSize*i.array.BYTES_PER_ELEMENT:0},mergeVertices:function(e,t=1e-4){t=Math.max(t,Number.EPSILON);for(var n={},r=e.getIndex(),i=e.getAttribute("position"),o=r?r.count:i.count,a=0,s=Object.keys(e.attributes),l={},c={},u=[],h=["getX","getY","getZ","getW"],d=0,f=s.length;d<f;d++)l[b=s[d]]=[],(E=e.morphAttributes[b])&&(c[b]=new Array(E.length).fill().map(()=>[]));var p=Math.log10(1/t),m=Math.pow(10,p);for(d=0;d<o;d++){var g=r?r.getX(d):d,v="",y=0;for(f=s.length;y<f;y++)for(var b=s[y],w=(_=e.getAttribute(b)).itemSize,x=0;x<w;x++)v+=~~(_[h[x]](g)*m)+",";if(v in n)u.push(n[v]);else{for(y=0,f=s.length;y<f;y++){b=s[y];var _=e.getAttribute(b),E=e.morphAttributes[b],A=(w=_.itemSize,l[b]),S=c[b];for(x=0;x<w;x++){var M=h[x];if(A.push(_[M](g)),E)for(var T=0,C=E.length;T<C;T++)S[T].push(E[T][M](g))}}n[v]=a,u.push(a),a++}}const O=e.clone();for(d=0,f=s.length;d<f;d++){b=s[d];var R=e.getAttribute(b),k=new R.array.constructor(l[b]);if(_=new THREE.BufferAttribute(k,R.itemSize,R.normalized),O.setAttribute(b,_),b in c)for(y=0;y<c[b].length;y++){var P=e.morphAttributes[b][y],L=(k=new P.array.constructor(c[b][y]),new THREE.BufferAttribute(k,P.itemSize,P.normalized));O.morphAttributes[b][y]=L}}return O.setIndex(u),O},toTrianglesDrawMode:function(e,t){if(t===THREE.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===THREE.TriangleFanDrawMode||t===THREE.TriangleStripDrawMode){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(var o=0;o<i.count;o++)r.push(o);e.setIndex(r),n=e.getIndex()}var a=n.count-2,s=[];if(t===THREE.TriangleFanDrawMode)for(o=1;o<=a;o++)s.push(n.getX(0)),s.push(n.getX(o)),s.push(n.getX(o+1));else for(o=0;o<a;o++)o%2===0?(s.push(n.getX(o)),s.push(n.getX(o+1)),s.push(n.getX(o+2))):(s.push(n.getX(o+2)),s.push(n.getX(o+1)),s.push(n.getX(o)));s.length/3!==a&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(s),l.clearGroups(),l}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e},computeMorphedAttributes:function(e){if(!0!==e.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type THREE.BufferGeometry."),null;var t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Vector3,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(e,u,h,d,f,p,m,g,v){t.fromBufferAttribute(h,p),n.fromBufferAttribute(h,m),r.fromBufferAttribute(h,g);var y=e.morphTargetInfluences;if(u.morphTargets&&d&&y){s.set(0,0,0),l.set(0,0,0),c.set(0,0,0);for(var b=0,w=d.length;b<w;b++){var x=y[b];d=d[b],0!==x&&(i.fromBufferAttribute(d,p),o.fromBufferAttribute(d,m),a.fromBufferAttribute(d,g),f?(s.addScaledVector(i,x),l.addScaledVector(o,x),c.addScaledVector(a,x)):(s.addScaledVector(i.sub(t),x),l.addScaledVector(o.sub(n),x),c.addScaledVector(a.sub(r),x)))}t.add(s),n.add(l),r.add(c)}e.isSkinnedMesh&&(e.boneTransform(p,t),e.boneTransform(m,n),e.boneTransform(g,r)),v[3*p+0]=t.x,v[3*p+1]=t.y,v[3*p+2]=t.z,v[3*m+0]=n.x,v[3*m+1]=n.y,v[3*m+2]=n.z,v[3*g+0]=r.x,v[3*g+1]=r.y,v[3*g+2]=r.z}var h,d,f,p,m,g,v,y,b,w=e.geometry,x=e.material,_=w.index,E=w.attributes.position,A=w.morphAttributes.position,S=w.morphTargetsRelative,M=w.attributes.normal,T=w.morphAttributes.position,C=w.groups,O=w.drawRange,R=new Float32Array(E.count*E.itemSize),k=new Float32Array(M.count*M.itemSize);if(null!==_)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=_.getX(m),d=_.getX(m+1),f=_.getX(m+2),R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(_.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=_.getX(p),d=_.getX(p+1),f=_.getX(p+2),R),u(e,x,M,T,S,h,d,f,k);else if(void 0!==E)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=m,d=m+1,f=m+2,R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(E.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=p,d=p+1,f=p+2,R),u(e,x,M,T,S,h,d,f,k);return{positionAttribute:E,normalAttribute:M,morphedPositionAttribute:new THREE.Float32BufferAttribute(R,3),morphedNormalAttribute:new THREE.Float32BufferAttribute(k,3)}}}},{}],63:[function(e,t,n){var r=e("layout-bmfont-text"),i=e("inherits"),o=e("quad-indices"),a=e("three-buffer-vertex-data"),s=e("object-assign"),l=e("./lib/vertices"),c=e("./lib/utils"),u=THREE.BufferGeometry;function h(e){u.call(this),"string"===typeof e&&(e={text:e}),this._opt=s({},e),e&&this.update(e)}t.exports=function(e){return new h(e)},i(h,u),h.prototype.update=function(e){if("string"===typeof e&&(e={text:e}),!(e=s({},this._opt,e)).font)throw new TypeError("must specify a { font } in options");this.layout=r(e);var t=!1!==e.flipY,n=e.font,i=n.common.scaleW,c=n.common.scaleH,u=this.layout.glyphs.filter((function(e){var t=e.data;return t.width*t.height>0}));this.visibleGlyphs=u;var h=l.positions(u),d=l.uvs(u,i,c,t),f=o({clockwise:!0,type:"uint16",count:u.length});if(a.index(this,f,1,"uint16"),a.attr(this,"position",h,2),a.attr(this,"uv",d,2),!e.multipage&&"page"in this.attributes)this.removeAttribute("page");else if(e.multipage){var p=l.pages(u);a.attr(this,"page",p,1)}},h.prototype.computeBoundingSphere=function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var e=this.attributes.position.array,t=this.attributes.position.itemSize;if(!e||!t||e.length<2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);c.computeSphere(e,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.')},h.prototype.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var e=this.boundingBox,t=this.attributes.position.array,n=this.attributes.position.itemSize;!t||!n||t.length<2?e.makeEmpty():c.computeBox(t,e)}},{"./lib/utils":64,"./lib/vertices":65,inherits:30,"layout-bmfont-text":36,"object-assign":39,"quad-indices":51,"three-buffer-vertex-data":66}],64:[function(e,t,n){var r={min:[0,0],max:[0,0]};function i(e){var t=e.length/2;r.min[0]=e[0],r.min[1]=e[1],r.max[0]=e[0],r.max[1]=e[1];for(var n=0;n<t;n++){var i=e[2*n+0],o=e[2*n+1];r.min[0]=Math.min(i,r.min[0]),r.min[1]=Math.min(o,r.min[1]),r.max[0]=Math.max(i,r.max[0]),r.max[1]=Math.max(o,r.max[1])}}t.exports.computeBox=function(e,t){i(e),t.min.set(r.min[0],r.min[1],0),t.max.set(r.max[0],r.max[1],0)},t.exports.computeSphere=function(e,t){i(e);var n=r.min[0],o=r.min[1],a=r.max[0]-n,s=r.max[1]-o,l=Math.sqrt(a*a+s*s);t.center.set(n+a/2,o+s/2,0),t.radius=l/2}},{}],65:[function(e,t,n){t.exports.pages=function(e){var t=new Float32Array(4*e.length*1),n=0;return e.forEach((function(e){var r=e.data.page||0;t[n++]=r,t[n++]=r,t[n++]=r,t[n++]=r})),t},t.exports.uvs=function(e,t,n,r){var i=new Float32Array(4*e.length*2),o=0;return e.forEach((function(e){var a=e.data,s=a.x+a.width,l=a.y+a.height,c=a.x/t,u=a.y/n,h=s/t,d=l/n;r&&(u=(n-a.y)/n,d=(n-l)/n),i[o++]=c,i[o++]=u,i[o++]=c,i[o++]=d,i[o++]=h,i[o++]=d,i[o++]=h,i[o++]=u})),i},t.exports.positions=function(e){var t=new Float32Array(4*e.length*2),n=0;return e.forEach((function(e){var r=e.data,i=e.position[0]+r.xoffset,o=e.position[1]+r.yoffset,a=r.width,s=r.height;t[n++]=i,t[n++]=o,t[n++]=i,t[n++]=o+s,t[n++]=i+a,t[n++]=o+s,t[n++]=i+a,t[n++]=o})),t}},{}],66:[function(e,t,n){var r=e("flatten-vertex-data");function i(e,t,n,i){return t=r(t=t||[],i),(e=new THREE.BufferAttribute(t,n)).itemSize=n,e.needsUpdate=!0,e}t.exports.attr=function(e,t,n,r,o){if("number"!==typeof r&&(r=3),"string"!==typeof o&&(o="float32"),Array.isArray(n)&&Array.isArray(n[0])&&n[0].length!==r)throw new Error("Nested vertex array has unexpected size; expected "+r+" but found "+n[0].length);var a=i(e.getAttribute(t),n,r,o);e.setAttribute(t,a)},t.exports.index=function(e,t,n,r){"number"!==typeof n&&(n=1),"string"!==typeof r&&(r="uint16");var o=!e.index&&"function"!==typeof e.setIndex,a=i(o?e.getAttribute("index"):e.index,t,n,r);a&&(o?e.addAttribute("index",a):e.index=a)}},{"flatten-vertex-data":23}],67:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"===typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"===typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":49,timers:67}],68:[function(e,t,r){(function(e){!function(e,n){"object"===typeof r&&"undefined"!==typeof t?t.exports=n():e.WebVRPolyfill=n()}(this,(function(){"use strict";var t,n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},r=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},i=function(e,t){for(var n=0,r=e.length;n<r;n++)t[n]=e[n]},o=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},a=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(e,t,n){return e+(t-e)*n},i=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),o=function(){var e=-1!==navigator.userAgent.indexOf("Version")&&-1!==navigator.userAgent.indexOf("Android")&&-1!==navigator.userAgent.indexOf("Chrome");return function(){return e}}(),a=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),s=function(){var e=-1!==navigator.userAgent.indexOf("Firefox")&&-1!==navigator.userAgent.indexOf("Android");return function(){return e}}(),l=function(){var e=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),t=e?parseInt(e[1],10):null;return function(){return t}}(),c=function(){var e;return e=i()&&a()&&-1!==navigator.userAgent.indexOf("13_4"),function(){return e}}(),u=function(){var e=!1;if(65===l()){var n=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(n){var r=n[1].split("."),i=t(r,4),o=(i[0],i[1],i[2]),a=i[3];e=3325===parseInt(o,10)&&parseInt(a,10)<148}}return function(){return e}}(),h=function(){var e=-1!==navigator.userAgent.indexOf("R7 Build");return function(){return e}}(),d=function(){var e=90==window.orientation||-90==window.orientation;return h()?!e:e},f=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},p=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},m=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},g=function(e,t,n,r){var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t),e.compileShader(i);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();for(var s in e.attachShader(a,i),e.attachShader(a,o),r)e.bindAttribLocation(a,r[s],s);return e.linkProgram(a),e.deleteShader(i),e.deleteShader(o),a},v=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i="",o=0;o<r;o++)n[i=e.getActiveUniform(t,o).name.replace("[0]","")]=e.getUniformLocation(t,i);return n},y=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},b=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},w=function(e){if(i()){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t)+1+"px",e.style.height=parseInt(n)+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),100)}window.canvas=e},x=function(){var e=Math.PI/180,t=.25*Math.PI,n=new Float32Array([0,0,0,1]),r=new Float32Array([0,0,0]);function i(i,o,a,s,l,c){!function(n,r,i,o){var a=Math.tan(r?r.upDegrees*e:t),s=Math.tan(r?r.downDegrees*e:t),l=Math.tan(r?r.leftDegrees*e:t),c=Math.tan(r?r.rightDegrees*e:t),u=2/(l+c),h=2/(a+s);n[0]=u,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h,n[6]=0,n[7]=0,n[8]=-(l-c)*u*.5,n[9]=(a-s)*h*.5,n[10]=o/(i-o),n[11]=-1,n[12]=0,n[13]=0,n[14]=o*i/(i-o),n[15]=0}(i,s||null,c.depthNear,c.depthFar),function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,c=o+o,u=r*s,h=r*l,d=r*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,y=a*c;e[0]=1-(f+m),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+v,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1}(o,a.orientation||n,a.position||r),l&&function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*m+s*g+h*v+t[12],e[13]=i*m+l*g+d*v+t[13],e[14]=o*m+c*g+f*v+t[14],e[15]=a*m+u*g+p*v+t[15])}(o,o,l),function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,w=n*c-o*a,x=r*l-i*s,_=r*c-o*s,E=i*c-o*l,A=u*m-h*p,S=u*g-d*p,M=u*v-f*p,T=h*g-d*m,C=h*v-f*m,O=d*v-f*g,R=y*O-b*C+w*T+x*M-_*S+E*A;R&&(R=1/R,e[0]=(s*O-l*C+c*T)*R,e[1]=(i*C-r*O-o*T)*R,e[2]=(m*E-g*_+v*x)*R,e[3]=(d*_-h*E-f*x)*R,e[4]=(l*M-a*O-c*S)*R,e[5]=(n*O-i*M+o*S)*R,e[6]=(g*w-p*E-v*b)*R,e[7]=(u*E-d*w+f*b)*R,e[8]=(a*C-s*M+c*A)*R,e[9]=(r*M-n*C-o*A)*R,e[10]=(p*_-m*w+v*y)*R,e[11]=(h*w-u*_-f*y)*R,e[12]=(s*S-a*T-l*A)*R,e[13]=(n*T-r*S+i*A)*R,e[14]=(m*b-p*x-g*y)*R,e[15]=(u*x-h*b+d*y)*R)}(o,o)}return function(e,t,n){return!(!e||!t)&&(e.pose=t,e.timestamp=t.timestamp,i(e.leftProjectionMatrix,e.leftViewMatrix,t,n._getFieldOfView("left"),n._getEyeOffset("left"),n),i(e.rightProjectionMatrix,e.rightViewMatrix,t,n._getFieldOfView("right"),n._getEyeOffset("right"),n),!0)}}(),_=function(e){var t,n=e.indexOf("://");t=-1!==n?n+3:0;var r=e.indexOf("/",t);return-1===r&&(r=e.length),e.substring(0,r)},E=function(){var e={};return function(t,n){void 0===e[t]&&(console.warn("webvr-polyfill: "+n),e[t]=!0)}}(),A=function(e,t){E(e,e+" has been deprecated. This may not work on native WebVR displays. "+(t?"Please use "+t+" instead.":""))},S=function(e,t,n){if(t){for(var r=[],i=null,o=0;o<t.length;++o)switch(a=t[o]){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),r.push(null,null);break}i||(i=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(l),r.push(e.getParameter(a),null);break;case e.ACTIVE_TEXTURE:i=e.getParameter(e.ACTIVE_TEXTURE),r.push(null);break;default:r.push(e.getParameter(a))}for(n(e),o=0;o<t.length;++o){var a=t[o],s=r[o];switch(a){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,s);break;case e.COLOR_CLEAR_VALUE:e.clearColor(s[0],s[1],s[2],s[3]);break;case e.COLOR_WRITEMASK:e.colorMask(s[0],s[1],s[2],s[3]);break;case e.CURRENT_PROGRAM:e.useProgram(s);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,s);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,s);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,s);break;case e.TEXTURE_BINDING_2D:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_2D,s);break;case e.TEXTURE_BINDING_CUBE_MAP:var l;if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_CUBE_MAP,s);break;case e.VIEWPORT:e.viewport(s[0],s[1],s[2],s[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:s?e.enable(a):e.disable(a);break;default:console.log("No GL restore behavior for 0x"+a.toString(16))}i&&e.activeTexture(i)}}else n(e)},M=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),T=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");function C(e,t,n,r){this.gl=e,this.cardboardUI=t,this.bufferScale=n,this.dirtySubmitFrameBindings=r,this.ctxAttribs=e.getContextAttributes(),this.instanceExt=e.getExtension("ANGLE_instanced_arrays"),this.meshWidth=20,this.meshHeight=20,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,i()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=g(e,M,T,this.attribs),this.uniforms=v(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize()}C.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},C.prototype.onResize=function(){var e=this.gl,t=this,n=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)})),this.cardboardUI&&this.cardboardUI.onResize()},C.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,n=this.gl;i()||(t.width=f()*this.bufferScale,t.height=p()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(n){e.bufferWidth=n,e.realCanvasWidth.set.call(t,n),e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(n){e.bufferHeight=n,e.realCanvasHeight.set.call(t,n),e.onResize()}})),this.lastBoundFramebuffer=n.getParameter(n.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,r){e.lastBoundFramebuffer=r||e.framebuffer,e.realBindFramebuffer.call(n,t,e.lastBoundFramebuffer)},this.cullFace=n.getParameter(n.CULL_FACE),this.depthTest=n.getParameter(n.DEPTH_TEST),this.blend=n.getParameter(n.BLEND),this.scissorTest=n.getParameter(n.SCISSOR_TEST),this.stencilTest=n.getParameter(n.STENCIL_TEST),n.enable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!0;break;case n.DEPTH_TEST:e.depthTest=!0;break;case n.BLEND:e.blend=!0;break;case n.SCISSOR_TEST:e.scissorTest=!0;break;case n.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(n,t)},n.disable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!1;break;case n.DEPTH_TEST:e.depthTest=!1;break;case n.BLEND:e.blend=!1;break;case n.SCISSOR_TEST:e.scissorTest=!1;break;case n.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(n,t)},this.colorMask=n.getParameter(n.COLOR_WRITEMASK),n.colorMask=function(t,r,i,o){e.colorMask[0]=t,e.colorMask[1]=r,e.colorMask[2]=i,e.colorMask[3]=o,e.realColorMask.call(n,t,r,i,o)},this.clearColor=n.getParameter(n.COLOR_CLEAR_VALUE),n.clearColor=function(t,r,i,o){e.clearColor[0]=t,e.clearColor[1]=r,e.clearColor[2]=i,e.clearColor[3]=o,e.realClearColor.call(n,t,r,i,o)},this.viewport=n.getParameter(n.VIEWPORT),n.viewport=function(t,r,i,o){e.viewport[0]=t,e.viewport[1]=r,e.viewport[2]=i,e.viewport[3]=o,e.realViewport.call(n,t,r,i,o)},this.isPatched=!0,w(t)}},C.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;i()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout((function(){w(t)}),1)}},C.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},C.prototype.submitFrame=function(){var e=this.gl,t=this,n=[];if(this.dirtySubmitFrameBindings||n.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);var n=0,r=0;t.instanceExt&&(n=e.getVertexAttrib(t.attribs.position,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),r=e.getVertexAttrib(t.attribs.texCoord,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE)),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||i())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,0),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,0)),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.dirtySubmitFrameBindings||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,n),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,r))})),i()){var r=e.canvas;r.width==t.bufferWidth&&r.height==t.bufferHeight||(t.bufferWidth=r.width,t.bufferHeight=r.height,t.onResize())}},C.prototype.updateDeviceInfo=function(e){var t=this.gl,n=this,r=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];S(t,r,(function(t){var r=n.computeMeshVertices_(n.meshWidth,n.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,n.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,r,t.STATIC_DRAW),!n.indexCount){var i=n.computeMeshIndices_(n.meshWidth,n.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,i,t.STATIC_DRAW),n.indexCount=i.length}}))},C.prototype.computeMeshVertices_=function(e,t,n){for(var i=new Float32Array(2*e*t*5),o=n.getLeftEyeVisibleTanAngles(),a=n.getLeftEyeNoLensTanAngles(),s=n.getLeftEyeVisibleScreenRect(a),l=0,c=0;c<2;c++){for(var u=0;u<t;u++)for(var h=0;h<e;h++,l++){var d=h/(e-1),f=u/(t-1),p=d,m=f,g=r(o[0],o[2],d),v=r(o[3],o[1],f),y=Math.sqrt(g*g+v*v),b=n.distortion.distortInverse(y),w=v*b/y;d=(g*b/y-a[0])/(a[2]-a[0]),f=(w-a[3])/(a[1]-a[3]),d=2*(s.x+d*s.width-.5),f=2*(s.y+f*s.height-.5),i[5*l+0]=d,i[5*l+1]=f,i[5*l+2]=p,i[5*l+3]=m,i[5*l+4]=c}var x=o[2]-o[0];o[0]=-(x+o[0]),o[2]=x-o[2],x=a[2]-a[0],a[0]=-(x+a[0]),a[2]=x-a[2],s.x=1-(s.x+s.width)}return i},C.prototype.computeMeshIndices_=function(e,t){for(var n=new Uint16Array(2*(e-1)*(t-1)*6),r=e/2,i=t/2,o=0,a=0,s=0;s<2;s++)for(var l=0;l<t;l++)for(var c=0;c<e;c++,o++)0!=c&&0!=l&&(c<=r==l<=i?(n[a++]=o,n[a++]=o-e-1,n[a++]=o-e,n[a++]=o-e-1,n[a++]=o,n[a++]=o-1):(n[a++]=o-1,n[a++]=o-e,n[a++]=o,n[a++]=o-e,n[a++]=o-1,n[a++]=o-e-1));return n},C.prototype.getOwnPropertyDescriptor_=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return void 0!==n.get&&void 0!==n.set||(n.configurable=!0,n.enumerable=!0,n.get=function(){return this.getAttribute(t)},n.set=function(e){this.setAttribute(t,e)}),n};var O=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),R=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n"),k=Math.PI/180;function P(e){this.gl=e,this.attribs={position:0},this.program=g(e,O,R,this.attribs),this.uniforms=v(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}function L(e){this.coefficients=e}P.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener("click",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},P.prototype.listen=function(e,t){var n=this.gl.canvas;this.listener=function(r){var i=n.clientWidth/2;r.clientX>i-42&&r.clientX<i+42&&r.clientY>n.clientHeight-42?e(r):r.clientX<42&&r.clientY<42&&t(r)},n.addEventListener("click",this.listener,!1)},P.prototype.onResize=function(){var e=this.gl,t=this,n=[e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){var n=[],r=e.drawingBufferWidth/2,i=Math.max(screen.width,screen.height)*window.devicePixelRatio,o=e.drawingBufferWidth/i*window.devicePixelRatio,a=4*o/2,s=42*o,l=28*o/2,c=14*o;function u(e,t){var i=(90-e)*k,o=Math.cos(i),a=Math.sin(i);n.push(.3125*o*l+r,.3125*a*l+l),n.push(t*o*l+r,t*a*l+l)}n.push(r-a,s),n.push(r-a,e.drawingBufferHeight),n.push(r+a,s),n.push(r+a,e.drawingBufferHeight),t.gearOffset=n.length/2;for(var h=0;h<=6;h++){var d=60*h;u(d,1),u(d+12,1),u(d+20,.75),u(d+40,.75),u(d+48,1)}function f(t,r){n.push(c+t,e.drawingBufferHeight-c-r)}t.gearVertexCount=n.length/2-t.gearOffset,t.arrowOffset=n.length/2;var p=a/Math.sin(45*k);f(0,l),f(l,0),f(l+p,p),f(p,l+p),f(p,l-p),f(0,l),f(l,2*l),f(l+p,2*l-p),f(p,l-p),f(0,l),f(p,l-a),f(28*o,l-a),f(p,l+a),f(28*o,l+a),t.arrowVertexCount=n.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(n),e.STATIC_DRAW)}))},P.prototype.render=function(){var e=this.gl,t=this,n=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()}))},P.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1}(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},L.prototype.distortInverse=function(e){for(var t=0,n=1,r=e-this.distort(t);Math.abs(n-t)>1e-4;){var i=e-this.distort(n),o=n-i*((n-t)/(i-r));t=n,n=o,r=i}return n},L.prototype.distort=function(e){for(var t=e*e,n=0,r=0;r<this.coefficients.length;r++)n=t*(n+this.coefficients[r]);return(n+1)*e};var D=Math.PI/180,I=180/Math.PI,N=function(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0};N.prototype={constructor:N,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this}};var j=function(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1};function B(e){this.width=e.width||f(),this.height=e.height||p(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}j.prototype={constructor:j,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l+a*s*o,this.w=r*i*o-a*s*l,this},setFromEulerYXZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l-a*s*o,this.w=r*i*o+a*s*l,this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this.x=e.x*r,this.y=e.y*r,this.z=e.z*r,this.w=Math.cos(n),this},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var n=e.x,r=e.y,i=e.z,o=e.w,a=t.x,s=t.y,l=t.z,c=t.w;return this.x=n*c+o*a+r*l-i*s,this.y=r*c+o*s+i*a-n*l,this.z=i*c+o*l+n*s-r*a,this.w=o*c-n*a-r*s-i*l,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===e?(this.x=0,this.y=0,this.z=0,this.w=1):(e=1/e,this.x=this.x*e,this.y=this.y*e,this.z=this.z*e,this.w=this.w*e),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this.x,r=this.y,i=this.z,o=this.w,a=o*e.w+n*e.x+r*e.y+i*e.z;if(a<0?(this.w=-e.w,this.x=-e.x,this.y=-e.y,this.z=-e.z,a=-a):this.copy(e),a>=1)return this.w=o,this.x=n,this.y=r,this.z=i,this;var s=Math.acos(a),l=Math.sqrt(1-a*a);if(Math.abs(l)<.001)return this.w=.5*(o+this.w),this.x=.5*(n+this.x),this.y=.5*(r+this.y),this.z=.5*(i+this.z),this;var c=Math.sin((1-t)*s)/l,u=Math.sin(t*s)/l;return this.w=o*c+this.w*u,this.x=n*c+this.x*u,this.y=r*c+this.y*u,this.z=i*c+this.z*u,this},setFromUnitVectors:function(){var e,t;return function(n,r){return void 0===e&&(e=new N),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()};var F=new B({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),z=new B({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),H={CardboardV1:new V({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new V({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function U(e,t){this.viewer=H.CardboardV2,this.updateDeviceParams(e),this.distortion=new L(this.viewer.distortionCoefficients);for(var n=0;n<t.length;n++){var r=t[n];H[r.id]=new V(r)}}function V(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}U.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},U.prototype.getDevice=function(){return this.device},U.prototype.setViewer=function(e){this.viewer=e,this.distortion=new L(this.viewer.distortionCoefficients)},U.prototype.determineDevice_=function(e){if(!e)return i()?(console.warn("Using fallback iOS device measurements."),z):(console.warn("Using fallback Android device measurements."),F);var t=.0254/e.xdpi,n=.0254/e.ydpi;return new B({widthMeters:t*f(),heightMeters:n*p(),bevelMeters:.001*e.bevelMm})},U.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=(t.widthMeters-e.interLensDistance)/2,o=e.interLensDistance/2,a=e.baselineLensDistance-t.bevelMeters,s=t.heightMeters-a,l=I*Math.atan(n.distort(i/r)),c=I*Math.atan(n.distort(o/r)),u=I*Math.atan(n.distort(a/r)),h=I*Math.atan(n.distort(s/r));return{leftDegrees:Math.min(l,e.fov),rightDegrees:Math.min(c,e.fov),downDegrees:Math.min(u,e.fov),upDegrees:Math.min(h,e.fov)}},U.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=Math.tan(-D*e.fov),i=Math.tan(D*e.fov),o=Math.tan(D*e.fov),a=Math.tan(-D*e.fov),s=t.widthMeters/4,l=t.heightMeters/2,c=e.baselineLensDistance-t.bevelMeters-l,u=e.interLensDistance/2-s,h=-c,d=e.screenLensDistance,f=n.distort((u-s)/d),p=n.distort((h+l)/d),m=n.distort((u+s)/d),g=n.distort((h-l)/d),v=new Float32Array(4);return v[0]=Math.max(r,f),v[1]=Math.min(i,p),v[2]=Math.min(o,m),v[3]=Math.max(a,g),v},U.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=new Float32Array(4),i=n.distortInverse(Math.tan(-D*e.fov)),o=n.distortInverse(Math.tan(D*e.fov)),a=n.distortInverse(Math.tan(D*e.fov)),s=n.distortInverse(Math.tan(-D*e.fov)),l=t.widthMeters/4,c=t.heightMeters/2,u=e.baselineLensDistance-t.bevelMeters-c,h=e.interLensDistance/2-l,d=-u,f=e.screenLensDistance,p=(h-l)/f,m=(d+c)/f,g=(h+l)/f,v=(d-c)/f;return r[0]=Math.max(i,p),r[1]=Math.min(o,m),r[2]=Math.min(a,g),r[3]=Math.max(s,v),r},U.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,n=this.device,r=t.screenLensDistance,i=(n.widthMeters-t.interLensDistance)/2,o=t.baselineLensDistance-n.bevelMeters,a=(e[0]*r+i)/n.widthMeters,s=(e[1]*r+o)/n.heightMeters,l=(e[2]*r+i)/n.widthMeters,c=(e[3]*r+o)/n.heightMeters;return{x:a,y:c,width:l-a,height:s-c}},U.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},U.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},U.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:I*Math.atan(e.outerDist),rightDegrees:I*Math.atan(e.innerDist),downDegrees:I*Math.atan(e.bottomDist),upDegrees:I*Math.atan(e.topDist)}},U.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,n=this.device,r=t.screenLensDistance,i=n.widthMeters/r,o=n.heightMeters/r,a=n.width/i,s=n.height/o,l=Math.round((e.eyePosX-e.outerDist)*a),c=Math.round((e.eyePosY-e.bottomDist)*s);return{x:l,y:c,width:Math.round((e.eyePosX+e.innerDist)*a)-l,height:Math.round((e.eyePosY+e.topDist)*s)-c}},U.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=e.interLensDistance/2/r,o=t.widthMeters/r,a=t.heightMeters/r,s=o/2-i,l=(e.baselineLensDistance-t.bevelMeters)/r,c=e.fov,u=n.distortInverse(Math.tan(D*c)),h=Math.min(s,u),d=Math.min(i,u),f=Math.min(l,u);return{outerDist:h,innerDist:d,topDist:Math.min(a-l,u),bottomDist:f,eyePosX:s,eyePosY:l}},U.Viewers=H;var G={format:1,last_updated:"2019-11-09T17:36:14Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X00PD/*"},{ua:"ASUS_X00PD"}],dpi:245,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X008D/*"},{ua:"ASUS_X008D"}],dpi:282,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2 XL/*"},{ua:"Pixel 2 XL"}],dpi:537.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3 XL/*"},{ua:"Pixel 3 XL"}],dpi:[558.5,553.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel XL/*"},{ua:"Pixel XL"}],dpi:[537.9,533],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3/*"},{ua:"Pixel 3"}],dpi:442.4,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2/*"},{ua:"Pixel 2"}],dpi:441,bw:3,ac:500},{type:"android",rules:[{mdmh:"Google/*/Pixel/*"},{ua:"Pixel"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/BLN-L24/*"},{ua:"HONORBLN-L24"}],dpi:480,bw:4,ac:500},{type:"android",rules:[{mdmh:"Huawei/*/BKL-L09/*"},{ua:"BKL-L09"}],dpi:403,bw:3.47,ac:500},{type:"android",rules:[{mdmh:"LENOVO/*/Lenovo PB2-690Y/*"},{ua:"Lenovo PB2-690Y"}],dpi:[457.2,454.713],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 B"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/G5/*"},{ua:"Moto G (5) Plus"}],dpi:[403.4,403],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 B"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/G4/*"},{ua:"Moto G (4)"}],dpi:401,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1001/*"},{ua:"ONE E1001"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1003/*"},{ua:"ONE E1003"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2001/*"},{ua:"ONE A2001"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2003/*"},{ua:"ONE A2003"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3000/*"},{ua:"ONEPLUS A3000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3003/*"},{ua:"ONEPLUS A3003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3010/*"},{ua:"ONEPLUS A3010"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A5000/*"},{ua:"ONEPLUS A5000 "}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A5010/*"},{ua:"ONEPLUS A5010"}],dpi:[403,400],bw:2,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6000/*"},{ua:"ONEPLUS A6000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6003/*"},{ua:"ONEPLUS A6003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6010/*"},{ua:"ONEPLUS A6010"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6013/*"},{ua:"ONEPLUS A6013"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SGH-M919/*"},{ua:"SGH-M919"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920P/*"},{ua:"SM-N920P"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920W8/*"},{ua:"SM-N920W8"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G930F/*"},{ua:"SM-G930F"}],dpi:576.6,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G935F/*"},{ua:"SM-G935F"}],dpi:533,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G950F/*"},{ua:"SM-G950F"}],dpi:[562.707,565.293],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955U/*"},{ua:"SM-G955U"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955F/*"},{ua:"SM-G955F"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G960F/*"},{ua:"SM-G960F"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9600/*"},{ua:"SM-G9600"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960T/*"},{ua:"SM-G960T"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960N/*"},{ua:"SM-G960N"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960U/*"},{ua:"SM-G960U"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9608/*"},{ua:"SM-G9608"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960FD/*"},{ua:"SM-G960FD"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960W/*"},{ua:"SM-G960W"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G965F/*"},{ua:"SM-G965F"}],dpi:529,bw:2,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Fly/*/IQ4412/*"},{ua:"IQ4412"}],dpi:307.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"BENEVE/*/VR518/*"},{ua:"VR518"}],dpi:480,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/EML-L29/*"},{ua:"EML-L29"}],dpi:428,bw:3.45,ac:500},{type:"android",rules:[{mdmh:"Nokia/*/Nokia 7.1/*"},{ua:"Nokia 7.1"}],dpi:[432,431.9],bw:3,ac:500},{type:"ios",rules:[{res:[1242,2688]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G570M/*"},{ua:"SM-G570M"}],dpi:320,bw:3.684,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G970F/*"},{ua:"SM-G970F"}],dpi:438,bw:2.281,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G973F/*"},{ua:"SM-G973F"}],dpi:550,bw:2.002,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G975F/*"},{ua:"SM-G975F"}],dpi:522,bw:2.054,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G977F/*"},{ua:"SM-G977F"}],dpi:505,bw:2.334,ac:500},{type:"ios",rules:[{res:[828,1792]}],dpi:326,bw:5,ac:500}]};function W(e,t){if(this.dpdb=G,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t;var n=new XMLHttpRequest,r=this;n.open("GET",e,!0),n.addEventListener("load",(function(){r.loading=!1,n.status>=200&&n.status<=299?(r.dpdb=JSON.parse(n.response),r.recalculateDeviceParams_()):console.error("Error loading online DPDB!")})),n.send()}}function q(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}function X(e,t){this.set(e,t)}function Y(e,t){this.kFilter=e,this.isDebug=t,this.currentAccelMeasurement=new X,this.currentGyroMeasurement=new X,this.previousGyroMeasurement=new X,i()?this.filterQ=new j(-1,0,0,1):this.filterQ=new j(1,0,0,1),this.previousFilterQ=new j,this.previousFilterQ.copy(this.filterQ),this.accelQ=new j,this.isOrientationInitialized=!1,this.estimatedGravity=new N,this.measuredGravity=new N,this.gyroIntegralQ=new j}function K(e,t){this.predictionTimeS=e,this.isDebug=t,this.previousQ=new j,this.previousTimestampS=null,this.deltaQ=new j,this.outQ=new j}function Q(e,t,n,r){this.yawOnly=n,this.accelerometer=new N,this.gyroscope=new N,this.filter=new Y(e,r),this.posePredictor=new K(t,r),this.isFirefoxAndroid=s(),this.isIOS=i();var o=l();this.isDeviceMotionInRadians=!this.isIOS&&o&&o<66,this.isWithoutDeviceMotion=u()||c(),this.filterToWorldQ=new j,i()?this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new j,this.worldToScreenQ=new j,this.originalPoseAdjustQ=new j,this.originalPoseAdjustQ.setFromAxisAngle(new N(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),d()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new j,this.orientationOut_=new Float32Array(4),this.start()}W.prototype.getDeviceParams=function(){return this.deviceParams},W.prototype.recalculateDeviceParams_=function(){var e=this.calcDeviceParams_();e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},W.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,n=f(),r=p();if(!e.devices)return console.error("DPDB has no devices section."),null;for(var o=0;o<e.devices.length;o++){var a=e.devices[o];if(a.rules)if("ios"==a.type||"android"==a.type){if(i()==("ios"==a.type)){for(var s=!1,l=0;l<a.rules.length;l++){var c=a.rules[l];if(this.ruleMatches_(c,t,n,r)){s=!0;break}}if(s)return new q({xdpi:a.dpi[0]||a.dpi,ydpi:a.dpi[1]||a.dpi,bevelMm:a.bw})}}else console.warn("Device["+o+"] has invalid type.");else console.warn("Device["+o+"] has no rules section.")}return console.warn("No DPDB device match."),null},W.prototype.ruleMatches_=function(e,t,n,r){if(!e.ua&&!e.res)return!1;if(e.ua&&"SM"===e.ua.substring(0,2)&&(e.ua=e.ua.substring(0,7)),e.ua&&t.indexOf(e.ua)<0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var i=e.res[0],o=e.res[1];if(Math.min(n,r)!=Math.min(i,o)||Math.max(n,r)!=Math.max(i,o))return!1}return!0},X.prototype.set=function(e,t){this.sample=e,this.timestampS=t},X.prototype.copy=function(e){this.set(e.sample,e.timestampS)},Y.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},Y.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var n,r=t-this.previousGyroMeasurement.timestampS;n=r,isNaN(n)||n<=.001||n>1||this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},Y.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var n=new j;n.copy(this.filterQ),n.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(n),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var r,i=new j;i.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),i.inverse(),this.isDebug&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",I*((r=i).w>1?(console.warn("getQuaternionAngle: w > 1"),0):2*Math.acos(r.w)),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var o=new j;o.copy(this.filterQ),o.multiply(i),this.filterQ.slerp(o,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},Y.prototype.getOrientation=function(){return this.filterQ},Y.prototype.accelToQuaternion_=function(e){var t=new N;t.copy(e),t.normalize();var n=new j;return n.setFromUnitVectors(new N(0,0,-1),t),n.inverse(),n},Y.prototype.gyroToQuaternionDelta_=function(e,t){var n=new j,r=new N;return r.copy(e),r.normalize(),n.setFromAxisAngle(r,e.length()*t),n},K.prototype.getPrediction=function(e,t,n){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=n,e;var r=new N;r.copy(t),r.normalize();var i=t.length();if(i<20*D)return this.isDebug&&console.log("Moving slowly, at %s deg/s: no prediction",(I*i).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var o=i*this.predictionTimeS;return this.deltaQ.setFromAxisAngle(r,o),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.previousTimestampS=n,this.outQ},Q.prototype.getPosition=function(){return null},Q.prototype.getOrientation=function(){var e=void 0;if(this.isWithoutDeviceMotion&&this._deviceOrientationQ)return this.deviceOrientationFixQ=this.deviceOrientationFixQ||function(){var e=(new j).setFromAxisAngle(new N(0,0,-1),0),t=new j;return-90===window.orientation?t.setFromAxisAngle(new N(0,1,0),Math.PI/-2):t.setFromAxisAngle(new N(0,1,0),Math.PI/2),e.multiply(t)}(),this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||function(){var e=new j;return e.setFromAxisAngle(new N(1,0,0),-Math.PI/2),e}(),e=this._deviceOrientationQ,(t=new j).copy(e),t.multiply(this.deviceOrientationFilterToWorldQ),t.multiply(this.resetQ),t.multiply(this.worldToScreenQ),t.multiplyQuaternions(this.deviceOrientationFixQ,t),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_;var t,n=this.filter.getOrientation();return e=this.posePredictor.getPrediction(n,this.gyroscope,this.previousTimestampS),(t=new j).copy(this.filterToWorldQ),t.multiply(this.resetQ),t.multiply(e),t.multiply(this.worldToScreenQ),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},Q.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),d()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ)},Q.prototype.onDeviceOrientation_=function(e){this._deviceOrientationQ=this._deviceOrientationQ||new j;var t=e.alpha,n=e.beta,r=e.gamma;t=(t||0)*Math.PI/180,n=(n||0)*Math.PI/180,r=(r||0)*Math.PI/180,this._deviceOrientationQ.setFromEulerYXZ(n,t,-r)},Q.prototype.onDeviceMotion_=function(e){this.updateDeviceMotion_(e)},Q.prototype.updateDeviceMotion_=function(e){var t=e.accelerationIncludingGravity,n=e.rotationRate,r=e.timeStamp/1e3,i=r-this.previousTimestampS;return i<0?(E("fusion-pose-sensor:invalid:non-monotonic","Invalid timestamps detected: non-monotonic timestamp from devicemotion"),void(this.previousTimestampS=r)):i<=.001||i>1?(E("fusion-pose-sensor:invalid:outside-threshold","Invalid timestamps detected: Timestamp from devicemotion outside expected range."),void(this.previousTimestampS=r)):(this.accelerometer.set(-t.x,-t.y,-t.z),n&&(h()?this.gyroscope.set(-n.beta,n.alpha,n.gamma):this.gyroscope.set(n.alpha,n.beta,n.gamma),this.isDeviceMotionInRadians||this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addGyroMeasurement(this.gyroscope,r)),this.filter.addAccelMeasurement(this.accelerometer,r),void(this.previousTimestampS=r))},Q.prototype.onOrientationChange_=function(e){this.setScreenTransform_()},Q.prototype.onMessage_=function(e){var t=e.data;t&&t.type&&"devicemotion"===t.type.toLowerCase()&&this.updateDeviceMotion_(t.deviceMotionEvent)},Q.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),Math.PI/2)}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},Q.prototype.start=function(){this.onDeviceMotionCallback_=this.onDeviceMotion_.bind(this),this.onOrientationChangeCallback_=this.onOrientationChange_.bind(this),this.onMessageCallback_=this.onMessage_.bind(this),this.onDeviceOrientationCallback_=this.onDeviceOrientation_.bind(this),i()&&function(){var e=window.self!==window.top,t=_(document.referrer),n=_(window.location.href);return e&&t!==n}()&&window.addEventListener("message",this.onMessageCallback_),window.addEventListener("orientationchange",this.onOrientationChangeCallback_),this.isWithoutDeviceMotion?window.addEventListener("deviceorientation",this.onDeviceOrientationCallback_):window.addEventListener("devicemotion",this.onDeviceMotionCallback_)},Q.prototype.stop=function(){window.removeEventListener("devicemotion",this.onDeviceMotionCallback_),window.removeEventListener("deviceorientation",this.onDeviceOrientationCallback_),window.removeEventListener("orientationchange",this.onOrientationChangeCallback_),window.removeEventListener("message",this.onMessageCallback_)};var Z=new N(1,0,0),J=new N(0,0,1),$=new j;$.setFromAxisAngle(Z,-Math.PI/2),$.multiply((new j).setFromAxisAngle(J,Math.PI/2));var ee=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=e,this.sensor=null,this.fusionSensor=null,this._out=new Float32Array(4),this.api=null,this.errors=[],this._sensorQ=new j,this._outQ=new j,this._onSensorRead=this._onSensorRead.bind(this),this._onSensorError=this._onSensorError.bind(this),this.init()}return e(t,[{key:"init",value:function(){var e=null;try{(e=new RelativeOrientationSensor({frequency:60,referenceFrame:"screen"})).addEventListener("error",this._onSensorError)}catch(t){this.errors.push(t),"SecurityError"===t.name?(console.error("Cannot construct sensors due to the Feature Policy"),console.warn('Attempting to fall back using "devicemotion"; however this will fail in the future without correct permissions.'),this.useDeviceMotion()):"ReferenceError"===t.name?this.useDeviceMotion():console.error(t)}e&&(this.api="sensor",this.sensor=e,this.sensor.addEventListener("reading",this._onSensorRead),this.sensor.start())}},{key:"useDeviceMotion",value:function(){this.api="devicemotion",this.fusionSensor=new Q(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG),this.sensor&&(this.sensor.removeEventListener("reading",this._onSensorRead),this.sensor.removeEventListener("error",this._onSensorError),this.sensor=null)}},{key:"getOrientation",value:function(){if(this.fusionSensor)return this.fusionSensor.getOrientation();if(!this.sensor||!this.sensor.quaternion)return this._out[0]=this._out[1]=this._out[2]=0,this._out[3]=1,this._out;var e=this.sensor.quaternion;this._sensorQ.set(e[0],e[1],e[2],e[3]);var t=this._outQ;return t.copy($),t.multiply(this._sensorQ),this.config.YAW_ONLY&&(t.x=t.z=0,t.normalize()),this._out[0]=t.x,this._out[1]=t.y,this._out[2]=t.z,this._out[3]=t.w,this._out}},{key:"_onSensorError",value:function(e){this.errors.push(e.error),"NotAllowedError"===e.error.name?console.error("Permission to access sensor was denied"):"NotReadableError"===e.error.name?console.error("Sensor could not be read"):console.error(e.error),this.useDeviceMotion()}},{key:"_onSensorRead",value:function(){}}]),t}();function te(){this.loadIcon_();var e=document.createElement("div");(o=e.style).position="fixed",o.top=0,o.right=0,o.bottom=0,o.left=0,o.backgroundColor="gray",o.fontFamily="sans-serif",o.zIndex=1e6;var t=document.createElement("img");t.src=this.icon,(o=t.style).marginLeft="25%",o.marginTop="25%",o.width="50%",e.appendChild(t);var n=document.createElement("div");(o=n.style).textAlign="center",o.fontSize="16px",o.lineHeight="24px",o.margin="24px 25%",o.width="50%",n.innerHTML="Place your phone into your Cardboard viewer.",e.appendChild(n);var r=document.createElement("div");(o=r.style).backgroundColor="#CFD8DC",o.position="fixed",o.bottom=0,o.width="100%",o.height="48px",o.padding="14px 24px",o.boxSizing="border-box",o.color="#656A6B",e.appendChild(r);var i=document.createElement("div");i.style.float="left",i.innerHTML="No Cardboard viewer?";var o,a=document.createElement("a");a.href="https://www.google.com/get/cardboard/get-cardboard/",a.innerHTML="get one",a.target="_blank",(o=a.style).float="right",o.fontWeight=600,o.textTransform="uppercase",o.borderLeft="1px solid gray",o.paddingLeft="24px",o.textDecoration="none",o.color="#656A6B",r.appendChild(i),r.appendChild(a),this.overlay=e,this.text=n,this.hide()}function ne(e){try{this.selectedKey=localStorage.getItem("WEBVR_CARDBOARD_VIEWER")}catch(t){console.error("Failed to load viewer profile: %s",t)}this.selectedKey||(this.selectedKey=e||"CardboardV1"),this.dialog=this.createDialog_(U.Viewers),this.root=null,this.onChangeCallbacks_=[]}te.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display="block";var t=this.overlay.querySelector("img").style;d()?(t.width="20%",t.marginLeft="40%",t.marginTop="3%"):(t.width="50%",t.marginLeft="25%",t.marginTop="25%")},te.prototype.hide=function(){this.overlay.style.display="none"},te.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},te.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},te.prototype.update=function(){this.disableShowTemporarily(),!d()&&y()?this.show():this.hide()},te.prototype.loadIcon_=function(){this.icon="data:image/svg+xml,"+encodeURIComponent("<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>")},ne.prototype.show=function(e){this.root=e,e.appendChild(this.dialog),this.dialog.querySelector("#"+this.selectedKey).checked=!0,this.dialog.style.display="block"},ne.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},ne.prototype.getCurrentViewer=function(){return U.Viewers[this.selectedKey]},ne.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");return e?e.id:null},ne.prototype.onChange=function(e){this.onChangeCallbacks_.push(e)},ne.prototype.fireOnChange_=function(e){for(var t=0;t<this.onChangeCallbacks_.length;t++)this.onChangeCallbacks_[t](e)},ne.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),this.selectedKey&&U.Viewers[this.selectedKey]){this.fireOnChange_(U.Viewers[this.selectedKey]);try{localStorage.setItem("WEBVR_CARDBOARD_VIEWER",this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()}else console.error("ViewerSelector.onSave_: this should never happen!")},ne.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add("webvr-polyfill-viewer-selector"),t.style.display="none";var n=document.createElement("div");(i=n.style).position="fixed",i.left=0,i.top=0,i.width="100%",i.height="100%",i.background="rgba(0, 0, 0, 0.3)",n.addEventListener("click",this.hide.bind(this));var r=document.createElement("div"),i=r.style;for(var o in i.boxSizing="border-box",i.position="fixed",i.top="24px",i.left="50%",i.marginLeft="-140px",i.width="280px",i.padding="24px",i.overflow="hidden",i.background="#fafafa",i.fontFamily="'Roboto', sans-serif",i.boxShadow="0px 5px 20px #666",r.appendChild(this.createH1_("Select your viewer")),e)r.appendChild(this.createChoice_(o,e[o].label));return r.appendChild(this.createButton_("Save",this.onSave_.bind(this))),t.appendChild(n),t.appendChild(r),t},ne.prototype.createH1_=function(e){var t=document.createElement("h1"),n=t.style;return n.color="black",n.fontSize="20px",n.fontWeight="bold",n.marginTop=0,n.marginBottom="24px",t.innerHTML=e,t},ne.prototype.createChoice_=function(e,t){var n=document.createElement("div");n.style.marginTop="8px",n.style.color="black";var r=document.createElement("input");r.style.fontSize="30px",r.setAttribute("id",e),r.setAttribute("type","radio"),r.setAttribute("value",e),r.setAttribute("name","field");var i=document.createElement("label");return i.style.marginLeft="4px",i.setAttribute("for",e),i.innerHTML=t,n.appendChild(r),n.appendChild(i),n},ne.prototype.createButton_=function(e,t){var n=document.createElement("button");n.innerHTML=e;var r=n.style;return r.float="right",r.textTransform="uppercase",r.color="#1094f7",r.fontSize="14px",r.letterSpacing=0,r.border=0,r.background="none",r.marginTop="16px",n.addEventListener("click",t),n},"undefined"!==typeof window?window:"undefined"!==typeof n||"undefined"!==typeof self&&self;var re,ie=(re=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),o="undefined"!==typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this.noSleepVideo.setAttribute("src",i),this.noSleepVideo.addEventListener("timeupdate",function(e){this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}.bind(this)))}return r(e,[{key:"enable",value:function(){o?(this.disable(),this.noSleepTimer=window.setInterval((function(){window.location.href="/",window.setTimeout(window.stop,0)}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){o?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=a},function(e,t,n){e.exports="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}])}))})))&&re.__esModule&&Object.prototype.hasOwnProperty.call(re,"default")?re.default:re,oe=1e3,ae=[0,0,.5,1],se=[.5,0,.5,1],le=window.requestAnimationFrame,ce=window.cancelAnimationFrame;function ue(e){Object.defineProperties(this,{hasPosition:{writable:!1,enumerable:!0,value:e.hasPosition},hasExternalDisplay:{writable:!1,enumerable:!0,value:e.hasExternalDisplay},canPresent:{writable:!1,enumerable:!0,value:e.canPresent},maxLayers:{writable:!1,enumerable:!0,value:e.maxLayers},hasOrientation:{enumerable:!0,get:function(){return A("VRDisplayCapabilities.prototype.hasOrientation","VRDisplay.prototype.getFrameData"),e.hasOrientation}}})}function he(e){var t=!("wakelock"in(e=e||{}))||e.wakelock;this.isPolyfilled=!0,this.displayId=oe++,this.displayName="",this.depthNear=.01,this.depthFar=1e4,this.isPresenting=!1,Object.defineProperty(this,"isConnected",{get:function(){return A("VRDisplay.prototype.isConnected","VRDisplayCapabilities.prototype.hasExternalDisplay"),!1}}),this.capabilities=new ue({hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1}),this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.originalParent_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,t&&y()&&(this.wakelock_=new ie)}he.prototype.getFrameData=function(e){return x(e,this._getPose(),this)},he.prototype.getPose=function(){return A("VRDisplay.prototype.getPose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.resetPose=function(){return A("VRDisplay.prototype.resetPose"),this._resetPose()},he.prototype.getImmediatePose=function(){return A("VRDisplay.prototype.getImmediatePose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.requestAnimationFrame=function(e){return le(e)},he.prototype.cancelAnimationFrame=function(e){return ce(e)},he.prototype.wrapForFullscreen=function(e){if(i())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var t=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",t.join("; ")+";"),this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;if(this.fullscreenElement_&&(this.originalParent_?this.originalParent_.appendChild(this.fullscreenElement_):this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_)),this.fullscreenElement_=e,this.originalParent_=e.parentElement,this.originalParent_||document.body.appendChild(e),!this.fullscreenWrapper_.parentElement){var n=this.fullscreenElement_.parentElement;n.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),n.removeChild(this.fullscreenElement_)}this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var r=this;return function(){if(r.fullscreenElement_){var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];r.fullscreenElement_.setAttribute("style",e.join("; ")+";")}}(),this.fullscreenWrapper_},he.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute("style",this.fullscreenElementCachedStyle_):e.removeAttribute("style"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),this.originalParent_===t?t.insertBefore(e,this.fullscreenWrapper_):this.originalParent_&&this.originalParent_.appendChild(e),t.removeChild(this.fullscreenWrapper_),e}},he.prototype.requestPresent=function(e){var t=this.isPresenting,n=this;return e instanceof Array||(A("VRDisplay.prototype.requestPresent with non-array argument","an array of VRLayers as the first argument"),e=[e]),new Promise((function(r,a){if(n.capabilities.canPresent)if(0==e.length||e.length>n.capabilities.maxLayers)a(new Error("Invalid number of layers."));else{var s=e[0];if(s.source){var l=s.leftBounds||ae,c=s.rightBounds||se;if(t){var u=n.layer_;u.source!==s.source&&(u.source=s.source);for(var h=0;h<4;h++)u.leftBounds[h]=l[h],u.rightBounds[h]=c[h];return n.wrapForFullscreen(n.layer_.source),n.updatePresent_(),void r()}if(n.layer_={predistorted:s.predistorted,source:s.source,leftBounds:l.slice(0),rightBounds:c.slice(0)},n.waitingForPresent_=!1,n.layer_&&n.layer_.source){var d=n.wrapForFullscreen(n.layer_.source);n.addFullscreenListeners_(d,(function(){var e=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;n.isPresenting=d===e,n.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary").catch((function(e){console.error("screen.orientation.lock() failed due to",e.message)})),n.waitingForPresent_=!1,n.beginPresent_(),r()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),n.removeFullscreenWrapper(),n.disableWakeLock(),n.endPresent_(),n.removeFullscreenListeners_()),n.fireVRDisplayPresentChange_()}),(function(){n.waitingForPresent_&&(n.removeFullscreenWrapper(),n.removeFullscreenListeners_(),n.disableWakeLock(),n.waitingForPresent_=!1,n.isPresenting=!1,a(new Error("Unable to present.")))})),function(e){if(o())return!1;if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0}(d)?(n.enableWakeLock(),n.waitingForPresent_=!0):(i()||o())&&(n.enableWakeLock(),n.isPresenting=!0,n.beginPresent_(),n.fireVRDisplayPresentChange_(),r())}n.waitingForPresent_||i()||(m(),a(new Error("Unable to present.")))}else r()}else a(new Error("VRDisplay is not capable of presenting."))}))},he.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.disableWakeLock(),new Promise((function(n,r){e?(!m()&&i()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),o()&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.endPresent_(),t.fireVRDisplayPresentChange_()),n()):r(new Error("Was not presenting to VRDisplay."))}))},he.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},he.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.fireVRDisplayConnect_=function(){var e=new CustomEvent("vrdisplayconnect",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.addFullscreenListeners_=function(e,t,n){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=n,t&&(document.fullscreenEnabled?e.addEventListener("fullscreenchange",t,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenchange",t,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenchange",t,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenchange",t,!1)),n&&(document.fullscreenEnabled?e.addEventListener("fullscreenerror",n,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenerror",n,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenerror",n,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenerror",n,!1))},he.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var n=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",n,!1),e.removeEventListener("webkitfullscreenerror",n,!1),document.removeEventListener("mozfullscreenerror",n,!1),e.removeEventListener("msfullscreenerror",n,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},he.prototype.enableWakeLock=function(){this.wakelock_&&this.wakelock_.enable()},he.prototype.disableWakeLock=function(){this.wakelock_&&this.wakelock_.disable()},he.prototype.beginPresent_=function(){},he.prototype.endPresent_=function(){},he.prototype.submitFrame=function(e){},he.prototype.getEyeParameters=function(e){return null};var de={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},fe="left",pe="right";function me(e){var t=b({},de);e=b(t,e||{}),he.call(this,{wakelock:e.MOBILE_WAKE_LOCK}),this.config=e,this.displayName="Cardboard VRDisplay",this.capabilities=new ue({hasPosition:!1,hasOrientation:!0,hasExternalDisplay:!1,canPresent:!0,maxLayers:1}),this.stageParameters=null,this.bufferScale_=this.config.BUFFER_SCALE,this.poseSensor_=new ee(this.config),this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new W(this.config.DPDB_URL,this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new U(this.dpdb_.getDeviceParams(),e.ADDITIONAL_VIEWERS),this.viewerSelector_=new ne(e.DEFAULT_VIEWER),this.viewerSelector_.onChange(this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),this.config.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new te),i()&&window.addEventListener("resize",this.onResize_.bind(this))}return me.prototype=Object.create(he.prototype),me.prototype._getPose=function(){return{position:null,orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},me.prototype._resetPose=function(){this.poseSensor_.resetPose&&this.poseSensor_.resetPose()},me.prototype._getFieldOfView=function(e){var t;if(e==fe)t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return t},me.prototype._getEyeOffset=function(e){var t;if(e==fe)t=[.5*-this.deviceInfo_.viewer.interLensDistance,0,0];else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=[.5*this.deviceInfo_.viewer.interLensDistance,0,0]}return t},me.prototype.getEyeParameters=function(e){var t=this._getEyeOffset(e),n=this._getFieldOfView(e),r={offset:t,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_};return Object.defineProperty(r,"fieldOfView",{enumerable:!0,get:function(){return A("VRFieldOfView","VRFrameData's projection matrices"),n}}),r},me.prototype.onDeviceParamsUpdated_=function(e){this.config.DEBUG&&console.log("DPDB reported that device params were updated."),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_)},me.prototype.updateBounds_=function(){this.layer_&&this.distorter_&&(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)},me.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");e||(e=this.layer_.source.getContext("experimental-webgl")),e||(e=this.layer_.source.getContext("webgl2")),e&&(this.layer_.predistorted?this.config.CARDBOARD_UI_DISABLED||(e.canvas.width=f()*this.bufferScale_,e.canvas.height=p()*this.bufferScale_,this.cardboardUI_=new P(e)):(this.config.CARDBOARD_UI_DISABLED||(this.cardboardUI_=new P(e)),this.distorter_=new C(e,this.cardboardUI_,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS),this.distorter_.updateDeviceInfo(this.deviceInfo_)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(),e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(d()&&y()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener("orientationchange",this.orientationHandler),this.vrdisplaypresentchangeHandler=this.updateBounds_.bind(this),window.addEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler),this.fireVRDisplayDeviceParamsChange_())},me.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener("orientationchange",this.orientationHandler),window.removeEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler)},me.prototype.updatePresent_=function(){this.endPresent_(),this.beginPresent_()},me.prototype.submitFrame=function(e){if(this.distorter_)this.updateBounds_(),this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2"));var n=t.canvas;n.width==this.lastWidth&&n.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=n.width,this.lastHeight=n.height,this.cardboardUI_.render()}},me.prototype.onOrientationChange_=function(e){this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},me.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2")),t.canvas.setAttribute("style",["position: absolute","top: 0","left: 0","width: 100vw","height: 100vh","border: 0","margin: 0","padding: 0px","box-sizing: content-box"].join("; ")+";"),w(t.canvas)}},me.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},me.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},me.VRFrameData=function(){this.leftProjectionMatrix=new Float32Array(16),this.leftViewMatrix=new Float32Array(16),this.rightProjectionMatrix=new Float32Array(16),this.rightViewMatrix=new Float32Array(16),this.pose=null},me.VRDisplay=he,me}()})),s=(t=a)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,l={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",PROVIDE_MOBILE_VRDISPLAY:!0,MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1};function c(e){this.config=o(o({},l),e),this.polyfillDisplays=[],this.enabled=!1,this.hasNative="getVRDisplays"in navigator,this.native={},this.native.getVRDisplays=navigator.getVRDisplays,this.native.VRFrameData=window.VRFrameData,this.native.VRDisplay=window.VRDisplay,(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&r())&&(this.enable(),this.getVRDisplays().then((function(e){e&&e[0]&&e[0].fireVRDisplayConnect_&&e[0].fireVRDisplayConnect_()})))}c.prototype.getPolyfillDisplays=function(){if(this._polyfillDisplaysPopulated)return this.polyfillDisplays;if(r()){var e=new s({ADDITIONAL_VIEWERS:this.config.ADDITIONAL_VIEWERS,DEFAULT_VIEWER:this.config.DEFAULT_VIEWER,MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(e)}return this._polyfillDisplaysPopulated=!0,this.polyfillDisplays},c.prototype.enable=function(){if(this.enabled=!0,this.hasNative&&this.native.VRFrameData){var e=this.native.VRFrameData,t=new this.native.VRFrameData,n=this.native.VRDisplay.prototype.getFrameData;window.VRDisplay.prototype.getFrameData=function(r){r instanceof e?n.call(this,r):(n.call(this,t),r.pose=t.pose,i(t.leftProjectionMatrix,r.leftProjectionMatrix),i(t.rightProjectionMatrix,r.rightProjectionMatrix),i(t.leftViewMatrix,r.leftViewMatrix),i(t.rightViewMatrix,r.rightViewMatrix))}}navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=s.VRDisplay,window.VRFrameData=s.VRFrameData},c.prototype.getVRDisplays=function(){var e=this;return this.config,this.hasNative?this.native.getVRDisplays.call(navigator).then((function(t){return t.length>0?t:e.getPolyfillDisplays()})):Promise.resolve(this.getPolyfillDisplays())},c.version="0.10.12",c.VRFrameData=s.VRFrameData,c.VRDisplay=s.VRDisplay;var u=Object.freeze({default:c}),h=u&&c||u;return"undefined"!==typeof n&&n.window&&(n.document||(n.document=n.window.document),n.navigator||(n.navigator=n.window.navigator)),h}))}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],69:[function(e,t,n){var r=/\n/,i=/\s/;function o(e,t,n,r){var i=e.indexOf(t,n);return-1===i||i>r?r:i}function a(e){return i.test(e)}function s(e,t,n,r){return{start:t,end:t+Math.min(r,n-t)}}t.exports=function(e,n){return t.exports.lines(e,n).map((function(t){return e.substring(t.start,t.end)})).join("\n")},t.exports.lines=function(e,t){if(0===(t=t||{}).width&&"nowrap"!==t.mode)return[];e=e||"";var n="number"===typeof t.width?t.width:Number.MAX_VALUE,i=Math.max(0,t.start||0),l="number"===typeof t.end?t.end:e.length,c=t.mode,u=t.measure||s;return"pre"===c?function(e,t,n,i,o){for(var a=[],s=n,l=n;l<i&&l<t.length;l++){var c=t.charAt(l),u=r.test(c);if(u||l===i-1){var h=e(t,s,u?l:l+1,o);a.push(h),s=l+1}}return a}(u,e,i,l,n):function(e,t,n,r,i,s){var l=[],c=i;for("nowrap"===s&&(c=Number.MAX_VALUE);n<r&&n<t.length;){for(var u=o(t,"\n",n,r);n<u&&a(t.charAt(n));)n++;var h=e(t,n,u,c),d=n+(h.end-h.start),f=d+"\n".length;if(d<u){for(;d>n&&!a(t.charAt(d));)d--;if(d===n)f>n+"\n".length&&f--,d=f;else for(f=d;d>n&&a(t.charAt(d-"\n".length));)d--}if(d>=n){var p=e(t,n,d,c);l.push(p)}n=f}return l}(u,e,i,l,n,c)}},{}],70:[function(t,n,r){"use strict";var i=t("global/window"),o=t("is-function"),a=t("parse-headers"),s=t("xtend");function l(e,t,n){var r=e;return o(t)?(n=t,"string"===typeof e&&(r={uri:e})):r=s(t,{uri:e}),r.callback=n,r}function c(e,t,n){return u(t=l(e,t,n))}function u(t){if("undefined"===typeof t.callback)throw new Error("callback argument missing");var n=!1,r=function(e,r,i){n||(n=!0,t.callback(e,r,i))};function i(){var t=void 0;if(t=h.response?h.response:h.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var n=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!n)return t.responseXML}catch(e){}return null}(h),y)try{t=JSON.parse(t)}catch(e){}return t}function o(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,b)}function s(){if(!u){var e;clearTimeout(d),e=t.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var n=b,o=null;return 0!==e?(n={body:i(),statusCode:e,method:p,headers:{},url:f,rawRequest:h},h.getAllResponseHeaders&&(n.headers=a(h.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,n,n.body)}}var l,u,h=t.xhr||null;h||(h=t.cors||t.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var d,f=h.url=t.uri||t.url,p=h.method=t.method||"GET",m=t.body||t.data,g=h.headers=t.headers||{},v=!!t.sync,y=!1,b={body:void 0,headers:{},statusCode:0,method:p,url:f,rawRequest:h};if("json"in t&&!1!==t.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=JSON.stringify(!0===t.json?m:t.json))),h.onreadystatechange=function(){4===h.readyState&&setTimeout(s,0)},h.onload=s,h.onerror=o,h.onprogress=function(){},h.onabort=function(){u=!0},h.ontimeout=o,h.open(p,f,!v,t.username,t.password),v||(h.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,h.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",o(e)}}),t.timeout)),h.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&h.setRequestHeader(l,g[l]);else if(t.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(h.responseType=t.responseType),"beforeSend"in t&&"function"===typeof t.beforeSend&&t.beforeSend(h),h.send(m||null),h}n.exports=c,n.exports.default=c,c.XMLHttpRequest=i.XMLHttpRequest||function(){},c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){c["delete"===e?"del":e]=function(t,n,r){return(n=l(t,n,r)).method=e.toUpperCase(),u(n)}}))},{"global/window":27,"is-function":33,"parse-headers":47,xtend:72}],71:[function(e,t,n){t.exports="undefined"!==typeof self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,"application/xml")}:"undefined"!==typeof self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(e){var t=new self.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}:function(e){var t=document.createElement("div");return t.innerHTML=e,t}},{}],72:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],73:[function(e,t,n){t.exports={name:"aframe",version:"1.2.0",description:"A web framework for building virtual reality experiences.",homepage:"https://aframe.io/",main:"dist/aframe-master.js",scripts:{browserify:"browserify src/index.js -s 'AFRAME' -p browserify-derequire",build:"shx mkdir -p build/ && npm run browserify -- --debug -t [ envify --INSPECTOR_VERSION dev ] -o build/aframe.js",codecov:"codecov",dev:"npm run build && cross-env INSPECTOR_VERSION=dev node ./scripts/budo -t envify",dist:"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max","dist:max":"npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js","dist:min":"npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map ] -o dist/aframe-master.min.js",docs:"markserv --dir docs --port 9001",preghpages:"node ./scripts/preghpages.js",ghpages:"ghpages -p gh-pages/",lint:"semistandard -v | snazzy","lint:fix":"semistandard --fix",precommit:"npm run lint",prepush:"node scripts/testOnlyCheck.js",prerelease:"node scripts/release.js 1.0.4 1.1.0",start:"npm run dev","start:https":"cross-env SSL=true npm run dev",test:"karma start ./tests/karma.conf.js","test:docs":"node scripts/docsLint.js","test:firefox":"npm test -- --browsers Firefox","test:chrome":"npm test -- --browsers Chrome","test:nobrowser":"NO_BROWSER=true npm test","test:node":"mocha --ui tdd tests/node"},repository:"aframevr/aframe",license:"MIT",files:["dist/*","docs/**/*","src/**/*","vendor/**/*"],dependencies:{"custom-event-polyfill":"^1.0.6",debug:"ngokevin/debug#noTimestamp","deep-assign":"^2.0.0","document-register-element":"dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90","load-bmfont":"^1.2.3","object-assign":"^4.0.1",present:"0.0.6","promise-polyfill":"^3.1.0","super-animejs":"^3.1.0","super-three":"^0.125.1","three-bmfont-text":"dmarcos/three-bmfont-text#1babdf8507c731a18f8af3b807292e2b9740955e","webvr-polyfill":"^0.10.12"},devDependencies:{browserify:"^13.1.0","browserify-css":"^0.8.4","browserify-derequire":"^0.9.4","browserify-istanbul":"^2.0.0",budo:"^9.2.0",chai:"^3.5.0","chai-shallow-deep-equal":"^1.4.0",chalk:"^1.1.3",codecov:"^1.0.1","cross-env":"^5.0.1",envify:"^3.4.1",exorcist:"^0.4.0",ghpages:"0.0.8","git-rev":"^0.2.1",glob:"^7.1.1",husky:"^0.11.7",istanbul:"^0.4.5",jsdom:"^9.11.0",karma:"1.4.1","karma-browserify":"^5.1.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.2.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-sinon-chai":"1.2.4",lolex:"^1.5.1",markserv:"github:sukima/markserv#feature/fix-broken-websoketio-link",minifyify:"^7.3.3",mocha:"^3.0.2","mozilla-download":"^1.1.1","replace-in-file":"^2.5.3",semistandard:"^9.0.0",shelljs:"^0.7.7",shx:"^0.2.2",sinon:"^1.17.5","sinon-chai":"2.8.0",snazzy:"^5.0.0","too-wordy":"ngokevin/too-wordy",uglifyjs:"^2.4.10","write-good":"^0.9.1"},link:!0,browserify:{transform:["browserify-css","envify"]},semistandard:{ignore:["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},keywords:["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","web-components","webvr"],"browserify-css":{minify:!0},engines:{node:">= 4.6.0",npm:"^2.15.9"}}},{}],74:[function(e,t,n){var r=e("super-animejs"),i=e("../core/component").components,o=e("../core/component").registerComponent,a=e("../lib/three"),s=e("../utils"),l=new a.Color,c=new a.Color,u=s.entity.getComponentProperty,h=s.entity.setComponentProperty,d={};function f(e){e.x=a.Math.degToRad(e.x),e.y=a.Math.degToRad(e.y),e.z=a.Math.degToRad(e.z)}function p(e,t,n){var r;for(r=0;r<t.length;r++)e.addEventListener(t[r],n)}function m(e,t,n){var r;for(r=0;r<t.length;r++)e.removeEventListener(t[r],n)}function g(e,t){var n,r,i;for(r=y(t),i=e,n=0;n<r.length;n++)i=i[r[n]];if(void 0===i)throw console.log(e),new Error("[animation] property ("+t+") could not be found");return i}function v(e,t,n,r){var i,o,s,l;for(t.startsWith("object3D.rotation")&&(n=a.Math.degToRad(n)),o=y(t),l=e,i=0;i<o.length-1;i++)l=l[o[i]];s=o[o.length-1],"color"!==r?l[s]=n:"r"in l[s]?(l[s].r=n.r,l[s].g=n.g,l[s].b=n.b):(l[s].x=n.r,l[s].y=n.g,l[s].z=n.b)}function y(e){return e in d||(d[e]=e.split(".")),d[e]}function b(e){return e.isRawProperty||e.property.startsWith("components")||e.property.startsWith("object3D")}t.exports.Component=o("animation",{schema:{autoplay:{default:!0},delay:{default:0},dir:{default:""},dur:{default:1e3},easing:{default:"easeInQuad"},elasticity:{default:400},enabled:{default:!0},from:{default:""},loop:{default:0,parse:function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&parseInt(e,10)}},property:{default:""},startEvents:{type:"array"},pauseEvents:{type:"array"},resumeEvents:{type:"array"},round:{default:!1},to:{default:""},type:{default:""},isRawProperty:{default:!1}},multiple:!0,init:function(){var e=this;this.eventDetail={name:this.attrName},this.time=0,this.animation=null,this.animationIsPlaying=!1,this.onStartEvent=this.onStartEvent.bind(this),this.beginAnimation=this.beginAnimation.bind(this),this.pauseAnimation=this.pauseAnimation.bind(this),this.resumeAnimation=this.resumeAnimation.bind(this),this.fromColor={},this.toColor={},this.targets={},this.targetsArray=[],this.updateConfigForDefault=this.updateConfigForDefault.bind(this),this.updateConfigForRawColor=this.updateConfigForRawColor.bind(this),this.config={complete:function(){e.animationIsPlaying=!1,e.el.emit("animationcomplete",e.eventDetail,!1),e.id&&e.el.emit("animationcomplete__"+e.id,e.eventDetail,!1)}}},update:function(e){var t=this.config,n=this.data;this.animationIsPlaying=!1,this.data.enabled&&n.property&&(t.autoplay=!1,t.direction=n.dir,t.duration=n.dur,t.easing=n.easing,t.elasticity=n.elasticity,t.loop=n.loop,t.round=n.round,this.createAndStartAnimation())},tick:function(e,t){this.animationIsPlaying&&(this.time+=t,this.animation.tick(this.time))},remove:function(){this.pauseAnimation(),this.removeEventListeners()},pause:function(){this.paused=!0,this.pausedWasPlaying=this.animationIsPlaying,this.pauseAnimation(),this.removeEventListeners()},play:function(){this.paused&&(this.paused=!1,this.addEventListeners(),this.pausedWasPlaying&&(this.resumeAnimation(),this.pausedWasPlaying=!1))},createAndStartAnimation:function(){var e=this.data;this.updateConfig(),this.animationIsPlaying=!1,this.animation=r(this.config),this.animation.began=!0,this.removeEventListeners(),this.addEventListeners(),!e.autoplay||e.startEvents&&e.startEvents.length||(e.delay?setTimeout(this.beginAnimation,e.delay):this.beginAnimation())},beginAnimation:function(){this.updateConfig(),this.animation.began=!0,this.time=0,this.animationIsPlaying=!0,this.stopRelatedAnimations(),this.el.emit("animationbegin",this.eventDetail,!1)},pauseAnimation:function(){this.animationIsPlaying=!1},resumeAnimation:function(){this.animationIsPlaying=!0},onStartEvent:function(){this.data.enabled&&(this.updateConfig(),this.animation&&this.animation.pause(),this.animation=r(this.config),this.data.delay?setTimeout(this.beginAnimation,this.data.delay):this.beginAnimation())},updateConfigForRawColor:function(){var e,t,n,r=this.config,i=this.data,o=this.el;if(!this.waitComponentInitRawProperty(this.updateConfigForRawColor)){for(t in e=""===i.from?g(o,i.property):i.from,n=i.to,this.setColorConfig(e,n),e=this.fromColor,n=this.toColor,this.targetsArray.length=0,this.targetsArray.push(e),r.targets=this.targetsArray,n)r[t]=n[t];r.update=function(){var e={};return function(t){var n;(n=t.animatables[0].target).r===e.r&&n.g===e.g&&n.b===e.b||v(o,i.property,n,i.type)}}()}},updateConfigForDefault:function(){var e,t,n,r=this.config,i=this.data,o=this.el;this.waitComponentInitRawProperty(this.updateConfigForDefault)||(e=""===i.from?b(i)?g(o,i.property):u(o,i.property):i.from,n=i.to,isNaN(e||n)?(e=e?e.toString():e,n=n?n.toString():n):(e=parseFloat(e),n=parseFloat(n)),(t="true"===i.to||"false"===i.to||!0===i.to||!1===i.to)&&(e="true"===i.from||!0===i.from?1:0,n="true"===i.to||!0===i.to?1:0),this.targets.aframeProperty=e,r.targets=this.targets,r.aframeProperty=n,r.update=function(){var e;return function(n){var r;(r=n.animatables[0].target.aframeProperty)!==e&&(e=r,t&&(r=r>=1),b(i)?v(o,i.property,r,i.type):h(o,i.property,r))}}())},updateConfigForVector:function(){var e,t,n,r=this.config,i=this.data,o=this.el;for(e in t=""!==i.from?s.coordinates.parse(i.from):u(o,i.property),n=s.coordinates.parse(i.to),"rotation"===i.property&&(f(t),f(n)),this.targetsArray.length=0,this.targetsArray.push(t),r.targets=this.targetsArray,n)r[e]=n[e];"position"!==i.property&&"rotation"!==i.property&&"scale"!==i.property?r.update=function(){var e={};return function(t){var n=t.animatables[0].target;n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,h(o,i.property,n))}}():r.update=function(){var e={};return function(t){var n=t.animatables[0].target;"scale"===i.property&&(n.x=Math.max(1e-4,n.x),n.y=Math.max(1e-4,n.y),n.z=Math.max(1e-4,n.z)),n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,o.object3D[i.property].set(n.x,n.y,n.z))}}()},updateConfig:function(){var e;e=function(e,t){var n,r,o,a;return o=t.split("."),r=o[0],a=o[1],(n=e.components[r]||i[r])?a&&!n.schema[a]?null:a?n.schema[a].type:n.schema.type:null}(this.el,this.data.property),b(this.data)&&"color"===this.data.type?this.updateConfigForRawColor():"vec2"===e||"vec3"===e||"vec4"===e?this.updateConfigForVector():this.updateConfigForDefault()},waitComponentInitRawProperty:function(e){var t,n=this.data,i=this.el,o=this;return""===n.from&&!!n.property.startsWith("components")&&(t=y(n.property)[1],!i.components[t]&&(i.addEventListener("componentinitialized",(function n(a){a.detail.name===t&&(e(),o.animation=r(o.config),i.removeEventListener("componentinitialized",n))})),!0))},stopRelatedAnimations:function(){var e,t;for(t in this.el.components)e=this.el.components[t],t!==this.attrName&&"animation"===e.name&&e.animationIsPlaying&&e.data.property===this.data.property&&(e.animationIsPlaying=!1)},addEventListeners:function(){var e=this.data,t=this.el;p(t,e.startEvents,this.onStartEvent),p(t,e.pauseEvents,this.pauseAnimation),p(t,e.resumeEvents,this.resumeAnimation)},removeEventListeners:function(){var e=this.data,t=this.el;m(t,e.startEvents,this.onStartEvent),m(t,e.pauseEvents,this.pauseAnimation),m(t,e.resumeEvents,this.resumeAnimation)},setColorConfig:function(e,t){l.set(e),c.set(t),e=this.fromColor,t=this.toColor,e.r=l.r,e.g=l.g,e.b=l.b,t.r=c.r,t.g=c.g,t.b=c.b}})},{"../core/component":131,"../lib/three":179,"../utils":205,"super-animejs":56}],75:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three");t.exports.Component=r("camera",{schema:{active:{default:!0},far:{default:1e4},fov:{default:80,min:0},near:{default:.005,min:0},spectator:{default:!1},zoom:{default:1,min:0}},init:function(){var e,t=this.el;e=this.camera=new i.PerspectiveCamera,t.setObject3D("camera",e)},update:function(e){var t=this.data,n=this.camera;n.aspect=t.aspect||window.innerWidth/window.innerHeight,n.far=t.far,n.fov=t.fov,n.near=t.near,n.zoom=t.zoom,n.updateProjectionMatrix(),this.updateActiveCamera(e),this.updateSpectatorCamera(e)},updateActiveCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.active===t.active||t.spectator||(t.active&&r.activeCameraEl!==n?r.setActiveCamera(n):t.active||r.activeCameraEl!==n||r.disableActiveCamera())},updateSpectatorCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.spectator===t.spectator||(t.spectator&&r.spectatorCameraEl!==n?r.setSpectatorCamera(n):t.spectator||r.spectatorCameraEl!==n||r.disableSpectatorCamera())},remove:function(){this.el.removeObject3D("camera")}})},{"../core/component":131,"../lib/three":179}],76:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/"),o=i.bind,a="click",s="fusing",l="mouseenter",c="mousedown",u="mouseleave",h="mouseup",d="cursor-fusing",f="cursor-hovering",p="cursor-hovered",m={DOWN:["mousedown","touchstart"],UP:["mouseup","touchend"]},g={DOWN:["selectstart"],UP:["selectend"]};t.exports.Component=r("cursor",{dependencies:["raycaster"],schema:{downEvents:{default:[]},fuse:{default:i.device.isMobile()},fuseTimeout:{default:1500,min:0},mouseCursorStylesEnabled:{default:!0},upEvents:{default:[]},rayOrigin:{default:"entity",oneOf:["mouse","entity"]}},init:function(){var e=this;this.fuseTimeout=void 0,this.cursorDownEl=null,this.intersectedEl=null,this.canvasBounds=document.body.getBoundingClientRect(),this.isCursorDown=!1,this.updateCanvasBounds=i.debounce((function(){e.canvasBounds=e.el.sceneEl.canvas.getBoundingClientRect()}),500),this.eventDetail={},this.intersectedEventDetail={cursorEl:this.el},this.onCursorDown=o(this.onCursorDown,this),this.onCursorUp=o(this.onCursorUp,this),this.onIntersection=o(this.onIntersection,this),this.onIntersectionCleared=o(this.onIntersectionCleared,this),this.onMouseMove=o(this.onMouseMove,this),this.onEnterVR=o(this.onEnterVR,this)},update:function(e){this.data.rayOrigin!==e.rayOrigin&&this.updateMouseEventListeners()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){var e=this.el;e.removeState(f),e.removeState(d),clearTimeout(this.fuseTimeout),this.intersectedEl&&this.intersectedEl.removeState(p),this.removeEventListeners()},addEventListeners:function(){var e,t=this.data,n=this.el,r=this;function i(){e=n.sceneEl.canvas,t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.addEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.addEventListener(t,r.onCursorUp)})))}(e=n.sceneEl.canvas)?i():n.sceneEl.addEventListener("render-target-loaded",i),t.downEvents.forEach((function(e){n.addEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.addEventListener(e,r.onCursorUp)})),n.addEventListener("raycaster-intersection",this.onIntersection),n.addEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),n.sceneEl.addEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.addEventListener("enter-vr",this.onEnterVR),window.addEventListener("resize",this.updateCanvasBounds),window.addEventListener("scroll",this.updateCanvasBounds),this.updateMouseEventListeners()},removeEventListeners:function(){var e,t=this.data,n=this.el,r=this;!(e=n.sceneEl.canvas)||t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.removeEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.removeEventListener(t,r.onCursorUp)}))),t.downEvents.forEach((function(e){n.removeEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.removeEventListener(e,r.onCursorUp)})),n.removeEventListener("raycaster-intersection",this.onIntersection),n.removeEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchstart",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),n.sceneEl.removeEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.removeEventListener("enter-vr",this.onEnterVR),window.removeEventListener("resize",this.updateCanvasBounds),window.removeEventListener("scroll",this.updateCanvasBounds)},updateMouseEventListeners:function(){var e,t=this.el;(e=t.sceneEl.canvas).removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),t.setAttribute("raycaster","useWorldCoordinates",!1),"mouse"===this.data.rayOrigin&&(e.addEventListener("mousemove",this.onMouseMove,!1),e.addEventListener("touchmove",this.onMouseMove,!1),t.setAttribute("raycaster","useWorldCoordinates",!0),this.updateCanvasBounds())},onMouseMove:function(){var e=new THREE.Vector3,t=new THREE.Vector2,n=new THREE.Vector3,r={origin:n,direction:e};return function(i){var o,a,s,l=this.canvasBounds,c=this.el.sceneEl.camera;c.parent.updateMatrixWorld(),o=(a="touchmove"===i.type||"touchstart"===i.type?i.touches.item(0):i).clientX-l.left,s=a.clientY-l.top,t.x=o/l.width*2-1,t.y=-s/l.height*2+1,n.setFromMatrixPosition(c.matrixWorld),e.set(t.x,t.y,.5).unproject(c).sub(n).normalize(),this.el.setAttribute("raycaster",r),"touchmove"===i.type&&i.preventDefault()}}(),onCursorDown:function(e){this.isCursorDown=!0,"mouse"===this.data.rayOrigin&&"touchstart"===e.type&&(this.onMouseMove(e),this.el.components.raycaster.checkIntersections(),e.preventDefault()),this.twoWayEmit(c),this.cursorDownEl=this.intersectedEl},onCursorUp:function(e){if(this.isCursorDown){this.isCursorDown=!1;var t=this.data;this.twoWayEmit(h),this.cursorDownEl&&this.cursorDownEl!==this.intersectedEl&&(this.intersectedEventDetail.intersection=null,this.cursorDownEl.emit(h,this.intersectedEventDetail)),t.fuse&&"mouse"!==t.rayOrigin||!this.intersectedEl||this.cursorDownEl!==this.intersectedEl||this.twoWayEmit(a),this.cursorDownEl=null,"touchend"===e.type&&e.preventDefault()}},onIntersection:function(e){var t,n,r,i,o=this.el;n=e.detail.els[0]===o?1:0,i=e.detail.intersections[n],(r=e.detail.els[n])&&this.intersectedEl!==r&&(this.intersectedEl&&(t=this.el.components.raycaster.getIntersection(this.intersectedEl))&&t.distance<=i.distance||(this.clearCurrentIntersection(!0),this.setIntersection(r,i)))},onIntersectionCleared:function(e){-1!==e.detail.clearedEls.indexOf(this.intersectedEl)&&this.clearCurrentIntersection()},onEnterVR:function(){this.clearCurrentIntersection(!0);var e=this.el.sceneEl.xrSession,t=this;e&&"mouse"!==this.data.rayOrigin&&(g.DOWN.forEach((function(n){e.addEventListener(n,t.onCursorDown)})),g.UP.forEach((function(n){e.addEventListener(n,t.onCursorUp)})))},setIntersection:function(e,t){var n=this.el,r=this.data,i=this;this.intersectedEl!==e&&(this.intersectedEl=e,n.addState(f),e.addState(p),this.twoWayEmit(l),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.add("a-mouse-cursor-hover"),0!==r.fuseTimeout&&r.fuse&&(n.addState(d),this.twoWayEmit(s),this.fuseTimeout=setTimeout((function(){n.removeState(d),i.twoWayEmit(a)}),r.fuseTimeout)))},clearCurrentIntersection:function(e){var t,n,r=this.el;this.intersectedEl&&(this.intersectedEl.removeState(p),r.removeState(f),r.removeState(d),this.twoWayEmit(u),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.remove("a-mouse-cursor-hover"),this.intersectedEl=null,clearTimeout(this.fuseTimeout),!0!==e&&0!==(n=this.el.components.raycaster.intersections).length&&(t=n[n[0].object.el===r?1:0])&&this.setIntersection(t.object.el,t))},twoWayEmit:function(e){var t,n=this.el,r=this.intersectedEl;t=this.el.components.raycaster.getIntersection(r),this.eventDetail.intersectedEl=r,this.eventDetail.intersection=t,n.emit(e,this.eventDetail),r&&(this.intersectedEventDetail.intersection=t,r.emit(e,this.intersectedEventDetail))}})},{"../core/component":131,"../utils/":205}],77:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"google-daydream":"Daydream Controller",h=c?{axes:{touchpad:[0,1]},buttons:["none","none","touchpad","menu","system"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","menu","system"]};t.exports.Component=r("daydream-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.obj",mtl:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).menu=n.getObjectByName("AppButton_AppButton_Cylinder.004"),t.system=n.getObjectByName("HomeButton_HomeButton_Cylinder.005"),t.trackpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),t.touchpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),n.position.set(0,0,-.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],78:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"samsung-gearvr":"Gear VR",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("gearvr-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.obj",mtl:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.children[2],t.trackpad=n.children[1],t.touchpad=n.children[1])},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],79:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("generic-tracked-controller-controls",{schema:{hand:{default:""},defaultModel:{default:!0},defaultModelColor:{default:"gray"},orientationOffset:{type:"vec3"},disabled:{default:!1}},mapping:{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick"]},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.wasControllerConnected=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods(),this.el.addEventListener("controllerconnected",(function(t){t.detail.name!==e.name&&(e.wasControllerConnected=!0,e.removeEventListeners(),e.removeControllersUpdateListener())}))},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;a(this,"generic",{hand:t,iterateControllerProfiles:!0})},play:function(){this.wasControllerConnected||(this.checkIfControllerPresent(),this.addControllersUpdateListener())},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;this.el.components["tracked-controls"]?this.removeEventListeners():(e.setAttribute("tracked-controls",{hand:t.hand,idPrefix:"generic",orientationOffset:t.orientationOffset,iterateControllerProfiles:!0}),this.data.defaultModel&&this.initDefaultModel())},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},initDefaultModel:function(){var e=this.modelEl=document.createElement("a-entity");e.setAttribute("geometry",{primitive:"sphere",radius:.03}),e.setAttribute("material",{color:this.data.color}),this.el.appendChild(e)}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],80:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/geometry").geometryNames,o=e("../core/component").registerComponent,a=e("../lib/three"),s=new a.BufferGeometry;t.exports.Component=o("geometry",{schema:{buffer:{default:!0},primitive:{default:"box",oneOf:i,schemaChange:!0},skipCache:{default:!1}},init:function(){this.geometry=null},update:function(e){var t,n=this.data,r=this.el,i=this.system;this.geometry&&(i.unuseGeometry(e),this.geometry=null),this.geometry=i.getOrCreateGeometry(n),(t=r.getObject3D("mesh"))?t.geometry=this.geometry:((t=new a.Mesh).geometry=this.geometry,this.el.getAttribute("material")||(t.material=new a.MeshStandardMaterial({color:16777215*Math.random(),metalness:0,roughness:.5})),r.setObject3D("mesh",t))},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D("mesh").geometry=s,this.geometry=null},updateSchema:function(e){var t=this.oldData&&this.oldData.primitive,n=e.primitive,i=r[n]&&r[n].schema;if(!i)throw new Error("Unknown geometry schema `"+n+"`");t&&t===n||this.extendSchema(i)}})},{"../core/component":131,"../core/geometry":132,"../lib/three":179}],81:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:gltf-model:warn");t.exports.Component=r("gltf-model",{schema:{type:"model"},init:function(){var e=this.system.getDRACOLoader();this.model=null,this.loader=new i.GLTFLoader,e&&this.loader.setDRACOLoader(e)},update:function(){var e=this,t=this.el,n=this.data;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene||n.scenes[0],e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}),void 0,(function(e){var r=e&&e.message?e.message:"Failed to load glTF model";o(r),t.emit("model-error",{format:"gltf",src:n})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],82:[function(e,t,n){var r=e("../core/component").registerComponent,i={toonLeft:"https://cdn.aframe.io/controllers/hands/leftHand.glb",toonRight:"https://cdn.aframe.io/controllers/hands/rightHand.glb",lowPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandLow.glb",lowPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandLow.glb",highPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandHigh.glb",highPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandHigh.glb"},o="Open",a="Point",s="Point + Thumb",l="Fist",c="Hold",u="Thumb Up",h={};function d(e,t){var n;if(e)return"grip"===(n=h[e])?n+(t?"close":"open"):"point"===n?n+(t?"up":"down"):"pointing"===n||"pistol"===n?n+(t?"start":"end"):void 0}h[l]="grip",h[u]="pistol",h[a]="pointing",t.exports.Component=r("hand-controls",{schema:{color:{default:"white",type:"color"},hand:{default:"left"},handModelStyle:{default:"lowPoly",oneOf:["lowPoly","highPoly","toon"]}},init:function(){var e=this,t=this.el;this.gesture=o,this.pressedButtons={},this.touchedButtons={},this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("anonymous"),this.onGripDown=function(){e.handleButton("grip","down")},this.onGripUp=function(){e.handleButton("grip","up")},this.onTrackpadDown=function(){e.handleButton("trackpad","down")},this.onTrackpadUp=function(){e.handleButton("trackpad","up")},this.onTrackpadTouchStart=function(){e.handleButton("trackpad","touchstart")},this.onTrackpadTouchEnd=function(){e.handleButton("trackpad","touchend")},this.onTriggerDown=function(){e.handleButton("trigger","down")},this.onTriggerUp=function(){e.handleButton("trigger","up")},this.onTriggerTouchStart=function(){e.handleButton("trigger","touchstart")},this.onTriggerTouchEnd=function(){e.handleButton("trigger","touchend")},this.onGripTouchStart=function(){e.handleButton("grip","touchstart")},this.onGripTouchEnd=function(){e.handleButton("grip","touchend")},this.onThumbstickDown=function(){e.handleButton("thumbstick","down")},this.onThumbstickUp=function(){e.handleButton("thumbstick","up")},this.onAorXTouchStart=function(){e.handleButton("AorX","touchstart")},this.onAorXTouchEnd=function(){e.handleButton("AorX","touchend")},this.onBorYTouchStart=function(){e.handleButton("BorY","touchstart")},this.onBorYTouchEnd=function(){e.handleButton("BorY","touchend")},this.onSurfaceTouchStart=function(){e.handleButton("surface","touchstart")},this.onSurfaceTouchEnd=function(){e.handleButton("surface","touchend")},this.onControllerConnected=this.onControllerConnected.bind(this),this.onControllerDisconnected=this.onControllerDisconnected.bind(this),t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected),t.object3D.visible=!1},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.mixer&&n.mixer.update(t/1e3)},onControllerConnected:function(){this.el.object3D.visible=!0},onControllerDisconnected:function(){this.el.object3D.visible=!1},addEventListeners:function(){var e=this.el;e.addEventListener("gripdown",this.onGripDown),e.addEventListener("gripup",this.onGripUp),e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.addEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.addEventListener("triggerdown",this.onTriggerDown),e.addEventListener("triggerup",this.onTriggerUp),e.addEventListener("triggertouchstart",this.onTriggerTouchStart),e.addEventListener("triggertouchend",this.onTriggerTouchEnd),e.addEventListener("griptouchstart",this.onGripTouchStart),e.addEventListener("griptouchend",this.onGripTouchEnd),e.addEventListener("thumbstickdown",this.onThumbstickDown),e.addEventListener("thumbstickup",this.onThumbstickUp),e.addEventListener("abuttontouchstart",this.onAorXTouchStart),e.addEventListener("abuttontouchend",this.onAorXTouchEnd),e.addEventListener("bbuttontouchstart",this.onBorYTouchStart),e.addEventListener("bbuttontouchend",this.onBorYTouchEnd),e.addEventListener("xbuttontouchstart",this.onAorXTouchStart),e.addEventListener("xbuttontouchend",this.onAorXTouchEnd),e.addEventListener("ybuttontouchstart",this.onBorYTouchStart),e.addEventListener("ybuttontouchend",this.onBorYTouchEnd),e.addEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.addEventListener("surfacetouchend",this.onSurfaceTouchEnd)},removeEventListeners:function(){var e=this.el;e.removeEventListener("gripdown",this.onGripDown),e.removeEventListener("gripup",this.onGripUp),e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.removeEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.removeEventListener("triggerdown",this.onTriggerDown),e.removeEventListener("triggerup",this.onTriggerUp),e.removeEventListener("triggertouchstart",this.onTriggerTouchStart),e.removeEventListener("triggertouchend",this.onTriggerTouchEnd),e.removeEventListener("griptouchstart",this.onGripTouchStart),e.removeEventListener("griptouchend",this.onGripTouchEnd),e.removeEventListener("thumbstickdown",this.onThumbstickDown),e.removeEventListener("thumbstickup",this.onThumbstickUp),e.removeEventListener("abuttontouchstart",this.onAorXTouchStart),e.removeEventListener("abuttontouchend",this.onAorXTouchEnd),e.removeEventListener("bbuttontouchstart",this.onBorYTouchStart),e.removeEventListener("bbuttontouchend",this.onBorYTouchEnd),e.removeEventListener("xbuttontouchstart",this.onAorXTouchStart),e.removeEventListener("xbuttontouchend",this.onAorXTouchEnd),e.removeEventListener("ybuttontouchstart",this.onBorYTouchStart),e.removeEventListener("ybuttontouchend",this.onBorYTouchEnd),e.removeEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.removeEventListener("surfacetouchend",this.onSurfaceTouchEnd)},update:function(e){var t,n=this.el,r=this.data.hand,o=this.data.handModelStyle,a=this.data.color,s=this;if(t={hand:r,model:!1},r!==e){var l=i[o+r.charAt(0).toUpperCase()+r.slice(1)];this.loader.load(l,(function(e){var i=e.scene.children[0],o="left"===r?Math.PI/2:-Math.PI/2;i.mixer=new THREE.AnimationMixer(i),s.clips=e.animations,n.setObject3D("mesh",i),i.children[1].material.color=new THREE.Color(a),i.position.set(0,0,0),i.rotation.set(0,0,o),n.setAttribute("magicleap-controls",t),n.setAttribute("vive-controls",t),n.setAttribute("oculus-touch-controls",t),n.setAttribute("windows-motion-controls",t)}))}},remove:function(){this.el.removeObject3D("mesh")},handleButton:function(e,t){var n,r="down"===t,i="touchstart"===t;if(0===t.indexOf("touch")){if(i===this.touchedButtons[e])return;this.touchedButtons[e]=i}else{if(r===this.pressedButtons[e])return;this.pressedButtons[e]=r}n=this.gesture,this.gesture=this.determineGesture(),this.gesture!==n&&(this.animateGesture(this.gesture,n),this.emitGestureEvents(this.gesture,n))},determineGesture:function(){var e,t=this.pressedButtons.grip,n=this.pressedButtons.surface||this.touchedButtons.surface,r=this.pressedButtons.trackpad||this.touchedButtons.trackpad,i=this.pressedButtons.trigger||this.touchedButtons.trigger,o=this.touchedButtons.AorX||this.touchedButtons.BorY;return function(e){var t=e&&e.controller;return t&&(t.id&&0===t.id.indexOf("OpenVR ")||t.profiles&&t.profiles[0]&&"htc-vive-controller-mv"===t.profiles[0])}(this.el.components["tracked-controls"])?t||i?e=l:r&&(e=a):t?e=n||o||r?i?l:a:i?u:s:i&&(e=c),e},getClip:function(e){var t,n;for(n=0;n<this.clips.length;n++)if((t=this.clips[n]).name===e)return t},animateGesture:function(e,t){e?this.playAnimation(e||o,t,!1):this.playAnimation(t,t,!0)},emitGestureEvents:function(e,t){var n,r=this.el;t!==e&&((n=d(t,!1))&&r.emit(n),(n=d(e,!0))&&r.emit(n))},playAnimation:function(e,t,n){var r,i,o,a=this.el.getObject3D("mesh");if(a){if(a.mixer.stopAllAction(),r=this.getClip(e),(o=a.mixer.clipAction(r)).clampWhenFinished=!0,o.loop=THREE.LoopRepeat,o.repetitions=0,o.timeScale=n?-1:1,o.time=n?r.duration:0,o.weight=1,!t||e===t)return a.mixer.stopAllAction(),void o.play();r=this.getClip(t),(i=a.mixer.clipAction(r)).weight=.15,i.play(),o.play(),i.crossFadeTo(o,.15,!0)}}})},{"../core/component":131}],83:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls").checkControllerPresentAndSetup,a={left:"b_l_",right:"b_r_"},s=["wrist","thumb-metacarpal","thumb-phalanx-proximal","thumb-phalanx-distal","thumb-tip","index-finger-metacarpal","index-finger-phalanx-proximal","index-finger-phalanx-intermediate","index-finger-phalanx-distal","index-finger-tip","middle-finger-metacarpal","middle-finger-phalanx-proximal","middle-finger-phalanx-intermediate","middle-finger-phalanx-distal","middle-finger-tip","ring-finger-metacarpal","ring-finger-phalanx-proximal","ring-finger-phalanx-intermediate","ring-finger-phalanx-distal","ring-finger-tip","pinky-finger-metacarpal","pinky-finger-phalanx-proximal","pinky-finger-phalanx-intermediate","pinky-finger-phalanx-distal","pinky-finger-tip"],l={wrist:"wrist","thumb-metacarpal":"thumb1","thumb-phalanx-proximal":"thumb2","thumb-phalanx-distal":"thumb3","thumb-tip":"thumb_null","index-finger-phalanx-proximal":"index1","index-finger-phalanx-intermediate":"index2","index-finger-phalanx-distal":"index3","index-finger-tip":"index_null","middle-finger-phalanx-proximal":"middle1","middle-finger-phalanx-intermediate":"middle2","middle-finger-phalanx-distal":"middle3","middle-finger-tip":"middle_null","ring-finger-phalanx-proximal":"ring1","ring-finger-phalanx-intermediate":"ring2","ring-finger-phalanx-distal":"ring3","ring-finger-tip":"ring_null","pinky-finger-metacarpal":"pinky0","pinky-finger-phalanx-proximal":"pinky1","pinky-finger-phalanx-intermediate":"pinky2","pinky-finger-phalanx-distal":"pinky3","pinky-finger-tip":"pinky_null"};t.exports.Component=r("hand-tracking-controls",{schema:{hand:{default:"right",oneOf:["left","right"]},modelStyle:{default:"mesh",oneOf:["dots","mesh"]},modelColor:{default:"white"}},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this)},addEventListeners:function(){this.el.addEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!0},removeEventListeners:function(){this.el.removeEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!1},init:function(){var e=this.el.sceneEl,t=e.getAttribute("webxr").optionalFeatures;t.push("hand-tracking"),e.setAttribute("webxr",{optionalFeatures:t}),this.onModelLoaded=this.onModelLoaded.bind(this),this.jointEls=[],this.controllerPresent=!1,this.isPinched=!1,this.pinchEventDetail={position:new THREE.Vector3},this.indexTipPosition=new THREE.Vector3,this.bindMethods(),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.sceneEl.addEventListener("enter-vr",this.updateReferenceSpace),this.el.sceneEl.addEventListener("exit-vr",this.updateReferenceSpace)},updateReferenceSpace:function(){var e=this,t=this.el.sceneEl.xrSession;if(this.referenceSpace=void 0,t){var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t.getOffsetReferenceSpace(new XRRigidTransform({x:0,y:1.5,z:0}))})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,"tracked-controls-webxr uses reference space "+n),t}))}},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;o(this,"",{hand:t,iterateControllerProfiles:!0,handTracking:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},tick:function(){var e=this.el.sceneEl,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=e.frame,r=this.el.components["tracked-controls-webxr"];t&&n&&r&&t.hand&&(this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),n.getJointPose&&this.updateHandModel(),this.detectGesture())},updateHandModel:function(){"dots"===this.data.modelStyle&&this.updateHandDotsModel(),"mesh"===this.data.modelStyle&&this.updateHandMeshModel()},getBone:function(e){for(var t=this.bones,n=0;n<t.length;n++)if(t[n].name===e)return t[n];return null},updateHandMeshModel:function(){var e=this.el.sceneEl.frame,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=this.referenceSpace;if(t&&this.mesh&&n)for(var r of(this.mesh.visible=!1,t.hand.values())){var i,o,s;o=e.getJointPose(r,n),l[r.jointName]&&null!=(i=this.getBone(a[this.data.hand]+l[r.jointName]))&&o&&(s=o.transform,this.mesh.visible=!0,i.position.copy(s.position).multiplyScalar(100),i.quaternion.set(s.orientation.x,s.orientation.y,s.orientation.z,s.orientation.w))}},updateHandDotsModel:function(){var e,t,n,r=this.el.sceneEl.frame,i=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,o=this.el.components["tracked-controls-webxr"].system.referenceSpace,a=0;for(var s of i.hand.values())t=(e=this.jointEls[a++]).object3D,n=r.getJointPose(s,o),e.object3D.visible=!!n,n&&(t.matrix.elements=n.transform.matrix,t.matrix.decompose(t.position,t.rotation,t.scale),e.setAttribute("scale",{x:n.radius,y:n.radius,z:n.radius}))},detectGesture:function(){this.detectPinch()},detectPinch:function(){var e=new THREE.Vector3;return function(){var t=this.el.sceneEl.frame,n=this.indexTipPosition,r=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,i=this.el.components["tracked-controls-webxr"],o=this.referenceSpace||i.system.referenceSpace,a=r.hand.get("index-finger-tip"),s=r.hand.get("thumb-tip");if(a&&s){var l=t.getJointPose(a,o),c=t.getJointPose(s,o);if(l&&c){e.copy(c.transform.position),n.copy(l.transform.position);var u=n.distanceTo(e);u<.015&&!1===this.isPinched&&(this.isPinched=!0,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchstarted",this.pinchEventDetail)),u>.03&&!0===this.isPinched&&(this.isPinched=!1,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchended",this.pinchEventDetail)),this.isPinched&&(this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchmoved",this.pinchEventDetail)),n.y+=1.5}}}}(),pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{hand:t.hand,iterateControllerProfiles:!0,handTrackingEnabled:!0}),this.initDefaultModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){var e;this.checkIfControllerPresent(),e=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,this.el.getObject3D("mesh")&&(e&&e.hand&&e.hand[0]||(this.el.getObject3D("mesh").visible=!1))},initDefaultModel:function(){this.el.getObject3D("mesh")||("dots"===this.data.modelStyle&&this.initDotsModel(),"mesh"===this.data.modelStyle&&this.initMeshHandModel())},initDotsModel:function(){if(0===this.jointEls.length)for(var e=0;e<s.length;++e){var t=this.jointEl=document.createElement("a-entity");t.setAttribute("geometry",{primitive:"sphere",radius:1}),t.setAttribute("material",{color:this.data.modelColor}),t.object3D.visible=!1,this.el.appendChild(t),this.jointEls.push(t)}},initMeshHandModel:function(){var e="left"===this.data.hand?"https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb":"https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb";this.el.setAttribute("gltf-model",e)},onModelLoaded:function(){var e=this.mesh=this.el.getObject3D("mesh").children[0],t=this.skinnedMesh=e.children[24];this.skinnedMesh&&(this.bones=t.skeleton.bones,this.el.removeObject3D("mesh"),e.position.set(0,1.5,0),e.rotation.set(0,0,0),t.frustumCulled=!1,t.material=new THREE.MeshStandardMaterial({skinning:!0,color:this.data.modelColor}),this.el.setObject3D("mesh",e))}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],84:[function(e,t,n){e("./animation"),e("./camera"),e("./cursor"),e("./daydream-controls"),e("./gearvr-controls"),e("./geometry"),e("./generic-tracked-controller-controls"),e("./gltf-model"),e("./hand-tracking-controls"),e("./hand-controls"),e("./layer"),e("./laser-controls"),e("./light"),e("./line"),e("./link"),e("./look-controls"),e("./magicleap-controls"),e("./material"),e("./obj-model"),e("./oculus-go-controls"),e("./oculus-touch-controls"),e("./position"),e("./raycaster"),e("./rotation"),e("./scale"),e("./shadow"),e("./sound"),e("./text"),e("./tracked-controls"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./visible"),e("./valve-index-controls"),e("./vive-controls"),e("./vive-focus-controls"),e("./wasd-controls"),e("./windows-motion-controls"),e("./scene/background"),e("./scene/debug"),e("./scene/device-orientation-permission-ui"),e("./scene/embedded"),e("./scene/inspector"),e("./scene/fog"),e("./scene/keyboard-shortcuts"),e("./scene/pool"),e("./scene/screenshot"),e("./scene/stats"),e("./scene/vr-mode-ui")},{"./animation":74,"./camera":75,"./cursor":76,"./daydream-controls":77,"./gearvr-controls":78,"./generic-tracked-controller-controls":79,"./geometry":80,"./gltf-model":81,"./hand-controls":82,"./hand-tracking-controls":83,"./laser-controls":85,"./layer":86,"./light":87,"./line":88,"./link":89,"./look-controls":90,"./magicleap-controls":91,"./material":92,"./obj-model":93,"./oculus-go-controls":94,"./oculus-touch-controls":95,"./position":96,"./raycaster":97,"./rotation":98,"./scale":99,"./scene/background":100,"./scene/debug":101,"./scene/device-orientation-permission-ui":102,"./scene/embedded":103,"./scene/fog":104,"./scene/inspector":105,"./scene/keyboard-shortcuts":106,"./scene/pool":107,"./scene/screenshot":108,"./scene/stats":109,"./scene/vr-mode-ui":110,"./shadow":111,"./sound":112,"./text":113,"./tracked-controls":116,"./tracked-controls-webvr":114,"./tracked-controls-webxr":115,"./valve-index-controls":117,"./visible":118,"./vive-controls":119,"./vive-focus-controls":120,"./wasd-controls":121,"./windows-motion-controls":122}],85:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/");r("laser-controls",{schema:{hand:{default:"right"},model:{default:!0},defaultModelColor:{type:"color",default:"grey"}},init:function(){var e=this.config,t=this.data,n=this.el,r=this,o={hand:t.hand,model:t.model};function a(t){var o=e[t.detail.name];if(o){var a=i.extend({showLine:!0},o.raycaster||{});t.detail.rayOrigin&&(a.origin=t.detail.rayOrigin.origin,a.direction=t.detail.rayOrigin.direction,a.showLine=!0),t.detail.rayOrigin||!r.modelReady?n.setAttribute("raycaster",a):n.setAttribute("raycaster","showLine",!0),n.setAttribute("cursor",i.extend({fuse:!1},o.cursor))}}n.setAttribute("daydream-controls",o),n.setAttribute("gearvr-controls",o),n.setAttribute("magicleap-controls",o),n.setAttribute("oculus-go-controls",o),n.setAttribute("oculus-touch-controls",o),n.setAttribute("valve-index-controls",o),n.setAttribute("vive-controls",o),n.setAttribute("vive-focus-controls",o),n.setAttribute("windows-motion-controls",o),n.setAttribute("generic-tracked-controller-controls",o),n.addEventListener("controllerconnected",a),n.addEventListener("controllerdisconnected",(function(){n.setAttribute("raycaster","showLine",!1)})),n.addEventListener("controllermodelready",(function(e){a(e),r.modelReady=!0}))},config:{"daydream-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"gearvr-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:.001,z:0}}},"generic-tracked-controller-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"magicleap-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-go-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:5e-4,z:0}}},"oculus-touch-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:0,z:0}}},"valve-index-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-focus-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"windows-motion-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{showLine:!1}}}})},{"../core/component":131,"../utils/":205}],86:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/").debug("components:layer:warn");t.exports.Component=r("layer",{schema:{type:{default:"quad",oneOf:["quad","monocubemap","stereocubemap"]},src:{type:"map"},rotateCubemap:{default:!1},width:{default:0},height:{default:0}},init:function(){var e=this.el.sceneEl.renderer.getContext();this.quaternion=new THREE.Quaternion,this.position=new THREE.Vector3,this.bindMethods(),this.needsRedraw=!1,this.frameBuffer=e.createFramebuffer();var t=this.el.sceneEl.getAttribute("webxr").requiredFeatures;t.push("layers"),this.el.sceneEl.getAttribute("webxr","requiredFeatures",t),this.el.sceneEl.addEventListener("enter-vr",this.onEnterVR),this.el.sceneEl.addEventListener("exit-vr",this.onExitVR)},bindMethods:function(){this.onRequestedReferenceSpace=this.onRequestedReferenceSpace.bind(this),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this)},update:function(e){this.data.src!==e.src&&this.updateSrc()},updateSrc:function(){var e=this.data.type;this.texture=void 0,"quad"!==e?"monocubemap"!==e&&"stereocubemap"!==e||this.loadCubeMapImages():this.loadQuadImage()},loadCubeMapImages:function(){var e,t=this.data.type,n=this.xrGLFactory,r=this.el.sceneEl.frame,i=this.data.src;this.visibilityChanged=!1,this.layer&&(i.complete?this.pendingCubeMapUpdate=!1:this.pendingCubeMapUpdate=!0,this.loadingScreen?this.loadingScreen=!1:this.loadingScreen=!0,"monocubemap"===t?(e=n.getSubImage(this.layer,r),this.loadCubeMapImage(e.colorTexture,i,0)):(e=n.getSubImage(this.layer,r,"left"),this.loadCubeMapImage(e.colorTexture,i,0),e=n.getSubImage(this.layer,r,"right"),this.loadCubeMapImage(e.colorTexture,i,6)))},loadQuadImage:function(){var e=this.data.src,t=this;this.el.sceneEl.systems.material.loadTexture(e,{src:e},(function(n){t.el.sceneEl.renderer.initTexture(n),t.texture=n,"VIDEO"===e.tagName&&setTimeout((function(){t.textureIsVideo=!0}),1e3),t.layer&&(t.layer.height=t.data.height/2||t.texture.image.height/1e3,t.layer.width=t.data.width/2||t.texture.image.width/1e3,t.needsRedraw=!0),t.updateQuadPanel()}))},preGenerateCubeMapTextures:function(e,t){"monocubemap"===this.data.type?this.generateCubeMapTextures(e,0,t):(this.generateCubeMapTextures(e,0,t),this.generateCubeMapTextures(e,6,t))},generateCubeMapTextures:function(e,t,n){for(var r,i,o=this.data,a=this.cubeFaceSize,s=Math.min(e.width,e.height),l=[],c=0;c<6;c++){var u=document.createElement("CANVAS");u.width=u.height=a;var h=u.getContext("2d");o.rotateCubemap&&(2!==c&&3!==c||(h.save(),h.translate(a,a),h.rotate(Math.PI))),h.drawImage(e,(c+t)*s,0,s,s,0,0,a,a),h.restore(),n&&n(),l.push(u)}return o.rotateCubemap&&(r=l[0],i=l[1],l[0]=i,l[1]=r,r=l[4],i=l[5],l[4]=i,l[5]=r),n&&n(),l},loadCubeMapImage:function(e,t,n){var r,i=this.el.sceneEl.renderer.getContext();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.bindTexture(i.TEXTURE_CUBE_MAP,e),r=!t.complete||this.loadingScreen?this.loadingScreenImages:this.generateCubeMapTextures(t,n);var o=0;r.forEach((function(e,t){i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,i.RGBA,i.UNSIGNED_BYTE,e),o=i.getError()})),0!==o&&console.log("renderingError, WebGL Error Code: "+o),i.bindTexture(i.TEXTURE_CUBE_MAP,null)},tick:function(){this.el.sceneEl.xrSession&&(!this.layer&&this.el.sceneEl.is("vr-mode")&&this.initLayer(),this.updateTransform(),this.data.src.complete&&(this.pendingCubeMapUpdate||this.loadingScreen||this.visibilityChanged)&&this.loadCubeMapImages(),(this.needsRedraw||this.layer.needsRedraw||this.textureIsVideo)&&("quad"===this.data.type&&this.draw(),this.needsRedraw=!1))},initLayer:function(){var e=this,t=this.data.type;this.el.sceneEl.xrSession.onvisibilitychange=function(t){e.visibilityChanged="hidden"!==t.session.visibilityState},"quad"!==t?"monocubemap"!==t&&"stereocubemap"!==t||this.initCubeMapLayer():this.initQuadLayer()},initQuadLayer:function(){var e=this.el.sceneEl,t=e.renderer.getContext(),n=this.xrGLFactory=new XRWebGLBinding(e.xrSession,t);this.texture&&(this.layer=n.createQuadLayer({space:this.referenceSpace,viewPixelHeight:2048,viewPixelWidth:2048,height:this.data.height/2||this.texture.image.height/1e3,width:this.data.width/2||this.texture.image.width/1e3}),e.renderer.xr.addLayer(this.layer))},initCubeMapLayer:function(){var e=this.data.src,t=this.el.sceneEl,n=t.renderer.getContext(),r=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),i=this.cubeFaceSize=Math.min(r,Math.min(e.width,e.height)),o=this.xrGLFactory=new XRWebGLBinding(t.xrSession,n);this.layer=o.createCubeLayer({space:this.referenceSpace,viewPixelWidth:i,viewPixelHeight:i,layout:"monocubemap"===this.data.type?"mono":"stereo",isStatic:!1}),this.initLoadingScreenImages(),this.loadCubeMapImages(),t.renderer.xr.addLayer(this.layer)},initLoadingScreenImages:function(){for(var e=this.cubeFaceSize,t=this.loadingScreenImages=[],n=0;n<6;n++){var r=document.createElement("CANVAS");r.width=r.height=e;var i=r.getContext("2d");r.width=r.height=e,i.fillStyle="black",i.fillRect(0,0,e,e),2!==n&&3!==n&&(i.translate(e,0),i.scale(-1,1),i.fillStyle="white",i.font="30px Arial",i.fillText("Loading",e/2,e/2)),t.push(r)}},destroyLayer:function(){this.layer&&(this.el.sceneEl.renderer.xr.removeLayer(this.layer),this.layer.destroy(),this.layer=void 0)},toggleCompositorLayer:function(){this.enableCompositorLayer(!this.layerEnabled)},enableCompositorLayer:function(e){this.layerEnabled=e,this.quadPanelEl.object3D.visible=!this.layerEnabled},updateQuadPanel:function(){var e=this.quadPanelEl;this.quadPanelEl||(e=this.quadPanelEl=document.createElement("a-entity"),this.el.appendChild(e)),e.setAttribute("material",{shader:"flat",src:this.data.src,transparent:!0}),e.setAttribute("geometry",{primitive:"plane",height:this.data.height||this.texture.image.height/1e3,width:this.data.width||this.texture.image.height/1e3})},draw:function(){var e=this.el.sceneEl,t=this.el.sceneEl.renderer.getContext(),n=this.xrGLFactory.getSubImage(this.layer,e.frame),r=e.renderer.properties.get(this.texture).__webglTexture,i=t.getParameter(t.FRAMEBUFFER_BINDING);t.viewport(n.viewport.x,n.viewport.y,n.viewport.width,n.viewport.height),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n.colorTexture,0),function(e,t,n,r){var i=e.createFramebuffer();let o=n.viewport.x,a=n.viewport.y,s=n.viewport.x+n.viewport.width,l=n.viewport.y+n.viewport.height;"VIDEO"===r.tagName&&(e.bindTexture(e.TEXTURE_2D,t),e.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,e.RGB,e.UNSIGNED_BYTE,r)),e.bindFramebuffer(e.READ_FRAMEBUFFER,i),e.framebufferTexture2D(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),e.readBuffer(e.COLOR_ATTACHMENT0),e.blitFramebuffer(0,0,r.width,r.height,o,a,s,l,e.COLOR_BUFFER_BIT,e.NEAREST),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.deleteFramebuffer(i)}(t,r,n,this.data.src),t.bindFramebuffer(t.FRAMEBUFFER,i)},updateTransform:function(){var e=this.el,t=this.position,n=this.quaternion;e.object3D.updateMatrixWorld(),t.setFromMatrixPosition(e.object3D.matrixWorld),n.setFromRotationMatrix(e.object3D.matrixWorld),this.layerEnabled||t.set(0,0,1e8),this.layer.transform=new XRRigidTransform(t,n)},onEnterVR:function(){var e=this.el.sceneEl,t=e.xrSession;e.hasWebXR&&XRWebGLBinding&&t?(t.requestReferenceSpace("local").then(this.onRequestedReferenceSpace),this.needsRedraw=!0,this.layerEnabled=!0,this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!1),this.data.src.play&&this.data.src.play()):i("The layer component requires WebXR and the layers API enabled")},onExitVR:function(){this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!0),this.destroyLayer()},onRequestedReferenceSpace:function(e){this.referenceSpace=e}})},{"../core/component":131,"../utils/":205}],87:[function(e,t,n){var r=e("../utils/bind"),i=e("../utils").diff,o=e("../utils/debug"),a=e("../core/component").registerComponent,s=e("../lib/three"),l=s.Math.degToRad,c=o("components:light:warn");t.exports.Component=a("light",{schema:{angle:{default:60,if:{type:["spot"]}},color:{type:"color"},groundColor:{type:"color",if:{type:["hemisphere"]}},decay:{default:1,if:{type:["point","spot"]}},distance:{default:0,min:0,if:{type:["point","spot"]}},intensity:{default:1,min:0,if:{type:["ambient","directional","hemisphere","point","spot"]}},penumbra:{default:0,min:0,max:1,if:{type:["spot"]}},type:{default:"directional",oneOf:["ambient","directional","hemisphere","point","spot"],schemaChange:!0},target:{type:"selector",if:{type:["spot","directional"]}},castShadow:{default:!1,if:{type:["point","spot","directional"]}},shadowBias:{default:0,if:{castShadow:!0}},shadowCameraFar:{default:500,if:{castShadow:!0}},shadowCameraFov:{default:90,if:{castShadow:!0}},shadowCameraNear:{default:.5,if:{castShadow:!0}},shadowCameraTop:{default:5,if:{castShadow:!0}},shadowCameraRight:{default:5,if:{castShadow:!0}},shadowCameraBottom:{default:-5,if:{castShadow:!0}},shadowCameraLeft:{default:-5,if:{castShadow:!0}},shadowCameraVisible:{default:!1,if:{castShadow:!0}},shadowMapHeight:{default:512,if:{castShadow:!0}},shadowMapWidth:{default:512,if:{castShadow:!0}},shadowRadius:{default:1,if:{castShadow:!0}}},init:function(){var e=this.el;this.light=null,this.defaultTarget=null,this.rendererSystem=this.el.sceneEl.systems.renderer,this.system.registerLight(e)},update:function(e){var t=this.data,n=i(t,e),o=this.light,a=this.rendererSystem,s=this;if(!o||"type"in n)this.setLight(this.data),this.updateShadow();else{var c=!1;Object.keys(n).forEach((function(e){var n=t[e];switch(e){case"color":o.color.set(n),a.applyColorCorrection(o.color);break;case"groundColor":o.groundColor.set(n),a.applyColorCorrection(o.groundColor);break;case"angle":o.angle=l(n);break;case"target":null===n?"spot"!==t.type&&"directional"!==t.type||(o.target=s.defaultTarget):n.hasLoaded?s.onSetTarget(n,o):n.addEventListener("loaded",r(s.onSetTarget,s,n,o));break;case"castShadow":case"shadowBias":case"shadowCameraFar":case"shadowCameraFov":case"shadowCameraNear":case"shadowCameraTop":case"shadowCameraRight":case"shadowCameraBottom":case"shadowCameraLeft":case"shadowCameraVisible":case"shadowMapHeight":case"shadowMapWidth":case"shadowRadius":c||(s.updateShadow(),c=!0);break;default:o[e]=n}}))}},setLight:function(e){var t=this.el,n=this.getLight(e);n&&(this.light&&t.removeObject3D("light"),this.light=n,this.light.el=t,t.setObject3D("light",this.light),"spot"!==e.type&&"directional"!==e.type&&"hemisphere"!==e.type||t.getObject3D("light").translateY(-1),"spot"===e.type&&(t.setObject3D("light-target",this.defaultTarget),t.getObject3D("light-target").position.set(0,0,-1)))},updateShadow:function(){var e=this.el,t=this.data,n=this.light;n.castShadow=t.castShadow;var r=e.getObject3D("cameraHelper");if(t.shadowCameraVisible&&!r?e.setObject3D("cameraHelper",new s.CameraHelper(n.shadow.camera)):!t.shadowCameraVisible&&r&&e.removeObject3D("cameraHelper"),!t.castShadow)return n;n.shadow.bias=t.shadowBias,n.shadow.radius=t.shadowRadius,n.shadow.mapSize.height=t.shadowMapHeight,n.shadow.mapSize.width=t.shadowMapWidth,n.shadow.camera.near=t.shadowCameraNear,n.shadow.camera.far=t.shadowCameraFar,n.shadow.camera instanceof s.OrthographicCamera?(n.shadow.camera.top=t.shadowCameraTop,n.shadow.camera.right=t.shadowCameraRight,n.shadow.camera.bottom=t.shadowCameraBottom,n.shadow.camera.left=t.shadowCameraLeft):n.shadow.camera.fov=t.shadowCameraFov,n.shadow.camera.updateProjectionMatrix(),r&&r.update()},getLight:function(e){var t=e.angle,n=new s.Color(e.color);this.rendererSystem.applyColorCorrection(n),n=n.getHex();var i=e.decay,o=e.distance,a=new s.Color(e.groundColor);this.rendererSystem.applyColorCorrection(a),a=a.getHex();var u=e.intensity,h=e.type,d=e.target,f=null;switch(h.toLowerCase()){case"ambient":return new s.AmbientLight(n,u);case"directional":return f=new s.DirectionalLight(n,u),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;case"hemisphere":return new s.HemisphereLight(n,a,u);case"point":return new s.PointLight(n,u,o,i);case"spot":return f=new s.SpotLight(n,u,o,l(t),e.penumbra,i),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;default:c("%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.",h)}},onSetTarget:function(e,t){t.target=e.object3D},remove:function(){var e=this.el;e.removeObject3D("light"),e.getObject3D("cameraHelper")&&e.removeObject3D("cameraHelper")}})},{"../core/component":131,"../lib/three":179,"../utils":205,"../utils/bind":199,"../utils/debug":201}],88:[function(e,t,n){var r=e("../core/component").registerComponent;function i(e,t){return!(!e||!t)&&e.x===t.x&&e.y===t.y&&e.z===t.z}t.exports.Component=r("line",{schema:{start:{type:"vec3",default:{x:0,y:0,z:0}},end:{type:"vec3",default:{x:0,y:0,z:0}},color:{type:"color",default:"#74BEC1"},opacity:{type:"number",default:1},visible:{default:!0}},multiple:!0,init:function(){var e,t,n=this.data;this.rendererSystem=this.el.sceneEl.systems.renderer,t=this.material=new THREE.LineBasicMaterial({color:n.color,opacity:n.opacity,transparent:n.opacity<1,visible:n.visible}),(e=this.geometry=new THREE.BufferGeometry).setAttribute("position",new THREE.BufferAttribute(new Float32Array(6),3)),this.rendererSystem.applyColorCorrection(t.color),this.line=new THREE.Line(e,t),this.el.setObject3D(this.attrName,this.line)},update:function(e){var t=this.data,n=this.geometry,r=!1,o=this.material,a=n.attributes.position.array;i(t.start,e.start)||(a[0]=t.start.x,a[1]=t.start.y,a[2]=t.start.z,r=!0),i(t.end,e.end)||(a[3]=t.end.x,a[4]=t.end.y,a[5]=t.end.z,r=!0),r&&(n.attributes.position.needsUpdate=!0,n.computeBoundingSphere()),o.color.setStyle(t.color),this.rendererSystem.applyColorCorrection(o.color),o.opacity=t.opacity,o.transparent=t.opacity<1,o.visible=t.visible},remove:function(){this.el.removeObject3D("line",this.line)}})},{"../core/component":131}],89:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../core/shader").registerShader,o=e("../lib/three");t.exports.Component=r("link",{schema:{backgroundColor:{default:"red",type:"color"},borderColor:{default:"white",type:"color"},highlighted:{default:!1},highlightedColor:{default:"#24CAFF",type:"color"},href:{default:""},image:{type:"asset"},on:{default:"click"},peekMode:{default:!1},title:{default:""},titleColor:{default:"white",type:"color"},visualAspectEnabled:{default:!1}},init:function(){this.navigate=this.navigate.bind(this),this.previousQuaternion=void 0,this.quaternionClone=new o.Quaternion,this.hiddenEls=[]},update:function(e){var t,n,r=this.data,i=this.el;r.visualAspectEnabled&&(this.initVisualAspect(),t=r.highlighted?r.highlightedColor:r.backgroundColor,n=r.highlighted?r.highlightedColor:r.borderColor,i.setAttribute("material","backgroundColor",t),i.setAttribute("material","strokeColor",n),r.on!==e.on&&this.updateEventListener(),void 0!==e.peekMode&&r.peekMode!==e.peekMode&&this.updatePeekMode(),r.image&&e.image!==r.image&&i.setAttribute("material","pano","string"===typeof r.image?r.image:r.image.src))},updatePeekMode:function(){var e=this.el,t=this.sphereEl;this.data.peekMode?(this.hideAll(),e.getObject3D("mesh").visible=!1,t.setAttribute("visible",!0)):(this.showAll(),e.getObject3D("mesh").visible=!0,t.setAttribute("visible",!1))},play:function(){this.updateEventListener()},pause:function(){this.removeEventListener()},updateEventListener:function(){var e=this.el;e.isPlaying&&(this.removeEventListener(),e.addEventListener(this.data.on,this.navigate))},removeEventListener:function(){var e=this.data.on;e&&this.el.removeEventListener(e,this.navigate)},initVisualAspect:function(){var e,t,n,r=this.el;this.data.visualAspectEnabled&&!this.visualAspectInitialized&&(n=this.textEl=this.textEl||document.createElement("a-entity"),t=this.sphereEl=this.sphereEl||document.createElement("a-entity"),e=this.semiSphereEl=this.semiSphereEl||document.createElement("a-entity"),r.setAttribute("geometry",{primitive:"circle",radius:1,segments:64}),r.setAttribute("material",{shader:"portal",pano:this.data.image,side:"double"}),n.setAttribute("text",{color:this.data.titleColor,align:"center",font:"kelsonsans",value:this.data.title||this.data.href,width:4}),n.setAttribute("position","0 1.5 0"),r.appendChild(n),e.setAttribute("geometry",{primitive:"sphere",radius:1,phiStart:0,segmentsWidth:64,segmentsHeight:64,phiLength:180,thetaStart:0,thetaLength:360}),e.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),e.setAttribute("rotation","0 180 0"),e.setAttribute("position","0 0 0"),e.setAttribute("visible",!1),r.appendChild(e),t.setAttribute("geometry",{primitive:"sphere",radius:10,segmentsWidth:64,segmentsHeight:64}),t.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),t.setAttribute("visible",!1),r.appendChild(t),this.visualAspectInitialized=!0)},navigate:function(){window.location=this.data.href},tick:function(){var e=new o.Vector3,t=new o.Vector3,n=new o.Quaternion,r=new o.Vector3;return function(){var i,o,a=this.el,s=a.object3D,l=a.sceneEl.camera,c=this.textEl;if(this.data.visualAspectEnabled)if(s.updateMatrixWorld(),l.parent.updateMatrixWorld(),l.updateMatrixWorld(),s.matrix.decompose(t,n,r),t.setFromMatrixPosition(s.matrixWorld),e.setFromMatrixPosition(l.matrixWorld),(o=t.distanceTo(e))>20)this.previousQuaternion||(this.quaternionClone.copy(n),this.previousQuaternion=this.quaternionClone),s.lookAt(e);else{if(i=this.calculateCameraPortalOrientation(),o<.5){if(!0===this.semiSphereEl.getAttribute("visible"))return;c.setAttribute("text","width",1.5),i<=0?(c.setAttribute("position","0 0 0.75"),c.setAttribute("rotation","0 180 0"),this.semiSphereEl.setAttribute("rotation","0 0 0")):(c.setAttribute("position","0 0 -0.75"),c.setAttribute("rotation","0 0 0"),this.semiSphereEl.setAttribute("rotation","0 180 0")),a.getObject3D("mesh").visible=!1,this.semiSphereEl.setAttribute("visible",!0),this.peekCameraPortalOrientation=i}else i<=0?c.setAttribute("rotation","0 180 0"):c.setAttribute("rotation","0 0 0"),c.setAttribute("text","width",5),c.setAttribute("position","0 1.5 0"),a.getObject3D("mesh").visible=!0,this.semiSphereEl.setAttribute("visible",!1),this.peekCameraPortalOrientation=void 0;this.previousQuaternion&&(s.quaternion.copy(this.previousQuaternion),this.previousQuaternion=void 0)}}}(),hideAll:function(){var e=this.el,t=this.hiddenEls,n=this;t.length>0||e.sceneEl.object3D.traverse((function(r){r&&r.el&&r.el.hasAttribute("link-controls")||r.el&&r!==e.sceneEl.object3D&&r.el!==e&&r.el!==n.sphereEl&&r.el!==e.sceneEl.cameraEl&&!1!==r.el.getAttribute("visible")&&r.el!==n.textEl&&r.el!==n.semiSphereEl&&(r.el.setAttribute("visible",!1),t.push(r.el))}))},showAll:function(){this.hiddenEls.forEach((function(e){e.setAttribute("visible",!0)})),this.hiddenEls=[]},calculateCameraPortalOrientation:function(){var e=new o.Matrix4,t=new o.Vector3,n=new o.Vector3(0,0,1),r=new o.Vector3(0,0,0);return function(){var i=this.el,o=i.sceneEl.camera;return t.set(0,0,0),n.set(0,0,1),r.set(0,0,0),i.object3D.matrixWorld.extractRotation(e),n.applyMatrix4(e),i.object3D.updateMatrixWorld(),i.object3D.localToWorld(r),o.parent.parent.updateMatrixWorld(),o.parent.updateMatrixWorld(),o.updateMatrixWorld(),o.localToWorld(t),t.sub(r).normalize(),n.normalize(),Math.sign(n.dot(t))}}(),remove:function(){this.removeEventListener()}}),i("portal",{schema:{borderEnabled:{default:1,type:"int",is:"uniform"},backgroundColor:{default:"red",type:"color",is:"uniform"},pano:{type:"map",is:"uniform"},strokeColor:{default:"white",type:"color",is:"uniform"}},vertexShader:["vec3 portalPosition;","varying vec3 vWorldPosition;","varying float vDistanceToCenter;","varying float vDistance;","void main() {","vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);","portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;","vDistance = length(portalPosition - cameraPosition);","vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI2 0.15915494","uniform sampler2D pano;","uniform vec3 strokeColor;","uniform vec3 backgroundColor;","uniform float borderEnabled;","varying float vDistanceToCenter;","varying float vDistance;","varying vec3 vWorldPosition;","void main() {","vec3 direction = normalize(vWorldPosition - cameraPosition);","vec2 sampleUV;","float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);","sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);","sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;","if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {","gl_FragColor = vec4(strokeColor, 1.0);","} else {","gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));","}","}"].join("\n")})},{"../core/component":131,"../core/shader":141,"../lib/three":179}],90:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/"),a=o.bind,s=Math.PI/2;t.exports.Component=r("look-controls",{dependencies:["position","rotation"],schema:{enabled:{default:!0},magicWindowTrackingEnabled:{default:!0},pointerLockEnabled:{default:!1},reverseMouseDrag:{default:!1},reverseTouchDrag:{default:!1},touchEnabled:{default:!0},mouseEnabled:{default:!0}},init:function(){this.deltaYaw=0,this.previousHMDPosition=new i.Vector3,this.hmdQuaternion=new i.Quaternion,this.magicWindowAbsoluteEuler=new i.Euler,this.magicWindowDeltaEuler=new i.Euler,this.position=new i.Vector3,this.magicWindowObject=new i.Object3D,this.rotation={},this.deltaRotation={},this.savedPose=null,this.pointerLocked=!1,this.setupMouseControls(),this.bindMethods(),this.previousMouseEvent={},this.setupMagicWindowControls(),this.savedPose={position:new i.Vector3,rotation:new i.Euler},this.el.sceneEl.is("vr-mode")&&this.onEnterVR()},setupMagicWindowControls:function(){var e,t=this.data;o.device.isMobile()&&(e=this.magicWindowControls=new i.DeviceOrientationControls(this.magicWindowObject),"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission&&(e.enabled=!1,this.el.sceneEl.components["device-orientation-permission-ui"].permissionGranted?e.enabled=t.magicWindowTrackingEnabled:this.el.sceneEl.addEventListener("deviceorientationpermissiongranted",(function(){e.enabled=t.magicWindowTrackingEnabled}))))},update:function(e){var t=this.data;t.enabled!==e.enabled&&this.updateGrabCursor(t.enabled),e&&!t.magicWindowTrackingEnabled&&e.magicWindowTrackingEnabled&&(this.magicWindowAbsoluteEuler.set(0,0,0),this.magicWindowDeltaEuler.set(0,0,0)),this.magicWindowControls&&(this.magicWindowControls.enabled=t.magicWindowTrackingEnabled),e&&!t.pointerLockEnabled!==e.pointerLockEnabled&&(this.removeEventListeners(),this.addEventListeners(),this.pointerLocked&&this.exitPointerLock())},tick:function(e){this.data.enabled&&this.updateOrientation()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},remove:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},bindMethods:function(){this.onMouseDown=a(this.onMouseDown,this),this.onMouseMove=a(this.onMouseMove,this),this.onMouseUp=a(this.onMouseUp,this),this.onTouchStart=a(this.onTouchStart,this),this.onTouchMove=a(this.onTouchMove,this),this.onTouchEnd=a(this.onTouchEnd,this),this.onEnterVR=a(this.onEnterVR,this),this.onExitVR=a(this.onExitVR,this),this.onPointerLockChange=a(this.onPointerLockChange,this),this.onPointerLockError=a(this.onPointerLockError,this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new i.Object3D,this.yawObject=new i.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},addEventListeners:function(){var e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.onMouseUp,!1),t.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.addEventListener("enter-vr",this.onEnterVR),e.addEventListener("exit-vr",this.onExitVR),this.data.pointerLockEnabled&&(document.addEventListener("pointerlockchange",this.onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.addEventListener("pointerlockerror",this.onPointerLockError,!1))):e.addEventListener("render-target-loaded",a(this.addEventListeners,this))},removeEventListeners:function(){var e=this.el.sceneEl,t=e&&e.canvas;t&&(t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.removeEventListener("enter-vr",this.onEnterVR),e.removeEventListener("exit-vr",this.onExitVR),document.removeEventListener("pointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("pointerlockerror",this.onPointerLockError,!1))},updateOrientation:function(){var e=new i.Matrix4;return function(){var t,n=this.el.object3D,r=this.pitchObject,i=this.yawObject,o=this.el.sceneEl;o.is("vr-mode")&&o.checkHeadsetConnected()?o.hasWebXR&&(t=o.renderer.xr.getCameraPose())&&(e.elements=t.transform.matrix,e.decompose(n.position,n.rotation,n.scale)):(this.updateMagicWindowOrientation(),n.rotation.x=this.magicWindowDeltaEuler.x+r.rotation.x,n.rotation.y=this.magicWindowDeltaEuler.y+i.rotation.y,n.rotation.z=this.magicWindowDeltaEuler.z)}}(),updateMagicWindowOrientation:function(){var e=this.magicWindowAbsoluteEuler,t=this.magicWindowDeltaEuler;this.magicWindowControls&&this.magicWindowControls.enabled&&(this.magicWindowControls.update(),e.setFromQuaternion(this.magicWindowObject.quaternion,"YXZ"),this.previousMagicWindowYaw||0===e.y||(this.previousMagicWindowYaw=e.y),this.previousMagicWindowYaw&&(t.x=e.x,t.y+=e.y-this.previousMagicWindowYaw,t.z=e.z,this.previousMagicWindowYaw=e.y))},onMouseMove:function(e){var t,n,r,i=this.pitchObject,o=this.previousMouseEvent,a=this.yawObject;this.data.enabled&&(this.mouseDown||this.pointerLocked)&&(this.pointerLocked?(n=e.movementX||e.mozMovementX||0,r=e.movementY||e.mozMovementY||0):(n=e.screenX-o.screenX,r=e.screenY-o.screenY),this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,t=this.data.reverseMouseDrag?1:-1,a.rotation.y+=.002*n*t,i.rotation.x+=.002*r*t,i.rotation.x=Math.max(-s,Math.min(s,i.rotation.x)))},onMouseDown:function(e){var t=this.el.sceneEl;if(this.data.enabled&&this.data.mouseEnabled&&(!t.is("vr-mode")||!t.checkHeadsetConnected())&&0===e.button){var n=t&&t.canvas;this.mouseDown=!0,this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,this.showGrabbingCursor(),this.data.pointerLockEnabled&&!this.pointerLocked&&(n.requestPointerLock?n.requestPointerLock():n.mozRequestPointerLock&&n.mozRequestPointerLock())}},showGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor="grabbing"},hideGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor=""},onMouseUp:function(){this.mouseDown=!1,this.hideGrabbingCursor()},onTouchStart:function(e){1===e.touches.length&&this.data.touchEnabled&&!this.el.sceneEl.is("vr-mode")&&(this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(e){var t,n,r=this.el.sceneEl.canvas,i=this.yawObject;this.touchStarted&&this.data.touchEnabled&&(n=2*Math.PI*(e.touches[0].pageX-this.touchStart.x)/r.clientWidth,t=this.data.reverseTouchDrag?1:-1,i.rotation.y-=.5*n*t,this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1},onEnterVR:function(){var e=this.el.sceneEl;e.checkHeadsetConnected()&&(this.saveCameraPose(),this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),e.hasWebXR&&(this.el.object3D.matrixAutoUpdate=!1,this.el.object3D.updateMatrix()))},onExitVR:function(){this.el.sceneEl.checkHeadsetConnected()&&(this.restoreCameraPose(),this.previousHMDPosition.set(0,0,0),this.el.object3D.matrixAutoUpdate=!0)},onPointerLockChange:function(){this.pointerLocked=!(!document.pointerLockElement&&!document.mozPointerLockElement)},onPointerLockError:function(){this.pointerLocked=!1},exitPointerLock:function(){document.exitPointerLock(),this.pointerLocked=!1},updateGrabCursor:function(e){var t=this.el.sceneEl;function n(){t.canvas.classList.add("a-grab-cursor")}function r(){t.canvas.classList.remove("a-grab-cursor")}t.canvas?e?n():r():e?t.addEventListener("render-target-loaded",n):t.addEventListener("render-target-loaded",r)},saveCameraPose:function(){var e=this.el;this.savedPose.position.copy(e.object3D.position),this.savedPose.rotation.copy(e.object3D.rotation),this.hasSavedPose=!0},restoreCameraPose:function(){var e=this.el,t=this.savedPose;this.hasSavedPose&&(e.object3D.position.copy(t.position),e.object3D.rotation.copy(t.rotation),this.hasSavedPose=!1)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],91:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=i("magicleap-controls",{schema:{hand:{default:"none"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{touchpad:[0,1]},buttons:["trigger","grip","touchpad","menu"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,"magicleap-one",{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"magicleap-one",hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id];n&&("trigger"===n&&(t=e.detail.state.value,console.log("analog value of trigger press: "+t)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){e.detail.model.scale.set(.01,.01,.01)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){},setButtonColor:function(e,t){}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],92:[function(e,t,n){var r=e("../utils/"),i=e("../core/component"),o=e("../lib/three"),a=e("../core/shader"),s=r.debug("components:material:error"),l=i.registerComponent,c=a.shaders,u=a.shaderNames;function h(e,t){e.dispose(),t.unregisterMaterial(e)}t.exports.Component=l("material",{schema:{alphaTest:{default:0,min:0,max:1},depthTest:{default:!0},depthWrite:{default:!0},flatShading:{default:!1},npot:{default:!1},offset:{type:"vec2",default:{x:0,y:0}},opacity:{default:1,min:0,max:1},repeat:{type:"vec2",default:{x:1,y:1}},shader:{default:"standard",oneOf:u,schemaChange:!0},side:{default:"front",oneOf:["front","back","double"]},transparent:{default:!1},vertexColors:{type:"string",default:"none",oneOf:["face","vertex"]},visible:{default:!0},blending:{default:"normal",oneOf:["none","normal","additive","subtractive","multiply"]},dithering:{default:!0}},init:function(){this.material=null},update:function(e){var t=this.data;this.shader&&t.shader===e.shader||this.updateShader(t.shader),this.shader.update(this.data),this.updateMaterial(e)},updateSchema:function(e){var t,n,r,i;n=e&&e.shader,t=this.oldData&&this.oldData.shader,(r=c[i=n||t]&&c[i].schema)||s("Unknown shader schema "+i),t&&n===t||(this.extendSchema(r),this.updateBehavior())},updateBehavior:function(){var e,t,n=this.el.sceneEl,r=this.schema,i=this;function o(e,n){var r;for(r in t)t[r]=e;i.shader.update(t)}for(e in this.tick=void 0,t={},r)"time"===r[e].type&&(this.tick=o,t[e]=!0);n&&(this.tick?n.addBehavior(this):n.removeBehavior(this))},updateShader:function(e){var t,n=this.data,r=c[e]&&c[e].Shader;if(!r)throw new Error("Unknown shader "+e);(t=this.shader=new r).el=this.el,t.init(n),this.setMaterial(t.material),this.updateSchema(n)},updateMaterial:function(e){var t,n=this.data,r=this.material;for(t in r.alphaTest=n.alphaTest,r.depthTest=!1!==n.depthTest,r.depthWrite=!1!==n.depthWrite,r.opacity=n.opacity,r.flatShading=n.flatShading,r.side=function(e){switch(e){case"back":return o.BackSide;case"double":return o.DoubleSide;default:return o.FrontSide}}(n.side),r.transparent=!1!==n.transparent||n.opacity<1,r.vertexColors=function(e){switch(e){case"face":return o.FaceColors;case"vertex":return o.VertexColors;default:return o.NoColors}}(n.vertexColors),r.visible=n.visible,r.blending=function(e){switch(e){case"none":return o.NoBlending;case"additive":return o.AdditiveBlending;case"subtractive":return o.SubtractiveBlending;case"multiply":return o.MultiplyBlending;default:return o.NormalBlending}}(n.blending),r.dithering=n.dithering,e)break;!t||e.alphaTest===n.alphaTest&&e.side===n.side&&e.vertexColors===n.vertexColors||(r.needsUpdate=!0)},remove:function(){var e=new o.MeshBasicMaterial,t=this.material,n=this.el.getObject3D("mesh");n&&(n.material=e),h(t,this.system)},setMaterial:function(e){var t,n=this.el,r=this.system;this.material&&h(this.material,r),this.material=e,r.registerMaterial(e),(t=n.getObject3D("mesh"))?t.material=e:n.addEventListener("object3dset",(function t(r){"mesh"===r.detail.type&&r.target===n&&(n.getObject3D("mesh").material=e,n.removeEventListener("object3dset",t))}))}})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205}],93:[function(e,t,n){var r=e("../utils/debug"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=r("components:obj-model:warn");t.exports.Component=i("obj-model",{schema:{mtl:{type:"model"},obj:{type:"model"}},init:function(){var e=this;this.model=null,this.objLoader=new o.OBJLoader,this.mtlLoader=new o.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin="",this.el.addEventListener("componentinitialized",(function(t){e.model&&"material"===t.detail.name&&e.applyMaterial()}))},update:function(){var e=this.data;e.obj&&(this.resetMesh(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.resetMesh()},resetMesh:function(){this.el.removeObject3D("mesh")},loadObj:function(e,t){var n=this,r=this.el,i=this.mtlLoader,o=this.objLoader,s=this.el.sceneEl.systems.renderer,l=t.substr(0,t.lastIndexOf("/")+1);if(t)return r.hasAttribute("material")&&a("Material component properties are ignored when a .MTL is provided"),i.setResourcePath(l),void i.load(t,(function(t){t.preload(),o.setMaterials(t),o.load(e,(function(e){n.model=e,n.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&s.applyColorCorrection(t.color),t.map&&s.applyColorCorrection(t.map),t.emissive&&s.applyColorCorrection(t.emissive),t.emissiveMap&&s.applyColorCorrection(t.emissiveMap)}})),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))}));o.load(e,(function(e){n.model=e,n.applyMaterial(),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))},applyMaterial:function(){var e=this.el.components.material;e&&this.model.traverse((function(t){t instanceof o.Mesh&&(t.material=e.material)}))}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],94:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"oculus-go":"Oculus Go",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("oculus-go-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#FFFFFF"},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("oculus_go_button_trigger"),t.trackpad=n.getObjectByName("oculus_go_touchpad"),t.touchpad=n.getObjectByName("oculus_go_touchpad"))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r,i;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}(i=n[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(i.material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],95:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u=e("../utils/").device.isWebXRAvailable,h=u?"oculus-touch":"Oculus Touch",d="https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-",f={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)}},p={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)}},m={"oculus-touch":u?p:f,"oculus-touch-v2":{left:{modelUrl:d+"gen2-left.gltf",rayOrigin:{origin:{x:-.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"gen2-right.gltf",rayOrigin:{origin:{x:.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)}},"oculus-touch-v3":{left:{modelUrl:d+"v3-left.glb",rayOrigin:{origin:{x:.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)},right:{modelUrl:d+"v3-right.glb",rayOrigin:{origin:{x:-.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(-.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)}}},g=u?{left:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","abutton","bbutton","surface"]}}:{left:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","abutton","bbutton","surface"]}};t.exports.Component=i("oculus-touch-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#999"},buttonTouchColor:{type:"color",default:"#8AB"},buttonHighlightColor:{type:"color",default:"#2DF"},model:{default:!0},controllerType:{default:"auto",oneOf:["auto","oculus-touch","oculus-touch-v2","oculus-touch-v3"]},orientationOffset:{type:"vec3",default:{x:43,y:0,z:0}}},mapping:g,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e,e.data.hand)},this.onButtonUp=function(t){c(t.detail.id,"up",e,e.data.hand)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e,e.data.hand)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e,e.data.hand)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){s(this,h,{hand:this.data.hand})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},loadModel:function(e){var t,n=this.data;if(n.model){if(this.displayModel=m[n.controllerType]||m["oculus-touch"],"auto"===n.controllerType){var r=this.el.sceneEl.systems["tracked-controls-webvr"];if(r&&r.vrDisplay){var i=r.vrDisplay.displayName;/^Oculus Quest$/.test(i)&&(this.displayModel=m["oculus-touch-v2"])}else t="oculus-touch",t=-1!==e.profiles.indexOf("oculus-touch-v2")?"oculus-touch-v2":t,t=-1!==e.profiles.indexOf("oculus-touch-v3")?"oculus-touch-v3":t,this.displayModel=m[t]}var o=this.displayModel[n.hand].modelUrl;this.el.setAttribute("gltf-model",o)}},injectTrackedControls:function(e){var t=this.data,n="right"===t.hand?"Oculus Touch (Right)":"Oculus Touch (Left)",r=u?"oculus-touch":n;this.el.setAttribute("tracked-controls",{id:r,hand:t.hand,orientationOffset:t.orientationOffset,handTrackingEnabled:!1}),this.loadModel(e)},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping[this.data.hand].buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"!==n&&"grip"!==n||(t=e.detail.state.value),r&&("trigger"===n&&r.trigger&&(r.trigger.rotation.x=this.originalXRotationTrigger-t*(Math.PI/26)),"grip"===n&&r.grip&&(r.grip.position.x=this.originalXPositionGrip+("left"===this.data.hand?-1:1)*t*.004)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=this.controllerObject3D=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).grip=n.getObjectByName("buttonHand"),this.originalXPositionGrip=t.grip&&t.grip.position.x,t.thumbstick=n.getObjectByName("stick"),t.trigger=n.getObjectByName("buttonTrigger"),this.originalXRotationTrigger=t.trigger&&t.trigger.rotation.x,t.xbutton=n.getObjectByName("buttonX"),t.abutton=n.getObjectByName("buttonA"),t.ybutton=n.getObjectByName("buttonY"),t.bbutton=n.getObjectByName("buttonB"),n.position.copy(this.displayModel[this.data.hand].modelPivotOffset),n.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation),this.el.emit("controllermodelready",{name:"oculus-touch-controls",model:this.data.model,rayOrigin:this.displayModel[this.data.hand].rayOrigin}))},onAxisMoved:function(e){l(this,this.mapping[this.data.hand].axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n,r="up"===t||"touchend"===t?this.data.buttonColor:"touchstart"===t?this.data.buttonTouchColor:this.data.buttonHighlightColor,i=this.buttonMeshes;this.data.model&&i&&i[e]&&((n=i[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(n.material.color))}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],96:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("position",{schema:{type:"vec3"},update:function(){var e=this.el.object3D,t=this.data;e.position.set(t.x,t.y,t.z)},remove:function(){this.el.object3D.position.set(0,0,0)}})},{"../core/component":131}],97:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:raycaster:warn"),a=/^[\w\s-.,[\]#]*$/,s={childList:!0,attributes:!0,subtree:!0},l="raycaster-intersected",c="raycaster-intersection",u="raycaster-intersected-cleared",h="raycaster-intersection-cleared";function d(e,t){var n;for(e.length=t.length,n=0;n<t.length;n++)e[n]=t[n]}t.exports.Component=r("raycaster",{schema:{autoRefresh:{default:!0},direction:{type:"vec3",default:{x:0,y:0,z:-1}},enabled:{default:!0},far:{default:1e3},interval:{default:0},near:{default:0},objects:{default:""},origin:{type:"vec3"},showLine:{default:!1},lineColor:{default:"white"},lineOpacity:{default:1},useWorldCoordinates:{default:!1}},multiple:!0,init:function(){this.clearedIntersectedEls=[],this.unitLineEndVec3=new i.Vector3,this.intersectedEls=[],this.intersections=[],this.newIntersectedEls=[],this.newIntersections=[],this.objects=[],this.prevCheckTime=void 0,this.prevIntersectedEls=[],this.rawIntersections=[],this.raycaster=new i.Raycaster,this.updateOriginDirection(),this.setDirty=this.setDirty.bind(this),this.updateLine=this.updateLine.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.lineEndVec3=new i.Vector3,this.otherLineEndVec3=new i.Vector3,this.lineData={end:this.lineEndVec3},this.getIntersection=this.getIntersection.bind(this),this.intersectedDetail={el:this.el,getIntersection:this.getIntersection},this.intersectedClearedDetail={el:this.el},this.intersectionClearedDetail={clearedEls:this.clearedIntersectedEls},this.intersectionDetail={}},update:function(e){var t=this.data,n=this.el,r=this.raycaster;r.far=t.far,r.near=t.near,!t.showLine||t.far===e.far&&t.origin===e.origin&&t.direction===e.direction&&e.showLine||(this.unitLineEndVec3.copy(t.origin).add(t.direction).normalize(),this.drawLine()),!t.showLine&&e.showLine&&n.removeAttribute("line"),t.objects===e.objects||a.test(t.objects)||o('[raycaster] Selector "'+t.objects+'" may not update automatically with DOM changes.'),t.objects||o('[raycaster] For performance, please define raycaster.objects when using raycaster or cursor components to whitelist which entities to intersect with. e.g., raycaster="objects: [data-raycastable]".'),t.autoRefresh!==e.autoRefresh&&n.isPlaying&&(t.autoRefresh?this.addEventListeners():this.removeEventListeners()),e.enabled&&!t.enabled&&this.clearAllIntersections(),this.setDirty()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.data.showLine&&this.el.removeAttribute("line"),this.clearAllIntersections()},addEventListeners:function(){this.data.autoRefresh&&(this.observer.observe(this.el.sceneEl,s),this.el.sceneEl.addEventListener("object3dset",this.setDirty),this.el.sceneEl.addEventListener("object3dremove",this.setDirty))},removeEventListeners:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener("object3dset",this.setDirty),this.el.sceneEl.removeEventListener("object3dremove",this.setDirty)},setDirty:function(){this.dirty=!0},refreshObjects:function(){var e,t=this.data;e=t.objects?this.el.sceneEl.querySelectorAll(t.objects):this.el.sceneEl.querySelectorAll("*"),this.objects=this.flattenObject3DMaps(e),this.dirty=!1},tock:function(e){var t=this.data,n=this.prevCheckTime;t.enabled&&(n&&e-n<t.interval||(this.prevCheckTime=e,this.checkIntersections()))},checkIntersections:function(){var e,t,n=this.clearedIntersectedEls,r=this.el,i=this.data,o=this.intersectedEls,a=this.intersections,s=this.newIntersectedEls,f=this.newIntersections,p=this.prevIntersectedEls,m=this.rawIntersections;for(this.dirty&&this.refreshObjects(),d(this.prevIntersectedEls,this.intersectedEls),this.updateOriginDirection(),m.length=0,this.raycaster.intersectObjects(this.objects,!0,m),a.length=0,o.length=0,e=0;e<m.length;e++)t=m[e],i.showLine&&t.object===r.getObject3D("line")||t.object.el&&(a.push(t),o.push(t.object.el));for(f.length=0,s.length=0,e=0;e<a.length;e++)-1===p.indexOf(a[e].object.el)&&(f.push(a[e]),s.push(a[e].object.el));for(n.length=0,e=0;e<p.length;e++)-1===o.indexOf(p[e])&&(p[e].emit(u,this.intersectedClearedDetail),n.push(p[e]));for(n.length&&r.emit(h,this.intersectionClearedDetail),e=0;e<s.length;e++)s[e].emit(l,this.intersectedDetail);f.length&&(this.intersectionDetail.els=s,this.intersectionDetail.intersections=f,r.emit(c,this.intersectionDetail)),i.showLine&&setTimeout(this.updateLine)},updateLine:function(){var e,t=this.el,n=this.intersections;n.length&&(e=n[0].object.el===t&&n[1]?n[1].distance:n[0].distance),this.drawLine(e)},getIntersection:function(e){var t,n;for(t=0;t<this.intersections.length;t++)if((n=this.intersections[t]).object.el===e)return n;return null},updateOriginDirection:function(){var e=new i.Vector3,t=new i.Vector3;return function(){var n=this.el,r=this.data;r.useWorldCoordinates?this.raycaster.set(r.origin,r.direction):(n.object3D.updateMatrixWorld(),t.setFromMatrixPosition(n.object3D.matrixWorld),0===r.origin.x&&0===r.origin.y&&0===r.origin.z||(t=n.object3D.localToWorld(t.copy(r.origin))),e.copy(r.direction).transformDirection(n.object3D.matrixWorld).normalize(),this.raycaster.set(t,e))}}(),drawLine:function(e){var t,n=this.data,r=this.el;t=this.lineData.end===this.lineEndVec3?this.otherLineEndVec3:this.lineEndVec3,void 0===e&&(e=n.far===1/0?1e3:n.far),this.lineData.start=n.origin,this.lineData.end=t.copy(this.unitLineEndVec3).multiplyScalar(e),this.lineData.color=n.lineColor,this.lineData.opacity=n.lineOpacity,r.setAttribute("line",this.lineData)},flattenObject3DMaps:function(e){var t,n,r=this.objects;for(r.length=0,n=0;n<e.length;n++)if(e[n].isEntity&&e[n].object3D)for(t in e[n].object3DMap)r.push(e[n].getObject3D(t));return r},clearAllIntersections:function(){var e;for(e=0;e<this.intersectedEls.length;e++)this.intersectedEls[e].emit(u,this.intersectedClearedDetail);d(this.clearedIntersectedEls,this.intersectedEls),this.intersectedEls.length=0,this.intersections.length=0,this.el.emit(h,this.intersectionClearedDetail)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],98:[function(e,t,n){var r=e("../lib/three").Math.degToRad,i=e("../core/component").registerComponent;t.exports.Component=i("rotation",{schema:{type:"vec3"},update:function(){var e=this.data,t=this.el.object3D;t.rotation.set(r(e.x),r(e.y),r(e.z)),t.rotation.order="YXZ"},remove:function(){this.el.object3D.rotation.set(0,0,0)}})},{"../core/component":131,"../lib/three":179}],99:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("scale",{schema:{type:"vec3",default:{x:1,y:1,z:1}},update:function(){var e=this.data,t=this.el.object3D,n=0===e.x?1e-5:e.x,r=0===e.y?1e-5:e.y,i=0===e.z?1e-5:e.z;t.scale.set(n,r,i)},remove:function(){this.el.object3D.scale.set(1,1,1)}})},{"../core/component":131}],100:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../core/component").components;t.exports.Component=r("background",{schema:{color:{type:"color",default:"black"},transparent:{default:!1}},update:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=new THREE.Color(e.color)},remove:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=i[this.name].schema.color.default}})},{"../../core/component":131}],101:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("debug",{schema:{default:!0}})},{"../../core/component":131}],102:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/"),o=i.bind,a=e("../../constants/");function s(e,t,n){var r,i;return(r=document.createElement("div")).classList.add("a-dialog-buttons-container"),(i=document.createElement("button")).classList.add("a-dialog-button","a-dialog-ok-button"),i.setAttribute(a.AFRAME_INJECTED,""),i.innerHTML=e,r.appendChild(i),i.addEventListener("click",(function(e){e.stopPropagation(),n()})),l(t,r)}function l(e,t){var n,r,i,o;return(n=document.createElement("div")).classList.add("a-modal"),n.setAttribute(a.AFRAME_INJECTED,""),(r=document.createElement("div")).className="a-dialog",r.setAttribute(a.AFRAME_INJECTED,""),n.appendChild(r),(i=document.createElement("div")).classList.add("a-dialog-text-container"),r.appendChild(i),(o=document.createElement("div")).classList.add("a-dialog-text"),o.innerHTML=e,i.appendChild(o),r.appendChild(t),n}t.exports.Component=r("device-orientation-permission-ui",{schema:{enabled:{default:!0},deviceMotionMessage:{default:"This immersive website requires access to your device motion sensors."},mobileDesktopMessage:{default:"Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode."},httpsMessage:{default:"Access this site over HTTPS to enter VR mode and grant access to the device sensors."},denyButtonText:{default:"Deny"},allowButtonText:{default:"Allow"},cancelButtonText:{default:"Cancel"}},init:function(){var e=this;this.data.enabled&&("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&"http:"===location.protocol&&this.showHTTPAlert(),i.device.isMobileDeviceRequestingDesktopSite()?this.showMobileDesktopModeAlert():"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?(this.onDeviceMotionDialogAllowClicked=o(this.onDeviceMotionDialogAllowClicked,this),this.onDeviceMotionDialogDenyClicked=o(this.onDeviceMotionDialogDenyClicked,this),DeviceOrientationEvent.requestPermission().catch((function(){e.devicePermissionDialogEl=function(e,t,n,r,i){var o,s,c;return(o=document.createElement("div")).classList.add("a-dialog-buttons-container"),(s=document.createElement("button")).classList.add("a-dialog-button","a-dialog-deny-button"),s.setAttribute(a.AFRAME_INJECTED,""),s.innerHTML=e,o.appendChild(s),(c=document.createElement("button")).classList.add("a-dialog-button","a-dialog-allow-button"),c.setAttribute(a.AFRAME_INJECTED,""),c.innerHTML=t,o.appendChild(c),c.addEventListener("click",(function(e){e.stopPropagation(),r()})),s.addEventListener("click",(function(e){e.stopPropagation(),i()})),l(n,o)}(e.data.denyButtonText,e.data.allowButtonText,e.data.deviceMotionMessage,e.onDeviceMotionDialogAllowClicked,e.onDeviceMotionDialogDenyClicked),e.el.appendChild(e.devicePermissionDialogEl)})).then((function(){e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0}))):this.permissionGranted=!0)},remove:function(){this.devicePermissionDialogEl&&this.el.removeChild(this.devicePermissionDialogEl)},onDeviceMotionDialogDenyClicked:function(){this.remove()},showMobileDesktopModeAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.mobileDesktopMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},showHTTPAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.httpsMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},onDeviceMotionDialogAllowClicked:function(){var e=this;this.el.emit("deviceorientationpermissionrequested"),DeviceOrientationEvent.requestPermission().then((function(t){"granted"===t?(e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0):e.el.emit("deviceorientationpermissionrejected"),e.remove()})).catch(console.error)}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],103:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("embedded",{dependencies:["vr-mode-ui"],schema:{default:!0},update:function(){var e=this.el,t=e.querySelector(".a-enter-vr");!0===this.data?(t&&t.classList.add("embedded"),e.removeFullScreenStyles()):(t&&t.classList.remove("embedded"),e.addFullScreenStyles())}})},{"../../core/component":131}],104:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=e("../../utils/debug")("components:fog:warn");t.exports.Component=r("fog",{schema:{color:{type:"color",default:"#000"},density:{default:25e-5},far:{default:1e3,min:0},near:{default:1,min:0},type:{default:"linear",oneOf:["linear","exponential"]}},update:function(){var e=this.data,t=this.el,n=this.el.object3D.fog;if(t.isScene)return n&&e.type===n.name?void Object.keys(this.schema).forEach((function(t){var r=e[t];"color"===t&&(r=new i.Color(r)),n[t]=r})):(t.object3D.fog=function(e){var t;return(t="exponential"===e.type?new i.FogExp2(e.color,e.density):new i.Fog(e.color,e.near,e.far)).name=e.type,t}(e),void t.systems.material.updateMaterials());o("Fog component can only be applied to <a-scene>")},remove:function(){var e=this.el.object3D.fog;e&&(e.far=0,e.near=.1)}})},{"../../core/component":131,"../../lib/three":179,"../../utils/debug":201}],105:[function(e,t,n){(function(n){var r=e("../../constants").AFRAME_INJECTED,i=e("../../../package"),o=e("../../core/component").registerComponent,a=e("../../utils/"),s="https://unpkg.com/aframe-inspector@"+function(e){var t=e.split(".");return t[2]="x",t.join(".")}(i.version)+"/dist/aframe-inspector.min.js",l="dev"===n.env.INSPECTOR_VERSION?"https://aframe.io/aframe-inspector/dist/aframe-inspector.js":s;t.exports.Component=o("inspector",{schema:{url:{default:l}},init:function(){this.firstPlay=!0,this.onKeydown=this.onKeydown.bind(this),this.onMessage=this.onMessage.bind(this),this.initOverlay(),window.addEventListener("keydown",this.onKeydown),window.addEventListener("message",this.onMessage)},play:function(){var e;this.firstPlay&&"false"!==(e=a.getUrlParameter("inspector"))&&e&&(this.openInspector(),this.firstPlay=!1)},initOverlay:function(){this.loadingMessageEl=document.createElement("div"),this.loadingMessageEl.classList.add("a-inspector-loader"),this.loadingMessageEl.innerHTML='Loading Inspector<span class="dots"><span>.</span><span>.</span><span>.</span></span>'},remove:function(){this.removeEventListeners()},onKeydown:function(e){73===e.keyCode&&(e.ctrlKey&&e.altKey||e.getModifierState("AltGraph"))&&this.openInspector()},showLoader:function(){document.body.appendChild(this.loadingMessageEl)},hideLoader:function(){document.body.removeChild(this.loadingMessageEl)},onMessage:function(e){"INJECT_AFRAME_INSPECTOR"===e.data&&this.openInspector()},openInspector:function(e){var t,n=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected?AFRAME.INSPECTOR.open(e):(this.showLoader(),(t=document.createElement("script")).src=this.data.url,t.setAttribute("data-name","aframe-inspector"),t.setAttribute(r,""),t.onload=function(){AFRAME.INSPECTOR.open(e),n.hideLoader(),n.removeEventListeners()},t.onerror=function(){n.loadingMessageEl.innerHTML="Error loading Inspector"},document.head.appendChild(t),AFRAME.inspectorInjected=!0)},removeEventListeners:function(){window.removeEventListener("keydown",this.onKeydown),window.removeEventListener("message",this.onMessage)}})}).call(this,e("_process"))},{"../../../package":73,"../../constants":123,"../../core/component":131,"../../utils/":205,_process:49}],106:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/").shouldCaptureKeyEvent;t.exports.Component=r("keyboard-shortcuts",{schema:{enterVR:{default:!0},exitVR:{default:!0}},init:function(){this.onKeyup=this.onKeyup.bind(this)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR},play:function(){window.addEventListener("keyup",this.onKeyup,!1)},pause:function(){window.removeEventListener("keyup",this.onKeyup)},onKeyup:function(e){var t=this.el;i(e)&&(this.enterVREnabled&&70===e.keyCode&&t.enterVR(),this.enterVREnabled&&27===e.keyCode&&t.exitVR())}})},{"../../core/component":131,"../../utils/":205}],107:[function(e,t,n){var r=e("../../utils/debug"),i=e("../../core/component").registerComponent,o=r("components:pool:warn");t.exports.Component=i("pool",{schema:{container:{default:""},mixin:{default:""},size:{default:0},dynamic:{default:!1}},multiple:!0,initPool:function(){var e;for(this.availableEls=[],this.usedEls=[],this.data.mixin||o("No mixin provided for pool component."),this.data.container&&(this.container=document.querySelector(this.data.container),this.container||o("Container "+this.data.container+" not found.")),this.container=this.container||this.el,e=0;e<this.data.size;++e)this.createEntity()},update:function(e){var t=this.data;e.mixin===t.mixin&&e.size===t.size||this.initPool()},createEntity:function(){var e;(e=document.createElement("a-entity")).play=this.wrapPlay(e.play),e.setAttribute("mixin",this.data.mixin),e.object3D.visible=!1,e.pause(),this.container.appendChild(e),this.availableEls.push(e)},wrapPlay:function(e){var t=this.usedEls;return function(){-1!==t.indexOf(this)&&e.call(this)}},requestEntity:function(){var e;if(0===this.availableEls.length){if(!1===this.data.dynamic)return void o("Requested entity from empty pool: "+this.attrName);o("Requested entity from empty pool. This pool is dynamic and will resize automatically. You might want to increase its initial size: "+this.attrName),this.createEntity()}return e=this.availableEls.shift(),this.usedEls.push(e),e.object3D.visible=!0,e},returnEntity:function(e){var t=this.usedEls.indexOf(e);if(-1!==t)return this.usedEls.splice(t,1),this.availableEls.push(e),e.object3D.visible=!1,e.pause(),e;o("The returned entity was not previously pooled from "+this.attrName)}})},{"../../core/component":131,"../../utils/debug":201}],108:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=["attribute vec3 position;","attribute vec2 uv;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUv;","void main() {"," vUv = vec2( 1.- uv.x, uv.y );"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),a=["precision mediump float;","uniform samplerCube map;","varying vec2 vUv;","#define M_PI 3.141592653589793238462643383279","void main() {"," vec2 uv = vUv;"," float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;"," float latitude = uv.y * M_PI;"," vec3 dir = vec3("," - sin( longitude ) * sin( latitude ),"," cos( latitude ),"," - cos( longitude ) * sin( latitude )"," );"," normalize( dir );"," gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );","}"].join("\n");t.exports.Component=r("screenshot",{schema:{width:{default:4096},height:{default:2048},camera:{type:"selector"}},init:function(){var e=this.el,t=this;function n(){var n=e.renderer.getContext();n&&(t.cubeMapSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.material=new i.RawShaderMaterial({uniforms:{map:{type:"t",value:null}},vertexShader:o,fragmentShader:a,side:i.DoubleSide}),t.quad=new i.Mesh(new i.PlaneBufferGeometry(1,1),t.material),t.quad.visible=!1,t.camera=new i.OrthographicCamera(-.5,.5,.5,-.5,-1e4,1e4),t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.object3D.add(t.quad),t.onKeyDown=t.onKeyDown.bind(t))}e.renderer?n():e.addEventListener("render-target-loaded",n)},getRenderTarget:function(e,t){return new i.WebGLRenderTarget(e,t,{minFilter:i.LinearFilter,magFilter:i.LinearFilter,wrapS:i.ClampToEdgeWrapping,wrapT:i.ClampToEdgeWrapping,format:i.RGBAFormat,type:i.UnsignedByteType})},resize:function(e,t){this.quad.scale.set(e,t,1),this.camera.left=-1*e/2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=-1*t/2,this.camera.updateProjectionMatrix(),this.canvas.width=e,this.canvas.height=t},play:function(){window.addEventListener("keydown",this.onKeyDown)},onKeyDown:function(e){var t=83===e.keyCode&&e.ctrlKey&&e.altKey;if(this.data&&t){var n=e.shiftKey?"equirectangular":"perspective";this.capture(n)}},setCapture:function(e){var t,n,r,o,a=this.el;return"perspective"===e?(this.quad.visible=!1,n=this.data.camera&&this.data.camera.components.camera.camera||a.camera,t={width:this.data.width,height:this.data.height}):(n=this.camera,o=new i.WebGLCubeRenderTarget(Math.min(this.cubeMapSize,2048),{format:i.RGBFormat,generateMipmaps:!0,minFilter:i.LinearMipmapLinearFilter,encoding:i.sRGBEncoding}),r=new i.CubeCamera(a.camera.near,a.camera.far,o),a.camera.getWorldPosition(r.position),a.camera.getWorldQuaternion(r.quaternion),r.update(a.renderer,a.object3D),this.quad.material.uniforms.map.value=r.renderTarget.texture,t={width:this.data.width,height:this.data.height},this.quad.visible=!0),{camera:n,size:t,projection:e}},capture:function(e){var t,n=this.el.renderer.xr.enabled,r=this.el.renderer;r.xr.enabled=!1,t=this.setCapture(e),this.renderCapture(t.camera,t.size,t.projection),this.saveCapture(),r.xr.enabled=n},getCanvas:function(e){var t=this.el.renderer.xr.enabled,n=this.el.renderer,r=this.setCapture(e);return n.xr.enabled=!1,this.renderCapture(r.camera,r.size,r.projection),n.xr.enabled=t,this.canvas},renderCapture:function(e,t,n){var r,i,o,a=this.el.renderer.autoClear,s=this.el,l=s.renderer;i=this.getRenderTarget(t.width,t.height),o=new Uint8Array(4*t.width*t.height),this.resize(t.width,t.height),l.autoClear=!0,l.clear(),l.setRenderTarget(i),l.render(s.object3D,e),l.autoClear=a,l.readRenderTargetPixels(i,0,0,t.width,t.height,o),l.setRenderTarget(null),"perspective"===n&&(o=this.flipPixelsVertically(o,t.width,t.height)),r=new ImageData(new Uint8ClampedArray(o),t.width,t.height),this.quad.visible=!1,this.ctx.putImageData(r,0,0)},flipPixelsVertically:function(e,t,n){for(var r=e.slice(0),i=0;i<t;++i)for(var o=0;o<n;++o)r[4*i+o*t*4]=e[4*i+(n-o)*t*4],r[4*i+1+o*t*4]=e[4*i+1+(n-o)*t*4],r[4*i+2+o*t*4]=e[4*i+2+(n-o)*t*4],r[4*i+3+o*t*4]=e[4*i+3+(n-o)*t*4];return r},saveCapture:function(){this.canvas.toBlob((function(e){var t="screenshot-"+document.title.toLowerCase()+"-"+Date.now()+".png",n=document.createElement("a"),r=URL.createObjectURL(e);n.href=r,n.setAttribute("download",t),n.innerHTML="downloading...",n.style.display="none",document.body.appendChild(n),setTimeout((function(){n.click(),document.body.removeChild(n)}),1)}),"image/png")}})},{"../../core/component":131,"../../lib/three":179}],109:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../../vendor/rStats"),o=e("../../utils");e("../../../vendor/rStats.extras"),e("../../lib/rStatsAframe");var a=window.aframeStats,s=o.bind,l=window.threeStats;t.exports.Component=r("stats",{schema:{default:!0},init:function(){var e=this.el;"false"!==o.getUrlParameter("stats")&&(this.stats=function(e){var t=new l(e.renderer),n=new a(e),r=e.isMobile?[]:[t,n];return new i({css:[],values:{fps:{caption:"fps",below:30}},groups:[{caption:"Framerate",values:["fps","raf"]}],plugins:r})}(e),this.statsEl=document.querySelector(".rs-base"),this.hideBound=s(this.hide,this),this.showBound=s(this.show,this),e.addEventListener("enter-vr",this.hideBound),e.addEventListener("exit-vr",this.showBound))},update:function(){if(this.stats)return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener("enter-vr",this.hideBound),this.el.removeEventListener("exit-vr",this.showBound),this.statsEl&&this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var e=this.stats;e&&(e("rAF").tick(),e("FPS").frame(),e().update())},hide:function(){this.statsEl.classList.add("a-hidden")},show:function(){this.statsEl.classList.remove("a-hidden")}})},{"../../../vendor/rStats":217,"../../../vendor/rStats.extras":216,"../../core/component":131,"../../lib/rStatsAframe":178,"../../utils":205}],110:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../constants/"),o=e("../../utils/"),a=o.bind;function s(e){e.addEventListener("touchstart",(function(){e.classList.remove("resethover")})),e.addEventListener("touchend",(function(){e.classList.add("resethover")}))}t.exports.Component=r("vr-mode-ui",{dependencies:["canvas"],schema:{enabled:{default:!0},enterVRButton:{default:""},enterARButton:{default:""}},init:function(){var e=this,t=this.el;"false"!==o.getUrlParameter("ui")&&(this.insideLoader=!1,this.enterVREl=null,this.enterAREl=null,this.orientationModalEl=null,this.bindMethods(),t.addEventListener("enter-vr",this.updateEnterInterfaces),t.addEventListener("exit-vr",this.updateEnterInterfaces),t.addEventListener("update-vr-devices",this.updateEnterInterfaces),window.addEventListener("message",(function(t){"loaderReady"===t.data.type&&(e.insideLoader=!0,e.remove())})),window.addEventListener("orientationchange",this.toggleOrientationModalIfNeeded))},bindMethods:function(){this.onEnterVRButtonClick=a(this.onEnterVRButtonClick,this),this.onEnterARButtonClick=a(this.onEnterARButtonClick,this),this.onModalClick=a(this.onModalClick,this),this.toggleOrientationModalIfNeeded=a(this.toggleOrientationModalIfNeeded,this),this.updateEnterInterfaces=a(this.updateEnterInterfaces,this)},onModalClick:function(){this.el.exitVR()},onEnterVRButtonClick:function(){this.el.enterVR()},onEnterARButtonClick:function(){this.el.enterAR()},update:function(){var e=this.data,t=this.el;if(!e.enabled||this.insideLoader||"false"===o.getUrlParameter("ui"))return this.remove();this.enterVREl||this.enterAREl||this.orientationModalEl||(e.enterVRButton?(this.enterVREl=document.querySelector(e.enterVRButton),this.enterVREl.addEventListener("click",this.onEnterVRButtonClick)):(this.enterVREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-vr"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-vr-button",t.setAttribute("title","Enter VR mode with a headset or fullscreen mode on a desktop. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterVRButtonClick),t.appendChild(this.enterVREl)),e.enterARButton?(this.enterAREl=document.querySelector(e.enterARButton),this.enterAREl.addEventListener("click",this.onEnterARButtonClick)):(this.enterAREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-ar"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-ar-button",t.setAttribute("title","Enter AR mode with a headset or handheld device. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterARButtonClick),t.appendChild(this.enterAREl)),this.orientationModalEl=function(e){var t=document.createElement("div");t.className="a-orientation-modal",t.classList.add("a-hidden"),t.setAttribute(i.AFRAME_INJECTED,"");var n=document.createElement("button");return n.setAttribute(i.AFRAME_INJECTED,""),n.innerHTML="Exit VR",n.addEventListener("click",e),t.appendChild(n),t}(this.onModalClick),t.appendChild(this.orientationModalEl),this.updateEnterInterfaces())},remove:function(){[this.enterVREl,this.enterAREl,this.orientationModalEl].forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})),this.enterVREl=void 0,this.enterAREl=void 0,this.orientationModalEl=void 0},updateEnterInterfaces:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleEnterARButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is("vr-mode")?this.enterVREl.classList.add("a-hidden"):this.enterVREl.classList.remove("a-hidden"))},toggleEnterARButtonIfNeeded:function(){var e=this.el;this.enterAREl&&(e.is("vr-mode")||!o.device.checkARSupport()?this.enterAREl.classList.add("a-hidden"):this.enterAREl.classList.remove("a-hidden"))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!o.device.isLandscape()&&e.is("vr-mode")?t.classList.remove("a-hidden"):t.classList.add("a-hidden"))}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],111:[function(e,t,n){var r=e("../core/component"),i=e("../lib/three"),o=e("../utils/bind"),a=r.registerComponent;t.exports.Component=a("shadow",{schema:{cast:{default:!0},receive:{default:!0}},init:function(){this.onMeshChanged=o(this.update,this),this.el.addEventListener("object3dset",this.onMeshChanged),this.system.setShadowMapEnabled(!0)},update:function(){var e=this.data;this.updateDescendants(e.cast,e.receive)},remove:function(){this.el.removeEventListener("object3dset",this.onMeshChanged),this.updateDescendants(!1,!1)},updateDescendants:function(e,t){var n=this.el.sceneEl;this.el.object3D.traverse((function(r){if(r instanceof i.Mesh&&(r.castShadow=e,r.receiveShadow=t,n.hasLoaded&&r.material))for(var o=Array.isArray(r.material)?r.material:[r.material],a=0;a<o.length;a++)o[a].needsUpdate=!0}))}})},{"../core/component":131,"../lib/three":179,"../utils/bind":199}],112:[function(t,n,r){var i=t("../core/component").registerComponent,o=t("../utils/debug"),a=t("../lib/three"),s=o("components:sound:warn");n.exports.Component=i("sound",{schema:{autoplay:{default:!1},distanceModel:{default:"inverse",oneOf:["linear","inverse","exponential"]},loop:{default:!1},maxDistance:{default:1e4},on:{default:""},poolSize:{default:1},positional:{default:!0},refDistance:{default:1},rolloffFactor:{default:1},src:{type:"audio"},volume:{default:1}},multiple:!0,init:function(){var e=this;this.listener=null,this.audioLoader=new a.AudioLoader,this.pool=new a.Group,this.loaded=!1,this.mustPlay=!1,this.playSoundBound=function(){e.playSound()}},update:function(e){var t,n,r=this.data,i=r.src!==e.src;if(i){if(!r.src)return;this.setupSound()}for(t=0;t<this.pool.children.length;t++)n=this.pool.children[t],r.positional&&(n.setDistanceModel(r.distanceModel),n.setMaxDistance(r.maxDistance),n.setRefDistance(r.refDistance),n.setRolloffFactor(r.rolloffFactor)),n.setLoop(r.loop),n.setVolume(r.volume),n.isPaused=!1;if(r.on!==e.on&&this.updateEventListener(e.on),i){var o=this;this.loaded=!1,this.audioLoader.load(r.src,(function(e){for(t=0;t<o.pool.children.length;t++)(n=o.pool.children[t]).setBuffer(e);o.loaded=!0,a.Cache.remove(r.src),(o.data.autoplay||o.mustPlay)&&o.playSound(),o.el.emit("sound-loaded",o.evtDetail,!1)}))}},pause:function(){this.stopSound(),this.removeEventListener()},play:function(){this.data.autoplay&&this.playSound(),this.updateEventListener()},remove:function(){var t;this.removeEventListener(),this.el.getObject3D(this.attrName)&&this.el.removeObject3D(this.attrName);try{for(t=0;t<this.pool.children.length;t++)this.pool.children[t].disconnect()}catch(e){s("Audio source not properly disconnected")}},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSoundBound),t.addEventListener(this.data.on,this.playSoundBound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSoundBound)},setupSound:function(){var e,t,n=this.el,r=n.sceneEl,i=this;this.pool.children.length>0&&(this.stopSound(),n.removeObject3D("sound"));var o=this.listener=r.audioListener||new a.AudioListener;for(r.audioListener=o,r.camera&&r.camera.add(o),r.addEventListener("camera-set-active",(function(e){e.detail.cameraEl.getObject3D("camera").add(o)})),this.pool=new a.Group,e=0;e<this.data.poolSize;e++)t=this.data.positional?new a.PositionalAudio(o):new a.Audio(o),this.pool.add(t);for(n.setObject3D(this.attrName,this.pool),e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).onEnded=function(){this.isPlaying=!1,i.el.emit("sound-ended",i.evtDetail,!1)}},pauseSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).source&&t.source.buffer&&t.isPlaying&&!t.isPaused&&(t.isPaused=!0,t.pause())},playSound:function(e){var t,n,r;if(!this.loaded)return s("Sound not loaded yet. It will be played once it finished loading"),void(this.mustPlay=!0);for(t=!1,this.isPlaying=!0,n=0;n<this.pool.children.length;n++)(r=this.pool.children[n]).isPlaying||!r.buffer||t||(e&&e(r),r.play(),r.isPaused=!1,t=!0);t?this.mustPlay=!1:s("All the sounds are playing. If you need to play more sounds simultaneously consider increasing the size of pool with the `poolSize` attribute.",this.el)},stopSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++){if(!(t=this.pool.children[e]).source||!t.source.buffer)return;t.stop()}}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],113:[function(e,t,n){var r=e("three-bmfont-text"),i=e("load-bmfont"),o=e("../core/component").registerComponent,a=e("../core/shader"),s=e("../lib/three"),l=e("../utils/"),c=l.debug("components:text:error"),u=a.shaders,h=l.debug("components:text:warn"),d="https://cdn.aframe.io/fonts/",f={aileronsemibold:d+"Aileron-Semibold.fnt",dejavu:d+"DejaVu-sdf.fnt",exo2bold:d+"Exo2Bold.fnt",exo2semibold:d+"Exo2SemiBold.fnt",kelsonsans:d+"KelsonSans.fnt",monoid:d+"Monoid.fnt",mozillavr:d+"mozillavr.fnt",roboto:d+"Roboto-msdf.json",sourcecodepro:d+"SourceCodePro.fnt"},p=["roboto"];t.exports.FONTS=f;var m=new function(){var e=this.cache={};this.get=function(t,n){return t in e||(e[t]=n()),e[t]}},g={},v={},y=/^\w+:/;function b(e,t,n){return e||(.5+t)*n}t.exports.Component=o("text",{multiple:!0,schema:{align:{type:"string",default:"left",oneOf:["left","right","center"]},alphaTest:{default:.5},anchor:{default:"center",oneOf:["left","right","center","align"]},baseline:{default:"center",oneOf:["top","center","bottom"]},color:{type:"color",default:"#FFF"},font:{type:"string",default:"roboto"},fontImage:{type:"string"},height:{type:"number"},letterSpacing:{type:"number",default:0},lineHeight:{type:"number"},negate:{type:"boolean",default:!0},opacity:{type:"number",default:1},shader:{default:"sdf",oneOf:u},side:{default:"front",oneOf:["front","back","double"]},tabSize:{default:4},transparent:{default:!0},value:{type:"string"},whiteSpace:{default:"normal",oneOf:["normal","pre","nowrap"]},width:{type:"number"},wrapCount:{type:"number",default:40},wrapPixels:{type:"number"},xOffset:{type:"number",default:0},yOffset:{type:"number",default:0},zOffset:{type:"number",default:.001}},init:function(){this.shaderData={},this.geometry=r(),this.createOrUpdateMaterial()},update:function(e){var t=this.data,n=this.currentFont;v[t.font]?this.texture=v[t.font]:(this.texture=v[t.font]=new s.Texture,this.texture.anisotropy=16),this.createOrUpdateMaterial(),e.font===t.font?n&&(this.updateGeometry(this.geometry,n),this.updateLayout()):this.updateFont()},remove:function(){this.geometry.dispose(),this.geometry=null,this.el.removeObject3D(this.attrName),this.material.dispose(),this.material=null,this.texture.dispose(),this.texture=null,this.shaderObject&&delete this.shaderObject},createOrUpdateMaterial:function(){var e,t,n,r=this.data,i=this.material,o=this.shaderData;if(n=r.shader,-1!==p.indexOf(r.font)||r.font.indexOf("-msdf.")>=0?n="msdf":r.font in f&&-1===p.indexOf(r.font)&&(n="sdf"),e=(this.shaderObject&&this.shaderObject.name)!==n,o.alphaTest=r.alphaTest,o.color=r.color,o.map=this.texture,o.opacity=r.opacity,o.side=function(e){switch(e){case"back":return s.FrontSide;case"double":return s.DoubleSide;default:return s.BackSide}}(r.side),o.transparent=r.transparent,o.negate=r.negate,!e)return this.shaderObject.update(o),i.transparent=o.transparent,void(i.side=o.side);t=function(e,t,n){var r,i;return(i=new u[t].Shader).el=e,i.init(n),i.update(n),(r=i.material).transparent=n.transparent,{material:r,shader:i}}(this.el,n,o),this.material=t.material,this.shaderObject=t.shader,this.material.side=o.side,this.mesh&&(this.mesh.material=this.material)},updateFont:function(){var e,t=this.data,n=this.el,r=this.geometry,o=this;t.font||h("No font specified. Using the default font."),this.mesh&&(this.mesh.visible=!1),e=this.lookupFont(t.font||"roboto")||t.font,m.get(e,(function(){return n=e,r=t.yOffset,new Promise((function(e,t){i(n,(function(i,o){if(i)return c("Error loading font",n),void t(i);n.indexOf("/Roboto-msdf.json")>=0&&(r=30),r&&o.chars.map((function(e){e.yoffset+=r})),e(o)}))}));var n,r})).then((function(i){var a;if(1!==i.pages.length)throw new Error("Currently only single-page bitmap fonts are supported.");g[e]||(i.widthFactor=g[i]=function(e){var t=0,n=0,r=0;return e.chars.map((function(e){t+=e.xadvance,e.id>=48&&e.id<=57&&(r++,n+=e.xadvance)})),r?n/r:t/e.chars.length}(i)),o.currentFont=i,a=o.getFontImageSrc(),m.get(a,(function(){return e=a,new Promise((function(t,n){(new s.ImageLoader).load(e,(function(e){t(e)}),void 0,(function(){c("Error loading font image",e),n(null)}))}));var e})).then((function(e){var a=o.texture;a.image=e,a.needsUpdate=!0,v[t.font]=a,o.texture=a,o.initMesh(),o.currentFont=i,o.updateGeometry(r,i),o.updateLayout(),o.mesh.visible=!0,n.emit("textfontset",{font:t.font,fontObj:i})})).catch((function(e){c(e.message),c(e.stack)}))})).catch((function(e){c(e.message),c(e.stack)}))},initMesh:function(){this.mesh||(this.mesh=new s.Mesh(this.geometry,this.material),this.el.setObject3D(this.attrName,this.mesh))},getFontImageSrc:function(){if(this.data.fontImage)return this.data.fontImage;var e=this.lookupFont(this.data.font||"roboto")||this.data.font,t=this.currentFont.pages[0];return t.match(y)&&0!==t.indexOf("http")?e.replace(/(\.fnt)|(\.json)/,".png"):s.LoaderUtils.extractUrlBase(e)+t},updateLayout:function(){var e,t,n,r,i,o,a,s,l,c=this.el,u=this.data,h=this.geometry,d=this.mesh;if(d&&h.layout){if(n=c.getAttribute("geometry"),r=(o=(a=u.width||n&&n.width||1)/b(u.wrapPixels,u.wrapCount,this.currentFont.widthFactor))*((i=h.layout).height+i.descender),n&&"plane"===n.primitive&&(n.width||c.setAttribute("geometry","width",a),n.height||c.setAttribute("geometry","height",r)),"left"===(e="align"===u.anchor?u.align:u.anchor))s=0;else if("right"===e)s=-1*i.width;else{if("center"!==e)throw new TypeError("Invalid text.anchor property value",e);s=-1*i.width/2}if("bottom"===(t=u.baseline))l=0;else if("top"===t)l=-1*i.height+i.ascender;else{if("center"!==t)throw new TypeError("Invalid text.baseline property value",t);l=-1*i.height/2}d.position.x=s*o+u.xOffset,d.position.y=l*o,d.position.z=u.zOffset,d.scale.set(o,-1*o,o)}},lookupFont:function(e){return f[e]},updateGeometry:function(){var e={},t={},n=/\\n/g,r=/\\t/g;return function(i,o){var a=this.data;t.font=o,t.lineHeight=a.lineHeight&&isFinite(a.lineHeight)?a.lineHeight:o.common.lineHeight,t.text=a.value.toString().replace(n,"\n").replace(r,"\t"),t.width=b(a.wrapPixels,a.wrapCount,o.widthFactor),i.update(l.extend(e,a,t))}}()})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205,"load-bmfont":37,"three-bmfont-text":63}],114:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/tracked-controls"),o=e("../constants").DEFAULT_CAMERA_HEIGHT,a=e("../lib/three"),s=e("../constants").DEFAULT_HANDEDNESS,l=.175,c=-.3,u=-.03,h=0,d=0,f=-.175,p={touches:[]},m="axismove",g="buttonchanged",v="buttondown",y="buttonup",b="touchstart",w="touchend";t.exports.Component=r("tracked-controls-webvr",{schema:{autoHide:{default:!0},controller:{default:0},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"}},init:function(){this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.changedAxes=[],this.targetControllerNumber=this.data.controller,this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes},this.deltaControllerPosition=new a.Vector3,this.controllerQuaternion=new a.Quaternion,this.controllerEuler=new a.Euler,this.updateGamepad(),this.buttonEventDetails={}},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.update&&n.update(t/1e3),this.updateGamepad(),this.updatePose(),this.updateButtons()},defaultUserHeight:function(){return o},getHeadElement:function(){return this.data.headElement||this.el.sceneEl.camera.el},updateGamepad:function(){var e=this.data,t=i.findMatchingControllerWebVR(this.system.controllers,e.id,e.idPrefix,e.hand,e.controller);this.controller=t,this.el.components["tracked-controls"].controller=t,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},applyArmModel:function(e){var t,n,r,i,o=this.controller,a=this.controllerEuler,p=this.controllerQuaternion,m=this.deltaControllerPosition;n=this.getHeadElement().object3D,i=this.defaultUserHeight(),r=o.pose,t=(o?o.hand:void 0)||s,e.copy(n.position),m.set(l*("left"===t?-1:"right"===t?1:0),c,u),m.multiplyScalar(i),m.applyAxisAngle(n.up,n.rotation.y),e.add(m),m.set(h,d,f),m.multiplyScalar(i),r.orientation?p.fromArray(r.orientation):p.copy(n.quaternion),a.setFromQuaternion(p),a.set(a.x,a.y,0),m.applyEuler(a),e.add(m)},updatePose:function(){var e,t,n=this.controller,r=this.data,i=this.el.object3D,o=this.system.vrDisplay;n&&((e=n.pose).position?i.position.fromArray(e.position):r.armModel&&this.applyArmModel(i.position),e.orientation&&i.quaternion.fromArray(e.orientation),o&&e.position&&(t=this.el.sceneEl.renderer.xr.getStandingMatrix(),i.matrix.compose(i.position,i.quaternion,i.scale),i.matrix.multiplyMatrices(t,i.matrix),i.matrix.decompose(i.position,i.quaternion,i.scale)),i.rotateX(this.data.orientationOffset.x*a.Math.DEG2RAD),i.rotateY(this.data.orientationOffset.y*a.Math.DEG2RAD),i.rotateZ(this.data.orientationOffset.z*a.Math.DEG2RAD))},updateButtons:function(){var e,t,n=this.controller;if(n){for(t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(g,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(m,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?v:y,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?b:w,this.el.emit(n,this.buttonEventDetails[e],!1,p),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/tracked-controls":214}],115:[function(e,t,n){var r=e("../utils/tracked-controls"),i=e("../core/component").registerComponent,o="axismove",a="buttonchanged",s="buttondown",l="buttonup",c="touchstart",u="touchend";t.exports.Component=i("tracked-controls-webxr",{schema:{id:{type:"string",default:""},hand:{type:"string",default:""},handTrackingEnabled:{default:!1},index:{type:"int",default:-1},iterateControllerProfiles:{default:!1}},init:function(){this.updateController=this.updateController.bind(this),this.buttonEventDetails={},this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.changedAxes=[],this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes}},update:function(){this.updateController()},play:function(){var e=this.el.sceneEl;this.updateController(),e.addEventListener("controllersupdated",this.updateController)},pause:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.updateController)},isControllerPresent:function(e){return!(!this.controller||this.controller.gamepad)&&("none"===e.inputSource.handedness||e.inputSource.handedness===this.data.hand)},updateController:function(){this.controller=r.findMatchingControllerWebXR(this.system.controllers,this.data.id,this.data.hand,this.data.index,this.data.iterateControllerProfiles,this.data.handTrackingEnabled),this.el.components["tracked-controls"].controller=this.controller,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},tick:function(){var e=this.el.sceneEl,t=this.controller,n=e.frame;t&&e.frame&&this.system.referenceSpace&&(t.hand||(this.pose=n.getPose(t.targetRaySpace,this.system.referenceSpace),this.updatePose(),this.updateButtons()))},updatePose:function(){var e=this.el.object3D,t=this.pose;t&&(e.matrix.elements=t.transform.matrix,e.matrix.decompose(e.position,e.rotation,e.scale))},updateButtons:function(){var e,t,n,r=this.controller;if(r&&r.gamepad){for(n=r.gamepad,t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(a,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.gamepad.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(o,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?s:l,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?c:u,this.el.emit(n,this.buttonEventDetails[e],!1),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../core/component":131,"../utils/tracked-controls":214}],116:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("tracked-controls",{schema:{autoHide:{default:!0},controller:{default:-1},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},handTrackingEnabled:{default:!1},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"},iterateControllerProfiles:{default:!1}},update:function(){var e=this.data,t=this.el;t.sceneEl.hasWebXR?t.setAttribute("tracked-controls-webxr",{id:e.id,hand:e.hand,index:e.controller,iterateControllerProfiles:e.iterateControllerProfiles,handTrackingEnabled:e.handTrackingEnabled}):t.setAttribute("tracked-controls-webvr",e)}})},{"../core/component":131}],117:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u={left:"https://cdn.aframe.io/controllers/valve/index/valve-index-left.glb",right:"https://cdn.aframe.io/controllers/valve/index/valve-index-right.glb"},h=e("../utils/").device.isWebXRAvailable,d={left:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"},right:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"}},f=h?d:{left:{_x:.692295102620542,_y:-.0627618864318427,_z:-.06265893149611756,_order:"XYZ"},right:{_x:.6484021229942998,_y:-.032563619881892894,_z:-.1327973171917482,_order:"XYZ"}},p=h?{left:{x:0,y:-.05,z:.06},right:{x:0,y:-.05,z:.06}}:{left:{x:-.00023692678902063457,y:.04724540367838371,z:-.061959880395271096},right:{x:.002471558599671131,y:.055765208987076195,z:-.061068168708348844}};t.exports.Component=r("valve-index-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{trackpad:[0,1],thumbstick:[2,3]},buttons:["trigger","grip","trackpad","thumbstick","abutton"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e)},this.onButtonUp=function(t){c(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t="right"===e.hand?0:"left"===e.hand?1:2;s(this,"valve",{index:t,iterateControllerProfiles:!0,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"valve",controller:"right"===t.hand?1:"left"===t.hand?0:2,hand:t.hand,orientationOffset:t.orientationOffset}),this.loadModel()},loadModel:function(){var e=this.data;e.model&&this.el.setAttribute("gltf-model",""+u[e.hand])},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=this.triggerOriginalRotationX-t*(Math.PI/40))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),this.triggerOriginalRotationX=t.trigger.rotation.x,Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.copy(p[this.data.hand]),n.rotation.copy(f[this.data.hand]),this.el.emit("controllermodelready",{name:"valve-index-controlls",model:this.data.model,rayOrigin:new o.Vector3(0,0,0)}))},onAxisMoved:function(e){l(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],118:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("visible",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data}})},{"../core/component":131}],119:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"htc-vive-controller-mv":"OpenVR ",h=c?{axes:{thumbstick:[0,1]},buttons:["trigger","grip","trackpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger","grip","menu","system"]};t.exports.Component=r("vive-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:h,init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,u,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:u,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj",mtl:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=-t*(Math.PI/12))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.set(0,-.015,.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){var n=this.buttonMeshes,r=this.rendererSystem;if(n){if("grip"===e)return n.grip.left.material.color.set(t),n.grip.right.material.color.set(t),r.applyColorCorrection(n.grip.left.material.color),void r.applyColorCorrection(n.grip.right.material.color);n[e].material.color.set(t),r.applyColorCorrection(n[e].material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],120:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("vive-focus-controls",{schema:{hand:{default:""},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0,this.addControllersUpdateListener()},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1,this.removeControllersUpdateListener()},checkIfControllerPresent:function(){a(this,"HTC Vive Focus",this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,idPrefix:"HTC Vive Focus",orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("BumperKey"),t.triggerPressed=n.getObjectByName("BumperKey_Press"),t.triggerPressed&&(t.triggerPressed.visible=!1),t.trackpad=n.getObjectByName("TouchPad"),t.trackpadPressed=n.getObjectByName("TouchPad_Press"),t.trackpadPressed&&(t.trackpadPressed.visible=!1))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes,r=e+"Pressed";if(n&&n[e]&&n[r]){var i;switch(t){case"down":i=this.data.buttonHighlightColor;break;case"touchstart":i=this.data.buttonTouchedColor}i&&n[r].material.color.set(i),n[r].visible=!!i,n[e].visible=!i}}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],121:[function(e,t,n){var r=e("../constants").keyboardevent.KEYCODE_TO_CODE,i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/"),s=a.bind,l=a.shouldCaptureKeyEvent,c=["KeyW","KeyA","KeyS","KeyD","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"];t.exports.Component=i("wasd-controls",{schema:{acceleration:{default:65},adAxis:{default:"x",oneOf:["x","y","z"]},adEnabled:{default:!0},adInverted:{default:!1},enabled:{default:!0},fly:{default:!1},wsAxis:{default:"z",oneOf:["x","y","z"]},wsEnabled:{default:!0},wsInverted:{default:!1}},init:function(){this.keys={},this.easing=1.1,this.velocity=new o.Vector3,this.onBlur=s(this.onBlur,this),this.onContextMenu=s(this.onContextMenu,this),this.onFocus=s(this.onFocus,this),this.onKeyDown=s(this.onKeyDown,this),this.onKeyUp=s(this.onKeyUp,this),this.onVisibilityChange=s(this.onVisibilityChange,this),this.attachVisibilityEventListeners()},tick:function(e,t){var n=this.data,r=this.el,i=this.velocity;(i[n.adAxis]||i[n.wsAxis]||!function(e){var t;for(t in e)return!1;return!0}(this.keys))&&(t/=1e3,this.updateVelocity(t),(i[n.adAxis]||i[n.wsAxis])&&r.object3D.position.add(this.getMovementVector(t)))},remove:function(){this.removeKeyEventListeners(),this.removeVisibilityEventListeners()},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},updateVelocity:function(e){var t,n,r,i,o,a=this.data,s=this.keys,l=this.velocity;if(n=a.adAxis,i=a.wsAxis,e>.2)return l[n]=0,void(l[i]=0);var c=Math.pow(1/this.easing,60*e);0!==l[n]&&(l[n]=l[n]*c),0!==l[i]&&(l[i]=l[i]*c),Math.abs(l[n])<1e-5&&(l[n]=0),Math.abs(l[i])<1e-5&&(l[i]=0),a.enabled&&(t=a.acceleration,a.adEnabled&&(r=a.adInverted?-1:1,(s.KeyA||s.ArrowLeft)&&(l[n]-=r*t*e),(s.KeyD||s.ArrowRight)&&(l[n]+=r*t*e)),a.wsEnabled&&(o=a.wsInverted?-1:1,(s.KeyW||s.ArrowUp)&&(l[i]-=o*t*e),(s.KeyS||s.ArrowDown)&&(l[i]+=o*t*e)))},getMovementVector:function(){var e=new o.Vector3(0,0,0),t=new o.Euler(0,0,0,"YXZ");return function(n){var r,i=this.el.getAttribute("rotation"),a=this.velocity;return e.copy(a),e.multiplyScalar(n),i?(r=this.data.fly?i.x:0,t.set(o.Math.degToRad(r),o.Math.degToRad(i.y),0),e.applyEuler(t),e):e}}(),attachVisibilityEventListeners:function(){window.oncontextmenu=this.onContextMenu,window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),document.addEventListener("visibilitychange",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),document.removeEventListener("visibilitychange",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)},onContextMenu:function(){for(var e=Object.keys(this.keys),t=0;t<e.length;t++)delete this.keys[e[t]]},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){var t;l(e)&&(t=e.code||r[e.keyCode],-1!==c.indexOf(t)&&(this.keys[t]=!0))},onKeyUp:function(e){var t;t=e.code||r[e.keyCode],delete this.keys[t]}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/":205}],122:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/"),u=c.debug("components:windows-motion-controls:debug"),h=c.debug("components:windows-motion-controls:warn"),d=e("../constants").DEFAULT_HANDEDNESS,f={left:"left.glb",right:"right.glb",default:"universal.glb"},p=e("../utils/").device.isWebXRAvailable,m=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,g=p?"windows-mixed-reality":"Spatial Controller (Spatial Interaction Source) ",v=p?{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick","menu"],axisMeshNames:["TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_X","THUMBSTICK_X","THUMBSTICK_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",squeeze:"GRASP",thumbstick:"THUMBSTICK_PRESS",touchpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"}:{axes:{thumbstick:[0,1],trackpad:[2,3]},buttons:["thumbstick","trigger","grip","menu","trackpad"],axisMeshNames:["THUMBSTICK_X","THUMBSTICK_Y","TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",grip:"GRASP",thumbstick:"THUMBSTICK_PRESS",trackpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"};t.exports.Component=r("windows-motion-controls",{schema:{hand:{default:d},pair:{default:0},model:{default:!0},hideDisconnected:{default:!0}},mapping:v,bindMethods:function(){this.onModelError=i(this.onModelError,this),this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this,t=this.el;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onControllerConnected=function(){e.setModelVisibility(!0)},this.onControllerDisconnected=function(){e.setModelVisibility(!1)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.bindMethods(),this.loadedMeshInfo={buttonMeshes:null,axisMeshes:null},this.rayOrigin={origin:new THREE.Vector3,direction:new THREE.Vector3(0,0,-1),createdFromMesh:!1},t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-error",this.onModelError),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-error",this.onModelError),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,g,{hand:this.data.hand,index:this.data.pair,iterateControllerProfiles:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},updateControllerModel:function(){if(this.data.model&&!this.rayOrigin.createdFromMesh){var e=this.createControllerModelUrl();this.loadModel(e)}else this.modelReady()},createControllerModelUrl:function(e){var t=this.el.components["tracked-controls"],n=t?t.controller:null,r="default",i=this.data.hand;if(n&&!window.hasNativeWebXRImplementation&&(i=n.hand,!e)){var o=n.id.match(m);r=o&&o[0]||r}return"https://cdn.aframe.io/controllers/microsoft/"+r+"/"+(f[i]||f.default)},injectTrackedControls:function(){var e=this.data;this.el.setAttribute("tracked-controls",{idPrefix:g,controller:e.pair,hand:e.hand,armModel:!1}),this.updateControllerModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelError:function(e){var t=this.createControllerModelUrl(!0);e.detail.src!==t?(h("Failed to load controller model for device, attempting to load default."),this.loadModel(t)):h("Failed to load default controller model.")},loadModel:function(e){this.el.setAttribute("gltf-model","url("+e+")")},onModelLoaded:function(e){var t,n,r,i,o=this.controllerModel=e.detail.model,a=this.loadedMeshInfo;if(u("Processing model"),a.buttonMeshes={},a.axisMeshes={},o){for(t=0;t<this.mapping.buttons.length;t++)(n=this.mapping.buttonMeshNames[this.mapping.buttons[t]])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),pressed:s(r,"PRESSED"),unpressed:s(r,"UNPRESSED")}).value&&i.pressed&&i.unpressed?a.buttonMeshes[this.mapping.buttons[t]]=i:h("Missing button submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", PRESSED: "+!!i.pressed+", UNPRESSED:"+!!i.unpressed+")"):h("Missing button mesh with name: "+n):u("Skipping unknown button at index: "+t+" with mapped name: "+this.mapping.buttons[t]);for(t=0;t<this.mapping.axisMeshNames.length;t++)(n=this.mapping.axisMeshNames[t])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),min:s(r,"MIN"),max:s(r,"MAX")}).value&&i.min&&i.max?a.axisMeshes[t]=i:h("Missing axis submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", MIN: "+!!i.min+", MAX:"+!!i.max+")"):h("Missing axis mesh with name: "+n):u("Skipping unknown axis at index: "+t);this.calculateRayOriginFromMesh(o),this.setModelVisibility()}function s(e,t){for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];if(i&&i.name===t)return i}}u("Model load complete.")},calculateRayOriginFromMesh:function(){var e=new THREE.Quaternion;return function(t){var n;if(this.rayOrigin.origin.set(0,0,0),this.rayOrigin.direction.set(0,0,-1),this.rayOrigin.createdFromMesh=!0,n=t.getObjectByName(this.mapping.pointingPoseMeshName)){var r=t.parent;r&&(t.parent=null,t.updateMatrixWorld(!0),t.parent=r),n.getWorldPosition(this.rayOrigin.origin),n.getWorldQuaternion(e),this.rayOrigin.direction.applyQuaternion(e),r&&t.updateMatrixWorld(!0)}else u("Mesh does not contain pointing origin data, defaulting to none.");this.modelReady()}}(),lerpAxisTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.axisMeshes[t];if(r){var i=r.min,o=r.max,a=r.value,s=.5*n+.5;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,s)),a.position.lerpVectors(i.position,o.position,s)}}}(),lerpButtonTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.buttonMeshes[t];if(r){var i=r.unpressed,o=r.pressed,a=r.value;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,n)),a.position.lerpVectors(i.position,o.position,n)}}}(),modelReady:function(){this.el.emit("controllermodelready",{name:"windows-motion-controls",model:this.data.model,rayOrigin:this.rayOrigin})},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&(this.loadedMeshInfo&&this.loadedMeshInfo.buttonMeshes&&this.lerpButtonTransform(t,e.detail.state.value),this.el.emit(t+"changed",e.detail.state))},onAxisMoved:function(e){var t=this.mapping.axisMeshNames.length;if(this.loadedMeshInfo&&this.loadedMeshInfo.axisMeshes)for(var n=0;n<t;n++)this.lerpAxisTransform(n,e.detail.axis[n]||0);s(this,this.mapping.axes,e)},setModelVisibility:function(e){var t=this.el.getObject3D("mesh");e=void 0!==e?e:this.modelVisible,this.modelVisible=e,t&&(t.visible=e)}})},{"../constants":123,"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],123:[function(e,t,n){t.exports={AFRAME_INJECTED:"aframe-injected",DEFAULT_CAMERA_HEIGHT:1.6,DEFAULT_HANDEDNESS:"right",keyboardevent:e("./keyboardevent")}},{"./keyboardevent":124}],124:[function(e,t,n){t.exports={KEYCODE_TO_CODE:{38:"ArrowUp",37:"ArrowLeft",40:"ArrowDown",39:"ArrowRight",87:"KeyW",65:"KeyA",83:"KeyS",68:"KeyD"}}},{}],125:[function(e,t,n){var r=e("./a-node"),i=e("../utils/bind"),o=e("../utils/debug"),a=e("./a-register-element").registerElement,s=e("../lib/three"),l=new s.FileLoader,c=o("core:a-assets:warn");function u(e){if(e.hasAttribute("autoplay")||"auto"===e.getAttribute("preload"))return new Promise((function(t,n){if(4===e.readyState)return t();if(e.error)return n();function r(){for(var n=0,r=0;r<e.buffered.length;r++)n+=e.buffered.end(r)-e.buffered.start(r);n>=e.duration&&("VIDEO"===e.tagName&&(s.Cache.files[e.getAttribute("src")]=e),t())}e.addEventListener("loadeddata",r,!1),e.addEventListener("progress",r,!1),e.addEventListener("error",n,!1)}))}function h(e){var t=function(e){var t;if(e.hasAttribute("crossorigin"))return e;if(null!==(t=e.getAttribute("src"))){if(-1===t.indexOf("://"))return e;if(function(e){var t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0];return t.substring(0,t.indexOf(":"))}(t)===window.location.host)return e}return c('Cross-origin element (e.g., <img>) was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set. Please set `crossorigin` on the element (e.g., <img crossorigin="anonymous">)',t),e.crossOrigin="anonymous",e.cloneNode(!0)}(e);return t.tagName&&"video"===t.tagName.toLowerCase()&&(t.setAttribute("playsinline",""),t.setAttribute("webkit-playsinline","")),t!==e&&(e.parentNode.appendChild(t),e.parentNode.removeChild(e)),t}function d(e){var t=f(e),n=t.lastIndexOf(".");return n>=0&&".glb"===t.slice(n,e.search(/\?|#|$/))?"arraybuffer":"text"}function f(e){var t=document.createElement("a");t.href=e;var n=t.search.replace(/^\?/,""),r=e.replace(n,"").replace("?","");return r.substring(r.lastIndexOf("/")+1)}t.exports=a("a-assets",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.isAssets=!0,this.fileLoader=l,this.timeout=null}},attachedCallback:{value:function(){var e,t,n,r,o,a,l=this,d=[];if(!this.parentNode.isScene)throw new Error("<a-assets> must be a child of a <a-scene>.");for(o=this.querySelectorAll("img"),e=0;e<o.length;e++)r=h(o[e]),d.push(new Promise((function(t,n){s.Cache.files[o[e].getAttribute("src")]=r,r.onload=t,r.onerror=n})));for(n=this.querySelectorAll("audio, video"),e=0;e<n.length;e++)(t=h(n[e])).src||t.srcObject||c("Audio/video asset has neither `src` nor `srcObject` attributes."),d.push(u(t));Promise.all(d).then(i(this.load,this)),a=parseInt(this.getAttribute("timeout"),10)||3e3,this.timeout=setTimeout((function(){l.hasLoaded||(c("Asset loading timed out in ",a,"ms"),l.emit("timeout"),l.load())}),a)}},detachedCallback:{value:function(){this.timeout&&clearTimeout(this.timeout)}},load:{value:function(){r.prototype.load.call(this,null,(function(e){return e.isAssetItem&&e.hasAttribute("src")}))}}})}),a("a-asset-item",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.data=null,this.isAssetItem=!0}},attachedCallback:{value:function(){var e=this,t=this.getAttribute("src");l.setResponseType(this.getAttribute("response-type")||d(t)),l.load(t,(function(t){e.data=t,setTimeout((function(){r.prototype.load.call(e)}))}),(function(t){e.emit("progress",{loadedBytes:t.loaded,totalBytes:t.total,xhr:t})}),(function(t){e.emit("error",{xhr:t})}))}}})}),t.exports.inferResponseType=d,t.exports.getFileNameFromURL=f},{"../lib/three":179,"../utils/bind":199,"../utils/debug":201,"./a-node":129,"./a-register-element":130}],126:[function(e,t,n){var r=e("../utils/debug"),i=e("./a-register-element").registerElement,o=r("core:cubemap:warn");t.exports=i("a-cubemap",{prototype:Object.create(window.HTMLElement.prototype,{attachedCallback:{value:function(){this.srcs=this.validate()},writable:window.debug},validate:{value:function(){var e,t=this.querySelectorAll("[src]"),n=[];if(6===t.length){for(e=0;e<t.length;e++)n.push(t[e].getAttribute("src"));return n}o("<a-cubemap> did not contain exactly six elements each with a `src` attribute.")},writable:window.debug}})})},{"../utils/debug":201,"./a-register-element":130}],127:[function(e,t,n){var r,i=e("./a-node"),o=e("./component").components,a=e("./a-register-element").registerElement,s=e("../lib/three"),l=e("../utils/"),c=l.debug("core:a-entity:debug"),u=l.debug("core:a-entity:warn"),h=["position","rotation","scale","visible"],d={once:!0},f=Object.create(i.prototype,{createdCallback:{value:function(){this.components={},this.initializingComponents={},this.componentsToUpdate={},this.isEntity=!0,this.isPlaying=!1,this.object3D=new s.Group,this.object3D.el=this,this.object3DMap={},this.parentEl=null,this.rotationObj={},this.states=[]}},attributeChangedCallback:{value:function(e,t,n){var r=this.components[e];r&&r.justInitialized&&""===n?delete r.justInitialized:(r||null!==n)&&this.setEntityAttribute(e,t,n)}},attachedCallback:{value:function(){var e,t=this.sceneEl,n=this;this.addToParent(),this.isScene||(t?!(e=t.querySelector("a-assets"))||e.hasLoaded?this.load():e.addEventListener("loaded",(function(){n.load()})):this.load())}},detachedCallback:{value:function(){var e;if(this.parentEl){for(e in this.components)this.removeComponent(e,!1);this.isScene||(this.removeFromParent(),i.prototype.detachedCallback.call(this),this.object3D.el=null)}}},getObject3D:{value:function(e){return this.object3DMap[e]}},setObject3D:{value:function(e,t){var n,r=this;if(!(t instanceof s.Object3D))throw new Error("`Entity.setObject3D` was called with an object that was not an instance of THREE.Object3D.");(n=this.getObject3D(e))&&this.object3D.remove(n),t.el=this,t.children.length&&t.traverse((function(e){e.el=r})),this.object3D.add(t),this.object3DMap[e]=t,this.emit("object3dset",{object:t,type:e})}},removeObject3D:{value:function(e){var t=this.getObject3D(e);t?(this.object3D.remove(t),delete this.object3DMap[e],this.emit("object3dremove",{type:e})):u("Tried to remove `Object3D` of type:",e,"which was not defined.")}},getOrCreateObject3D:{value:function(e,t){var n=this.getObject3D(e);return!n&&t&&(n=new t,this.setObject3D(e,n)),u("`getOrCreateObject3D` has been deprecated. Use `setObject3D()` and `object3dset` event instead."),n}},add:{value:function(e){if(!e.object3D)throw new Error("Trying to add an element that doesn't have an `object3D`");this.object3D.add(e.object3D),this.emit("child-attached",{el:e})}},addToParent:{value:function(){var e=this.parentEl=this.parentNode;e&&e.add&&!this.attachedToParent&&(e.add(this),this.attachedToParent=!0)}},removeFromParent:{value:function(){var e=this.parentEl;this.parentEl.remove(this),this.attachedToParent=!1,this.parentEl=null,e.emit("child-detached",{el:this})}},load:{value:function(){var e=this;!this.hasLoaded&&this.parentEl&&i.prototype.load.call(this,(function(){e.parentEl&&(e.updateComponents(),(e.isScene||e.parentEl.isPlaying)&&e.play())}))},writable:window.debug},remove:{value:function(e){e?this.object3D.remove(e.object3D):this.parentNode.removeChild(this)}},getChildEntities:{value:function(){for(var e=this.children,t=[],n=0;n<e.length;n++){var i=e[n];i instanceof r&&t.push(i)}return t}},initComponent:{value:function(e,t,n){var r,i,a,s;if(s=(a=l.split(e,"__"))[0],i=a.length>2?a.slice(1).join("__"):a[1],o[s]&&(p(this,e)||void 0!==t||n)&&!(e in this.components)){if(this.initComponentDependencies(s),i&&!o[s].multiple)throw new Error("Trying to initialize multiple components of type `"+s+"`. There can only be one component of this type per entity.");r=new o[s].Component(this,t,i),this.isPlaying&&r.play(),this.hasAttribute(e)||(r.justInitialized=!0,window.HTMLElement.prototype.setAttribute.call(this,e,"")),c("Component initialized: %s",e)}},writable:window.debug},initComponentDependencies:{value:function(e){var t,n;if(o[e]&&(t=o[e].dependencies))for(n=0;n<t.length;n++)this.initComponent(t[n],window.HTMLElement.prototype.getAttribute.call(this,t[n])||void 0,!0)}},removeComponent:{value:function(e,t){var n;(n=this.components[e])&&(n.initialized?(n.pause(),n.remove(),t&&(n.destroy(),delete this.components[e]),this.emit("componentremoved",n.evtDetail,!1)):this.addEventListener("componentinitialized",(function n(r){r.detail.name===e&&(this.removeComponent(e,t),this.removeEventListener("componentinitialized",n))})))},writable:window.debug},updateComponents:{value:function(){var e,t,n,r,i,o,a=this.componentsToUpdate;if(this.hasLoaded){for(n=0;n<this.mixinEls.length;n++)for(r in this.mixinEls[n].componentCache)m(r)&&(a[r]=!0);if(this.getExtraComponents)for(r in t=this.getExtraComponents())m(r)&&(a[r]=!0);for(n=0;n<this.attributes.length;++n)r=this.attributes[n].name,-1===h.indexOf(r)&&m(r)&&(a[r]=!0);for(n=0;n<h.length;n++)r=h[n],this.hasAttribute(r)&&this.updateComponent(r,this.getDOMAttribute(r));for(r in a)i=this.getDOMAttribute(r),o=t&&t[r],e=o?o.constructor===Object?l.extend(o,l.styleParser.parse(i||{})):i||o:i,this.updateComponent(r,e),delete a[r]}},writable:window.debug},updateComponent:{value:function(e,t,n){var r=this.components[e];if(r)return null!==t||p(this,e)?void r.updateProperties(t,n):void this.removeComponent(e,!0);this.initComponent(e,t,!1)}},removeAttribute:{value:function(e,t){var n=this.components[e];n&&void 0===t&&this.removeComponent(e,!0),n&&void 0!==t?n.resetProperty(t):("mixin"===e&&this.mixinUpdate(""),window.HTMLElement.prototype.removeAttribute.call(this,e))}},play:{value:function(){var e,t,n;if(!this.isPlaying&&this.hasLoaded){for(n in this.isPlaying=!0,this.components)this.components[n].play();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].play();this.emit("play")}},writable:!0},pause:{value:function(){var e,t,n;if(this.isPlaying){for(n in this.isPlaying=!1,this.components)this.components[n].pause();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].pause();this.emit("pause")}},writable:!0},setEntityAttribute:{value:function(e,t,n){if(o[e]||this.components[e])this.updateComponent(e,n);else if("mixin"===e){if(n===this.computedMixinStr)return;this.mixinUpdate(n,t)}}},mixinUpdate:{value:function(){var e=[];return function(t,n){var r,i,o,a,s=this;if(this.hasLoaded){for(n=n||this.getAttribute("mixin"),o=this.updateMixins(t,n),e.length=0,a=0;a<this.mixinEls.length;a++)for(r in this.mixinEls[a].componentCache)-1===e.indexOf(r)&&(this.components[r]?this.components[r].handleMixinUpdate():this.initComponent(r,null),e.push(r));for(a=0;a<o.oldMixinIds.length;a++)if(i=document.getElementById(o.oldMixinIds[a]))for(r in i.componentCache)-1===e.indexOf(r)&&this.components[r]&&(this.getDOMAttribute(r)?this.components[r].handleMixinUpdate():this.removeComponent(r,!0))}else this.addEventListener("loaded",(function(){s.mixinUpdate(t,n)}),d)}}()},setAttribute:{value:function(){var e={};return function(t,n,r){var a,s,c,u,h;if(c=(u=t.indexOf("__"))>0?t.substring(0,u):t,!o[c])return"mixin"===t&&this.mixinUpdate(n),void i.prototype.setAttribute.call(this,t,n);if(!this.components[t]&&this.hasAttribute(t)&&this.updateComponent(t,window.HTMLElement.prototype.getAttribute.call(this,t)),"undefined"!==typeof r&&"string"===typeof n&&n.length>0&&"string"===typeof l.styleParser.parse(n)){for(h in e)delete e[h];(a=e)[n]=r,s=!1}else a=n,s=!0===r;this.updateComponent(t,a,s),this.sceneEl&&this.sceneEl.getAttribute("debug")&&this.components[t].flushToDOM()}}(),writable:window.debug},flushToDOM:{value:function(e){var t,n,r,i=this.components,o=this.children;for(r in i)i[r].flushToDOM();if(e)for(n=0;n<o.length;++n)(t=o[n]).flushToDOM&&t.flushToDOM(e)}},getAttribute:{value:function(e){var t;return"position"===e?this.object3D.position:"rotation"===e?function(e){var t=s.Math.radToDeg,n=e.object3D.rotation,r=e.rotationObj;return r.x=t(n.x),r.y=t(n.y),r.z=t(n.z),r}(this):"scale"===e?this.object3D.scale:"visible"===e?this.object3D.visible:(t=this.components[e])?t.data:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},getDOMAttribute:{value:function(e){var t=this.components[e];return t?t.attrValue:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},addState:{value:function(e){this.is(e)||(this.states.push(e),this.emit("stateadded",e))}},removeState:{value:function(e){var t=this.states.indexOf(e);-1!==t&&(this.states.splice(t,1),this.emit("stateremoved",e))}},is:{value:function(e){return-1!==this.states.indexOf(e)}},inspect:{value:function(){this.sceneEl.components.inspector.openInspector(this)}},destroy:{value:function(){var e;if(this.parentNode)u("Entity can only be destroyed if detached from scenegraph.");else for(e in this.components)this.components[e].destroy()}}});function p(e,t){return!(!e.components[t]||!e.components[t].attrValue)||function(e,t){var n,r=!1;for(n=0;n<t.length&&!(r=t[n].hasAttribute(e));++n);return r}(t,e.mixinEls)}function m(e){return-1!==e.indexOf("__")&&(e=l.split(e,"__")[0]),!!o[e]}r=a("a-entity",{prototype:f}),t.exports=r},{"../lib/three":179,"../utils/":205,"./a-node":129,"./a-register-element":130,"./component":131}],128:[function(e,t,n){var r=e("./a-node"),i=e("./a-register-element").registerElement,o=e("./component").components,a=e("../utils");t.exports=i("a-mixin",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.componentCache={},this.id=this.getAttribute("id"),this.isMixin=!0}},attributeChangedCallback:{value:function(e,t,n){this.cacheAttribute(e,n),this.updateEntities()}},attachedCallback:{value:function(){this.sceneEl=this.closestScene(),this.cacheAttributes(),this.updateEntities(),this.load()}},setAttribute:{value:function(e,t){window.HTMLElement.prototype.setAttribute.call(this,e,t),this.cacheAttribute(e,t)}},cacheAttribute:{value:function(e,t){var n,r;r=a.split(e,"__")[0],(n=o[r])&&(void 0===t&&(t=window.HTMLElement.prototype.getAttribute.call(this,e)),this.componentCache[e]=n.parseAttrValueForCache(t))}},getAttribute:{value:function(e){return this.componentCache[e]||window.HTMLElement.prototype.getAttribute.call(this,e)}},cacheAttributes:{value:function(){var e,t,n=this.attributes;for(t=0;t<n.length;t++)e=n[t].name,this.cacheAttribute(e)}},updateEntities:{value:function(){var e,t,n;if(this.sceneEl)for(t=this.sceneEl.querySelectorAll("[mixin~="+this.id+"]"),n=0;n<t.length;n++)(e=t[n]).hasLoaded&&!e.isMixin&&e.mixinUpdate(this.id)}}})})},{"../utils":205,"./a-node":129,"./a-register-element":130,"./component":131}],129:[function(e,t,n){var r=e("./a-register-element").registerElement,i=e("./a-register-element").isNode,o=e("../utils/"),a=o.debug("core:a-node:warn"),s=o.debug("core:a-node:error");t.exports=r("a-node",{prototype:Object.create(window.HTMLElement.prototype,{createdCallback:{value:function(){this.computedMixinStr="",this.hasLoaded=!1,this.isNode=!0,this.mixinEls=[]},writable:window.debug},attachedCallback:{value:function(){var e;this.sceneEl=this.closestScene(),this.sceneEl||a("You are attempting to attach <"+this.tagName+"> outside of an A-Frame scene. Append this element to `<a-scene>` instead."),this.hasLoaded=!1,this.emit("nodeready",void 0,!1),this.isMixin||(e=this.getAttribute("mixin"))&&this.updateMixins(e)},writable:window.debug},attributeChangedCallback:{value:function(e,t,n){n!==this.computedMixinStr&&("mixin"!==e||this.isMixin||this.updateMixins(n,t))}},closestScene:{value:function(){for(var e=this;e&&!e.isScene;)e=e.parentElement;return e}},closest:{value:function(e){for(var t=this.matches||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector,n=this;n&&!t.call(n,e);)n=n.parentElement;return n}},detachedCallback:{value:function(){this.hasLoaded=!1}},load:{value:function(e,t){var n,r=this;this.hasLoaded||(t=t||i,n=this.getChildren().filter(t).map((function(e){return new Promise((function(t){if(e.hasLoaded)return t();e.addEventListener("loaded",t)}))})),Promise.all(n).then((function(){r.hasLoaded=!0,e&&e(),r.emit("loaded",void 0,!1)})).catch((function(e){s("Failure loading node: ",e)})))},writable:!0},getChildren:{value:function(){return Array.prototype.slice.call(this.children,0)}},updateMixins:{value:function(){var e=[],t=[],n={};return function(r,i){var a,s,l;for(e.length=0,t.length=0,s=r?o.split(r.trim(),/\s+/):e,l=i?o.split(i.trim(),/\s+/):t,n.newMixinIds=s,n.oldMixinIds=l,a=0;a<l.length;a++)-1===s.indexOf(l[a])&&this.unregisterMixin(l[a]);for(this.computedMixinStr="",this.mixinEls.length=0,a=0;a<s.length;a++)this.registerMixin(document.getElementById(s[a]));return this.computedMixinStr&&(this.computedMixinStr=this.computedMixinStr.trim(),window.HTMLElement.prototype.setAttribute.call(this,"mixin",this.computedMixinStr)),n}}()},registerMixin:{value:function(e){var t,n,r;if(e){if(r=e.getAttribute("mixin"))for(t=o.split(r.trim(),/\s+/),n=0;n<t.length;n++)this.registerMixin(document.getElementById(t[n]));this.computedMixinStr=this.computedMixinStr+" "+e.id,this.mixinEls.push(e)}}},setAttribute:{value:function(e,t){"mixin"===e&&this.updateMixins(t),window.HTMLElement.prototype.setAttribute.call(this,e,t)}},unregisterMixin:{value:function(e){var t,n=this.mixinEls;for(t=0;t<n.length;++t)if(e===n[t].id){n.splice(t,1);break}}},emit:{value:function(){var e={};return function(t,n,r,i){void 0===r&&(r=!0),e.bubbles=!!r,e.detail=n,i&&(e=o.extend({},i,e)),this.dispatchEvent(new CustomEvent(t,e))}}(),writable:window.debug}})})},{"../utils/":205,"./a-register-element":130}],130:[function(e,t,n){var r,i;e("document-register-element");var o=t.exports.knownTags={};function a(e,t,n,r){t.forEach((function(t){!function(e,t,n,r){var i=n[t],o=r[t];i&&o&&i!==o&&(e[t]={value:function(){return o.apply(this,arguments),i.apply(this,arguments)},writable:window.debug})}(e,t,n,r)}))}function s(e,t){Object.getOwnPropertyNames(e).forEach((function(n){var r;t[n]||(r=Object.getOwnPropertyDescriptor(e,n),t[n]={value:e[n],writable:r.writable})}))}t.exports.isNode=function(e){return e.tagName.toLowerCase()in o||e.isNode},t.exports.registerElement=function(e,t){var n=Object.getPrototypeOf(t.prototype),l=t,c=r&&n===r.prototype,u=i&&n===i.prototype;return(c||u)&&function(e){o[e.toLowerCase()]=!0}(e),c&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),u&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,i.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),Object.getOwnPropertyNames(l.prototype).forEach((function(e){var t=l.prototype[e];"function"===typeof t&&(t.displayName=e)})),document.registerElement(e,l)},t.exports.wrapMethods=a,r=e("./a-node"),i=e("./a-entity")},{"./a-entity":127,"./a-node":129,"document-register-element":12}],131:[function(e,t,n){var r=e("./schema"),i=e("./scene/scenes"),o=e("./system"),a=e("../utils/"),s=t.exports.components={},l=r.parseProperties,c=r.parseProperty,u=r.process,h=r.isSingleProperty,d=r.stringifyProperties,f=r.stringifyProperty,p=a.styleParser,m=a.debug("core:component:warn"),g=document.currentScript,v=new RegExp("[A-Z]+"),y={},b=t.exports.Component=function(e,t,n){var r=this;this.el=e,this.id=n,this.attrName=this.name+(n?"__"+n:""),this.evtDetail={id:this.id,name:this.name},this.initialized=!1,this.isSingleProperty=h(this.schema),this.isSinglePropertyObject=this.isSingleProperty&&A(c(void 0,this.schema))&&!(this.schema.default instanceof window.HTMLElement),this.isObjectBased=!this.isSingleProperty||this.isSinglePropertyObject,this.el.components[this.attrName]=this,this.objectPool=y[this.name];const i=this.events;this.events={},function(e,t){var n;for(n in t)e.events[n]=t[n].bind(e)}(this,i),this.attrValue=void 0,this.isObjectBased?(this.nextData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.nextData,this.schema),this.oldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.oldData,this.schema),this.previousOldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.previousOldData,this.schema),this.parsingAttrValue=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.parsingAttrValue,this.schema)):(this.nextData=void 0,this.oldData=void 0,this.previousOldData=void 0,this.parsingAttrValue=void 0),this.throttledEmitComponentChanged=a.throttle((function(){e.emit("componentchanged",r.evtDetail,!1)}),200),this.updateProperties(t)};if(b.prototype={schema:{},init:function(){},events:{},update:function(e){},updateSchema:void 0,tick:void 0,tock:void 0,play:function(){},pause:function(){},remove:function(){},parse:function(e,t){var n=this.schema;return this.isSingleProperty?c(e,n):l(p.parse(e),n,!0,this.name,t)},stringify:function(e){var t=this.schema;return"string"===typeof e?e:this.isSingleProperty?f(e,t):(e=d(e,t),p.stringify(e))},updateCachedAttrValue:function(e,t){var n,r,i;if(void 0!==e){if(null===e)return this.isObjectBased&&this.attrValue&&this.objectPool.recycle(this.attrValue),void(this.attrValue=void 0);if(e instanceof Object&&!(e instanceof window.HTMLElement)?(r=this.objectPool.use(),n=a.extend(r,e)):n=this.parseAttrValueForCache(e),this.isObjectBased&&!t&&this.attrValue)for(i in this.attrValue)void 0===n[i]&&(n[i]=this.attrValue[i]);this.isObjectBased&&!this.attrValue&&(this.attrValue=this.objectPool.use()),a.objectPool.clearObject(this.attrValue),this.attrValue=_(this.attrValue,n,this.isObjectBased),a.objectPool.clearObject(r)}},parseAttrValueForCache:function(e){var t;return"string"!==typeof e?e:(this.isSingleProperty?"string"===typeof(t=this.schema.parse(e))&&(t=e):(a.objectPool.clearObject(this.parsingAttrValue),t=p.parse(e,this.parsingAttrValue)),t)},flushToDOM:function(e){var t=e?this.data:this.attrValue;null!==t&&void 0!==t&&window.HTMLElement.prototype.setAttribute.call(this.el,this.attrName,this.stringify(t))},updateProperties:function(e,t){this.el.hasLoaded?(null!==e&&(e=this.parseAttrValueForCache(e)),this.updateCachedAttrValue(e,t),this.initialized?(this.updateComponent(e,t),this.callUpdateHandler()):this.initComponent()):this.updateCachedAttrValue(e)},initComponent:function(){var e,t=this.el;this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!1,!0)),this.data=this.buildData(this.attrValue),t.initializingComponents[this.name]||(t.initializingComponents[this.name]=!0,this.init(),this.initialized=!0,delete t.initializingComponents[this.name],this.oldData=_(this.oldData,this.data,this.isObjectBased),e=this.isObjectBased?this.objectPool.use():void 0,this.update(e),this.isObjectBased&&this.objectPool.recycle(e),t.isPlaying&&this.play(),t.emit("componentinitialized",this.evtDetail,!1))},updateComponent:function(e,t){var n,r;if(t)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));if(this.isSingleProperty)return this.isObjectBased&&c(e,this.schema),void(this.data=e);if(l(e,this.schema,!0,this.name),this.schemaChangeKeys.length)for(n in e)if(this.schema[n].schemaChange){r=!0;break}if(r)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));for(n in e)void 0!==e[n]&&(this.data[n]=e[n])},callUpdateHandler:function(){var e;this.previousOldData instanceof Object&&a.objectPool.clearObject(this.previousOldData),this.isObjectBased?x(this.previousOldData,this.oldData):this.previousOldData=this.oldData,e=!a.deepEqual(this.oldData,this.data),(this.isPositionRotationScale||e)&&(this.oldData instanceof Object&&a.objectPool.clearObject(this.oldData),this.oldData=_(this.oldData,this.data,this.isObjectBased),this.update(this.previousOldData),this.throttledEmitComponentChanged())},handleMixinUpdate:function(){this.data=this.buildData(this.attrValue),this.callUpdateHandler()},resetProperty:function(e){if(this.isObjectBased){if(!(e in this.attrValue))return;delete this.attrValue[e],this.data[e]=this.schema[e].default}else this.attrValue=this.schema.default,this.data=this.schema.default;this.updateProperties(this.attrValue)},extendSchema:function(e){var t;t=a.extend({},s[this.name].schema),a.extend(t,e),this.schema=u(t),this.el.emit("schemachanged",this.evtDetail)},buildData:function(e,t,n){var r,i,o,s,u,h,d,f=this.nextData,p=this.schema,m=this.el.mixinEls;if(r=e&&e.constructor===Array?e.length:void 0!==e&&null!==e,this.isObjectBased&&a.objectPool.clearObject(f),this.isSingleProperty)i=this.isObjectBased?x(f,p.default):S(p.default)?a.clone(p.default):p.default;else for(s in i=(d=!t&&this.attrValue)instanceof Object?x(f,d):f,p)o=p[s].default,void 0===i[s]&&(i[s]=S(o)?a.clone(o):o);for(h=0;h<m.length;h++)(u=m[h].getAttribute(this.attrName))&&(i=_(i,u,this.isObjectBased));if(r){if(this.isSingleProperty)return A(e)?(x(this.parsingAttrValue,e),c(this.parsingAttrValue,p)):c(e,p);i=_(i,e,this.isObjectBased)}else if(this.isSingleProperty)return c(i,p);return l(i,p,void 0,this.name,n)},eventsAttach:function(){var e;for(e in this.eventsDetach(),this.events)this.el.addEventListener(e,this.events[e])},eventsDetach:function(){var e;for(e in this.events)this.el.removeEventListener(e,this.events[e])},destroy:function(){this.objectPool.recycle(this.attrValue),this.objectPool.recycle(this.oldData),this.objectPool.recycle(this.parsingAttrValue),this.attrValue=this.oldData=this.parsingAttrValue=void 0}},window.debug)var w=t.exports.registrationOrderWarnings={};function x(e,t){var n,r;for(r in t)void 0!==t[r]&&(n=t[r],e[r]=S(n)?a.clone(n):n);return e}function _(e,t,n){var r;if(n&&t.constructor===Object){for(r in t)void 0!==t[r]&&(t[r]&&t[r].constructor===Object?e[r]=a.clone(t[r]):e[r]=t[r]);return e}return t}function E(e){return e.tick||e.tock}function A(e){return e&&e.constructor===Object&&!(e instanceof window.HTMLElement)}function S(e){return e&&(e.constructor===Object||e.constructor===Array)&&!(e instanceof window.HTMLElement)}t.exports.registerComponent=function(e,t){var n,r,l,c,d,f,p={};if(document.currentScript&&document.currentScript!==g&&i.forEach((function(t){t.hasLoaded||document.currentScript.compareDocumentPosition(t)!==Node.DOCUMENT_POSITION_FOLLOWING&&(m("The component `"+e+"` was registered in a <script> tag after the scene. Component <script> tags in an HTML file should be declared *before* the scene such that the component is available to entities during scene initialization."),window.debug&&(w[e]=!0))})),!0===v.test(e)&&m("The component name `"+e+"` contains uppercase characters, but HTML will ignore the capitalization of attribute names. Change the name to be lowercase: `"+e.toLowerCase()+"`"),-1!==e.indexOf("__"))throw new Error("The component name `"+e+"` is not allowed. The sequence __ (double underscore) is reserved to specify an id for multiple components of the same type");if(Object.keys(t).forEach((function(e){p[e]={value:t[e],writable:!0}})),s[e])throw new Error("The component `"+e+"` has been already registered. Check that you are not loading two versions of the same component or two different components of the same name.");if(((n=function(e,t,n){b.call(this,e,t,n)}).prototype=Object.create(b.prototype,p)).name=e,n.prototype.isPositionRotationScale="position"===e||"rotation"===e||"scale"===e,n.prototype.constructor=n,n.prototype.system=o&&o.systems[e],n.prototype.play=(d=n.prototype.play,function(){var e=this.el.sceneEl,t=this.el.isPlaying&&!this.isPlaying;this.initialized&&t&&(d.call(this),this.isPlaying=!0,this.eventsAttach(),E(this)&&e.addBehavior(this))}),n.prototype.pause=(f=n.prototype.pause,function(){var e=this.el.sceneEl;this.isPlaying&&(f.call(this),this.isPlaying=!1,this.eventsDetach(),E(this)&&e.removeBehavior(this))}),l=a.extend(u(n.prototype.schema,n.prototype.name)),!(c=h(n.prototype.schema)))for(r in n.prototype.schemaChangeKeys=[],l)l[r].schemaChange&&n.prototype.schemaChangeKeys.push(r);return y[e]=a.objectPool.createPool(),s[e]={Component:n,dependencies:n.prototype.dependencies,isSingleProp:c,multiple:n.prototype.multiple,name:e,parse:n.prototype.parse,parseAttrValueForCache:n.prototype.parseAttrValueForCache,schema:l,stringify:n.prototype.stringify,type:n.prototype.type},n}},{"../utils/":205,"./scene/scenes":138,"./schema":140,"./system":142}],132:[function(e,t,n){var r=e("./schema").process,i=t.exports.geometries={},o=t.exports.geometryNames=[],a=e("../lib/three"),s=t.exports.Geometry=function(){};s.prototype={schema:{},init:function(e){return this.geometry=new a.BufferGeometry,this.geometry},update:function(e){}},t.exports.registerGeometry=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The geometry `"+e+"` has been already registered");return((n=function(){s.call(this)}).prototype=Object.create(s.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Geometry:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"./schema":140}],133:[function(e,t,n){var r=e("../utils/coordinates"),i=e("debug"),o=i("core:propertyTypes:warn"),a=i("core:propertyTypes:warn"),s=t.exports.propertyTypes={},l=/[,> .[\]:]/,c=/\url\((.+)\)/;function u(e,t,n,r){"type"in s?o("Property type "+e+" is already registered."):s[e]={default:t,parse:n||d,stringify:r||f}}function h(e){var t,n;return"string"!==typeof e?e:(n=e.match(c))?n[1]:"#"===e.charAt(0)?(t=document.getElementById(e.substring(1)))?"CANVAS"===t.tagName||"VIDEO"===t.tagName||"IMG"===t.tagName?t:t.getAttribute("src"):void a('"'+e+'" asset not found.'):e}function d(e){return e}function f(e){return null===e?"null":e.toString()}function p(e){return parseInt(e,10)}function m(e){return r.parse(e,this.default)}function g(e,t){if(null===e)return!0;if("object"!==typeof e)return!1;if(Object.keys(e).length!==t)return!1;var n=e.x,r=e.y,i=e.z,o=e.w;return"number"===typeof n&&"number"===typeof r&&!(t>2&&"number"!==typeof i)&&!(t>3&&"number"!==typeof o)}u("audio","",h),u("array",[],(function(e){return Array.isArray(e)?e:e&&"string"===typeof e?e.split(",").map((function(e){return e.trim()})):[]}),(function(e){return e.join(", ")})),u("asset","",h),u("boolean",!1,(function(e){return"false"!==e&&!1!==e})),u("color","#FFF",d,f),u("int",0,p),u("number",0,(function(e){return parseFloat(e,10)})),u("map","",h),u("model","",h),u("selector",null,(function(e){return e?"string"!==typeof e?e:"#"!==e[0]||l.test(e)?document.querySelector(e):document.getElementById(e.substring(1)):null}),(function(e){return e.getAttribute?"#"+e.getAttribute("id"):f(e)})),u("selectorAll",null,(function(e){return e?"string"!==typeof e?e:Array.prototype.slice.call(document.querySelectorAll(e),0):null}),(function(e){return e instanceof Array?e.map((function(e){return"#"+e.getAttribute("id")})).join(", "):f(e)})),u("src","",(function(e){return a("`src` property type is deprecated. Use `asset` instead."),h(e)})),u("string","",d,f),u("time",0,p),u("vec2",{x:0,y:0},m,r.stringify),u("vec3",{x:0,y:0,z:0},m,r.stringify),u("vec4",{x:0,y:0,z:0,w:1},m,r.stringify),t.exports.registerPropertyType=u,t.exports.isValidDefaultValue=function(e,t){return("audio"!==e||"string"===typeof t)&&!("array"===e&&!Array.isArray(t))&&("asset"!==e||"string"===typeof t)&&("boolean"!==e||"boolean"===typeof t)&&("color"!==e||"string"===typeof t)&&("int"!==e||"number"===typeof t)&&("number"!==e||"number"===typeof t)&&("map"!==e||"string"===typeof t)&&("model"!==e||"string"===typeof t)&&("selector"!==e||"string"===typeof t||null===t)&&("selectorAll"!==e||"string"===typeof t||null===t)&&("src"!==e||"string"===typeof t)&&("string"!==e||"string"===typeof t)&&("time"!==e||"number"===typeof t)&&("vec2"===e?g(t,2):"vec3"===e?g(t,3):"vec4"!==e||g(t,4))},t.exports.isValidDefaultCoordinate=g},{"../utils/coordinates":200,debug:8}],134:[function(e,t,n){var r=e("./metaTags").inject,i=e("./wakelock"),o=e("./loadingScreen"),a=e("../a-register-element"),s=e("./scenes"),l=e("../system").systems,c=e("../../lib/three"),u=e("../../utils/"),h=e("../a-entity"),d=e("../a-node"),f=e("./postMessage"),p=u.bind,m=u.device.isIOS(),g=u.device.isMobile(),v=u.device.isWebXRAvailable,y=a.registerElement,b=u.debug("core:a-scene:warn");function w(e,t,n,r){return e.parentElement?t?{height:e.parentElement.offsetHeight,width:e.parentElement.offsetWidth}:function(e,t){var n,r,i=window.devicePixelRatio;return r={height:document.body.offsetHeight,width:document.body.offsetWidth},!e||t||-1===e.width&&-1===e.height||r.width*i<e.width&&r.height*i<e.height||(n=r.width/r.height,r.width*i>e.width&&-1!==e.width&&(r.width=Math.round(e.width/i),r.height=Math.round(e.width/n/i)),r.height*i>e.height&&-1!==e.height&&(r.height=Math.round(e.height/i),r.width=Math.round(e.height*n/i))),r}(n,r):{height:0,width:0}}function x(e){var t;function n(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||e.exitVR(),document.activeElement.blur(),document.body.focus()}(t=document.createElement("canvas")).classList.add("a-canvas"),t.dataset.aframeCanvas=!0,e.appendChild(t),document.addEventListener("fullscreenchange",n),document.addEventListener("mozfullscreenchange",n),document.addEventListener("webkitfullscreenchange",n),document.addEventListener("MSFullscreenChange",n),t.addEventListener("touchmove",(function(e){e.preventDefault()})),e.canvas=t,e.emit("render-target-loaded",{target:t}),setTimeout(p(e.resize,e),0)}m&&e("../../utils/ios-orientationchange-blank-bug"),t.exports.AScene=y("a-scene",{prototype:Object.create(h.prototype,{createdCallback:{value:function(){this.clock=new c.Clock,this.isIOS=m,this.isMobile=g,this.hasWebXR=v,this.isAR=!1,this.isScene=!0,this.object3D=new c.Scene;var e=this;this.object3D.onAfterRender=function(t,n,r){e.isPlaying&&e.tock(e.time,e.delta,r)},this.resize=p(this.resize,this),this.render=p(this.render,this),this.systems={},this.systemNames=[],this.time=this.delta=0,this.behaviors={tick:[],tock:[]},this.hasLoaded=!1,this.isPlaying=!1,this.originalHTML=this.innerHTML,this.setAttribute("inspector",""),this.setAttribute("keyboard-shortcuts",""),this.setAttribute("screenshot",""),this.setAttribute("vr-mode-ui",""),this.setAttribute("device-orientation-permission-ui","")}},addFullScreenStyles:{value:function(){document.documentElement.classList.add("a-fullscreen")}},removeFullScreenStyles:{value:function(){document.documentElement.classList.remove("a-fullscreen")}},attachedCallback:{value:function(){var e=this,t=this.hasAttribute("embedded");x(this),this.setupRenderer(),o.setup(this,w),this.resize(),t||this.addFullScreenStyles(),f(this),r(this),i(this),this.onVRPresentChangeBound=p(this.onVRPresentChange,this),window.addEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),this.enterVRBound=function(){e.enterVR()},this.exitVRBound=function(){e.exitVR()},this.exitVRTrueBound=function(){e.exitVR(!0)},this.pointerRestrictedBound=function(){e.pointerRestricted()},this.pointerUnrestrictedBound=function(){e.pointerUnrestricted()},v||(window.addEventListener("vrdisplaydeactivate",this.exitVRBound),window.addEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.addEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.addEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound)),window.addEventListener("sessionend",this.resize),this.addEventListener("cameraready",(function(){e.attachedCallbackPostCamera()})),this.initSystems(),this.hasWebXR&&navigator.xr&&navigator.xr.addEventListener&&navigator.xr.addEventListener("sessiongranted",(function(){e.enterVR()}))}},attachedCallbackPostCamera:{value:function(){var e=this;window.addEventListener("load",void 0),window.addEventListener("resize",(function(){e.isIOS?setTimeout(e.resize,100):e.resize()})),this.play(),s.push(this)},writable:window.debug},initSystems:{value:function(){var e;for(e in this.initSystem("camera"),l)"camera"!==e&&this.initSystem(e)}},initSystem:{value:function(e){this.systems[e]||(this.systems[e]=new l[e](this),this.systemNames.push(e))}},detachedCallback:{value:function(){var e=s.indexOf(this);s.splice(e,1),window.removeEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),window.removeEventListener("vrdisplayactivate",this.enterVRBound),window.removeEventListener("vrdisplaydeactivate",this.exitVRBound),window.removeEventListener("vrdisplayconnect",this.enterVRBound),window.removeEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.removeEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.removeEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound),window.removeEventListener("sessionend",this.resize),this.renderer.xr.dispose()}},addBehavior:{value:function(e){var t,n,r=this.behaviors;for(n in r)e[n]&&-1===(t=this.behaviors[n]).indexOf(e)&&t.push(e)}},getPointerLockElement:{value:function(){return document.pointerLockElement},writable:window.debug},checkHeadsetConnected:{value:u.device.checkHeadsetConnected,writable:window.debug},enterAR:{value:function(){var e;if(!this.hasWebXR)throw e="Failed to enter AR mode, WebXR not supported.",new Error(e);if(!u.device.checkARSupport())throw e="Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.",new Error(e);return this.enterVR(!0)}},enterVR:{value:function(e){var t,n,r=this,i=r.renderer.xr;if(this.is("vr-mode"))return Promise.resolve("Already in VR.");if(this.checkHeadsetConnected()||this.isMobile){if(i.enabled=!0,this.hasWebXR){this.xrSession&&this.xrSession.removeEventListener("end",this.exitVRBound);var o=this.sceneEl.systems.webxr.sessionReferenceSpaceType;i.setReferenceSpaceType(o);var a=e?"immersive-ar":"immersive-vr";return n=this.sceneEl.systems.webxr.sessionConfiguration,new Promise((function(e,t){navigator.xr.requestSession(a,n).then((function(t){r.xrSession=t,i.layersEnabled=-1!==n.requiredFeatures.indexOf("layers"),i.setSession(t),t.addEventListener("end",r.exitVRBound),c(e)}),(function(e){throw new Error("Failed to enter "+("immersive-ar"===a?"AR":"VR")+" mode (`requestSession`) "+e)}))}))}if(t=u.device.getVRDisplay(),i.setDevice(t),t.isPresenting&&!window.hasNativeWebVRImplementation)return c(),Promise.resolve();var s=this.getAttribute("renderer"),l={highRefreshRate:s.highRefreshRate,foveationLevel:s.foveationLevel};return t.requestPresent([{source:this.canvas,attributes:l}]).then(c,(function(e){throw r.removeState("vr-mode"),e&&e.message?new Error("Failed to enter VR mode (`requestPresent`): "+e.message):new Error("Failed to enter VR mode (`requestPresent`).")}))}return c(),Promise.resolve();function c(t){var n,i;window.hasNativeWebVRImplementation&&!window.hasNativeWebXRImplementation&&(n=new CustomEvent("vrdisplaypresentchange",{detail:{display:u.device.getVRDisplay()}}),window.dispatchEvent(n)),e?r.addState("ar-mode"):r.addState("vr-mode"),r.emit("enter-vr",{target:r}),!v&&r.isMobile&&screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape"),r.addFullScreenStyles(),r.isMobile||r.checkHeadsetConnected()||((i=r.canvas).requestFullscreen||i.webkitRequestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen).apply(i,[{navigationUI:"hide"}]),r.renderer.setAnimationLoop(r.render),r.resize(),t&&t()}},writable:!0},exitVR:{value:function(){var e,t=this,n=this.renderer.xr;if(!this.is("vr-mode")&&!this.is("ar-mode"))return Promise.resolve("Not in immersive mode.");if(this.checkHeadsetConnected()||this.isMobile){if(n.enabled=!1,e=u.device.getVRDisplay(),this.hasWebXR)this.xrSession.removeEventListener("end",this.exitVRBound),this.xrSession.end().then((function(){}),(function(){})),this.xrSession=void 0,n.setSession(null);else if(e.isPresenting)return e.exitPresent().then(r,(function(e){throw e&&e.message?new Error("Failed to exit VR mode (`exitPresent`): "+e.message):new Error("Failed to exit VR mode (`exitPresent`).")}))}else(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen());return r(),Promise.resolve();function r(){t.removeState("vr-mode"),t.removeState("ar-mode"),t.isMobile&&screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.hasAttribute("embedded")&&t.removeFullScreenStyles(),t.resize(),t.isIOS&&u.forceCanvasResizeSafariMobile(t.canvas),t.renderer.setPixelRatio(window.devicePixelRatio),t.emit("exit-vr",{target:t})}},writable:!0},pointerRestricted:{value:function(){if(this.canvas){var e=this.getPointerLockElement();e&&e!==this.canvas&&document.exitPointerLock&&document.exitPointerLock(),this.canvas.requestPointerLock&&this.canvas.requestPointerLock()}}},pointerUnrestricted:{value:function(){var e=this.getPointerLockElement();e&&e===this.canvas&&document.exitPointerLock&&document.exitPointerLock()}},onVRPresentChange:{value:function(e){var t=e.display||e.detail.display;t&&t.isPresenting?this.enterVR():this.exitVR()}},getAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getAttribute.call(this,e)}},getComputedAttribute:{value:function(e){b("`getComputedAttribute` is deprecated. Use `getAttribute` instead."),this.getAttribute(e)}},getDOMAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getDOMAttribute.call(this,e)}},setAttribute:{value:function(e,t,n){var r=this.systems[e];if(r)return d.prototype.setAttribute.call(this,e,t),void r.updateProperties(t);h.prototype.setAttribute.call(this,e,t,n)}},removeBehavior:{value:function(e){var t,n,r,i=this.behaviors;for(n in i)e[n]&&-1!==(r=(t=this.behaviors[n]).indexOf(e))&&t.splice(r,1)}},resize:{value:function(){var e,t,n=this.camera,r=this.canvas,i=this.renderer.xr.isPresenting;e=this.renderer.xr.enabled&&i,!n||!r||this.is("vr-mode")&&(this.isMobile||e)||(t=w(r,this.getAttribute("embedded")&&!this.is("vr-mode"),this.maxCanvasSize,this.is("vr-mode")),n.aspect=t.width/t.height,n.updateProjectionMatrix(),this.renderer.setSize(t.width,t.height,!1),this.emit("rendererresize",null,!1))},writable:!0},setupRenderer:{value:function(){var e,t,n,r,i=this;r={alpha:!0,antialias:!g,canvas:this.canvas,logarithmicDepthBuffer:!1,powerPreference:"high-performance"},this.maxCanvasSize={height:1920,width:1920},this.hasAttribute("renderer")&&(n=this.getAttribute("renderer"),(t=u.styleParser.parse(n)).precision&&(r.precision=t.precision+"p"),t.antialias&&"auto"!==t.antialias&&(r.antialias="true"===t.antialias),t.logarithmicDepthBuffer&&"auto"!==t.logarithmicDepthBuffer&&(r.logarithmicDepthBuffer="true"===t.logarithmicDepthBuffer),t.alpha&&(r.alpha="true"===t.alpha),this.maxCanvasSize={width:t.maxCanvasWidth?parseInt(t.maxCanvasWidth):this.maxCanvasSize.width,height:t.maxCanvasHeight?parseInt(t.maxCanvasHeight):this.maxCanvasSize.height}),(e=this.renderer=new c.WebGLRenderer(r)).setPixelRatio(window.devicePixelRatio),e.sortObjects=!1,this.camera&&e.xr.setPoseTarget(this.camera.el.object3D),this.addEventListener("camera-set-active",(function(){e.xr.setPoseTarget(i.camera.el.object3D)}))},writable:window.debug},play:{value:function(){var e=this,t=this;this.renderStarted?h.prototype.play.call(this):(this.addEventListener("loaded",(function(){var e,n=this.renderer,r=this.renderer.xr;h.prototype.play.call(this),t.renderStarted||(t.resize(),t.renderer&&(window.performance&&window.performance.mark("render-started"),o.remove(),(e=u.device.getVRDisplay())&&e.isPresenting&&(r.setDevice(e),r.enabled=!0,t.enterVR()),n.setAnimationLoop(this.render),t.renderStarted=!0,t.emit("renderstart")))})),setTimeout((function(){h.prototype.load.call(e)})))}},updateComponent:{value:function(e){e in l||h.prototype.updateComponent.apply(this,arguments)}},tick:{value:function(e,t){var n,r=this.systems;for(n=0;n<this.behaviors.tick.length;n++)this.behaviors.tick[n].el.isPlaying&&this.behaviors.tick[n].tick(e,t);for(n=0;n<this.systemNames.length;n++)r[this.systemNames[n]].tick&&r[this.systemNames[n]].tick(e,t)}},tock:{value:function(e,t,n){var r,i=this.systems;for(r=0;r<this.behaviors.tock.length;r++)this.behaviors.tock[r].el.isPlaying&&this.behaviors.tock[r].tock(e,t,n);for(r=0;r<this.systemNames.length;r++)i[this.systemNames[r]].tock&&i[this.systemNames[r]].tock(e,t,n)}},render:{value:function(e,t){var n=this.renderer;this.frame=t,this.delta=1e3*this.clock.getDelta(),this.time=1e3*this.clock.elapsedTime,this.isPlaying&&this.tick(this.time,this.delta);var r=null;this.is("ar-mode")&&(r=this.object3D.background,this.object3D.background=null),n.render(this.object3D,this.camera),r&&(this.object3D.background=r)},writable:!0}})}),t.exports.setupCanvas=x},{"../../lib/three":179,"../../utils/":205,"../../utils/ios-orientationchange-blank-bug":206,"../a-entity":127,"../a-node":129,"../a-register-element":130,"../system":142,"./loadingScreen":135,"./metaTags":136,"./postMessage":137,"./scenes":138,"./wakelock":139}],135:[function(e,t,n){var r,i,o,a=e("../../utils/").styleParser;function s(e){var t=r.hasAttribute("embedded"),n=o(r.canvas,t,r.maxCanvasSize,r.is("vr-mode"));e.aspect=n.width/n.height,e.updateProjectionMatrix(),r.renderer.setSize(n.width,n.height,!1)}t.exports.setup=function(e,t){o=t;var n,l,c,u,h,d,f,p,m,g,v=(r=e).hasAttribute("loading-screen")?a.parse(r.getAttribute("loading-screen")):void 0,y=v&&v.dotsColor||"white",b=v&&v.backgroundColor||"#24CAFF";(void 0===v||"true"===v.enabled||void 0===v.enabled)&&(n=new THREE.Scene,l=new THREE.SphereGeometry(.2,36,18,0,2*Math.PI,0,Math.PI),c=new THREE.MeshBasicMaterial({color:y}),u=new THREE.Mesh(l,c),h=u.clone(),d=u.clone(),f=new THREE.PerspectiveCamera(80,window.innerWidth/window.innerHeight,5e-4,1e4),p=new THREE.Clock,m=0,g=function(){r.renderer.render(n,f),m=p.getElapsedTime()%4,u.visible=m>=1,h.visible=m>=2,d.visible=m>=3},n.background=new THREE.Color(b),n.add(f),u.position.set(-1,0,-15),h.position.set(0,0,-15),d.position.set(1,0,-15),f.add(u),f.add(h),f.add(d),(i=document.createElement("div")).className="a-loader-title",i.innerHTML=document.title,i.style.display="none",r.appendChild(i),setTimeout((function(){r.hasLoaded||(s(f),i.style.display="block",window.addEventListener("resize",(function(){s(f)})),r.renderer.setAnimationLoop(g))}),200))},t.exports.remove=function(){window.removeEventListener("resize",s),i&&(i.style.display="none")}},{"../../utils/":205}],136:[function(e,t,n){var r,i=e("../../constants/"),o=e("../../utils").extend,a=t.exports.MOBILE_HEAD_TAGS=[l({name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover"}),l({name:"mobile-web-app-capable",content:"yes"}),l({name:"theme-color",content:"black"})],s=[l({name:"apple-mobile-web-app-capable",content:"yes"}),l({name:"apple-mobile-web-app-status-bar-style",content:"black"}),(r={rel:"apple-touch-icon",href:"https://aframe.io/images/aframe-logo-152.png"},{tagName:"link",attributes:r,exists:function(){return document.querySelector('link[rel="'+r.rel+'"]')}})];function l(e){return{tagName:"meta",attributes:e,exists:function(){return document.querySelector('meta[name="'+e.name+'"]')}}}t.exports.inject=function(e){var t,n=document.head,r=n.querySelector("script"),l=[];return a.forEach(c),e.isIOS&&s.forEach(c),l;function c(e){e&&!e.exists()&&(t=function(e){if(e&&e.tagName){var t=document.createElement(e.tagName);return t.setAttribute(i.AFRAME_INJECTED,""),o(t,e.attributes)}}(e))&&(r?r.parentNode.insertBefore(t,r):n.appendChild(t),l.push(t))}}},{"../../constants/":123,"../../utils":205}],137:[function(e,t,n){var r=e("../../utils/bind"),i=e("../../utils/").isIframed;function o(e){if(e.data)switch(e.data.type){case"vr":switch(e.data.data){case"enter":this.enterVR();break;case"exit":this.exitVR()}}}t.exports=function(e){i()&&window.addEventListener("message",r(o,e))}},{"../../utils/":205,"../../utils/bind":199}],138:[function(e,t,n){t.exports=[]},{}],139:[function(e,t,n){var r=e("../../../vendor/wakelock/wakelock");t.exports=function(e){if(e.isMobile){var t=e.wakelock=new r;e.addEventListener("enter-vr",(function(){t.request()})),e.addEventListener("exit-vr",(function(){t.release()}))}}},{"../../../vendor/wakelock/wakelock":220}],140:[function(e,t,n){var r=e("../utils/"),i=e("./propertyTypes"),o=r.debug,a=i.isValidDefaultValue,s=i.propertyTypes,l=o("core:schema:warn");function c(e){return"type"in e?"string"===typeof e.type:"default"in e}function u(e,t){var n,r,i=e.default,o=e.type;return e.type?"bool"===e.type?o="boolean":"float"===e.type&&(o="number"):o=void 0===i||"boolean"!==typeof i&&"number"!==typeof i?Array.isArray(i)?"array":"string":typeof i,(r=s[o])||l("Unknown property type for component `"+t+"`: "+o),n=!!e.parse,e.parse=e.parse||r.parse,e.stringify=e.stringify||r.stringify,e.type=o,"default"in e?n||a(o,i)||l("Default value `"+i+"` does not match type `"+o+"` in component `"+t+"`"):e.default=r.default,e}function h(e,t){return void 0!==e&&null!==e&&""!==e||(e=t.default,Array.isArray(e)&&(e=e.slice())),t.parse(e,t.default)}function d(e,t){return"object"!==typeof e?e:t&&null!==e?t.stringify(e):JSON.stringify(e)}t.exports.isSingleProperty=c,t.exports.process=function(e,t){var n;if(c(e))return u(e,t);for(n in e)e[n]=u(e[n],t);return e},t.exports.processPropertyDefinition=u,t.exports.parseProperties=function(){var e=[];return function(t,n,r,i,o){var a,s,c,u;for(s in e.length=0,r?t:n)r&&void 0===t[s]||e.push(s);if(null===t||"object"!==typeof t)return t;for(s in t)void 0===t[s]||n[s]||o||l("Unknown property `"+s+"` for component/system `"+i+"`.");for(a=0;a<e.length;a++){if(c=n[s=e[a]],u=t[s],!n[s])return;t[s]=h(u,c)}return t}}(),t.exports.parseProperty=h,t.exports.stringifyProperties=function(e,t){var n,r,i,o,a={};for(n in e)r=t[n],"object"===typeof(o=i=e[n])&&(o=d(i,r),r||l("Unknown component property: "+n)),a[n]=o;return a},t.exports.stringifyProperty=d},{"../utils/":205,"./propertyTypes":133}],141:[function(e,t,n){var r=e("./schema").process,i=t.exports.shaders={},o=t.exports.shaderNames=[],a=e("../lib/three"),s=e("../utils"),l={array:"v3",color:"v3",int:"i",number:"f",map:"t",time:"f",vec2:"v2",vec3:"v3",vec4:"v4"},c=t.exports.Shader=function(){};c.prototype={schema:{},vertexShader:"void main() {gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);}",fragmentShader:"void main() {gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);}",init:function(e){return this.attributes=this.initVariables(e,"attribute"),this.uniforms=this.initVariables(e,"uniform"),this.material=new(this.raw?a.RawShaderMaterial:a.ShaderMaterial)({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader}),this.material},initVariables:function(e,t){var n,r,i=this.schema,o={};for(n in i)i[n].is===t&&(r=l[i[n].type],o[n]={type:r,value:void 0});return o},update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform")},updateVariables:function(e,t){var n,r,i,o=this.schema;for(n in i="uniform"===t?this.uniforms:this.attributes,e)if(o[n]&&o[n].is===t)if("map"!==o[n].type)i[n].value=this.parseValue(o[n].type,e[n]),i[n].needsUpdate=!0;else{if(!i[n]||i[n].value===e[n])continue;r="_texture_"+n,this.setMapOnTextureLoad(i,n,r),s.material.updateMapMaterialFromData(r,n,this,e)}},parseValue:function(e,t){var n;switch(e){case"vec2":return new a.Vector2(t.x,t.y);case"vec3":return new a.Vector3(t.x,t.y,t.z);case"vec4":return new a.Vector4(t.x,t.y,t.z,t.w);case"color":return n=new a.Color(t),new a.Vector3(n.r,n.g,n.b);case"map":return a.ImageUtils.loadTexture(t);default:return t}},setMapOnTextureLoad:function(e,t,n){var r=this;this.el.addEventListener("materialtextureloaded",(function(){e[t].value=r.material[n],e[t].needsUpdate=!0}))}},t.exports.registerShader=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The shader "+e+" has been already registered");return((n=function(){c.call(this)}).prototype=Object.create(c.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Shader:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"../utils":205,"./schema":140}],142:[function(e,t,n){var r=e("./component"),i=e("./schema"),o=e("../utils/"),a=i.parseProperties,s=i.parseProperty,l=i.process,c=i.isSingleProperty,u=o.styleParser,h=t.exports.systems={},d=t.exports.System=function(e){var t=r&&r.components[this.name];this.el=e,this.sceneEl=e,t&&(t.Component.prototype.system=this),this.buildData(),this.init(),this.update({})};d.prototype={schema:{},init:function(){},update:function(e){},updateProperties:function(e){var t=this.data;Object.keys(i).length&&(this.buildData(e),this.update(t))},buildData:function(e){var t=this.schema;Object.keys(t).length&&(e=e||window.HTMLElement.prototype.getAttribute.call(this.sceneEl,this.name),c(t)?this.data=s(e,t):this.data=a(u.parse(e)||{},t))},tick:void 0,tock:void 0,play:function(){},pause:function(){}},t.exports.registerSystem=function(e,t){var n,r,i={},a=o.findAllScenes(document);if(Object.keys(t).forEach((function(e){i[e]={value:t[e],writable:!0}})),h[e])throw new Error("The system `"+e+"` has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name.");for(((r=function(e){d.call(this,e)}).prototype=Object.create(d.prototype,i)).name=e,r.prototype.constructor=r,r.prototype.schema=o.extend(l(r.prototype.schema)),h[e]=r,n=0;n<a.length;n++)a[n].initSystem(e)}},{"../utils/":205,"./component":131,"./schema":140}],143:[function(e,t,n){e("./pivot")},{"./pivot":144}],144:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=new i.Vector3,a=new i.Vector3;r("pivot",{dependencies:["position"],schema:{type:"vec3"},init:function(){var e=this.data,t=this.el,n=t.object3D.parent,r=t.object3D,s=new i.Group;o.copy(r.position),a.copy(r.rotation),n.remove(r),s.add(r),n.add(s),t.object3D=s,r.position.set(-1*e.x,-1*e.y,-1*e.z),s.position.set(e.x+o.x,e.y+o.y,e.z+o.z),s.rotation.copy(r.rotation),r.rotation.set(0,0,0)}})},{"../../core/component":131,"../../lib/three":179}],145:[function(e,t,n){var r=e("../../core/component").components,i=e("../../core/shader").shaders,o=e("../../utils/"),a={};function s(e){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();"fog"===e&&(t="material-fog"),"visible"===e&&(t="material-visible"),a[t]="material."+e}Object.keys(r.material.schema).forEach(s),Object.keys(i.standard.schema).forEach(s),t.exports=function(){return{defaultComponents:{material:{}},mappings:o.extend({},a)}}},{"../../core/component":131,"../../core/shader":141,"../../utils/":205}],146:[function(e,t,n){e("./primitives/a-camera"),e("./primitives/a-cursor"),e("./primitives/a-curvedimage"),e("./primitives/a-gltf-model"),e("./primitives/a-image"),e("./primitives/a-light"),e("./primitives/a-link"),e("./primitives/a-obj-model"),e("./primitives/a-sky"),e("./primitives/a-sound"),e("./primitives/a-text"),e("./primitives/a-video"),e("./primitives/a-videosphere"),e("./primitives/meshPrimitives")},{"./primitives/a-camera":148,"./primitives/a-cursor":149,"./primitives/a-curvedimage":150,"./primitives/a-gltf-model":151,"./primitives/a-image":152,"./primitives/a-light":153,"./primitives/a-link":154,"./primitives/a-obj-model":155,"./primitives/a-sky":156,"./primitives/a-sound":157,"./primitives/a-text":158,"./primitives/a-video":159,"./primitives/a-videosphere":160,"./primitives/meshPrimitives":161}],147:[function(e,t,n){var r=e("../../core/a-entity"),i=e("../../core/component").components,o=e("../../core/a-register-element").registerElement,a=e("../../utils/"),s=a.debug,l=a.entity.setComponentProperty,c=s("extras:primitives:debug"),u=s("extras:primitives:warn"),h=t.exports.primitives={};t.exports.registerPrimitive=function(e,t){e=e.toLowerCase(),c("Registering <%s>",e),t.defaultAttributes&&u("The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.");var n=o(e,{prototype:Object.create(r.prototype,{defaultComponentsFromPrimitive:{value:t.defaultComponents||t.defaultAttributes||{}},deprecated:{value:t.deprecated||null},deprecatedMappings:{value:t.deprecatedMappings||{}},mappings:{value:t.mappings||{}},createdCallback:{value:function(){t.deprecated&&console.warn(t.deprecated),this.resolveMappingCollisions()}},resolveMappingCollisions:{value:function(){var e=this.mappings,t=this;Object.keys(e).forEach((function(n){var r;n!==n.toLowerCase()&&u("Mapping keys should be specified in lower case. The mapping key "+n+" may not be recognized"),i[n]&&(r=e[n].replace(".","-"),e[r]=e[n],delete e[n],console.warn("The primitive "+t.tagName.toLowerCase()+" has a mapping collision. The attribute "+n+" has the same name as a registered component and has been renamed to "+r))}))}},getExtraComponents:{value:function(){var e,t,n,r,i,o,s=this;for(t=a.clone(this.defaultComponentsFromPrimitive),(i=this.getAttribute("mixin"))&&(i=i.trim().split(" ")).forEach((function(e){var n=s.sceneEl.querySelector("#"+e).componentCache;Object.keys(n).forEach((function(e){var r,i;t[e]=(r=t[e],i=n[e],l(r)?c(i):l(i)?c(r):u(r)&&u(i)?a.extendDeep(r,i):c(i))}))})),n=0;n<this.attributes.length;n++)e=this.attributes[n],(r=this.mappings[e.name])&&((o=a.entity.getComponentPropertyPath(r)).constructor===Array?(t[o[0]]=t[o[0]]||{},t[o[0]][o[1]]=e.value.trim()):t[o]=e.value.trim());return t;function l(e){return"undefined"===typeof e}function c(e){return u(e)?a.extendDeep({},e):e}function u(e){return null!==e&&e.constructor===Object}}},attributeChangedCallback:{value:function(e,t,n){var r=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&r&&l(this,r,n)}}})});return h[e]=n,n},t.exports.definePrimitive=function(e,n,r){r=r||{},Object.keys(n).map((function(e){!function(e,t){var n=i[e].schema;Object.keys(n).map((function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();void 0!==t[r]&&(r=e+"-"+n),t[r]=e+"."+n}))}(e,r)})),t.exports.registerPrimitive(e,a.extendDeep({},null,{defaultComponents:n,mappings:r}))}},{"../../core/a-entity":127,"../../core/a-register-element":130,"../../core/component":131,"../../utils/":205}],148:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-camera",{defaultComponents:{camera:{},"look-controls":{},"wasd-controls":{},position:{x:0,y:1.6,z:0}},mappings:{active:"camera.active",far:"camera.far",fov:"camera.fov","look-controls-enabled":"look-controls.enabled",near:"camera.near","pointer-lock-enabled":"look-controls.pointerLockEnabled","wasd-controls-enabled":"wasd-controls.enabled","reverse-mouse-drag":"look-controls.reverseMouseDrag",zoom:"camera.zoom"}})},{"../primitives":147}],149:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-cursor",e("../../../utils/").extendDeep({},r(),{defaultComponents:{cursor:{},geometry:{primitive:"ring",radiusOuter:.016,radiusInner:.01,segmentsTheta:32},material:{color:"#000",shader:"flat",opacity:.8},position:{x:0,y:0,z:-1}},mappings:{far:"raycaster.far",fuse:"cursor.fuse","fuse-timeout":"cursor.fuseTimeout",interval:"raycaster.interval",objects:"raycaster.objects"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],150:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-curvedimage",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{height:1,primitive:"cylinder",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0,repeat:"-1 1"}},mappings:{height:"geometry.height","open-ended":"geometry.openEnded",radius:"geometry.radius",segments:"geometry.segmentsRadial",start:"geometry.thetaStart","theta-length":"geometry.thetaLength","theta-start":"geometry.thetaStart",width:"geometry.thetaLength"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],151:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-gltf-model",{mappings:{src:"gltf-model"}})},{"../primitives":147}],152:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-image",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],153:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-light",{defaultComponents:{light:{}},mappings:{angle:"light.angle",color:"light.color","ground-color":"light.groundColor",decay:"light.decay",distance:"light.distance",intensity:"light.intensity",penumbra:"light.penumbra",type:"light.type",target:"light.target"}})},{"../primitives":147}],154:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-link",{defaultComponents:{link:{visualAspectEnabled:!0}},mappings:{href:"link.href",image:"link.image",title:"link.title"}})},{"../primitives":147}],155:[function(e,t,n){var r=e("../getMeshMixin")();(0,e("../primitives").registerPrimitive)("a-obj-model",e("../../../utils/").extendDeep({},r,{defaultComponents:{"obj-model":{}},mappings:{src:"obj-model.obj",mtl:"obj-model.mtl"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],156:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../primitives").registerPrimitive,o=e("../../../utils/"),a=e("./meshPrimitives");i("a-sky",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",side:"back",shader:"flat",npot:!0},scale:"-1 1 1"},mappings:o.extendDeep({},a["a-sphere"].prototype.mappings)}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147,"./meshPrimitives":161}],157:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-sound",{defaultComponents:{sound:{}},mappings:{src:"sound.src",on:"sound.on",autoplay:"sound.autoplay",loop:"sound.loop",volume:"sound.volume"}})},{"../primitives":147}],158:[function(e,t,n){(0,e("../primitives").definePrimitive)("a-text",{text:{anchor:"align",width:5}})},{"../primitives":147}],159:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-video",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],160:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-videosphere",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",shader:"flat",side:"back",npot:!0},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-height":"geometry.segmentsHeight","segments-width":"geometry.segmentsWidth"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],161:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../../../core/geometry").geometries,o=e("../../../core/geometry").geometryNames,a=e("../primitives").registerPrimitive,s=e("../../../utils/"),l=t.exports={};function c(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}o.forEach((function(e){var t=i[e],n=c(e),o={};Object.keys(t.schema).forEach((function(e){o[c(e)]="geometry."+e}));var u="a-"+n,h=a(u,s.extendDeep({},r(),{defaultComponents:{geometry:{primitive:e}},mappings:o}));l[u]=h}))},{"../../../core/geometry":132,"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],162:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("box",{schema:{depth:{default:1,min:0},height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"},segmentsDepth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.BoxGeometry(e.width,e.height,e.depth,e.segmentsWidth,e.segmentsHeight,e.segmentsDepth)}})},{"../core/geometry":132,"../lib/three":179}],163:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("circle",{schema:{radius:{default:1,min:0},segments:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CircleGeometry(e.radius,e.segments,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],164:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cone",{schema:{height:{default:1,min:0},openEnded:{default:!1},radiusBottom:{default:1,min:0},radiusTop:{default:.01,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],165:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cylinder",{schema:{height:{default:1,min:0},openEnded:{default:!1},radius:{default:1,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],166:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("dodecahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.DodecahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],167:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("icosahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.IcosahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],168:[function(e,t,n){e("./box.js"),e("./circle.js"),e("./cone.js"),e("./cylinder.js"),e("./dodecahedron.js"),e("./icosahedron.js"),e("./octahedron.js"),e("./plane.js"),e("./ring.js"),e("./sphere.js"),e("./tetrahedron.js"),e("./torus.js"),e("./torusKnot.js"),e("./triangle.js")},{"./box.js":162,"./circle.js":163,"./cone.js":164,"./cylinder.js":165,"./dodecahedron.js":166,"./icosahedron.js":167,"./octahedron.js":169,"./plane.js":170,"./ring.js":171,"./sphere.js":172,"./tetrahedron.js":173,"./torus.js":174,"./torusKnot.js":175,"./triangle.js":176}],169:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("octahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.OctahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],170:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("plane",{schema:{height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.PlaneGeometry(e.width,e.height,e.segmentsWidth,e.segmentsHeight)}})},{"../core/geometry":132,"../lib/three":179}],171:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("ring",{schema:{radiusInner:{default:.8,min:0},radiusOuter:{default:1.2,min:0},segmentsPhi:{default:10,min:1,type:"int"},segmentsTheta:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],172:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("sphere",{schema:{radius:{default:1,min:0},phiLength:{default:360},phiStart:{default:0,min:0},thetaLength:{default:180,min:0},thetaStart:{default:0},segmentsHeight:{default:18,min:2,type:"int"},segmentsWidth:{default:36,min:3,type:"int"}},init:function(e){this.geometry=new i.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,o(e.phiStart),o(e.phiLength),o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],173:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("tetrahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.TetrahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],174:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("torus",{schema:{arc:{default:360},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:36,min:2,type:"int"},segmentsTubular:{default:32,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,o(e.arc))}})},{"../core/geometry":132,"../lib/three":179}],175:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("torusKnot",{schema:{p:{default:2,min:1},q:{default:3,min:1},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:8,min:3,type:"int"},segmentsTubular:{default:100,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}})},{"../core/geometry":132,"../lib/three":179}],176:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=new i.Quaternion,a=new i.Vector3(0,0,1),s=new i.Vector2,l=new i.Vector2,c=new i.Vector2;r("triangle",{schema:{vertexA:{type:"vec3",default:{x:0,y:.5,z:0}},vertexB:{type:"vec3",default:{x:-.5,y:-.5,z:0}},vertexC:{type:"vec3",default:{x:.5,y:-.5,z:0}}},init:function(e){var t,n,r,u,h,d,f,p,m;(r=new i.Triangle).a.set(e.vertexA.x,e.vertexA.y,e.vertexA.z),r.b.set(e.vertexB.x,e.vertexB.y,e.vertexB.z),r.c.set(e.vertexC.x,e.vertexC.y,e.vertexC.z),n=r.getNormal(new i.Vector3),o.setFromUnitVectors(n,a),u=r.a.clone().applyQuaternion(o),h=r.b.clone().applyQuaternion(o),d=r.c.clone().applyQuaternion(o),s.set(Math.min(u.x,h.x,d.x),Math.min(u.y,h.y,d.y)),l.set(Math.max(u.x,h.x,d.x),Math.max(u.y,h.y,d.y)),c.set(0,0).subVectors(l,s),u=(new i.Vector2).subVectors(u,s).divide(c),h=(new i.Vector2).subVectors(h,s).divide(c),d=(new i.Vector2).subVectors(d,s).divide(c),t=this.geometry=new i.BufferGeometry,f=[r.a.x,r.a.y,r.a.z,r.b.x,r.b.y,r.b.z,r.c.x,r.c.y,r.c.z],p=[n.x,n.y,n.z,n.x,n.y,n.z,n.x,n.y,n.z],m=[u.x,u.y,h.x,h.y,d.x,d.y],t.setAttribute("position",new i.Float32BufferAttribute(f,3)),t.setAttribute("normal",new i.Float32BufferAttribute(p,3)),t.setAttribute("uv",new i.Float32BufferAttribute(m,2))}})},{"../core/geometry":132,"../lib/three":179}],177:[function(e,t,n){if(window.Promise=window.Promise||e("promise-polyfill"),window.hasNativeWebVRImplementation=!!window.navigator.getVRDisplays||!!window.navigator.getVRDevices,window.hasNativeWebXRImplementation=void 0!==navigator.xr,!window.hasNativeWebXRImplementation&&!window.hasNativeWebVRImplementation){var r=e("./utils/isIOSOlderThan10")(window.navigator.userAgent)?1/window.devicePixelRatio:1,i=e("webvr-polyfill"),o={BUFFER_SCALE:r,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!!window.cordova};window.webvrpolyfill=new i(o)}var a=e("./utils/"),s=a.debug;a.isIE11&&(e("custom-event-polyfill"),e("../vendor/starts-with-polyfill"));var l=s("A-Frame:error"),c=s("A-Frame:warn");window.document.currentScript&&window.document.currentScript.parentNode!==window.document.head&&!window.debug&&c("Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML."),window.cordova||"file:"!==window.location.protocol||l("This HTML file is currently being served via the file:// protocol. Assets, textures, and models WILL NOT WORK due to cross-origin policy! Please use a local or hosted server: https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server."),e("present"),a.device.isBrowserEnvironment&&(e("./style/aframe.css"),e("./style/rStats.css"));var u=e("./core/scene/a-scene").AScene,h=e("./core/component").components,d=e("./core/component").registerComponent,f=e("./core/geometry").registerGeometry,p=e("./extras/primitives/primitives").registerPrimitive,m=e("./core/shader").registerShader,g=e("./core/system").registerSystem,v=e("./core/shader").shaders,y=e("./core/system").systems,b=window.THREE=e("./lib/three"),w=e("../package");e("./components/index"),e("./geometries/index"),e("./shaders/index"),e("./systems/index");var x=e("./core/a-node"),_=e("./core/a-entity");e("./core/a-assets"),e("./core/a-cubemap"),e("./core/a-mixin"),e("./extras/components/"),e("./extras/primitives/"),console.log("A-Frame Version: 1.2.0 (Date 2021-02-05, Commit #b220fa00)"),console.log("THREE Version (https://github.com/supermedium/three.js):",w.dependencies["super-three"]),console.log("WebVR Polyfill Version:",w.dependencies["webvr-polyfill"]),t.exports=window.AFRAME={AComponent:e("./core/component").Component,AEntity:_,ANode:x,ANIME:e("super-animejs"),AScene:u,components:h,coreComponents:Object.keys(h),geometries:e("./core/geometry").geometries,registerComponent:d,registerElement:e("./core/a-register-element").registerElement,registerGeometry:f,registerPrimitive:p,registerShader:m,registerSystem:g,primitives:{getMeshMixin:e("./extras/primitives/getMeshMixin"),primitives:e("./extras/primitives/primitives").primitives},scenes:e("./core/scene/scenes"),schema:e("./core/schema"),shaders:v,systems:y,THREE:b,utils:a,version:w.version}},{"../package":73,"../vendor/starts-with-polyfill":218,"./components/index":84,"./core/a-assets":125,"./core/a-cubemap":126,"./core/a-entity":127,"./core/a-mixin":128,"./core/a-node":129,"./core/a-register-element":130,"./core/component":131,"./core/geometry":132,"./core/scene/a-scene":134,"./core/scene/scenes":138,"./core/schema":140,"./core/shader":141,"./core/system":142,"./extras/components/":143,"./extras/primitives/":146,"./extras/primitives/getMeshMixin":145,"./extras/primitives/primitives":147,"./geometries/index":168,"./lib/three":179,"./shaders/index":181,"./style/aframe.css":186,"./style/rStats.css":187,"./systems/index":191,"./utils/":205,"./utils/isIOSOlderThan10":208,"custom-event-polyfill":7,present:48,"promise-polyfill":50,"super-animejs":56,"webvr-polyfill":68}],178:[function(e,t,n){window.aframeStats=function(e){var t=null,n=e;return{update:function(){t("te").set(function(){var e=n.querySelectorAll("*");return Array.prototype.slice.call(e).filter((function(e){return e.isEntity})),e.length}()),window.performance.getEntriesByName&&t("lt").set(window.performance.getEntriesByName("render-started")[0].startTime.toFixed(0))},start:function(){},end:function(){},attach:function(e){t=e},values:{te:{caption:"Entities"},lt:{caption:"Load Time"}},groups:[{caption:"A-Frame",values:["te","lt"]}],fractions:[]}},"object"===typeof t&&(t.exports={aframeStats:window.aframeStats})},{}],179:[function(e,t,r){(function(n){var r=n.THREE=e("super-three");r.TextureLoader&&(r.TextureLoader.prototype.crossOrigin="anonymous"),r.ImageLoader&&(r.ImageLoader.prototype.crossOrigin="anonymous"),r.Cache&&(r.Cache.enabled=!0),e("../../vendor/DeviceOrientationControls"),e("super-three/examples/js/loaders/DRACOLoader"),e("super-three/examples/js/loaders/GLTFLoader"),e("super-three/examples/js/loaders/OBJLoader"),e("super-three/examples/js/loaders/MTLLoader"),e("super-three/examples/js/utils/BufferGeometryUtils"),r.DRACOLoader.prototype.crossOrigin="anonymous",r.GLTFLoader.prototype.crossOrigin="anonymous",r.MTLLoader.prototype.crossOrigin="anonymous",r.OBJLoader.prototype.crossOrigin="anonymous",t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../vendor/DeviceOrientationControls":215,"super-three":57,"super-three/examples/js/loaders/DRACOLoader":58,"super-three/examples/js/loaders/GLTFLoader":59,"super-three/examples/js/loaders/MTLLoader":60,"super-three/examples/js/loaders/OBJLoader":61,"super-three/examples/js/utils/BufferGeometryUtils":62}],180:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/");function a(e,t){return t.color.set(e.color),t.fog=e.fog,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,t}t.exports.Shader=r("flat",{schema:{color:{type:"color"},fog:{default:!0},height:{default:256},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color},this.textureSrc=null,a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.material=new i.MeshBasicMaterial(this.materialData),o.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e)},updateMaterial:function(e){var t;for(t in a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.materialData)this.material[t]=this.materialData[t]}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],181:[function(e,t,n){e("./flat"),e("./standard"),e("./sdf"),e("./msdf"),e("./ios10hls")},{"./flat":180,"./ios10hls":182,"./msdf":183,"./sdf":184,"./standard":185}],182:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("ios10hls",{schema:{src:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},vertexShader:["varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["uniform sampler2D src;","uniform float opacity;","varying vec2 vUV;","void main() {"," vec2 offset = vec2(0, 0);"," vec2 repeat = vec2(1, 1);"," vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;"," gl_FragColor = vec4(color.rgb, opacity);","}"].join("\n")})},{"../core/shader":141}],183:[function(e,t,n){var r=e("../core/shader").registerShader,i=!!document.createElement("canvas").getContext("webgl2"),o=["attribute vec2 uv;","attribute vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),a=["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),s=i?a:o,l=["#ifdef GL_OES_standard_derivatives","#extension GL_OES_standard_derivatives: enable","#endif","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","varying vec2 vUV;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture2D(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," gl_FragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),c=["#version 300 es","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," fragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),u=i?c:l;t.exports.Shader=r("msdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},negate:{type:"boolean",is:"uniform",default:!0},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:s,fragmentShader:u})},{"../core/shader":141}],184:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("sdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["#version 300 es","precision highp float;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","#ifdef GL_OES_standard_derivatives"," float contour(float width, float value) {"," return smoothstep(0.5 - value, 0.5 + value, width);"," }","#else"," float aastep(float value, float afwidth) {"," return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);"," }","#endif","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","#define ALL_SMOOTH 0.4","#define ALL_ROUGH 0.02","#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))","void main() {"," #ifdef GL_OES_standard_derivatives"," vec2 uv = vUV;"," vec4 texColor = texture(map, uv);"," float dist = texColor.a;"," float width = fwidth(dist);"," float alpha = contour(dist, width);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(uv) + dFdy(uv));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * dist;"," }"," if (isBigEnough <= BIG_ENOUGH) {"," vec4 box = vec4 (uv - duv, uv + duv);"," alpha = (alpha + 0.5 * ("," contour(texture(map, box.xy).a, width)"," + contour(texture(map, box.zw).a, width)"," + contour(texture(map, box.xw).a, width)"," + contour(texture(map, box.zy).a, width)"," )) / 3.0;"," }"," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," #else"," vec4 texColor = texture(map, vUV);"," float value = texColor.a;"," float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));"," float alpha = aastep(value, afwidth);"," float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w < ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);"," if (alpha < alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }"," alpha = alpha * ratio + (1.0 - ratio) * value;"," if (ratio < 1.0 && alpha <= DISCARD_ALPHA) { discard; return; }"," #endif"," fragColor = vec4(color, opacity * alpha);","}"].join("\n")})},{"../core/shader":141}],185:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/"),a=new i.CubeTextureLoader,s={};function l(e,t){return t.color.set(e.color),t.emissive.set(e.emissive),t.emissiveIntensity=e.emissiveIntensity,t.fog=e.fog,t.metalness=e.metalness,t.roughness=e.roughness,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,e.normalMap&&(t.normalScale=e.normalScale),e.ambientOcclusionMap&&(t.aoMapIntensity=e.ambientOcclusionMapIntensity),e.displacementMap&&(t.displacementScale=e.displacementScale,t.displacementBias=e.displacementBias),t}t.exports.Shader=r("standard",{schema:{ambientOcclusionMap:{type:"map"},ambientOcclusionMapIntensity:{default:1},ambientOcclusionTextureOffset:{type:"vec2"},ambientOcclusionTextureRepeat:{type:"vec2",default:{x:1,y:1}},color:{type:"color"},displacementMap:{type:"map"},displacementScale:{default:1},displacementBias:{default:.5},displacementTextureOffset:{type:"vec2"},displacementTextureRepeat:{type:"vec2",default:{x:1,y:1}},emissive:{type:"color",default:"#000"},emissiveIntensity:{default:1},envMap:{default:""},fog:{default:!0},height:{default:256},metalness:{default:0,min:0,max:1},metalnessMap:{type:"map"},metalnessTextureOffset:{type:"vec2"},metalnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},normalMap:{type:"map"},normalScale:{type:"vec2",default:{x:1,y:1}},normalTextureOffset:{type:"vec2"},normalTextureRepeat:{type:"vec2",default:{x:1,y:1}},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},roughness:{default:.5,min:0,max:1},roughnessMap:{type:"map"},roughnessTextureOffset:{type:"vec2"},roughnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},sphericalEnvMap:{type:"map"},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color,emissive:new i.Color},l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.material=new i.MeshStandardMaterial(this.materialData),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t,n=this.material;for(t in l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.materialData)n[t]=this.materialData[t]},updateEnvMap:function(e){var t=this,n=this.material,r=e.envMap,l=e.sphericalEnvMap;if(!r&&!l||this.isLoadingEnvMap)return n.envMap=null,void(n.needsUpdate=!0);this.isLoadingEnvMap=!0,l?this.el.sceneEl.systems.material.loadTexture(l,{src:l},(function(e){t.isLoadingEnvMap=!1,e.mapping=i.SphericalReflectionMapping,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]?s[r].then((function(e){t.isLoadingEnvMap=!1,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]=new Promise((function(e){o.srcLoader.validateCubemapSrc(r,(function(r){a.load(r,(function(r){t.isLoadingEnvMap=!1,n.envMap=r,o.material.handleTextureEvents(t.el,r),e(r)}))}))}))}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],186:[function(e,t,n){var r="html.a-fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}html.a-fullscreen body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}html.a-fullscreen .a-canvas{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;position:fixed!important}html:not(.a-fullscreen) .a-enter-ar,html:not(.a-fullscreen) .a-enter-vr{right:5px;bottom:5px}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}canvas.a-canvas.a-mouse-cursor-hover:hover{cursor:pointer}.a-inspector-loader{background-color:#ed3160;position:fixed;left:3px;top:3px;padding:6px 10px;color:#fff;text-decoration:none;font-size:12px;font-family:Roboto,sans-serif;text-align:center;z-index:99999;width:204px}@keyframes dots-1{from{opacity:0}25%{opacity:1}}@keyframes dots-2{from{opacity:0}50%{opacity:1}}@keyframes dots-3{from{opacity:0}75%{opacity:1}}@-webkit-keyframes dots-1{from{opacity:0}25%{opacity:1}}@-webkit-keyframes dots-2{from{opacity:0}50%{opacity:1}}@-webkit-keyframes dots-3{from{opacity:0}75%{opacity:1}}.a-inspector-loader .dots span{animation:dots-1 2s infinite steps(1);-webkit-animation:dots-1 2s infinite steps(1)}.a-inspector-loader .dots span:first-child+span{animation-name:dots-2;-webkit-animation-name:dots-2}.a-inspector-loader .dots span:first-child+span+span{animation-name:dots-3;-webkit-animation-name:dots-3}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-ar,.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;position:absolute;right:20px;bottom:20px}.a-enter-ar{right:80px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff;user-select:none;outline:0}.a-enter-vr-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.35)}.a-enter-ar-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.2)}.a-enter-ar-button,.a-enter-vr-button{background-size:90% 90%;border:0;bottom:0;cursor:pointer;min-width:58px;min-height:34px;padding-right:0;padding-top:0;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999;border-radius:8px;touch-action:manipulation}.a-enter-ar-button{background-size:100% 90%;margin-right:10px;border-radius:7px}.a-enter-ar-button:active,.a-enter-ar-button:hover,.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#ef2d5e}.a-enter-vr-button.resethover{background-color:rgba(0,0,0,.35)}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\"Insert phone into Cardboard holder.\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}.a-loader-title{background-color:rgba(0,0,0,.6);font-family:sans-serif,monospace;text-align:center;font-size:20px;height:50px;font-weight:300;line-height:50px;position:absolute;right:0;left:0;top:0;color:#fff}.a-modal{background:0 0/50% 50% rgba(0,0,0,.6);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-dialog{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);z-index:199995;width:300px;height:200px;background-size:contain;background-color:#fff;font-family:sans-serif,monospace;font-size:20px;border-radius:3px;padding:6px}.a-dialog-text-container{width:100%;height:70%;align-self:flex-start;display:flex;justify-content:center;align-content:center;flex-direction:column}.a-dialog-text{display:inline-block;font-weight:400;font-size:14pt;margin:8px}.a-dialog-buttons-container{display:inline-flex;align-self:flex-end;width:100%;height:30%}.a-dialog-button{cursor:pointer;align-self:center;opacity:.9;height:80%;width:50%;font-size:12pt;margin:4px;border-radius:2px;text-align:center;border:none;display:inline-block;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);user-select:none}.a-dialog-permission-button:hover{box-shadow:0 7px 14px rgba(0,0,0,.2),0 2px 2px rgba(0,0,0,.2)}.a-dialog-allow-button{background-color:#00ceff}.a-dialog-deny-button{background-color:#ff005b}.a-dialog-ok-button{background-color:#00ceff;width:100%}";e("browserify-css").createStyle(r,{href:"src/style/aframe.css"}),t.exports=r},{"browserify-css":4}],187:[function(e,t,n){var r=".rs-base{background-color:#333;color:#fafafa;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-base.alarm{color:#b70000;text-shadow:0 0 0 #b70000,0 0 1px #fff,0 0 1px #fff,0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 3px #fff,0 0 4px #fff,0 0 4px #fff}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}";e("browserify-css").createStyle(r,{href:"src/style/rStats.css"}),t.exports=r},{"browserify-css":4}],188:[function(e,t,n){var r=e("../constants/"),i=e("../core/system").registerSystem;t.exports.System=i("camera",{init:function(){this.activeCameraEl=null,this.render=this.render.bind(this),this.unwrapRender=this.unwrapRender.bind(this),this.wrapRender=this.wrapRender.bind(this),this.initialCameraFound=!1,this.numUserCameras=0,this.numUserCamerasChecked=0,this.setupInitialCamera()},setupInitialCamera:function(){var e,t,n=this.sceneEl,r=this;if(!n.camera||n.camera.el.getAttribute("camera").spectator)if((e=n.querySelectorAll("a-camera, [camera]")).length)for(this.numUserCameras=e.length,t=0;t<e.length;t++)e[t].addEventListener("object3dset",(function(e){"camera"===e.detail.type&&r.checkUserCamera(this)})),e[t].isNode?e[t].load():e[t].addEventListener("nodeready",(function(){this.load()}));else this.createDefaultCamera();else n.emit("cameraready",{cameraEl:n.camera.el})},checkUserCamera:function(e){var t,n=this.el.sceneEl;this.numUserCamerasChecked++,this.initialCameraFound||((t=e.getAttribute("camera")).active&&!t.spectator?(this.initialCameraFound=!0,n.camera=e.getObject3D("camera"),n.emit("cameraready",{cameraEl:e})):this.numUserCamerasChecked===this.numUserCameras&&this.createDefaultCamera())},createDefaultCamera:function(){var e,t=this.sceneEl;(e=document.createElement("a-entity")).setAttribute("camera",{active:!0}),e.setAttribute("position",{x:0,y:r.DEFAULT_CAMERA_HEIGHT,z:0}),e.setAttribute("wasd-controls",""),e.setAttribute("look-controls",""),e.setAttribute(r.AFRAME_INJECTED,""),e.addEventListener("object3dset",(function(n){"camera"===n.detail.type&&(t.camera=n.detail.object,t.emit("cameraready",{cameraEl:e}))})),t.appendChild(e)},disableActiveCamera:function(){var e;(e=this.sceneEl.querySelectorAll("[camera]"))[e.length-1].setAttribute("camera","active",!0)},setActiveCamera:function(e){var t,n,r,i,o=this.activeCameraEl,a=this.sceneEl;if((i=e.getObject3D("camera"))&&e!==this.activeCameraEl){var s=a.querySelector("[data-aframe-default-camera]");for(e!==(s&&s.querySelector("[camera]"))&&function(e){var t;e.camera&&(t=e.querySelector("[data-aframe-default-camera]"))&&e.removeChild(t)}(a),this.activeCameraEl=e,this.activeCameraEl.play(),a.camera=i,o&&o.setAttribute("camera","active",!1),n=a.querySelectorAll("[camera]"),r=0;r<n.length;r++)(t=n[r]).isEntity&&e!==t&&(t.setAttribute("camera","active",!1),t.pause());a.emit("camera-set-active",{cameraEl:e})}},setSpectatorCamera:function(e){var t,n=this.spectatorCameraEl,r=this.sceneEl;e.getObject3D("camera")&&e!==this.spectatorCameraEl&&(n&&n.setAttribute("camera","spectator",!1),t=this.spectatorCameraEl=e,r.addEventListener("enter-vr",this.wrapRender),r.addEventListener("exit-vr",this.unwrapRender),t.setAttribute("camera","active",!1),t.play(),r.emit("camera-set-spectator",{cameraEl:e}))},disableSpectatorCamera:function(){this.spectatorCameraEl=void 0},wrapRender:function(){this.spectatorCameraEl&&!this.originalRender&&(this.originalRender=this.sceneEl.renderer.render,this.sceneEl.renderer.render=this.render)},unwrapRender:function(){this.originalRender&&(this.sceneEl.renderer.render=this.originalRender,this.originalRender=void 0)},render:function(e,t){var n,r,i=this.sceneEl;n=i.renderer.xr.enabled,this.originalRender.call(i.renderer,e,t),this.spectatorCameraEl&&!i.isMobile&&n&&(r=this.spectatorCameraEl.components.camera.camera,i.renderer.xr.enabled=!1,this.originalRender.call(i.renderer,e,r),i.renderer.xr.enabled=n)}})},{"../constants/":123,"../core/system":142}],189:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/system").registerSystem;function o(e){var t=e.primitive,n=r[t]&&r[t].Geometry,i=new n;if(!n)throw new Error("Unknown geometry `"+t+"`");return i.init(e),i.geometry}t.exports.System=i("geometry",{init:function(){this.cache={},this.cacheCount={}},clearCache:function(){this.cache={},this.cacheCount={}},getOrCreateGeometry:function(e){var t,n,r=this.cache;return e.skipCache?o(e):(t=r[n=this.hash(e)],function(e,t){e[t]=void 0===e[t]?1:e[t]+1}(this.cacheCount,n),t||(t=o(e),r[n]=t,t))},unuseGeometry:function(e){var t,n=this.cache,r=this.cacheCount;e.skipCache||n[t=this.hash(e)]&&(function(e,t){e[t]--}(r,t),r[t]>0||(n[t].dispose(),delete n[t],delete r[t]))},hash:function(e){return JSON.stringify(e)}})},{"../core/geometry":132,"../core/system":142}],190:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three");t.exports.System=r("gltf-model",{schema:{dracoDecoderPath:{default:""}},init:function(){var e=this.data.dracoDecoderPath;this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e)},update:function(){var e;this.dracoLoader||(e=this.data.dracoDecoderPath,this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e))},getDRACOLoader:function(){return this.dracoLoader}})},{"../core/system":142,"../lib/three":179}],191:[function(e,t,n){e("./camera"),e("./geometry"),e("./gltf-model"),e("./light"),e("./material"),e("./renderer"),e("./shadow"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./webxr")},{"./camera":188,"./geometry":189,"./gltf-model":190,"./light":192,"./material":193,"./renderer":194,"./shadow":195,"./tracked-controls-webvr":196,"./tracked-controls-webxr":197,"./webxr":198}],192:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/bind"),o=e("../constants/");t.exports.System=r("light",{schema:{defaultLightsEnabled:{default:!0}},init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener("loaded",i(this.setupDefaultLights,this))},registerLight:function(e){e.hasAttribute("data-aframe-default-light")||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var e,t=this.sceneEl;if(this.defaultLights){e=document.querySelectorAll("[data-aframe-default-light]");for(var n=0;n<e.length;n++)t.removeChild(e[n]);this.defaultLights=!1}},setupDefaultLights:function(){var e,t,n=this.sceneEl;this.userDefinedLights||this.defaultLights||!this.data.defaultLightsEnabled||((e=document.createElement("a-entity")).setAttribute("light",{color:"#BBB",type:"ambient"}),e.setAttribute("data-aframe-default-light",""),e.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(e),(t=document.createElement("a-entity")).setAttribute("light",{color:"#FFF",intensity:.6,castShadow:!0}),t.setAttribute("position",{x:-.5,y:1,z:1}),t.setAttribute("data-aframe-default-light",""),t.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(t),this.defaultLights=!0)}})},{"../constants/":123,"../core/system":142,"../utils/bind":199}],193:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o=e("../utils/"),a=e("../utils/material").isHLS,s=o.bind,l=o.debug,c=l("components:texture:error"),u=new i.TextureLoader,h=l("components:texture:warn");function d(e,t){var n=t.offset||{x:0,y:0},r=t.repeat||{x:1,y:1};!!t.npot&&(e.wrapS=i.ClampToEdgeWrapping,e.wrapT=i.ClampToEdgeWrapping,e.magFilter=i.LinearFilter,e.minFilter=i.LinearFilter),1===r.x&&1===r.y||(e.wrapS=i.RepeatWrapping,e.wrapT=i.RepeatWrapping,e.repeat.set(r.x,r.y)),0===n.x&&0===n.y||e.offset.set(n.x,n.y)}u.setCrossOrigin("anonymous"),t.exports.System=r("material",{init:function(){this.materials={},this.textureCounts={},this.textureCache={},this.sceneEl.addEventListener("materialtextureloaded",s(this.onMaterialTextureLoaded,this))},clearTextureCache:function(){this.textureCache={}},loadTexture:function(e,t,n){var r=this;if("CANVAS"!==e.tagName){if("VIDEO"===e.tagName)return e.src||e.srcObject||e.childElementCount||h("Video element was defined with neither `source` elements nor `src` / `srcObject` attributes."),void this.loadVideo(e,t,n);o.srcLoader.validateSrc(e,(function(e){r.loadImage(e,t,n)}),(function(e){r.loadVideo(e,t,n)}))}else this.loadCanvas(e,t,n)},loadImage:function(e,t,n){var r=this.hash(t),o=this.textureCache;o[r]||(o[r]=function(e,t){return new Promise((function(n,r){function o(e){d(e,t),e.needsUpdate=!0,n(e)}"string"===typeof e?u.load(e,o,(function(){}),(function(e){c("`$s` could not be fetched (Error code: %s; Response: %s)",e.status,e.statusText)})):o(new i.Texture(e))}))}(e,t)),o[r].then(n)},loadCanvas:function(e,t,n){var r;d(r=new i.CanvasTexture(e),t),n(r)},loadVideo:function(e,t,n){var r,o,s,l,c=this.textureCache;function u(e){e.texture.needsUpdate=!0,n(e.texture,e.videoEl)}if("string"!==typeof e){if(s=e,c[r=this.hashVideo(t,s)])return void c[r].then(u);!function(e){e.autoplay=e.hasAttribute("autoplay")&&"false"!==e.getAttribute("autoplay"),e.controls=e.hasAttribute("controls")&&"false"!==e.getAttribute("controls"),"false"===e.getAttribute("loop")&&e.removeAttribute("loop"),"false"===e.getAttribute("preload")&&(e.preload="none"),e.crossOrigin=e.crossOrigin||"anonymous",e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline","")}(s)}s=s||function(e,t,n){var r=document.createElement("video");return r.width=t,r.height=n,r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.autoplay=!0,r.loop=!0,r.crossOrigin="anonymous",r.addEventListener("error",(function(){h("`$s` is not a valid video",e)}),!0),r.src=e,r}(e,t.width,t.height),c[r=this.hashVideo(t,s)]?c[r].then(u):((o=new i.VideoTexture(s)).minFilter=i.LinearFilter,d(o,t),this.sceneEl.isIOS&&a(s.src||s.getAttribute("src"),s.type||s.getAttribute("type"))&&(o.format=i.RGBAFormat,o.needsCorrectionBGRA=!0,o.flipY=!1,o.needsCorrectionFlipY=!0),l={texture:o,videoEl:s},c[r]=Promise.resolve(l),u(l))},hash:function(e){return e.src.tagName&&((e=o.extendDeep({},e)).src=e.src.src),JSON.stringify(e)},hashVideo:function(e,t){return function(e,t){var n,r,i,o=t.getAttribute("id");if(o)return o;for(r="",i=e||{},n=0;n<t.attributes.length;n++)i[t.attributes[n].name]=t.attributes[n].value;return Object.keys(i).sort().forEach((function(e){r+=e+":"+i[e]+";"})),r}(e,t)},registerMaterial:function(e){this.materials[e.uuid]=e},unregisterMaterial:function(e){delete this.materials[e.uuid];var t=this.textureCounts;Object.keys(e).filter((function(t){return e[t]&&e[t].isTexture})).forEach((function(n){t[e[n].uuid]--,t[e[n].uuid]<=0&&e[n].dispose()}))},updateMaterials:function(e){var t=this.materials;Object.keys(t).forEach((function(e){t[e].needsUpdate=!0}))},onMaterialTextureLoaded:function(e){this.textureCounts[e.detail.texture.uuid]||(this.textureCounts[e.detail.texture.uuid]=0),this.textureCounts[e.detail.texture.uuid]++}})},{"../core/system":142,"../lib/three":179,"../utils/":205,"../utils/material":209}],194:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/"),o=e("../lib/three"),a=(0,i.debug)("components:renderer:warn");t.exports.System=r("renderer",{schema:{antialias:{default:"auto",oneOf:["true","false","auto"]},highRefreshRate:{default:i.device.isOculusBrowser()},logarithmicDepthBuffer:{default:"auto",oneOf:["true","false","auto"]},maxCanvasWidth:{default:1920},maxCanvasHeight:{default:1920},physicallyCorrectLights:{default:!1},precision:{default:"high",oneOf:["high","medium","low"]},sortObjects:{default:!1},colorManagement:{default:!1},gammaOutput:{default:!1},alpha:{default:!0},foveationLevel:{default:0}},init:function(){var e=this.data,t=this.el,n=t.renderer;n.sortObjects=e.sortObjects,n.physicallyCorrectLights=e.physicallyCorrectLights,(e.colorManagement||e.gammaOutput)&&(n.outputEncoding=o.sRGBEncoding,e.gammaOutput&&a('Property `gammaOutput` is deprecated. Use `renderer="colorManagement: true;"` instead.')),t.hasAttribute("antialias")&&a('Component `antialias` is deprecated. Use `renderer="antialias: true"` instead.'),t.hasAttribute("logarithmicDepthBuffer")&&a('Component `logarithmicDepthBuffer` is deprecated. Use `renderer="logarithmicDepthBuffer: true"` instead.')},applyColorCorrection:function(e){this.data.colorManagement&&e&&(e.isColor?e.convertSRGBToLinear():e.isTexture&&(e.encoding=o.sRGBEncoding))}})},{"../core/system":142,"../lib/three":179,"../utils/":205}],195:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o={basic:i.BasicShadowMap,pcf:i.PCFShadowMap,pcfsoft:i.PCFSoftShadowMap};t.exports.System=r("shadow",{schema:{enabled:{default:!0},autoUpdate:{default:!0},type:{default:"pcf",oneOf:["basic","pcf","pcfsoft"]}},init:function(){var e=this.sceneEl,t=this.data;this.shadowMapEnabled=!1,e.renderer&&(e.renderer.shadowMap.type=o[t.type],e.renderer.shadowMap.autoUpdate=t.autoUpdate,this.setShadowMapEnabled(this.shadowMapEnabled))},update:function(e){e.enabled!==this.data.enabled&&this.setShadowMapEnabled(this.data.enabled)},setShadowMapEnabled:function(e){var t=this.sceneEl.renderer;this.shadowMapEnabled=this.data.enabled&&e,t&&(t.shadowMap.enabled=this.shadowMapEnabled)}})},{"../core/system":142,"../lib/three":179}],196:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils"),o=i.device.isWebXRAvailable;t.exports.System=r("tracked-controls-webvr",{init:function(){var e=this;this.controllers=[],this.isChrome=-1!==navigator.userAgent.indexOf("Chrome"),this.updateControllerList(),this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),o||navigator.getVRDisplays&&this.sceneEl.addEventListener("enter-vr",(function(){navigator.getVRDisplays().then((function(t){t.length&&(e.vrDisplay=t[0])}))}))},tick:function(){this.isChrome?this.updateControllerList():this.throttledUpdateControllerList()},updateControllerList:function(){var e,t,n,r,i=this.controllers;if(t=navigator.getGamepads&&navigator.getGamepads()){for(r=i.length,i.length=0,n=0;n<t.length;++n)(e=t[n])&&e.pose&&i.push(e);i.length!==r&&this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],197:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils");t.exports.System=r("tracked-controls-webxr",{init:function(){this.controllers=[],this.oldControllers=[],this.oldControllersLength=0,this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.addEventListener("enter-vr",this.updateReferenceSpace),this.el.addEventListener("exit-vr",this.updateReferenceSpace)},tick:function(){this.throttledUpdateControllerList()},updateReferenceSpace:function(){var e=this,t=this.el.xrSession;if(!t)return this.referenceSpace=void 0,this.controllers=[],void(this.oldControllersLength>0&&(this.oldControllersLength=0,this.el.emit("controllersupdated",void 0,!1)));var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,'tracked-controls-webxr uses reference space "'+n+'".'),t}))},updateControllerList:function(){var e,t=this.el.xrSession,n=this.oldControllers;if(!t){if(0===this.oldControllersLength)return;return this.oldControllersLength=0,this.controllers=[],void this.el.emit("controllersupdated",void 0,!1)}if(t.inputSources){if(this.controllers=t.inputSources,this.oldControllersLength===this.controllers.length){var r=!0;for(e=0;e<this.controllers.length;++e)if(this.controllers[e]!==n[e]||this.controllers[e].gamepad!==n[e].gamepad){r=!1;break}if(r)return}for(n.length=0,e=0;e<this.controllers.length;e++)n.push(this.controllers[e]);this.oldControllersLength=this.controllers.length,this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],198:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/").debug("systems:webxr:warn");t.exports.System=r("webxr",{schema:{referenceSpaceType:{type:"string",default:"local-floor"},requiredFeatures:{type:"array",default:["local-floor"]},optionalFeatures:{type:"array",default:["bounded-floor"]},overlayElement:{type:"selector"}},update:function(){var e=this.data;this.sessionConfiguration={requiredFeatures:e.requiredFeatures,optionalFeatures:e.optionalFeatures},this.sessionReferenceSpaceType=e.referenceSpaceType,e.overlayElement&&(this.warnIfFeatureNotRequested("dom-overlay"),this.sessionConfiguration.domOverlay={root:e.overlayElement})},wasFeatureRequested:function(e){return"viewer"===e||"local"===e||!(!this.sessionConfiguration.requiredFeatures.includes(e)&&!this.sessionConfiguration.optionalFeatures.includes(e))},warnIfFeatureNotRequested:function(e,t){this.wasFeatureRequested(e)||i((t?t+" ":"")+'Please add the feature "'+e+"\" to a-scene's webxr system options in requiredFeatures/optionalFeatures.")}})},{"../core/system":142,"../utils/":205}],199:[function(e,t,n){t.exports=function(e,t){return n=Array.prototype.slice.call(arguments,2),function(){var r=n.concat(Array.prototype.slice.call(arguments,0));return e.apply(t,r)};var n}},{}],200:[function(e,t,n){var r=e("./debug"),i=e("object-assign"),o=r("utils:coordinates:warn"),a=["x","y","z","w"],s=/^\s*((-?\d*\.{0,1}\d+(e-?\d+)?)\s+){2,3}(-?\d*\.{0,1}\d+(e-?\d+)?)\s*$/;t.exports.regex=s;var l=/\s+/g;function c(e){return s.test(e)}function u(e){return null!==e&&void 0!==e&&e.constructor===String?parseFloat(e,10):e}t.exports.parse=function(e,t){var n,r,o,s,c,h,d,f,p;if(e&&e instanceof Object)return h=void 0===e.x?t&&t.x:e.x,d=void 0===e.y?t&&t.y:e.y,f=void 0===e.z?t&&t.z:e.z,p=void 0===e.w?t&&t.w:e.w,void 0!==h&&null!==h&&(e.x=u(h)),void 0!==d&&null!==d&&(e.y=u(d)),void 0!==f&&null!==f&&(e.z=u(f)),void 0!==p&&null!==p&&(e.w=u(p)),e;if(null===e||void 0===e)return"object"===typeof t?i({},t):t;for(n=e.trim().split(l),c={},s=0;s<a.length;s++)if(o=a[s],n[s])c[o]=parseFloat(n[s],10);else{if(void 0===(r=t&&t[o]))continue;c[o]=u(r)}return c},t.exports.stringify=function(e){var t;return"object"!==typeof e?e:(t=e.x+" "+e.y,null!=e.z&&(t+=" "+e.z),null!=e.w&&(t+=" "+e.w),t)},t.exports.isCoordinates=c,t.exports.isCoordinate=function(e){return o("`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`"),c(e)},t.exports.toVector3=function(e){return new THREE.Vector3(e.x,e.y,e.z)}},{"./debug":201,"object-assign":39}],201:[function(t,n,r){(function(r){var i=t("debug"),o=t("object-assign"),a={colors:{debug:"gray",error:"red",info:"gray",warn:"orange"}},s=function(e){var t=i(e);return t.color=function(e){var t=function(e){var t=e.split(":");return t[t.length-1]}(e);return a.colors&&a.colors[t]||null}(e),t};o(s,i);var l=function(){try{return window.localStorage}catch(e){}}();l&&(parseInt(l.logs,10)||"true"===l.logs)?s.enable("*"):s.enable("*:error,*:info,*:warn"),r.browser&&(window.logs=s),n.exports=s}).call(this,t("_process"))},{_process:49,debug:8,"object-assign":39}],202:[function(e,t,n){(function(n){var r,i=e("debug")("device:error"),o=!1,a=!1,s=t.exports.isWebXRAvailable=!window.debug&&void 0!==navigator.xr;if(window.addEventListener("vrdisplayactivate",(function(e){var t;s||(t=document.createElement("canvas"),r=e.display,t.getContext("webgl",{}),r.requestPresent([{source:t}]).then((function(){}),(function(){})))})),s){var l=function(){var e=document.querySelector("a-scene");e?e.hasLoaded?e.components["vr-mode-ui"].updateEnterInterfaces():e.addEventListener("loaded",l):window.addEventListener("DOMContentLoaded",l)},c=function(e){i("WebXR session support error: "+e.message)};navigator.xr.isSessionSupported?(navigator.xr.isSessionSupported("immersive-vr").then((function(e){o=e,l()})).catch(c),navigator.xr.isSessionSupported("immersive-ar").then((function(e){a=e,l()})).catch((function(){}))):navigator.xr.supportsSession?(navigator.xr.supportsSession("immersive-vr").then((function(){o=!0,l()})).catch(c),navigator.xr.supportsSession("immersive-ar").then((function(){a=!0,l()})).catch((function(){}))):i("WebXR has neither isSessionSupported or supportsSession?!")}else navigator.getVRDisplays&&navigator.getVRDisplays().then((function(e){var t=document.querySelector("a-scene");r=e.length&&e[0],t&&t.emit("displayconnected",{vrDisplay:r})}));function u(){return r}t.exports.getVRDisplay=u,t.exports.checkHeadsetConnected=function(){return o||a||!!u()},t.exports.checkARSupport=function(){return a};var h=function(){var e,t=!1;return e=window.navigator.userAgent||window.navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),(f()||d()||v())&&(t=!0),g()&&(t=!1),function(){return t}}();function d(e){var t=e||window.navigator.userAgent;return/ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(t)}function f(){return/iPad|iPhone|iPod/.test(window.navigator.platform)}function p(){return/(OculusBrowser)/i.test(window.navigator.userAgent)}function m(){return/(Mobile VR)/i.test(window.navigator.userAgent)}function g(){return p()||m()}function v(){return/R7 Build/.test(window.navigator.userAgent)}t.exports.isMobile=h,t.exports.isTablet=d,t.exports.isIOS=f,t.exports.isMobileDeviceRequestingDesktopSite=function(){return!h()&&!g()&&void 0!==window.orientation},t.exports.isOculusBrowser=p,t.exports.isFirefoxReality=m,t.exports.isMobileVR=g,t.exports.isR7=v,t.exports.isLandscape=function(){var e=window.orientation;return v()&&(e+=90),90===e||-90===e},t.exports.isBrowserEnvironment=!(n&&!n.browser),t.exports.isNodeEnvironment=!t.exports.isBrowserEnvironment}).call(this,e("_process"))},{_process:49,debug:8}],203:[function(e,t,n){var r={};function i(e,t){return r[t=t||"."]||(r[t]={}),-1!==e.indexOf(t)?r[t][e]=e.split(t):r[t][e]=e,r[t][e]}t.exports.getComponentPropertyPath=i,t.exports.propertyPathCache=r,t.exports.getComponentProperty=function(e,t,n){var r;return n=n||".",-1!==t.indexOf(n)?(r=i(t,n)).constructor===String?e.getAttribute(r):e.getAttribute(r[0])[r[1]]:e.getAttribute(t)},t.exports.setComponentProperty=function(e,t,n,r){var o;r=r||".",-1===t.indexOf(r)?e.setAttribute(t,n):(o=i(t,r)).constructor===String?e.setAttribute(o,n):e.setAttribute(o[0],o[1],n)}},{}],204:[function(e,t,n){t.exports=function(e){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t,10)+1+"px",e.style.height=parseInt(n,10)+1+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),200)}},{}],205:[function(e,t,n){var r=e("./debug"),i=e("deep-assign"),o=e("./device"),a=e("object-assign"),s=e("./object-pool"),l=r("utils:warn");t.exports.bind=e("./bind"),t.exports.coordinates=e("./coordinates"),t.exports.debug=r,t.exports.device=o,t.exports.entity=e("./entity"),t.exports.forceCanvasResizeSafariMobile=e("./forceCanvasResizeSafariMobile"),t.exports.isIE11=e("./is-ie11"),t.exports.material=e("./material"),t.exports.objectPool=s,t.exports.split=e("./split").split,t.exports.styleParser=e("./styleParser"),t.exports.trackedControls=e("./tracked-controls"),t.exports.checkHeadsetConnected=function(){return l("`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`"),o.checkHeadsetConnected(arguments)},t.exports.isGearVR=t.exports.device.isGearVR=function(){l("`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isIOS=function(){return l("`utils.isIOS` has moved to `utils.device.isIOS`"),o.isIOS(arguments)},t.exports.isOculusGo=t.exports.device.isOculusGo=function(){l("`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isMobile=function(){return l("`utils.isMobile has moved to `utils.device.isMobile`"),o.isMobile(arguments)},t.exports.throttle=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(){var t=Date.now(),r="undefined"===typeof i?n:t-i;("undefined"===typeof i||r>=n)&&(i=t,e.apply(null,arguments))}},t.exports.throttleTick=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(t,r){var o="undefined"===typeof i?r:t-i;("undefined"===typeof i||o>=n)&&(i=t,e(t,o))}},t.exports.debounce=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}},t.exports.extend=a,t.exports.extendDeep=i,t.exports.clone=function(e){return JSON.parse(JSON.stringify(e))};var c=function(){var e=s.createPool((function(){return[]}));return function(t,n){var r,i,o,a,s,l;if(void 0===t||void 0===n||null===t||null===n||!(t&&n&&t.constructor===Object&&n.constructor===Object||t.constructor===Array&&n.constructor===Array))return t===n;for(r in i=e.use(),o=e.use(),i.length=0,o.length=0,t)i.push(r);for(r in n)o.push(r);if(i.length!==o.length)return e.recycle(i),e.recycle(o),!1;for(a=0;a<i.length;++a)if(s=t[i[a]],l=n[i[a]],"object"===typeof s||"object"===typeof l||Array.isArray(s)&&Array.isArray(l)){if(s===l)continue;if(!c(s,l))return e.recycle(i),e.recycle(o),!1}else if(s!==l)return e.recycle(i),e.recycle(o),!1;return e.recycle(i),e.recycle(o),!0}}();t.exports.deepEqual=c,t.exports.diff=function(){var e=[];return function(t,n,r){var i,o,a,s,l,u,h;for(l in s=r||{},e.length=0,t)e.push(l);if(!n)return s;for(a in n)-1===e.indexOf(a)&&e.push(a);for(u=0;u<e.length;u++)i=t[l=e[u]],o=n[l],((h=i&&o&&i.constructor===Object&&o.constructor===Object)&&!c(i,o)||!h&&i!==o)&&(s[l]=o);return s}}(),t.exports.shouldCaptureKeyEvent=function(e){return!e.metaKey&&document.activeElement===document.body},t.exports.splitString=function(e,t){"undefined"===typeof t&&(t=" ");var n=new RegExp(t,"g");return(e=(e||"").replace(n,t)).split(t)},t.exports.getElData=function(e,t){t=t||{};var n={};return Object.keys(t).forEach((function(t){e.hasAttribute(t)&&(n[t]=e.getAttribute(t))})),n},t.exports.getUrlParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},t.exports.isIframed=function(){return window.top!==window.self},t.exports.findAllScenes=function(e){for(var t=[],n=e.getElementsByTagName("*"),r=0,i=n.length;r<i;r++)n[r].isScene&&t.push(n[r]);return t},t.exports.srcLoader=e("./src-loader")},{"./bind":199,"./coordinates":200,"./debug":201,"./device":202,"./entity":203,"./forceCanvasResizeSafariMobile":204,"./is-ie11":207,"./material":209,"./object-pool":210,"./split":211,"./src-loader":212,"./styleParser":213,"./tracked-controls":214,"deep-assign":10,"object-assign":39}],206:[function(e,t,n){window.addEventListener("orientationchange",(function(){document.documentElement.style.height="initial",setTimeout((function(){document.documentElement.style.height="100%",setTimeout((function(){window.scrollTo(0,1)}),500)}),500)}))},{}],207:[function(e,t,n){t.exports=11===function(){var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):"Netscape"===navigator.appName&&null!=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e}()},{}],208:[function(e,t,n){t.exports=function(e){return/(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(e)}},{}],209:[function(e,t,n){var r=e("../lib/three"),i=["application/x-mpegurl","application/vnd.apple.mpegurl"],o=new Set(["emissiveMap","envMap","map","specularMap"]);function a(e,t){t&&(e.emit("materialtextureloaded",{src:t.image,texture:t}),t.image&&"VIDEO"===t.image.tagName&&(t.image.addEventListener("loadeddata",(function(){e.components&&e.components.material&&(t.needsCorrectionBGRA&&t.needsCorrectionFlipY&&-1!==["standard","flat"].indexOf(e.components.material.data.shader)&&e.setAttribute("material","shader","ios10hls"),e.emit("materialvideoloadeddata",{src:t.image,texture:t}))})),t.image.addEventListener("ended",(function(){e.emit("materialvideoended",{src:t.image,texture:t})}))))}t.exports.updateMapMaterialFromData=function(e,t,n,i){var s=n.el,l=n.material,c=s.sceneEl.systems.renderer,u=i[t];if(n.materialSrcs||(n.materialSrcs={}),!u)return delete n.materialSrcs[e],void h(null);function h(t){l[e]=t,t&&o.has(e)&&c.applyColorCorrection(t),l.needsUpdate=!0,a(s,t)}u!==n.materialSrcs[e]&&(n.materialSrcs[e]=u,u instanceof r.Texture?h(u):s.sceneEl.systems.material.loadTexture(u,{src:u,repeat:i.repeat,offset:i.offset,npot:i.npot},(function(t){n.materialSrcs[e]===u&&h(t)})))},t.exports.updateMap=function(e,n){return t.exports.updateMapMaterialFromData("map","src",e,n)},t.exports.updateDistortionMap=function(e,t,n){var r=e;"ambientOcclusion"===e&&(r="ao");var i=t.el,s=t.material,l=i.sceneEl.systems.renderer,c=n[e+"Map"],u={};if(u.src=c,u.offset=n[e+"TextureOffset"],u.repeat=n[e+"TextureRepeat"],u.wrap=n[e+"TextureWrap"],c){if(c===t[e+"TextureSrc"])return;return t[e+"TextureSrc"]=c,void i.sceneEl.systems.material.loadTexture(c,u,h)}function h(e){var t=r+"Map";s[t]=e,e&&o.has(t)&&l.applyColorCorrection(e),s.needsUpdate=!0,a(i,e)}s.map&&h(null)},t.exports.handleTextureEvents=a,t.exports.isHLS=function(e,t){return!(!t||!i.includes(t.toLowerCase()))||!!(e&&e.toLowerCase().indexOf(".m3u8")>0)}},{"../lib/three":179}],210:[function(e,t,n){var r=Object.freeze(Object.create(null));function i(){return{}}function o(e){var t;if(e&&e.constructor===Object)for(t in e)e[t]=void 0}t.exports.createPool=function(e){var t=[],n=null;function a(r){var i,o;if((r=void 0===r?t.length:r)>0&&null==n&&(n=0),r>0)for(i=t.length,t.length+=Number(r),o=i;o<t.length;o++)t[o]=e();return t.length}return e=e||i,{grow:a,pool:t,recycle:function(e){e instanceof Object&&(null!==n&&-1!==n?t[--n]=e:t[t.length]=e)},size:function(){return t.length},use:function(){var e;return null!==n&&n!==t.length||a(t.length||5),e=t[n],t[n++]=r,o(e),e}}},t.exports.clearObject=o,t.exports.removeUnusedKeys=function(e,t){var n;if(e&&e.constructor===Object)for(n in e)n in t||delete e[n]}},{}],211:[function(e,t,n){t.exports.split=function(){var e={};return function(t,n){return n in e||(e[n]={}),t in e[n]||(e[n][t]=t.split(n)),e[n][t]}}()},{}],212:[function(t,n,r){var i=t("./debug")("utils:src-loader:warn");function o(e,t,n){!function(e,t){var n;e.tagName?t("IMG"===e.tagName):((n=new XMLHttpRequest).open("HEAD",e),n.addEventListener("load",(function(r){var i;n.status>=200&&n.status<300?null==(i=n.getResponseHeader("Content-Type"))?s(e,t):i.startsWith("image")?t(!0):t(!1):s(e,t),n.abort()})),n.send())}(e,(function(r){r?t(e):n(e)}))}function a(e){var t=e.match(/\url\((.+)\)/);if(t)return t[1]}function s(e,t){var n=new Image;n.addEventListener("load",(function(){t(!0)})),n.addEventListener("error",(function(){t(!1)})),n.src=e}n.exports={parseUrl:a,validateSrc:o,validateCubemapSrc:function(t,n){var r,s,l,c="",u=[];for(s=0;s<5;s++)c+="(url\\((?:[^\\)]+)\\),\\s*)";function h(e){u.push(e),6===u.length&&n(u)}if(c+="(url\\((?:[^\\)]+)\\)\\s*)",l=t.match(new RegExp(c)))for(s=1;s<7;s++)o(a(l[s]),h);else if(r=function(t){try{var n=document.querySelector(t);return n||i('No element was found matching the selector: "%s"',t),n}catch(e){return void i('"%s" is not a valid selector',t)}}(t))return"A-CUBEMAP"===r.tagName&&r.srcs?n(r.srcs):void i('Selector "%s" does not point to <a-cubemap>',t)}}},{"./debug":201}],213:[function(e,t,n){var r=/-([a-z])/g;function i(e){return e.replace(r,s)}function o(e){var t,n;for(n in e)n!==(t=i(n))&&(e[t]=e[n],delete e[n]);return e}t.exports.parse=function(e,t){var n;return"string"!==typeof e||(n=function(e,t){var n,r,i,o,s,l;for(t=t||{},n=a(e),r=0;r<n.length;r++)(i=n[r])&&(o=i.indexOf(":"),s=i.substr(0,o).trim(),l=i.substr(o+1).trim(),t[s]=l);return t}(e,t))[""]?e:o(n)},t.exports.stringify=function(e){return"string"===typeof e?e:function(e){var t,n=0,r=0,i="";for(t in e)n++;for(t in e)i+=t+": "+e[t],r<n-1&&(i+="; "),r++;return i}(e)},t.exports.toCamelCase=i,t.exports.transformKeysToCamelCase=o;var a=function(){var e=[],t=/url\([^)]+$/;return function(n){var r,i="",o=0;for(e.length=0;o<n.length;)-1===(r=n.indexOf(";",o))&&(r=n.length),i+=n.substring(o,r),t.test(i)?(i+=";",o=r+1):(e.push(i.trim()),i="",o=r+1);return e}}();function s(e){return e[1].toUpperCase()}},{}],214:[function(e,t,n){var r=e("../constants").DEFAULT_HANDEDNESS,i=["x","y","z","w"];function o(e,t,n){var r,i,o=e.el.sceneEl,a=n.index||0;return!!t&&!!(i=o&&o.systems["tracked-controls-webvr"])&&!!(r=i.controllers).length&&!!s(r,null,t,n.hand,a)}function a(e,t,n){var r,i=e.el.sceneEl,o=i&&i.systems["tracked-controls-webxr"];return!!o&&!(!(r=o.controllers)||!r.length)&&l(r,t,n.hand,n.index,n.iterateControllerProfiles,n.handTracking)}function s(e,t,n,i,o){var a,s,l=0;for(s=0;s<e.length;s++)if(a=e[s],(!n||a.id.startsWith(n))&&(n||a.id===t)&&(!i||!a.hand||i===a.hand)){if(!i||a.hand)return a;if(l===2*o+(i===r?0:1))return a;++l}}function l(e,t,n,r,i,o){var a,s,l,c,u=!1;for(a=0;a<e.length;a++){if(c=(l=e[a]).profiles,o)u=l.hand;else if(i)for(s=0;s<c.length&&!(u=c[s].startsWith(t));s++);else u=c.length>0&&c[0].startsWith(t);if(u)if("right"===l.handedness||"left"===l.handedness){if(l.handedness===n)return e[a]}else if(a===r)return e[a]}}t.exports.checkControllerPresentAndSetup=function(e,t,n){var r,i,s=e.el,l=s.sceneEl.hasWebXR;if(i=!!(r=(l?a:o)(e,t,n)),!e.controllerPresent||e.controllerEventsActive||l||e.addEventListeners(),i===e.controllerPresent)return i;e.controllerPresent=i,i?(e.addEventListeners(),e.injectTrackedControls(r),s.emit("controllerconnected",{name:e.name,component:e})):(e.removeEventListeners(),s.emit("controllerdisconnected",{name:e.name,component:e}))},t.exports.isControllerPresentWebVR=o,t.exports.isControllerPresentWebXR=a,t.exports.findMatchingControllerWebVR=s,t.exports.findMatchingControllerWebXR=l,t.exports.emitIfAxesChanged=function(e,t,n){var r,o,a,s,l;for(o in t){for(r=t[o],a=!1,l=0;l<r.length;l++)n.detail.changed[r[l]]&&(a=!0);if(a){for(s={},l=0;l<r.length;l++)s[i[l]]=n.detail.axis[r[l]];e.el.emit(o+"moved",s)}}},t.exports.onButtonEvent=function(e,t,n,r){var i=(r?n.mapping[r]:n.mapping).buttons[e];n.el.emit(i+t),n.updateModel&&n.updateModel(i,t)}},{"../constants":123}],215:[function(e,t,n){THREE.DeviceOrientationControls=function(e){var t=this;this.object=e,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var n=function(e){t.deviceOrientation=e},r=function(){t.screenOrientation=window.orientation||0},i=function(){var e=new THREE.Vector3(0,0,1),t=new THREE.Euler,n=new THREE.Quaternion,r=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));return function(i,o,a,s,l){t.set(a,o,-s,"YXZ"),i.setFromEuler(t),i.multiply(r),i.multiply(n.setFromAxisAngle(e,-l))}}();this.connect=function(){r(),window.addEventListener("orientationchange",r,!1),window.addEventListener("deviceorientation",n,!1),t.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",r,!1),window.removeEventListener("deviceorientation",n,!1),t.enabled=!1},this.update=function(){if(!1!==t.enabled){var e=t.deviceOrientation;if(e){var n=e.alpha?THREE.Math.degToRad(e.alpha)+t.alphaOffset:0,r=e.beta?THREE.Math.degToRad(e.beta):0,o=e.gamma?THREE.Math.degToRad(e.gamma):0,a=t.screenOrientation?THREE.Math.degToRad(t.screenOrientation):0;i(t.object.quaternion,n,r,o,a)}}},this.dispose=function(){t.disconnect()},this.connect()}},{}],216:[function(e,t,n){window.glStats=function(){var e=null,t=0,n=0,r=0,i=0,o=0,a=0,s=0;function l(e,t){return function(){t.apply(this,arguments),e.apply(this,arguments)}}return WebGLRenderingContext.prototype.drawArrays=l(WebGLRenderingContext.prototype.drawArrays,(function(){t++,arguments[0]==this.POINTS?a+=arguments[2]:o+=arguments[2]})),WebGLRenderingContext.prototype.drawElements=l(WebGLRenderingContext.prototype.drawElements,(function(){n++,i+=arguments[1]/3,o+=arguments[1]})),WebGLRenderingContext.prototype.useProgram=l(WebGLRenderingContext.prototype.useProgram,(function(){r++})),WebGLRenderingContext.prototype.bindTexture=l(WebGLRenderingContext.prototype.bindTexture,(function(){s++})),{update:function(){e("allcalls").set(t+n),e("drawElements").set(n),e("drawArrays").set(t),e("bindTexture").set(s),e("useProgram").set(r),e("glfaces").set(i),e("glvertices").set(o),e("glpoints").set(a)},start:function(){t=0,n=0,r=0,i=0,o=0,a=0,s=0},end:function(){},attach:function(t){e=t},values:{allcalls:{over:3e3,caption:"Calls (hook)"},drawelements:{caption:"drawElements (hook)"},drawarrays:{caption:"drawArrays (hook)"}},groups:[{caption:"WebGL",values:["allcalls","drawelements","drawarrays","useprogram","bindtexture","glfaces","glvertices","glpoints"]}],fractions:[{base:"allcalls",steps:["drawelements","drawarrays"]}]}},window.threeStats=function(e){var t=null;return{update:function(){t("renderer.info.memory.geometries").set(e.info.memory.geometries),t("renderer.info.programs").set(e.info.programs.length),t("renderer.info.memory.textures").set(e.info.memory.textures),t("renderer.info.render.calls").set(e.info.render.calls),t("renderer.info.render.triangles").set(e.info.render.triangles),t("renderer.info.render.points").set(e.info.render.points)},start:function(){},end:function(){},attach:function(e){t=e},values:{"renderer.info.memory.geometries":{caption:"Geometries"},"renderer.info.memory.textures":{caption:"Textures"},"renderer.info.programs":{caption:"Programs"},"renderer.info.render.calls":{caption:"Calls"},"renderer.info.render.triangles":{caption:"Triangles",over:1e3},"renderer.info.render.points":{caption:"Points"}},groups:[{caption:"Three.js - Memory",values:["renderer.info.memory.geometries","renderer.info.programs","renderer.info.memory.textures"]},{caption:"Three.js - Render",values:["renderer.info.render.calls","renderer.info.render.triangles","renderer.info.render.points"]}],fractions:[]}},window.BrowserStats=function(){var e=null,t=0,n=0;window.performance&&!performance.memory&&(performance.memory={usedJSHeapSize:0,totalJSHeapSize:0}),0===performance.memory.totalJSHeapSize&&console.warn("totalJSHeapSize === 0... performance.memory is only available in Chrome .");var r=Math.log(1024);function i(e){var t=Math.floor(Math.log(e)/r);return Math.round(100*e/Math.pow(1024,t))/100}return{update:function(){t=i(performance.memory.usedJSHeapSize),n=i(performance.memory.totalJSHeapSize),e("memory").set(t),e("total").set(n)},start:function(){t=0},end:function(){},attach:function(t){e=t},values:{memory:{caption:"Used Memory",average:!0,avgMs:1e3,over:22},total:{caption:"Total Memory"}},groups:[{caption:"Browser",values:["memory","total"]}],fractions:[{base:"total",steps:["memory"]}]}},"object"===typeof t&&(t.exports={glStats:window.glStats,threeStats:window.threeStats,BrowserStats:window.BrowserStats})},{}],217:[function(e,t,n){"use strict";!function(){"performance"in window==0&&(window.performance={});var e=window.performance;if("now"in e==0){var t=Date.now();e.timing&&e.timing.navigationStart&&(t=e.timing.navigationStart),e.now=function(){return Date.now()-t}}e.mark||(e.mark=function(){}),e.measure||(e.measure=function(){})}(),window.rStats=function(e){function t(e,t){for(var n=Object.keys(e),r=0,i=n.length;r<i;r++)t(n[r])}var n=e||{},r=n.colours||["#850700","#c74900","#fcb300","#284280","#4c7c0c"],i=(n.CSSPath?n.CSSPath:"")+"rStats.css";(n.css||["https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300",i]).forEach((function(e){!function(e){var t=document.createElement("link");t.href=e,t.rel="stylesheet",t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t)}(e)})),n.values||(n.values={});var o,a,s={};function l(e,t,n){var r=n||{},i=document.createElement("canvas"),o=i.getContext("2d"),a=0,s=0,l=r.color?r.color:"#666666",c=document.createElement("canvas"),u=c.getContext("2d");c.width=1,c.height=20,u.fillStyle="#444444",u.fillRect(0,0,1,20),u.fillStyle=l,u.fillRect(0,10,1,10),u.fillStyle="#ffffff",u.globalAlpha=.5,u.fillRect(0,10,1,1),u.globalAlpha=1;var h=document.createElement("canvas"),d=h.getContext("2d");return h.width=1,h.height=20,d.fillStyle="#444444",d.fillRect(0,0,1,20),d.fillStyle="#b70000",d.fillRect(0,10,1,10),d.globalAlpha=.5,d.fillStyle="#ffffff",d.fillRect(0,10,1,1),d.globalAlpha=1,i.width=200,i.height=10,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e,t){(s+=.1*(e-s))>(a*=.99)&&(a=s),o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height),t?o.drawImage(h,i.width-1,i.height-s*i.height/a-10):o.drawImage(c,i.width-1,i.height-s*i.height/a-10)}}}function c(e,n){var i=document.createElement("canvas"),o=i.getContext("2d");return i.width=200,i.height=10*n,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e){o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height);var n=0;t(e,(function(t){var a=e[t]*i.height;o.fillStyle=r[t],o.fillRect(i.width-1,n,1,a),n+=a}))}}}function u(e,t){var r,i=e,o=0,s=0,c=0,u=0,h=performance.now(),d=0,f=document.createElement("div"),p=document.createElement("span"),m=document.createElement("div"),g=document.createTextNode(""),v=n?n.values[i.toLowerCase()]:null,y=new l(f,i,v),b=!1;function w(e){if(v&&v.average){u+=e,d++;var t=performance.now();t-h>=(v.avgMs||1e3)&&(c=u/d,u=0,h=t,d=0)}}function x(){r=performance.now(),n.userTimingAPI&&performance.mark(i+"-start"),b=!0}function _(){o=performance.now()-r,n.userTimingAPI&&(performance.mark(i+"-end"),b&&performance.measure(i,i+"-start",i+"-end")),w(o)}return p.className="rs-counter-id",p.textContent=v&&v.caption?v.caption:i,m.className="rs-counter-value",m.appendChild(g),f.appendChild(p),f.appendChild(m),t?t.div.appendChild(f):a.appendChild(f),r=performance.now(),{set:function(e){w(o=e)},start:x,tick:function(){_(),x()},end:_,frame:function(){var e=performance.now(),t=e-r;s++,t>1e3&&(o=v&&!1===v.interpolate?s:1e3*s/t,s=0,r=e,w(o))},value:function(){return o},draw:function(){var e=v&&v.average?c:o;g.nodeValue=Math.round(100*e)/100;var t=v&&(v.below&&o<v.below||v.over&&o>v.over);y.draw(o,t),f.className=t?"rs-counter-base alarm":"rs-counter-base"}}}function h(e){var r=e.toLowerCase();if(void 0===r&&(r="default"),s[r])return s[r];var i=null;n&&n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)];i||-1===t.values.indexOf(r.toLowerCase())||(i=t)}));var o=new u(r,i);return s[r]=o,o}function d(){t(n.plugins,(function(e){n.plugins[e].update()})),t(s,(function(e){s[e].draw()})),n&&n.fractions&&t(n.fractions,(function(e){var r=n.fractions[parseInt(e,10)],i=[],o=s[r.base.toLowerCase()];o&&(o=o.value(),t(n.fractions[e].steps,(function(t){var r=n.fractions[e].steps[parseInt(t,10)].toLowerCase(),a=s[r];a&&i.push(a.value()/o)}))),r.graph.draw(i)}))}return function(){if(n.plugins){n.values||(n.values={}),n.groups||(n.groups=[]),n.fractions||(n.fractions=[]);for(var e=0;e<n.plugins.length;e++)n.plugins[e].attach(h),t(n.plugins[e].values,(function(t){n.values[t]=n.plugins[e].values[t]})),n.groups=n.groups.concat(n.plugins[e].groups),n.fractions=n.fractions.concat(n.plugins[e].fractions)}else n.plugins={};(o=document.createElement("div")).className="rs-base",(a=document.createElement("div")).className="rs-container",a.style.height="auto",o.appendChild(a),document.body.appendChild(o),n&&(n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)],r=document.createElement("div");r.className="rs-group",t.div=r;var i=document.createElement("h1");i.textContent=t.caption,i.addEventListener("click",function(e){this.classList.toggle("hidden"),e.preventDefault()}.bind(r)),a.appendChild(i),a.appendChild(r)})),n.fractions&&t(n.fractions,(function(e){var i=n.fractions[parseInt(e,10)],o=document.createElement("div");o.className="rs-fraction";var s=document.createElement("div");s.className="rs-legend";var l=0;t(n.fractions[e].steps,(function(t){var i=document.createElement("p");i.textContent=n.fractions[e].steps[t],i.style.color=r[l],s.appendChild(i),l++})),o.appendChild(s),o.style.height=10*l+"px",i.div=o;var u=new c(o,l);i.graph=u,a.appendChild(o)})))}(),function(e){return e?h(e):{element:o,update:d}}},"object"===typeof t&&(t.exports=window.rStats)},{}],218:[function(e,t,n){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e})},{}],219:[function(t,n,r){var i={base64:function(e,t){return"data:"+e+";base64,"+t},isMobile:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},isIOS:function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},isIFrame:function(){try{return window.self!==window.top}catch(e){return!0}},appendQueryParameter:function(e,t,n){var r=e.indexOf("?")<0?"?":"&";return e+=r+t+"="+n},getQueryParameter:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},isLandscapeMode:function(){return 90==window.orientation||-90==window.orientation}};n.exports=i},{}],220:[function(e,t,n){var r=e("./util.js");function i(){var e=document.createElement("video");e.addEventListener("ended",(function(){e.play()})),this.request=function(){e.paused&&(e.src=r.base64("video/webm","GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw=="),e.play())},this.release=function(){e.pause(),e.src=""}}function o(){var e=null;this.request=function(){e||(e=setInterval((function(){window.location.href="/",setTimeout(window.stop,0)}),15e3))},this.release=function(){e&&(clearInterval(e),e=null)}}t.exports=function(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?o:i}()},{"./util.js":219}]},{},[177])(177)}).call(this,r(46))},function(e,t,n){n(320),n(330),n(339),n(348),n(353)},function(e,t,n){n(321),n(322),n(325),n(327),n(328),n(329)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint-controls",{schema:{enabled:{default:!0},mode:{default:"teleport",oneOf:["teleport","animate"]},animateSpeed:{default:3}},init:function(){this.active=!0,this.checkpoint=null,this.isNavMeshConstrained=!1,this.offset=new THREE.Vector3,this.position=new THREE.Vector3,this.targetPosition=new THREE.Vector3},play:function(){this.active=!0},pause:function(){this.active=!1},setCheckpoint:function(e){const t=this.el;this.active&&this.checkpoint!==e&&(this.checkpoint&&t.emit("navigation-end",{checkpoint:this.checkpoint}),this.checkpoint=e,this.sync(),this.position.distanceTo(this.targetPosition)<.1?this.checkpoint=null:(t.emit("navigation-start",{checkpoint:e}),"teleport"===this.data.mode&&(this.el.setAttribute("position",this.targetPosition),this.checkpoint=null,t.emit("navigation-end",{checkpoint:e}),t.components["movement-controls"].updateNavLocation())))},isVelocityActive:function(){return!(!this.active||!this.checkpoint)},getVelocity:function(){if(!this.active)return;const e=this.data,t=this.offset,n=this.position,r=this.targetPosition,i=this.checkpoint;return this.sync(),n.distanceTo(r)<.1?(this.checkpoint=null,this.el.emit("navigation-end",{checkpoint:i}),t.set(0,0,0)):(t.setLength(e.animateSpeed),t)},sync:function(){const e=this.offset,t=this.position,n=this.targetPosition;t.copy(this.el.getAttribute("position")),this.checkpoint.object3D.getWorldPosition(n),n.add(this.checkpoint.components.checkpoint.getOffset()),e.copy(n).sub(t)}})},function(e,t,n){const r=n(323),i=n(324),o="left",a="right",s=1,l=2;e.exports=AFRAME.registerComponent("gamepad-controls",{GamepadButton:r,schema:{enabled:{default:!0},camera:{default:"[camera]",type:"selector"},rotationSensitivity:{default:2}},init:function(){const e=this.el.sceneEl;this.system=e.systems["tracked-controls-webxr"]||{controllers:[]},this.prevTime=window.performance.now(),this.buttons={};const t=this.el.object3D.rotation;this.pitch=new THREE.Object3D,this.pitch.rotation.x=THREE.Math.degToRad(t.x),this.yaw=new THREE.Object3D,this.yaw.position.y=10,this.yaw.rotation.y=THREE.Math.degToRad(t.y),this.yaw.add(this.pitch),this._lookVector=new THREE.Vector2,this._moveVector=new THREE.Vector2,this._dpadVector=new THREE.Vector2,e.addBehavior(this)},update:function(){this.tick()},tick:function(e,t){this.updateButtonState(),this.updateRotation(t)},remove:function(){},isVelocityActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y;return Math.abs(n)>.2||Math.abs(r)>.2},getVelocityDelta:function(){const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y,i=new THREE.Vector3;return Math.abs(n)>.2&&(i.x+=n),Math.abs(r)>.2&&(i.z+=r),i},isRotationActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._lookVector;return this.getJoystick(l,e),Math.abs(e.x)>.2||Math.abs(e.y)>.2},updateRotation:function(e){if(!this.isRotationActive())return;const t=this.data,n=this.yaw,r=this.pitch,i=t.camera.components["look-controls"],o=i&&i.pitchObject&&i.yawObject;o&&(r.rotation.copy(i.pitchObject.rotation),n.rotation.copy(i.yawObject.rotation));const a=this._lookVector;this.getJoystick(l,a),Math.abs(a.x)<=.2&&(a.x=0),Math.abs(a.y)<=.2&&(a.y=0),a.multiplyScalar(t.rotationSensitivity*e/1e3),n.rotation.y-=a.x,r.rotation.x-=a.y,r.rotation.x=Math.max(-Math.PI/2,Math.min(Math.PI/2,r.rotation.x)),t.camera.object3D.rotation.set(r.rotation.x,n.rotation.y,0),o&&(i.pitchObject.rotation.copy(r.rotation),i.yawObject.rotation.copy(n.rotation))},updateButtonState:function(){const e=this.getGamepad(a);if(this.data.enabled&&e)for(var t=0;t<e.buttons.length;t++)e.buttons[t].pressed&&!this.buttons[t]?this.emit(new i("gamepadbuttondown",t,e.buttons[t])):!e.buttons[t].pressed&&this.buttons[t]&&this.emit(new i("gamepadbuttonup",t,e.buttons[t])),this.buttons[t]=e.buttons[t].pressed;else Object.keys(this.buttons)&&(this.buttons={})},emit:function(e){this.el.emit(e.type,e),this.el.emit(e.type+":"+e.index,new i(e.type,e.index,e))},getGamepad:function(){const e=[],t=[];return function(n){const r=this.el.sceneEl.components["proxy-controls"],i=r&&r.isConnected()&&r.getGamepad(0);if(i)return i;e.length=0;for(let t=0;t<this.system.controllers.length;t++){const r=this.system.controllers[t],i=r?r.gamepad:null;if(e.push(i),i&&i.handedness===n)return i}const o=navigator.getGamepads?navigator.getGamepads():t;for(let e=0;e<o.length;e++){const t=o[e];if(t&&t.hand===n)return t}return e[0]||o[0]}}(),getButton:function(e){return this.getGamepad(a).buttons[e]},getAxis:function(e){return this.getGamepad(e>1?a:o).axes[e]},getJoystick:function(e,t){const n=this.getGamepad(e===s?o:a);if("xr-standard"===n.mapping)switch(e){case s:return t.set(n.axes[2],n.axes[3]);case l:return t.set(n.axes[0],n.axes[1])}else switch(e){case s:return t.set(n.axes[0],n.axes[1]);case l:return t.set(n.axes[2],n.axes[3])}throw new Error('Unexpected joystick index "%d".',e)},getDpad:function(e){const t=this.getGamepad(o);return t.buttons[r.DPAD_RIGHT]?e.set((t.buttons[r.DPAD_RIGHT].pressed?1:0)+(t.buttons[r.DPAD_LEFT].pressed?-1:0),(t.buttons[r.DPAD_UP].pressed?-1:0)+(t.buttons[r.DPAD_DOWN].pressed?1:0)):e.set(0,0)},isConnected:function(){const e=this.getGamepad(o);return!(!e||!e.connected)},getID:function(){return this.getGamepad(o).id}})},function(e,t){e.exports=Object.assign((function(){}),{FACE_1:0,FACE_2:1,FACE_3:2,FACE_4:3,L_SHOULDER_1:4,R_SHOULDER_1:5,L_SHOULDER_2:6,R_SHOULDER_2:7,SELECT:8,START:9,DPAD_UP:12,DPAD_DOWN:13,DPAD_LEFT:14,DPAD_RIGHT:15,VENDOR:16})},function(e,t){e.exports=function(e,t,n){this.type=e,this.index=t,this.pressed=n.pressed,this.value=n.value}},function(e,t,n){n(326);const r=window.KeyboardEvent;e.exports=AFRAME.registerComponent("keyboard-controls",{schema:{enabled:{default:!0},debug:{default:!1}},init:function(){this.dVelocity=new THREE.Vector3,this.localKeys={},this.listeners={keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this),blur:this.onBlur.bind(this)},this.attachEventListeners()},isVelocityActive:function(){return this.data.enabled&&!!Object.keys(this.getKeys()).length},getVelocityDelta:function(){const e=this.data,t=this.getKeys();return this.dVelocity.set(0,0,0),e.enabled&&((t.KeyW||t.ArrowUp)&&(this.dVelocity.z-=1),(t.KeyA||t.ArrowLeft)&&(this.dVelocity.x-=1),(t.KeyS||t.ArrowDown)&&(this.dVelocity.z+=1),(t.KeyD||t.ArrowRight)&&(this.dVelocity.x+=1)),this.dVelocity.clone()},play:function(){this.attachEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.pause()},attachEventListeners:function(){window.addEventListener("keydown",this.listeners.keydown,!1),window.addEventListener("keyup",this.listeners.keyup,!1),window.addEventListener("blur",this.listeners.blur,!1)},removeEventListeners:function(){window.removeEventListener("keydown",this.listeners.keydown),window.removeEventListener("keyup",this.listeners.keyup),window.removeEventListener("blur",this.listeners.blur)},onKeyDown:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(this.localKeys[e.code]=!0,this.emit(e))},onKeyUp:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(delete this.localKeys[e.code],this.emit(e))},onBlur:function(){for(let e in this.localKeys)this.localKeys.hasOwnProperty(e)&&delete this.localKeys[e]},emit:function(e){"__keyboard-controls-proxy"in e&&this.el.emit(e.type,e),this.el.emit(e.type+":"+e.code,new r(e.type,e)),this.data.debug&&console.log(e.type+":"+e.code)},isPressed:function(e){return e in this.getKeys()},getKeys:function(){return this.isProxied()?this.el.sceneEl.components["proxy-controls"].getKeyboard():this.localKeys},isProxied:function(){const e=this.el.sceneEl.components["proxy-controls"];return e&&e.isConnected()}})},function(e,t,n){!function(e){var t="KeyboardEvent"in e;t||(e.KeyboardEvent=function(){throw TypeError("Illegal constructor")}),"DOM_KEY_LOCATION_STANDARD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_STANDARD=0),"DOM_KEY_LOCATION_LEFT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_LEFT=1),"DOM_KEY_LOCATION_RIGHT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_RIGHT=2),"DOM_KEY_LOCATION_NUMPAD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD=3);var n=window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,r=window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,i=window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,o=window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;function a(e,t){return-1!==String(e).indexOf(t)}var s=a(navigator.platform,"Win")?"win":a(navigator.platform,"Mac")?"mac":a(navigator.platform,"CrOS")?"cros":a(navigator.platform,"Linux")?"linux":a(navigator.userAgent,"iPad")||a(navigator.platform,"iPod")||a(navigator.platform,"iPhone")?"ios":"",l=a(navigator.userAgent,"Chrome/")?"chrome":a(navigator.vendor,"Apple")?"safari":a(navigator.userAgent,"MSIE")?"ie":a(navigator.userAgent,"Gecko/")?"moz":a(navigator.userAgent,"Opera/")?"opera":"",c=l+"-"+s;function u(e,t,n){c!==t&&l!==t&&s!==t||Object.keys(n).forEach((function(t){e[t]=n[t]}))}var h={3:{code:"Cancel"},6:{code:"Help"},8:{code:"Backspace"},9:{code:"Tab"},12:{code:"Clear"},13:{code:"Enter"},16:{code:"Shift"},17:{code:"Control"},18:{code:"Alt"},19:{code:"Pause"},20:{code:"CapsLock"},21:{code:"KanaMode"},22:{code:"HangulMode"},23:{code:"JunjaMode"},24:{code:"FinalMode"},25:{code:"KanjiMode"},27:{code:"Escape"},28:{code:"Convert"},29:{code:"NonConvert"},30:{code:"Accept"},31:{code:"ModeChange"},32:{code:"Space"},33:{code:"PageUp"},34:{code:"PageDown"},35:{code:"End"},36:{code:"Home"},37:{code:"ArrowLeft"},38:{code:"ArrowUp"},39:{code:"ArrowRight"},40:{code:"ArrowDown"},41:{code:"Select"},42:{code:"Print"},43:{code:"Execute"},44:{code:"PrintScreen"},45:{code:"Insert"},46:{code:"Delete"},47:{code:"Help"},48:{code:"Digit0",keyCap:"0"},49:{code:"Digit1",keyCap:"1"},50:{code:"Digit2",keyCap:"2"},51:{code:"Digit3",keyCap:"3"},52:{code:"Digit4",keyCap:"4"},53:{code:"Digit5",keyCap:"5"},54:{code:"Digit6",keyCap:"6"},55:{code:"Digit7",keyCap:"7"},56:{code:"Digit8",keyCap:"8"},57:{code:"Digit9",keyCap:"9"},65:{code:"KeyA",keyCap:"a"},66:{code:"KeyB",keyCap:"b"},67:{code:"KeyC",keyCap:"c"},68:{code:"KeyD",keyCap:"d"},69:{code:"KeyE",keyCap:"e"},70:{code:"KeyF",keyCap:"f"},71:{code:"KeyG",keyCap:"g"},72:{code:"KeyH",keyCap:"h"},73:{code:"KeyI",keyCap:"i"},74:{code:"KeyJ",keyCap:"j"},75:{code:"KeyK",keyCap:"k"},76:{code:"KeyL",keyCap:"l"},77:{code:"KeyM",keyCap:"m"},78:{code:"KeyN",keyCap:"n"},79:{code:"KeyO",keyCap:"o"},80:{code:"KeyP",keyCap:"p"},81:{code:"KeyQ",keyCap:"q"},82:{code:"KeyR",keyCap:"r"},83:{code:"KeyS",keyCap:"s"},84:{code:"KeyT",keyCap:"t"},85:{code:"KeyU",keyCap:"u"},86:{code:"KeyV",keyCap:"v"},87:{code:"KeyW",keyCap:"w"},88:{code:"KeyX",keyCap:"x"},89:{code:"KeyY",keyCap:"y"},90:{code:"KeyZ",keyCap:"z"},91:{code:"OSLeft",location:r},92:{code:"OSRight",location:i},93:{code:"ContextMenu"},95:{code:"Standby"},96:{code:"Numpad0",keyCap:"0",location:o},97:{code:"Numpad1",keyCap:"1",location:o},98:{code:"Numpad2",keyCap:"2",location:o},99:{code:"Numpad3",keyCap:"3",location:o},100:{code:"Numpad4",keyCap:"4",location:o},101:{code:"Numpad5",keyCap:"5",location:o},102:{code:"Numpad6",keyCap:"6",location:o},103:{code:"Numpad7",keyCap:"7",location:o},104:{code:"Numpad8",keyCap:"8",location:o},105:{code:"Numpad9",keyCap:"9",location:o},106:{code:"NumpadMultiply",keyCap:"*",location:o},107:{code:"NumpadAdd",keyCap:"+",location:o},108:{code:"NumpadComma",keyCap:",",location:o},109:{code:"NumpadSubtract",keyCap:"-",location:o},110:{code:"NumpadDecimal",keyCap:".",location:o},111:{code:"NumpadDivide",keyCap:"/",location:o},112:{code:"F1"},113:{code:"F2"},114:{code:"F3"},115:{code:"F4"},116:{code:"F5"},117:{code:"F6"},118:{code:"F7"},119:{code:"F8"},120:{code:"F9"},121:{code:"F10"},122:{code:"F11"},123:{code:"F12"},124:{code:"F13"},125:{code:"F14"},126:{code:"F15"},127:{code:"F16"},128:{code:"F17"},129:{code:"F18"},130:{code:"F19"},131:{code:"F20"},132:{code:"F21"},133:{code:"F22"},134:{code:"F23"},135:{code:"F24"},144:{code:"NumLock",location:o},145:{code:"ScrollLock"},160:{code:"ShiftLeft",location:r},161:{code:"ShiftRight",location:i},162:{code:"ControlLeft",location:r},163:{code:"ControlRight",location:i},164:{code:"AltLeft",location:r},165:{code:"AltRight",location:i},166:{code:"BrowserBack"},167:{code:"BrowserForward"},168:{code:"BrowserRefresh"},169:{code:"BrowserStop"},170:{code:"BrowserSearch"},171:{code:"BrowserFavorites"},172:{code:"BrowserHome"},173:{code:"VolumeMute"},174:{code:"VolumeDown"},175:{code:"VolumeUp"},176:{code:"MediaTrackNext"},177:{code:"MediaTrackPrevious"},178:{code:"MediaStop"},179:{code:"MediaPlayPause"},180:{code:"LaunchMail"},181:{code:"MediaSelect"},182:{code:"LaunchApp1"},183:{code:"LaunchApp2"},186:{code:"Semicolon",keyCap:";"},187:{code:"Equal",keyCap:"="},188:{code:"Comma",keyCap:","},189:{code:"Minus",keyCap:"-"},190:{code:"Period",keyCap:"."},191:{code:"Slash",keyCap:"/"},192:{code:"Backquote",keyCap:"`"},219:{code:"BracketLeft",keyCap:"["},220:{code:"Backslash",keyCap:"\\"},221:{code:"BracketRight",keyCap:"]"},222:{code:"Quote",keyCap:"'"},226:{code:"IntlBackslash",keyCap:"\\"},229:{code:"Process"},246:{code:"Attn"},247:{code:"CrSel"},248:{code:"ExSel"},249:{code:"EraseEof"},250:{code:"Play"},251:{code:"ZoomToggle"},254:{code:"Clear"}};u(h,"moz",{59:{code:"Semicolon",keyCap:";"},61:{code:"Equal",keyCap:"="},107:{code:"Equal",keyCap:"="},109:{code:"Minus",keyCap:"-"},187:{code:"NumpadAdd",keyCap:"+",location:o},189:{code:"NumpadSubtract",keyCap:"-",location:o}}),u(h,"moz-mac",{12:{code:"NumLock",location:o},173:{code:"Minus",keyCap:"-"}}),u(h,"moz-win",{173:{code:"Minus",keyCap:"-"}}),u(h,"chrome-mac",{93:{code:"OSRight",location:i}}),u(h,"safari",{3:{code:"Enter"},25:{code:"Tab"}}),u(h,"ios",{10:{code:"Enter",location:n}}),u(h,"safari-mac",{91:{code:"OSLeft",location:r},93:{code:"OSRight",location:i},229:{code:"KeyQ",keyCap:"Q"}});var d={};"cros"===s&&(d["U+00A0"]={code:"ShiftLeft",location:r},d["U+00A1"]={code:"ShiftRight",location:i},d["U+00A2"]={code:"ControlLeft",location:r},d["U+00A3"]={code:"ControlRight",location:i},d["U+00A4"]={code:"AltLeft",location:r},d["U+00A5"]={code:"AltRight",location:i}),"chrome-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"safari-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"ios"===s&&(d["U+0010"]={code:"Function"},d["U+001C"]={code:"ArrowLeft"},d["U+001D"]={code:"ArrowRight"},d["U+001E"]={code:"ArrowUp"},d["U+001F"]={code:"ArrowDown"},d["U+0001"]={code:"Home"},d["U+0004"]={code:"End"},d["U+000B"]={code:"PageUp"},d["U+000C"]={code:"PageDown"});var f=[];f[r]={16:{code:"ShiftLeft",location:r},17:{code:"ControlLeft",location:r},18:{code:"AltLeft",location:r}},f[i]={16:{code:"ShiftRight",location:i},17:{code:"ControlRight",location:i},18:{code:"AltRight",location:i}},f[o]={13:{code:"NumpadEnter",location:o}},u(f[o],"moz",{109:{code:"NumpadSubtract",location:o},107:{code:"NumpadAdd",location:o}}),u(f[r],"moz-mac",{224:{code:"OSLeft",location:r}}),u(f[i],"moz-mac",{224:{code:"OSRight",location:i}}),u(f[i],"moz-win",{91:{code:"OSRight",location:i}}),u(f[i],"mac",{93:{code:"OSRight",location:i}}),u(f[o],"chrome-mac",{12:{code:"NumLock",location:o}}),u(f[o],"safari-mac",{12:{code:"NumLock",location:o},187:{code:"NumpadAdd",location:o},189:{code:"NumpadSubtract",location:o},190:{code:"NumpadDecimal",location:o},191:{code:"NumpadDivide",location:o}});var p={ShiftLeft:{key:"Shift"},ShiftRight:{key:"Shift"},ControlLeft:{key:"Control"},ControlRight:{key:"Control"},AltLeft:{key:"Alt"},AltRight:{key:"Alt"},OSLeft:{key:"OS"},OSRight:{key:"OS"},NumpadEnter:{key:"Enter"},Space:{key:" "},Digit0:{key:"0",shiftKey:")"},Digit1:{key:"1",shiftKey:"!"},Digit2:{key:"2",shiftKey:"@"},Digit3:{key:"3",shiftKey:"#"},Digit4:{key:"4",shiftKey:"$"},Digit5:{key:"5",shiftKey:"%"},Digit6:{key:"6",shiftKey:"^"},Digit7:{key:"7",shiftKey:"&"},Digit8:{key:"8",shiftKey:"*"},Digit9:{key:"9",shiftKey:"("},KeyA:{key:"a",shiftKey:"A"},KeyB:{key:"b",shiftKey:"B"},KeyC:{key:"c",shiftKey:"C"},KeyD:{key:"d",shiftKey:"D"},KeyE:{key:"e",shiftKey:"E"},KeyF:{key:"f",shiftKey:"F"},KeyG:{key:"g",shiftKey:"G"},KeyH:{key:"h",shiftKey:"H"},KeyI:{key:"i",shiftKey:"I"},KeyJ:{key:"j",shiftKey:"J"},KeyK:{key:"k",shiftKey:"K"},KeyL:{key:"l",shiftKey:"L"},KeyM:{key:"m",shiftKey:"M"},KeyN:{key:"n",shiftKey:"N"},KeyO:{key:"o",shiftKey:"O"},KeyP:{key:"p",shiftKey:"P"},KeyQ:{key:"q",shiftKey:"Q"},KeyR:{key:"r",shiftKey:"R"},KeyS:{key:"s",shiftKey:"S"},KeyT:{key:"t",shiftKey:"T"},KeyU:{key:"u",shiftKey:"U"},KeyV:{key:"v",shiftKey:"V"},KeyW:{key:"w",shiftKey:"W"},KeyX:{key:"x",shiftKey:"X"},KeyY:{key:"y",shiftKey:"Y"},KeyZ:{key:"z",shiftKey:"Z"},Numpad0:{key:"0"},Numpad1:{key:"1"},Numpad2:{key:"2"},Numpad3:{key:"3"},Numpad4:{key:"4"},Numpad5:{key:"5"},Numpad6:{key:"6"},Numpad7:{key:"7"},Numpad8:{key:"8"},Numpad9:{key:"9"},NumpadMultiply:{key:"*"},NumpadAdd:{key:"+"},NumpadComma:{key:","},NumpadSubtract:{key:"-"},NumpadDecimal:{key:"."},NumpadDivide:{key:"/"},Semicolon:{key:";",shiftKey:":"},Equal:{key:"=",shiftKey:"+"},Comma:{key:",",shiftKey:"<"},Minus:{key:"-",shiftKey:"_"},Period:{key:".",shiftKey:">"},Slash:{key:"/",shiftKey:"?"},Backquote:{key:"`",shiftKey:"~"},BracketLeft:{key:"[",shiftKey:"{"},Backslash:{key:"\\",shiftKey:"|"},BracketRight:{key:"]",shiftKey:"}"},Quote:{key:"'",shiftKey:'"'},IntlBackslash:{key:"\\",shiftKey:"|"}};u(p,"mac",{OSLeft:{key:"Meta"},OSRight:{key:"Meta"}});var m={Esc:"Escape",Nonconvert:"NonConvert",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Menu:"ContextMenu",MediaNextTrack:"MediaTrackNext",MediaPreviousTrack:"MediaTrackPrevious",SelectMedia:"MediaSelect",HalfWidth:"Hankaku",FullWidth:"Zenkaku",RomanCharacters:"Romaji",Crsel:"CrSel",Exsel:"ExSel",Zoom:"ZoomToggle"},g=function(e,t){var n={};return Object.keys(e).forEach((function(r){var i=e[r];t in i&&(n[i[t]]=i)})),n}(h,"code");try{var v=t&&"location"in new KeyboardEvent("")}catch(b){}function y(e){var t="keyCode"in e?e.keyCode:"which"in e?e.which:0,n=function(){if(v||"keyLocation"in e){var n=v?e.location:e.keyLocation;if(n&&t in f[n])return f[n][t]}return"keyIdentifier"in e&&e.keyIdentifier in d?d[e.keyIdentifier]:t in h?h[t]:null}();if(!n)return null;var r=function(){var t=p[n.code];return t?e.shiftKey&&"shiftKey"in t?t.shiftKey:t.key:n.code}();return{code:n.code,key:r,location:n.location,keyCap:n.keyCap}}"KeyboardEvent"in e&&"defineProperty"in Object&&function(){function e(e,t,n){t in e||Object.defineProperty(e,t,n)}if(e(KeyboardEvent.prototype,"code",{get:function(){var e=y(this);return e?e.code:""}}),"key"in KeyboardEvent.prototype){var t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key");Object.defineProperty(KeyboardEvent.prototype,"key",{get:function(){var e=t.get.call(this);return m.hasOwnProperty(e)?m[e]:e}})}e(KeyboardEvent.prototype,"key",{get:function(){var e=y(this);return e&&"key"in e?e.key:"Unidentified"}}),e(KeyboardEvent.prototype,"location",{get:function(){var e=y(this);return e&&"location"in e?e.location:n}}),e(KeyboardEvent.prototype,"locale",{get:function(){return""}})}(),"queryKeyCap"in e.KeyboardEvent||(e.KeyboardEvent.queryKeyCap=function(e,t){if(e=String(e),!g.hasOwnProperty(e))return"Undefined";if(t&&"en-us"!==String(t).toLowerCase())throw Error("Unsupported locale");var n=g[e];return n.keyCap||n.code||"Undefined"}),e.identifyKey=function(e){if(!("code"in e)){var t=y(e);e.code=t?t.code:"",e.key=t&&"key"in t?t.key:"Unidentified",e.location="location"in e?e.location:"keyLocation"in e?e.keyLocation:t&&"location"in t?t.location:n,e.locale=""}}}(window)},function(e,t){e.exports=AFRAME.registerComponent("touch-controls",{schema:{enabled:{default:!0},reverseEnabled:{default:!0}},init:function(){this.dVelocity=new THREE.Vector3,this.bindMethods(),this.direction=0},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("touchstart",this.onTouchStart),t.addEventListener("touchend",this.onTouchEnd)):e.addEventListener("render-target-loaded",this.addEventListeners.bind(this))},removeEventListeners:function(){const e=this.el.sceneEl&&this.el.sceneEl.canvas;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchend",this.onTouchEnd))},isVelocityActive:function(){return this.data.enabled&&!!this.direction},getVelocityDelta:function(){return this.dVelocity.z=this.direction,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},onTouchStart:function(e){this.direction=-1,this.data.reverseEnabled&&2===e.touches.length&&(this.direction=1),e.preventDefault()},onTouchEnd:function(e){this.direction=0,e.preventDefault()}})},function(e,t){e.exports=AFRAME.registerComponent("movement-controls",{dependencies:["rotation"],schema:{enabled:{default:!0},controls:{default:["gamepad","trackpad","keyboard","touch"]},speed:{default:.3,min:0},fly:{default:!1},constrainToNavMesh:{default:!1},camera:{default:"[movement-controls] [camera]",type:"selector"}},init:function(){const e=this.el;this.velocityCtrl=null,this.velocity=new THREE.Vector3,this.heading=new THREE.Quaternion,this.navGroup=null,this.navNode=null,e.sceneEl.hasLoaded?this.injectControls():e.sceneEl.addEventListener("loaded",this.injectControls.bind(this))},update:function(e){const t=this.el,n=this.data,r=t.sceneEl.systems.nav;t.sceneEl.hasLoaded&&this.injectControls(),r&&n.constrainToNavMesh!==e.constrainToNavMesh&&(n.constrainToNavMesh?r.addAgent(this):r.removeAgent(this))},injectControls:function(){const e=this.data;var t;for(let n=0;n<e.controls.length;n++)t=e.controls[n]+"-controls",this.el.components[t]||this.el.setAttribute(t,"")},updateNavLocation:function(){this.navGroup=null,this.navNode=null},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){if(!i)return;const o=this.el,a=this.data;if(!a.enabled)return;this.updateVelocityCtrl();const s=this.velocityCtrl,l=this.velocity;if(s)if(i/1e3>.2?l.set(0,0,0):this.updateVelocity(i),a.constrainToNavMesh&&!1!==s.isNavMeshConstrained){if(l.lengthSq()<1e-5)return;e.copy(o.object3D.position),t.copy(l).multiplyScalar(i/1e3).add(e);const r=o.sceneEl.systems.nav;this.navGroup=null===this.navGroup?r.getGroup(e):this.navGroup,this.navNode=this.navNode||r.getNode(e,this.navGroup),this.navNode=r.clampStep(e,t,this.navGroup,this.navNode,n),o.object3D.position.copy(n)}else o.hasAttribute("velocity")?o.setAttribute("velocity",l):(o.object3D.position.x+=l.x*i/1e3,o.object3D.position.y+=l.y*i/1e3,o.object3D.position.z+=l.z*i/1e3)}}(),updateVelocityCtrl:function(){const e=this.data;if(e.enabled){for(let t=0,n=e.controls.length;t<n;t++){const n=this.el.components[e.controls[t]+"-controls"];if(n&&n.isVelocityActive())return void(this.velocityCtrl=n)}this.velocityCtrl=null}},updateVelocity:function(){const e=new THREE.Vector2,t=new THREE.Quaternion;return function(n){let r;const i=this.el,o=this.velocityCtrl,a=this.velocity,s=this.data;if(o){if(!o.getVelocityDelta){if(o.getVelocity)return void a.copy(o.getVelocity());if(o.getPositionDelta)return void a.copy(o.getPositionDelta(n).multiplyScalar(1e3/n));throw new Error("Incompatible movement controls: ",o)}r=o.getVelocityDelta(n)}if(i.hasAttribute("velocity")&&!s.constrainToNavMesh&&a.copy(this.el.getAttribute("velocity")),r&&s.enabled){const n=s.camera;t.copy(n.object3D.quaternion),t.premultiply(i.object3D.quaternion),r.applyQuaternion(t);const o=r.length();s.fly?(a.copy(r),a.multiplyScalar(16.66667*this.data.speed)):(e.set(r.x,r.z),e.setLength(o*this.data.speed*16.66667),a.x=e.x,a.z=e.y)}}}()})},function(e,t){e.exports=AFRAME.registerComponent("trackpad-controls",{schema:{enabled:{default:!0},enableNegX:{default:!0},enablePosX:{default:!0},enableNegZ:{default:!0},enablePosZ:{default:!0},mode:{default:"touch",oneOf:["swipe","touch","press"]}},init:function(){this.dVelocity=new THREE.Vector3,this.zVel=0,this.xVel=0,this.bindMethods()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.data,t=this.el.sceneEl;switch(t.addEventListener("axismove",this.onAxisMove),e.mode){case"swipe":case"touch":t.addEventListener("trackpadtouchstart",this.onTouchStart),t.addEventListener("trackpadtouchend",this.onTouchEnd);break;case"press":t.addEventListener("trackpaddown",this.onTouchStart),t.addEventListener("trackpadup",this.onTouchEnd)}},removeEventListeners:function(){const e=this.el.sceneEl;e.removeEventListener("axismove",this.onAxisMove),e.removeEventListener("trackpadtouchstart",this.onTouchStart),e.removeEventListener("trackpadtouchend",this.onTouchEnd),e.removeEventListener("trackpaddown",this.onTouchStart),e.removeEventListener("trackpadup",this.onTouchEnd)},isVelocityActive:function(){return this.data.enabled&&this.isMoving},getVelocityDelta:function(){return this.dVelocity.z=this.isMoving?-this.zVel:1,this.dVelocity.x=this.isMoving?this.xVel:1,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onAxisMove=this.onAxisMove.bind(this)},onTouchStart:function(e){switch(this.data.mode){case"swipe":this.canRecordAxis=!0,this.startingAxisData=[];break;case"touch":case"press":this.isMoving=!0}e.preventDefault()},onTouchEnd:function(e){"swipe"==this.data.mode&&(this.startingAxisData=[]),this.isMoving=!1,e.preventDefault()},onAxisMove:function(e){switch(this.data.mode){case"swipe":return this.handleSwipeAxis(e);case"touch":case"press":return this.handleTouchAxis(e)}},handleSwipeAxis:function(e){const t=this.data,n=e.detail.axis;if(0===this.startingAxisData.length&&this.canRecordAxis&&(this.canRecordAxis=!1,this.startingAxisData[0]=n[0],this.startingAxisData[1]=n[1]),this.startingAxisData.length>0){let e=0,r=0;t.enableNegX&&n[0]<this.startingAxisData[0]&&(e=-1),t.enablePosX&&n[0]>this.startingAxisData[0]&&(e=1),t.enablePosZ&&n[1]>this.startingAxisData[1]&&(r=-1),t.enableNegZ&&n[1]<this.startingAxisData[1]&&(r=1);const i=Math.abs(this.startingAxisData[1]-n[1]);Math.abs(this.startingAxisData[0]-n[0])>i?(this.zVel=0,this.xVel=e,this.isMoving=!0):(this.xVel=0,this.zVel=r,this.isMoving=!0)}},handleTouchAxis:function(e){const t=this.data,n=e.detail.axis;let r=0,i=0;t.enableNegX&&n[0]<0&&(r=-1),t.enablePosX&&n[0]>0&&(r=1),t.enablePosZ&&n[1]>0&&(i=-1),t.enableNegZ&&n[1]<0&&(i=1),Math.abs(n[0])>Math.abs(n[1])?(this.zVel=0,this.xVel=r):(this.xVel=0,this.zVel=i)}})},function(e,t,n){n(331),n(332),n(334),n(336),n(338)},function(e,t){const n={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function r(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}e.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(n)},repetitions:{default:1/0,min:0},timeScale:{default:1}},init:function(){this.model=null,this.mixer=null,this.activeActions=[];const e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",e=>{this.load(e.detail.model)})},load:function(e){const t=this.el;this.model=e,this.mixer=new THREE.AnimationMixer(e),this.mixer.addEventListener("loop",e=>{t.emit("animation-loop",{action:e.action,loopDelta:e.loopDelta})}),this.mixer.addEventListener("finished",e=>{t.emit("animation-finished",{action:e.action,direction:e.direction})}),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(e){if(!e)return;const t=this.data,r=AFRAME.utils.diff(t,e);if("clip"in r)return this.stopAction(),void(t.clip&&this.playAction());this.activeActions.forEach(e=>{"duration"in r&&t.duration&&e.setDuration(t.duration),"clampWhenFinished"in r&&(e.clampWhenFinished=t.clampWhenFinished),("loop"in r||"repetitions"in r)&&e.setLoop(n[t.loop],t.repetitions),"timeScale"in r&&e.setEffectiveTimeScale(t.timeScale)})},stopAction:function(){const e=this.data;for(let t=0;t<this.activeActions.length;t++)e.crossFadeDuration?this.activeActions[t].fadeOut(e.crossFadeDuration):this.activeActions[t].stop();this.activeActions.length=0},playAction:function(){if(!this.mixer)return;const e=this.model,t=this.data,i=e.animations||(e.geometry||{}).animations||[];if(!i.length)return;const o=(a=t.clip,new RegExp("^"+a.split(/\*+/).map(r).join(".*")+"$"));var a;for(let r,s=0;r=i[s];s++)if(r.name.match(o)){const i=this.mixer.clipAction(r,e);i.enabled=!0,i.clampWhenFinished=t.clampWhenFinished,t.duration&&i.setDuration(t.duration),1!==t.timeScale&&i.setEffectiveTimeScale(t.timeScale),i.setLoop(n[t.loop],t.repetitions).fadeIn(t.crossFadeDuration).play(),this.activeActions.push(i)}},tick:function(e,t){this.mixer&&!isNaN(t)&&this.mixer.update(t/1e3)}})},function(e,t,n){THREE.ColladaLoader=n(333),e.exports.Component=AFRAME.registerComponent("collada-model-legacy",{schema:{type:"asset"},init:function(){this.model=null,this.loader=new THREE.ColladaLoader},update:function(){var e=this,t=this.el,n=this.data,r=this.el.sceneEl.systems.renderer;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene,e.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&r.applyColorCorrection(t.color),t.map&&r.applyColorCorrection(t.map),t.emissive&&r.applyColorCorrection(t.emissive),t.emissiveMap&&r.applyColorCorrection(t.emissiveMap)}})),t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"collada",model:e.model})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.ColladaLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager},THREE.ColladaLoader.prototype={constructor:THREE.ColladaLoader,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=void 0===i.path?THREE.LoaderUtils.extractUrlBase(e):i.path,a=new THREE.FileLoader(i.manager);a.setPath(i.path),a.load(e,(function(e){t(i.parse(e,o))}),n,r)},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},options:{set convertUpAxis(e){console.warn("THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.")}},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){function n(e,t){for(var n=[],r=e.childNodes,i=0,o=r.length;i<o;i++){var a=r[i];a.nodeName===t&&n.push(a)}return n}function r(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=t[r];return n}function i(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseFloat(t[r]);return n}function o(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseInt(t[r]);return n}function a(e){return e.substring(1)}function s(e){return 0===Object.keys(e).length}function l(e){return void 0!==e&&!0===e.hasAttribute("meter")?parseFloat(e.getAttribute("meter")):1}function c(e){return void 0!==e?e.textContent:"Y_UP"}function u(e,t,r,i){var o=n(e,t)[0];if(void 0!==o)for(var a=n(o,r),s=0;s<a.length;s++)i(a[s])}function h(e,t){for(var n in e){e[n].build=t(e[n])}}function d(e,t){return void 0!==e.build||(e.build=t(e)),e.build}function f(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=a(i.getAttribute("source")),s=i.getAttribute("semantic");t.inputs[s]=o}}return t}function p(e){var t={},n=e.getAttribute("target").split("/"),r=n.shift(),i=n.shift(),o=-1!==i.indexOf("("),s=-1!==i.indexOf(".");if(s)n=i.split("."),i=n.shift(),t.member=n.shift();else if(o){var l=i.split("(");i=l.shift();for(var c=0;c<l.length;c++)l[c]=parseInt(l[c].replace(/\)/,""));t.indices=l}return t.id=r,t.sid=i,t.arraySyntax=o,t.memberSyntax=s,t.sampler=a(e.getAttribute("source")),t}function m(e){var t=[],n=e.channels,r=e.samplers,i=e.sources;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=r[a.sampler],l=s.inputs.INPUT,c=s.inputs.OUTPUT;x(v(a,i[l],i[c]),t)}return t}function g(e){return d(qe.animations[e],m)}function v(e,t,n){var r,i,o,a,s,l,c=qe.nodes[e.id],u=Ie(c.id),h=c.transforms[e.sid],d=c.matrix.clone().transpose(),f={};switch(h){case"matrix":for(o=0,a=t.array.length;o<a;o++)if(r=t.array[o],i=o*n.stride,void 0===f[r]&&(f[r]={}),!0===e.arraySyntax){var p=n.array[i],m=e.indices[0]+4*e.indices[1];f[r][m]=p}else for(s=0,l=n.stride;s<l;s++)f[r][s]=n.array[i+s];break;case"translate":case"rotate":case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',h)}var g=function(e,t){var n=[];for(var r in e)n.push({time:parseFloat(r),value:e[r]});n.sort((function(e,t){return e.time-t.time}));for(var i=0;i<16;i++)_(n,i,t.elements[i]);return n}(f,d);return{name:u.uuid,keyframes:g}}var y=new THREE.Vector3,b=new THREE.Vector3,w=new THREE.Quaternion;function x(e,t){for(var n=e.keyframes,r=e.name,i=[],o=[],a=[],s=[],l=0,c=n.length;l<c;l++){var u=n[l],h=u.time,d=u.value;Ae.fromArray(d).transpose(),Ae.decompose(y,w,b),i.push(h),o.push(y.x,y.y,y.z),a.push(w.x,w.y,w.z,w.w),s.push(b.x,b.y,b.z)}return o.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".position",i,o)),a.length>0&&t.push(new THREE.QuaternionKeyframeTrack(r+".quaternion",i,a)),s.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".scale",i,s)),t}function _(e,t,n){var r,i,o,a=!0;for(i=0,o=e.length;i<o;i++)void 0===(r=e[i]).value[t]?r.value[t]=null:a=!1;if(!0===a)for(i=0,o=e.length;i<o;i++)(r=e[i]).value[t]=n;else!function(e,t){for(var n,r,i=0,o=e.length;i<o;i++){var a=e[i];if(null===a.value[t]){if(n=E(e,i,t),r=A(e,i,t),null===n){a.value[t]=r.value[t];continue}if(null===r){a.value[t]=n.value[t];continue}S(a,n,r,t)}}}(e,t)}function E(e,t,n){for(;t>=0;){var r=e[t];if(null!==r.value[n])return r;t--}return null}function A(e,t,n){for(;t<e.length;){var r=e[t];if(null!==r.value[n])return r;t++}return null}function S(e,t,n,r){n.time-t.time!==0?e.value[r]=(e.time-t.time)*(n.value[r]-t.value[r])/(n.time-t.time)+t.value[r]:e.value[r]=t.value[r]}function M(e){for(var t=[],n=e.name,r=e.end-e.start||-1,i=e.animations,o=0,a=i.length;o<a;o++)for(var s=g(i[o]),l=0,c=s.length;l<c;l++)t.push(s[l]);return new THREE.AnimationClip(n,r,t)}function T(e){return d(qe.clips[e],M)}function C(e){for(var t={sources:{}},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=i(o.textContent);break;case"source":var a=o.getAttribute("id");t.sources[a]=ie(o);break;case"joints":t.joints=O(o);break;case"vertex_weights":t.vertexWeights=R(o)}}return t}function O(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=i.getAttribute("semantic"),s=a(i.getAttribute("source"));t.inputs[o]=s}}return t}function R(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=i.getAttribute("semantic"),l=a(i.getAttribute("source")),c=parseInt(i.getAttribute("offset"));t.inputs[s]={id:l,offset:c};break;case"vcount":t.vcount=o(i.textContent);break;case"v":t.v=o(i.textContent)}}return t}function k(e){var t={id:e.id},n=qe.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){var t,n,r,i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,a=e.vertexWeights,s=a.vcount,l=a.v,c=a.inputs.JOINT.offset,u=a.inputs.WEIGHT.offset,h=e.sources[e.joints.inputs.JOINT],d=e.sources[e.joints.inputs.INV_BIND_MATRIX],f=o[a.inputs.WEIGHT.id].array,p=0;for(t=0,r=s.length;t<r;t++){var m=s[t],g=[];for(n=0;n<m;n++){var v=l[p+c],y=l[p+u],b=f[y];g.push({index:v,weight:b}),p+=2}for(g.sort(E),n=0;n<4;n++){var w=g[n];void 0!==w?(i.indices.array.push(w.index),i.weights.array.push(w.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}e.bindShapeMatrix?i.bindMatrix=(new THREE.Matrix4).fromArray(e.bindShapeMatrix).transpose():i.bindMatrix=(new THREE.Matrix4).identity();for(t=0,r=h.array.length;t<r;t++){var x=h.array[t],_=(new THREE.Matrix4).fromArray(d.array,t*d.stride).transpose();i.joints.push({name:x,boneInverse:_})}return i;function E(e,t){return t.weight-e.weight}}(e.skin),n.sources.skinIndices=t.skin.indices,n.sources.skinWeights=t.skin.weights),t}function P(e){return void 0!==e.build?e.build:e.init_from}function L(e){var t=qe.images[e];return void 0!==t?d(t,P):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",e),null)}function D(e){for(var t={surfaces:{},samplers:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"newparam":I(i,t);break;case"technique":t.technique=B(i);break;case"extra":t.extra=G(i)}}return t}function I(e,t){for(var n=e.getAttribute("sid"),r=0,i=e.childNodes.length;r<i;r++){var o=e.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"surface":t.surfaces[n]=N(o);break;case"sampler2D":t.samplers[n]=j(o)}}}function N(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"init_from":t.init_from=i.textContent}}return t}function j(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"source":t.source=i.textContent}}return t}function B(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=i.nodeName,t.parameters=F(i)}}return t}function F(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":t[i.nodeName]=z(i);break;case"transparent":t[i.nodeName]={opaque:i.getAttribute("opaque"),data:z(i)}}}return t}function z(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":t[o.nodeName]=i(o.textContent);break;case"float":t[o.nodeName]=parseFloat(o.textContent);break;case"texture":t[o.nodeName]={id:o.getAttribute("texture"),extra:H(o)}}}return t}function H(e){for(var t={technique:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"extra":U(i,t)}}return t}function U(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":V(i,t)}}}function V(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[i.nodeName]=parseFloat(i.textContent);break;case"wrapU":case"wrapV":"TRUE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=1:"FALSE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=0:t.technique[i.nodeName]=parseInt(i.textContent)}}}function G(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":t.technique=W(i)}}return t}function W(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"double_sided":t[i.nodeName]=parseInt(i.textContent)}}return t}function q(e){return e}function X(e){var t,n,r=(t=e.url,d(qe.effects[t],q)),i=r.profile.technique,o=r.profile.extra;switch(i.type){case"phong":case"blinn":n=new THREE.MeshPhongMaterial;break;case"lambert":n=new THREE.MeshLambertMaterial;break;default:n=new THREE.MeshBasicMaterial}function a(e){var t=r.profile.samplers[e.id],n=null;void 0!==t?n=L(r.profile.surfaces[t.source].init_from):(console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),n=L(e.id));if(null!==n){var i=function(e){var t,n=e.slice(2+(e.lastIndexOf(".")-1>>>0));switch(n=n.toLowerCase()){case"tga":t=ze;break;default:t=Ue}return t}(n);if(void 0!==i){var o=i.load(n),a=e.extra;if(void 0!==a&&void 0!==a.technique&&!1===s(a.technique)){var l=a.technique;o.wrapS=l.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.wrapT=l.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.offset.set(l.offsetU||0,l.offsetV||0),o.repeat.set(l.repeatU||1,l.repeatV||1)}else o.wrapS=THREE.RepeatWrapping,o.wrapT=THREE.RepeatWrapping;return o}return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",n),null}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}n.name=e.name;var l=i.parameters;for(var c in l){var u=l[c];switch(c){case"diffuse":u.color&&n.color.fromArray(u.color),u.texture&&(n.map=a(u.texture));break;case"specular":u.color&&n.specular&&n.specular.fromArray(u.color),u.texture&&(n.specularMap=a(u.texture));break;case"bump":u.texture&&(n.normalMap=a(u.texture));break;case"ambient":u.texture&&(n.lightMap=a(u.texture));break;case"shininess":u.float&&n.shininess&&(n.shininess=u.float);break;case"emission":u.color&&n.emissive&&n.emissive.fromArray(u.color),u.texture&&(n.emissiveMap=a(u.texture))}}var h=l.transparent,f=l.transparency;if(void 0===f&&h&&(f={float:1}),void 0===h&&f&&(h={opaque:"A_ONE",data:{color:[1,1,1,1]}}),h&&f)if(h.data.texture)n.transparent=!0;else{var p=h.data.color;switch(h.opaque){case"A_ONE":n.opacity=p[3]*f.float;break;case"RGB_ZERO":n.opacity=1-p[0]*f.float;break;case"A_ZERO":n.opacity=1-p[3]*f.float;break;case"RGB_ONE":n.opacity=p[0]*f.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',h.opaque)}n.opacity<1&&(n.transparent=!0)}return void 0!==o&&void 0!==o.technique&&1===o.technique.double_sided&&(n.side=THREE.DoubleSide),n}function Y(e){return d(qe.materials[e],X)}function K(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];switch(n.nodeName){case"technique_common":return Q(n)}}return{}}function Q(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"perspective":case"orthographic":t.technique=r.nodeName,t.parameters=Z(r)}}return t}function Z(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[r.nodeName]=parseFloat(r.textContent)}}return t}function J(e){var t;switch(e.optics.technique){case"perspective":t=new THREE.PerspectiveCamera(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":var n=e.optics.parameters.ymag,r=e.optics.parameters.xmag,i=e.optics.parameters.aspect_ratio;r=void 0===r?n*i:r,n=void 0===n?r/i:n,r*=.5,n*=.5,t=new THREE.OrthographicCamera(-r,r,n,-n,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new THREE.PerspectiveCamera}return t.name=e.name,t}function $(e){var t=qe.cameras[e];return void 0!==t?d(t,J):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",e),null)}function ee(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=i.nodeName,t.parameters=te(i)}}return t}function te(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":var a=i(o.textContent);t.color=(new THREE.Color).fromArray(a);break;case"falloff_angle":t.falloffAngle=parseFloat(o.textContent);break;case"quadratic_attenuation":var s=parseFloat(o.textContent);t.distance=s?Math.sqrt(1/s):0}}return t}function ne(e){var t;switch(e.technique){case"directional":t=new THREE.DirectionalLight;break;case"point":t=new THREE.PointLight;break;case"spot":t=new THREE.SpotLight;break;case"ambient":t=new THREE.AmbientLight}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function re(e){var t=qe.lights[e];return void 0!==t?d(t,ne):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",e),null)}function ie(e){for(var t={array:[],stride:3},o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(1===a.nodeType)switch(a.nodeName){case"float_array":t.array=i(a.textContent);break;case"Name_array":t.array=r(a.textContent);break;case"technique_common":var s=n(a,"accessor")[0];void 0!==s&&(t.stride=parseInt(s.getAttribute("stride")))}}return t}function oe(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];1===r.nodeType&&(t[r.getAttribute("semantic")]=a(r.getAttribute("source")))}return t}function ae(e){for(var t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=a(i.getAttribute("source")),l=i.getAttribute("semantic"),c=parseInt(i.getAttribute("offset")),u=parseInt(i.getAttribute("set")),h=u>0?l+u:l;t.inputs[h]={id:s,offset:c},t.stride=Math.max(t.stride,c+1),"TEXCOORD"===l&&(t.hasUV=!0);break;case"vcount":t.vcount=o(i.textContent);break;case"p":t.p=o(i.textContent)}}return t}function se(e){for(var t=0,n=0,r=e.length;n<r;n++){!0===e[n].hasUV&&t++}t>0&&t<e.length&&(e.uvsNeedsFix=!0)}function le(e){var t={},n=e.sources,r=e.vertices,i=e.primitives;if(0===i.length)return{};var o=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];void 0===t[r.type]&&(t[r.type]=[]),t[r.type].push(r)}return t}(i);for(var a in o){var s=o[a];se(s),t[a]=ce(s,n,r)}return t}function ce(e,t,n){for(var r={},i={array:[],stride:0},o={array:[],stride:0},a={array:[],stride:0},s={array:[],stride:0},l={array:[],stride:0},c=[],u=4,h=[],d=4,f=new THREE.BufferGeometry,p=[],m=0,g=0;g<e.length;g++){var v=e[g],y=v.inputs,b=0;switch(v.type){case"lines":case"linestrips":b=2*v.count;break;case"triangles":b=3*v.count;break;case"polylist":for(var w=0;w<v.count;w++){var x=v.vcount[w];switch(x){case 3:b+=3;break;case 4:b+=6;break;default:b+=3*(x-2)}}break;default:console.warn("THREE.ColladaLoader: Unknow primitive type:",v.type)}for(var _ in f.addGroup(m,b,g),m+=b,v.material&&p.push(v.material),y){var E=y[_];switch(_){case"VERTEX":for(var A in n){var S=n[A];switch(A){case"POSITION":var M=i.array.length;if(ue(v,t[S],E.offset,i.array),i.stride=t[S].stride,t.skinWeights&&t.skinIndices&&(ue(v,t.skinIndices,E.offset,c),ue(v,t.skinWeights,E.offset,h)),!1===v.hasUV&&!0===e.uvsNeedsFix){b=(i.array.length-M)/i.stride;for(var T=0;T<b;T++)a.array.push(0,0)}break;case"NORMAL":ue(v,t[S],E.offset,o.array),o.stride=t[S].stride;break;case"COLOR":ue(v,t[S],E.offset,l.array),l.stride=t[S].stride;break;case"TEXCOORD":ue(v,t[S],E.offset,a.array),a.stride=t[S].stride;break;case"TEXCOORD1":ue(v,t[S],E.offset,s.array),a.stride=t[S].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',A)}}break;case"NORMAL":ue(v,t[E.id],E.offset,o.array),o.stride=t[E.id].stride;break;case"COLOR":ue(v,t[E.id],E.offset,l.array),l.stride=t[E.id].stride;break;case"TEXCOORD":ue(v,t[E.id],E.offset,a.array),a.stride=t[E.id].stride;break;case"TEXCOORD1":ue(v,t[E.id],E.offset,s.array),s.stride=t[E.id].stride}}}return i.array.length>0&&f.addAttribute("position",new THREE.Float32BufferAttribute(i.array,i.stride)),o.array.length>0&&f.addAttribute("normal",new THREE.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&f.addAttribute("color",new THREE.Float32BufferAttribute(l.array,l.stride)),a.array.length>0&&f.addAttribute("uv",new THREE.Float32BufferAttribute(a.array,a.stride)),s.array.length>0&&f.addAttribute("uv2",new THREE.Float32BufferAttribute(s.array,s.stride)),c.length>0&&f.addAttribute("skinIndex",new THREE.Float32BufferAttribute(c,u)),h.length>0&&f.addAttribute("skinWeight",new THREE.Float32BufferAttribute(h,d)),r.data=f,r.type=e[0].type,r.materialKeys=p,r}function ue(e,t,n,r){var i=e.p,o=e.stride,a=e.vcount;function s(e){for(var t=i[e+n]*c,o=t+c;t<o;t++)r.push(l[t])}var l=t.array,c=t.stride;if(void 0!==e.vcount)for(var u=0,h=0,d=a.length;h<d;h++){var f=a[h];if(4===f){var p=u+1*o,m=u+2*o,g=u+3*o;s(u+0*o),s(p),s(g),s(p),s(m),s(g)}else if(3===f){p=u+1*o,m=u+2*o;s(u+0*o),s(p),s(m)}else if(f>4)for(var v=1,y=f-2;v<=y;v++){p=u+o*v,m=u+o*(v+1);s(u+0*o),s(p),s(m)}u+=o*f}else for(h=0,d=i.length;h<d;h+=o)s(h)}function he(e){return d(qe.geometries[e],le)}function de(e){return void 0!==e.build?e.build:e}function fe(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"joint":t.joints[r.getAttribute("sid")]=pe(r);break;case"link":t.links.push(ge(r))}}}function pe(e){for(var t,n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"prismatic":case"revolute":t=me(r)}}return t}function me(e,t){t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new THREE.Vector3,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var o=i(r.textContent);t.axis.fromArray(o);break;case"limits":var a=r.getElementsByTagName("max")[0],s=r.getElementsByTagName("min")[0];t.limits.max=parseFloat(a.textContent),t.limits.min=parseFloat(s.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ge(e){for(var t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"attachment_full":t.attachments.push(ve(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ve(e){for(var t={joint:e.getAttribute("joint").split("/").pop(),transforms:[],links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"link":t.links.push(ge(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ye(e){var t={type:e.nodeName},n=i(e.textContent);switch(t.type){case"matrix":t.obj=new THREE.Matrix4,t.obj.fromArray(n).transpose();break;case"translate":t.obj=new THREE.Vector3,t.obj.fromArray(n);break;case"rotate":t.obj=new THREE.Vector3,t.obj.fromArray(n),t.angle=THREE.Math.degToRad(n[3])}return t}function be(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":we(r,t)}}}function we(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"inertia":t.inertia=i(r.textContent);break;case"mass":t.mass=i(r.textContent)[0]}}}function xe(e){for(var t={target:e.getAttribute("target").split("/").pop()},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var i=r.getElementsByTagName("param")[0];t.axis=i.textContent;var o=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=o.substr(0,o.length-1)}}return t}function _e(e){return void 0!==e.build?e.build:e}function Ee(e){for(var t=[],n=Be.querySelector('[id="'+e.id+'"]'),r=0;r<n.childNodes.length;r++){var o=n.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"matrix":var a=i(o.textContent),s=(new THREE.Matrix4).fromArray(a).transpose();t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:s});break;case"translate":case"scale":a=i(o.textContent);var l=(new THREE.Vector3).fromArray(a);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l});break;case"rotate":a=i(o.textContent),l=(new THREE.Vector3).fromArray(a);var c=THREE.Math.degToRad(a[3]);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l,angle:c})}}return t}var Ae=new THREE.Matrix4,Se=new THREE.Vector3;function Me(e){for(var t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new THREE.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"node":t.nodes.push(r.getAttribute("id")),Me(r);break;case"instance_camera":t.instanceCameras.push(a(r.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(Te(r));break;case"instance_light":t.instanceLights.push(a(r.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(Te(r));break;case"instance_node":t.instanceNodes.push(a(r.getAttribute("url")));break;case"matrix":var o=i(r.textContent);t.matrix.multiply(Ae.fromArray(o).transpose()),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"translate":o=i(r.textContent);Se.fromArray(o),t.matrix.multiply(Ae.makeTranslation(Se.x,Se.y,Se.z)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"rotate":o=i(r.textContent);var s=THREE.Math.degToRad(o[3]);t.matrix.multiply(Ae.makeRotationAxis(Se.fromArray(o),s)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"scale":o=i(r.textContent);t.matrix.scale(Se.fromArray(o)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"extra":break;default:console.log(r)}}return De(t.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",t.id):qe.nodes[t.id]=t,t}function Te(e){for(var t={id:a(e.getAttribute("url")),materials:{},skeletons:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"bind_material":for(var i=r.getElementsByTagName("instance_material"),o=0;o<i.length;o++){var s=i[o],l=s.getAttribute("symbol"),c=s.getAttribute("target");t.materials[l]=a(c)}break;case"skeleton":t.skeletons.push(a(r.textContent))}}return t}function Ce(e,t){var n,r,i,o=[],a=[];for(n=0;n<e.length;n++){var s=e[n];if(De(s))Oe(Ie(s),t,o);else if(i=s,void 0!==qe.visualScenes[i])for(var l=qe.visualScenes[s].children,c=0;c<l.length;c++){var u=l[c];if("JOINT"===u.type)Oe(Ie(u.id),t,o)}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",s)}for(n=0;n<t.length;n++)for(c=0;c<o.length;c++)if((r=o[c]).bone.name===t[n].name){a[n]=r,r.processed=!0;break}for(n=0;n<o.length;n++)!1===(r=o[n]).processed&&(a.push(r),r.processed=!0);var h=[],d=[];for(n=0;n<a.length;n++)r=a[n],h.push(r.bone),d.push(r.boneInverse);return new THREE.Skeleton(h,d)}function Oe(e,t,n){e.traverse((function(e){if(!0===e.isBone){for(var r,i=0;i<t.length;i++){var o=t[i];if(o.name===e.name){r=o.boneInverse;break}}void 0===r&&(r=new THREE.Matrix4),n.push({bone:e,boneInverse:r,processed:!1})}}))}function Re(e){for(var t,n=[],r=e.matrix,i=e.nodes,o=e.type,a=e.instanceCameras,s=e.instanceControllers,l=e.instanceLights,c=e.instanceGeometries,u=e.instanceNodes,h=0,f=i.length;h<f;h++)n.push(Ie(i[h]));for(h=0,f=a.length;h<f;h++){var p=$(a[h]);null!==p&&n.push(p.clone())}for(h=0,f=s.length;h<f;h++)for(var m=s[h],g=(t=m.id,d(qe.controllers[t],k)),v=Le(he(g.id),m.materials),y=Ce(m.skeletons,g.skin.joints),b=0,w=v.length;b<w;b++){var x;(x=v[b]).isSkinnedMesh&&(x.bind(y,g.skin.bindMatrix),x.normalizeSkinWeights()),n.push(x)}for(h=0,f=l.length;h<f;h++){var _=re(l[h]);null!==_&&n.push(_.clone())}for(h=0,f=c.length;h<f;h++)for(b=0,w=(v=Le(he((m=c[h]).id),m.materials)).length;b<w;b++)n.push(v[b]);for(h=0,f=u.length;h<f;h++)n.push(Ie(u[h]).clone());if(0===i.length&&1===n.length)x=n[0];else{x="JOINT"===o?new THREE.Bone:new THREE.Group;for(h=0;h<n.length;h++)x.add(n[h])}return""===x.name&&(x.name="JOINT"===o?e.sid:e.name),x.matrix.copy(r),x.matrix.decompose(x.position,x.quaternion,x.scale),x}var ke=new THREE.MeshBasicMaterial({color:16711935});function Pe(e,t){for(var n=[],r=0,i=e.length;r<i;r++){var o=t[e[r]];void 0===o?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",e[r]),n.push(ke)):n.push(Y(o))}return n}function Le(e,t){var n=[];for(var r in e){var i=e[r],o=Pe(i.materialKeys,t);0===o.length&&("lines"===r||"linestrips"===r?o.push(new THREE.LineBasicMaterial):o.push(new THREE.MeshPhongMaterial));var a=void 0!==i.data.attributes.skinIndex;if(a)for(var s=0,l=o.length;s<l;s++)o[s].skinning=!0;var c,u=1===o.length?o[0]:o;switch(r){case"lines":c=new THREE.LineSegments(i.data,u);break;case"linestrips":c=new THREE.Line(i.data,u);break;case"triangles":case"polylist":c=a?new THREE.SkinnedMesh(i.data,u):new THREE.Mesh(i.data,u)}n.push(c)}return n}function De(e){return void 0!==qe.nodes[e]}function Ie(e){return d(qe.nodes[e],Re)}function Ne(e){var t=new THREE.Group;t.name=e.name;for(var n=e.children,r=0;r<n.length;r++){var i=n[r];t.add(Ie(i.id))}return t}function je(e){return d(qe.visualScenes[e],Ne)}if(0===e.length)return{scene:new THREE.Scene};var Be=n((new DOMParser).parseFromString(e,"application/xml"),"COLLADA")[0],Fe=Be.getAttribute("version");console.log("THREE.ColladaLoader: File version",Fe);var ze,He=function(e){return{unit:l(n(e,"unit")[0]),upAxis:c(n(e,"up_axis")[0])}}(n(Be,"asset")[0]),Ue=new THREE.TextureLoader(this.manager);Ue.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),THREE.TGALoader&&(ze=new THREE.TGALoader(this.manager)).setPath(this.resourcePath||t);var Ve=[],Ge={},We=0,qe={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};u(Be,"library_animations","animation",(function(e){for(var t={sources:{},samplers:{},channels:{}},n=0,r=e.childNodes.length;n<r;n++){var i,o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"source":i=o.getAttribute("id"),t.sources[i]=ie(o);break;case"sampler":i=o.getAttribute("id"),t.samplers[i]=f(o);break;case"channel":i=o.getAttribute("target"),t.channels[i]=p(o);break;default:console.log(o)}}qe.animations[e.getAttribute("id")]=t})),u(Be,"library_animation_clips","animation_clip",(function(e){for(var t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_animation":t.animations.push(a(i.getAttribute("url")))}}qe.clips[e.getAttribute("id")]=t})),u(Be,"library_controllers","controller",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"skin":t.id=a(i.getAttribute("source")),t.skin=C(i);break;case"morph":t.id=a(i.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.")}}qe.controllers[e.getAttribute("id")]=t})),u(Be,"library_images","image",(function(e){var t={init_from:n(e,"init_from")[0].textContent};qe.images[e.getAttribute("id")]=t})),u(Be,"library_effects","effect",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"profile_COMMON":t.profile=D(i)}}qe.effects[e.getAttribute("id")]=t})),u(Be,"library_materials","material",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_effect":t.url=a(i.getAttribute("url"))}}qe.materials[e.getAttribute("id")]=t})),u(Be,"library_cameras","camera",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"optics":t.optics=K(i)}}qe.cameras[e.getAttribute("id")]=t})),u(Be,"library_lights","light",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique_common":t=ee(i)}}qe.lights[e.getAttribute("id")]=t})),u(Be,"library_geometries","geometry",(function(e){var t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},r=n(e,"mesh")[0];if(void 0!==r){for(var i=0;i<r.childNodes.length;i++){var o=r.childNodes[i];if(1===o.nodeType){var a=o.getAttribute("id");switch(o.nodeName){case"source":t.sources[a]=ie(o);break;case"vertices":t.vertices=oe(o);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",o.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(ae(o));break;default:console.log(o)}}}qe.geometries[e.getAttribute("id")]=t}})),u(Be,"library_nodes","node",Me),u(Be,"library_visual_scenes","visual_scene",(function(e){var t={name:e.getAttribute("name"),children:[]};!function(e){for(var t=e.getElementsByTagName("node"),n=0;n<t.length;n++){var r=t[n];!1===r.hasAttribute("id")&&r.setAttribute("id","three_default_"+We++)}}(e);for(var r=n(e,"node"),i=0;i<r.length;i++)t.children.push(Me(r[i]));qe.visualScenes[e.getAttribute("id")]=t})),u(Be,"library_kinematics_models","kinematics_model",(function(e){for(var t={name:e.getAttribute("name")||"",joints:{},links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":fe(r,t)}}qe.kinematicsModels[e.getAttribute("id")]=t})),u(Be,"library_physics_models","physics_model",(function(e){for(var t={name:e.getAttribute("name")||"",rigidBodies:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"rigid_body":t.rigidBodies[r.getAttribute("name")]={},be(r,t.rigidBodies[r.getAttribute("name")])}}qe.physicsModels[e.getAttribute("id")]=t})),u(Be,"scene","instance_kinematics_scene",(function(e){for(var t={bindJointAxis:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"bind_joint_axis":t.bindJointAxis.push(xe(r))}}qe.kinematicsScenes[a(e.getAttribute("url"))]=t})),h(qe.animations,m),h(qe.clips,M),h(qe.controllers,k),h(qe.images,P),h(qe.effects,q),h(qe.materials,X),h(qe.cameras,J),h(qe.lights,ne),h(qe.geometries,le),h(qe.visualScenes,Ne),function(){var e=qe.clips;if(!0===s(e)){if(!1===s(qe.animations)){var t=[];for(var n in qe.animations)for(var r=g(n),i=0,o=r.length;i<o;i++)t.push(r[i]);Ve.push(new THREE.AnimationClip("default",-1,t))}}else for(var n in e)Ve.push(T(n))}(),function(){var e=Object.keys(qe.kinematicsModels)[0],t=Object.keys(qe.kinematicsScenes)[0],n=Object.keys(qe.visualScenes)[0];if(void 0!==e&&void 0!==t){for(var r,i=(r=e,d(qe.kinematicsModels[r],de)),o=function(e){return d(qe.kinematicsScenes[e],_e)}(t),a=je(n),s=o.bindJointAxis,l={},c=0,u=s.length;c<u;c++){var h=s[c],f=Be.querySelector('[sid="'+h.target+'"]');if(f){var p=f.parentElement;g(h.jointIndex,p)}}var m=new THREE.Matrix4;Ge={joints:i&&i.joints,getJointValue:function(e){var t=l[e];if(t)return t.position;console.warn("THREE.ColladaLoader: Joint "+e+" doesn't exist.")},setJointValue:function(e,t){var n=l[e];if(n){var r=n.joint;if(t>r.limits.max||t<r.limits.min)console.warn("THREE.ColladaLoader: Joint "+e+" value "+t+" outside of limits (min: "+r.limits.min+", max: "+r.limits.max+").");else if(r.static)console.warn("THREE.ColladaLoader: Joint "+e+" is static.");else{var i=n.object,o=r.axis,a=n.transforms;Ae.identity();for(var s=0;s<a.length;s++){var c=a[s];if(c.sid&&-1!==c.sid.indexOf(e))switch(r.type){case"revolute":Ae.multiply(m.makeRotationAxis(o,THREE.Math.degToRad(t)));break;case"prismatic":Ae.multiply(m.makeTranslation(o.x*t,o.y*t,o.z*t));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+r.type)}else switch(c.type){case"matrix":Ae.multiply(c.obj);break;case"translate":Ae.multiply(m.makeTranslation(c.obj.x,c.obj.y,c.obj.z));break;case"scale":Ae.scale(c.obj);break;case"rotate":Ae.multiply(m.makeRotationAxis(c.obj,c.angle))}}i.matrix.copy(Ae),i.matrix.decompose(i.position,i.quaternion,i.scale),l[e].position=t}}else console.log("THREE.ColladaLoader: "+e+" does not exist.")}}}function g(e,t){var n=t.getAttribute("name"),r=i.joints[e];a.traverse((function(i){i.name===n&&(l[e]={object:i,transforms:Ee(t),joint:r,position:r.zeroPosition})}))}}();var Xe=function(e){return je(a(n(e,"instance_visual_scene")[0].getAttribute("url")))}(n(Be,"scene")[0]);return"Z_UP"===He.upAxis&&Xe.quaternion.setFromEuler(new THREE.Euler(-Math.PI/2,0,0)),Xe.scale.multiplyScalar(He.unit),{animations:Ve,kinematics:Ge,library:qe,scene:Xe}}}},function(e,t,n){THREE.FBXLoader=n(335),e.exports=AFRAME.registerComponent("fbx-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){const e=this.data;if(!e.src)return;this.remove();const t=new THREE.FBXLoader;e.crossorigin&&t.setCrossOrigin(e.crossorigin),t.load(e.src,this.load.bind(this))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"fbx",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.FBXLoader=function(){var e,t,n;function r(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager}function i(e){this.textureLoader=e}function o(){}function a(){}function s(){}function l(){}function c(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}function u(){}function h(e){var t=e.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function d(e){return e/46186158e3}r.prototype={constructor:r,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(e),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(e,(function(n){try{var a=i.parse(n,o);t(a)}catch(s){setTimeout((function(){r&&r(s),i.manager.itemError(e)}),0)}}),n,r)},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(t,n){if(function(e){var t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===E(e,0,t.length)}(t))e=(new l).parse(t);else{var r=E(t);if(!function(e){var t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],n=0;function r(t){var r=e[t-1];return e=e.slice(n+t),n++,r}for(var i=0;i<t.length;++i){if(r(1)===t[i])return!1}return!0}(r))throw new Error("THREE.FBXLoader: Unknown format.");if(h(r)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+h(r));e=(new s).parse(r)}return new i(new THREE.TextureLoader(this.manager).setPath(n).setCrossOrigin(this.crossOrigin)).parse(e)}},i.prototype={constructor:i,parse:function(){t=this.parseConnections();var e=this.parseImages(),r=this.parseTextures(e),i=this.parseMaterials(r),a=this.parseDeformers(),s=(new o).parse(a);return this.parseScene(a,s,i),n},parseConnections:function(){var t=new Map;"Connections"in e&&e.Connections.connections.forEach((function(e){var n=e[0],r=e[1],i=e[2];t.has(n)||t.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};t.get(n).parents.push(o),t.has(r)||t.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};t.get(r).children.push(a)}));return t},parseImages:function(){var t={},n={};if("Video"in e.Objects){var r=e.Objects.Video;for(var i in r){var o=r[i];if(t[c=parseInt(i)]=o.RelativeFilename||o.Filename,"Content"in o){var a=o.Content instanceof ArrayBuffer&&o.Content.byteLength>0,s="string"===typeof o.Content&&""!==o.Content;if(a||s){var l=this.parseImage(r[i]);n[o.RelativeFilename||o.Filename]=l}}}}for(var c in t){var u=t[c];void 0!==n[u]?t[c]=n[u]:t[c]=t[c].split("\\").pop()}return t},parseImage:function(e){var t,n=e.Content,r=e.RelativeFilename||e.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":if("function"!==typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\.tga$/i,new THREE.TGALoader),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"===typeof n)return"data:"+t+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:t}))},parseTextures:function(t){var n=new Map;if("Texture"in e.Objects){var r=e.Objects.Texture;for(var i in r){var o=this.parseTexture(r[i],t);n.set(parseInt(i),o)}}return n},parseTexture:function(e,t){var n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;var r=e.WrapModeU,i=e.WrapModeV,o=void 0!==r?r.value:0,a=void 0!==i?i.value:0;if(n.wrapS=0===o?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,n.wrapT=0===a?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in e){var s=e.Scaling.value;n.repeat.x=s[0],n.repeat.y=s[1]}return n},loadTexture:function(e,n){var r,i,o=this.textureLoader.path,a=t.get(e.id).children;void 0!==a&&a.length>0&&void 0!==n[a[0].ID]&&(0!==(r=n[a[0].ID]).indexOf("blob:")&&0!==r.indexOf("data:")||this.textureLoader.setPath(void 0));var s=e.FileName.slice(-3).toLowerCase();if("tga"===s){var l=THREE.Loader.Handlers.get(".tga");null===l?(console.warn("FBXLoader: TGALoader not found, creating empty placeholder texture for",r),i=new THREE.Texture):i=l.load(r)}else"psd"===s?(console.warn("FBXLoader: PSD textures are not supported, creating empty placeholder texture for",r),i=new THREE.Texture):i=this.textureLoader.load(r);return this.textureLoader.setPath(o),i},parseMaterials:function(t){var n=new Map;if("Material"in e.Objects){var r=e.Objects.Material;for(var i in r){var o=this.parseMaterial(r[i],t);null!==o&&n.set(parseInt(i),o)}}return n},parseMaterial:function(e,n){var r=e.id,i=e.attrName,o=e.ShadingModel;if("object"===typeof o&&(o=o.value),!t.has(r))return null;var a,s=this.parseParameters(e,n,r);switch(o.toLowerCase()){case"phong":a=new THREE.MeshPhongMaterial;break;case"lambert":a=new THREE.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',o),a=new THREE.MeshPhongMaterial({color:3342591})}return a.setValues(s),a.name=i,a},parseParameters:function(e,n,r){var i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(i.color=(new THREE.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(i.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new THREE.Color).fromArray(e.SpecularColor.value));var o=this;return t.get(r).children.forEach((function(e){var t=e.relationship;switch(t){case"Bump":i.bumpMap=o.getTexture(n,e.ID);break;case"DiffuseColor":i.map=o.getTexture(n,e.ID);break;case"DisplacementColor":i.displacementMap=o.getTexture(n,e.ID);break;case"EmissiveColor":i.emissiveMap=o.getTexture(n,e.ID);break;case"NormalMap":i.normalMap=o.getTexture(n,e.ID);break;case"ReflectionColor":i.envMap=o.getTexture(n,e.ID),i.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":i.specularMap=o.getTexture(n,e.ID);break;case"TransparentColor":i.alphaMap=o.getTexture(n,e.ID),i.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",t)}})),i},getTexture:function(n,r){return"LayeredTexture"in e.Objects&&r in e.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),r=t.get(r).children[0].ID),n.get(r)},parseDeformers:function(){var n={},r={};if("Deformer"in e.Objects){var i=e.Objects.Deformer;for(var o in i){var a=i[o],s=t.get(parseInt(o));if("Skin"===a.attrType){var l=this.parseSkeleton(s,i);l.ID=o,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=s.parents[0].ID,n[o]=l}else if("BlendShape"===a.attrType){var c={id:o};c.rawTargets=this.parseMorphTargets(s,i),c.id=o,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),r[o]=c}}}return{skeletons:n,morphTargets:r}},parseSkeleton:function(e,t){var n=[];return e.children.forEach((function(e){var r=t[e.ID];if("Cluster"===r.attrType){var i={ID:e.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}})),{rawBones:n,bones:[]}},parseMorphTargets:function(e,n){for(var r=[],i=0;i<e.children.length;i++){if(8===i){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var o=e.children[i],a=n[o.ID],s={name:a.attrName,initialWeight:a.DeformPercent,id:a.id,fullWeights:a.FullWeights.a};if("BlendShapeChannel"!==a.attrType)return;t.get(parseInt(o.ID)).children.forEach((function(e){void 0===e.relationship&&(s.geoID=e.ID)})),r.push(s)}return r},parseScene:function(r,i,o){n=new THREE.Group;var s=this.parseModels(r.skeletons,i,o),l=e.Objects.Model,c=this;s.forEach((function(e){var r=l[e.ID];c.setLookAtProperties(e,r),t.get(e.ID).parents.forEach((function(t){var n=s.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&n.add(e)})),this.bindSkeleton(r.skeletons,i,s),this.createAmbientLight(),this.setupMorphMaterials();var u=(new a).parse();1===n.children.length&&n.children[0].isGroup&&(n.children[0].animations=u,n=n.children[0]),n.animations=u},parseModels:function(n,r,i){var o=new Map,a=e.Objects.Model;for(var s in a){var l=parseInt(s),c=a[s],u=t.get(l),h=this.buildSkeleton(u,n,l,c.attrName);if(!h){switch(c.attrType){case"Camera":h=this.createCamera(u);break;case"Light":h=this.createLight(u);break;case"Mesh":h=this.createMesh(u,r,i);break;case"NurbsCurve":h=this.createCurve(u,r);break;case"LimbNode":case"Null":default:h=new THREE.Group}h.name=THREE.PropertyBinding.sanitizeNodeName(c.attrName),h.ID=l}this.setModelTransforms(h,c),o.set(l,h)}return o},buildSkeleton:function(e,t,n,r){var i=null;return e.parents.forEach((function(e){for(var o in t){var a=t[o];a.rawBones.forEach((function(t,o){if(t.ID===e.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(t.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}}))}})),i},createCamera:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,l=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,l=r.AspectHeight.value);var c=s/l,u=45;void 0!==r.FieldOfView&&(u=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(u,c,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,l/2,-l/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n},createLight:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var l=Math.PI/3;void 0!==r.InnerAngle&&(l=THREE.Math.degToRad(r.InnerAngle.value));var c=0;void 0!==r.OuterAngle&&(c=THREE.Math.degToRad(r.OuterAngle.value),c=Math.max(c,1)),n=new THREE.SpotLight(o,a,s,l,c,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n},createMesh:function(e,t,n){var r,i=null,o=null,a=[];return e.children.forEach((function(e){t.has(e.ID)&&(i=t.get(e.ID)),n.has(e.ID)&&a.push(n.get(e.ID))})),a.length>1?o=a:a.length>0?o=a[0]:(o=new THREE.MeshPhongMaterial({color:13421772}),a.push(o)),"color"in i.attributes&&a.forEach((function(e){e.vertexColors=THREE.VertexColors})),i.FBX_Deformer?(a.forEach((function(e){e.skinning=!0})),r=new THREE.SkinnedMesh(i,o)):r=new THREE.Mesh(i,o),r},createCurve:function(e,t){var n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)},setModelTransforms:function(e,t){var n={};"RotationOrder"in t&&(n.eulerOrder=parseInt(t.RotationOrder.value)),"Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value);var r=w(n);e.applyMatrix(r)},setLookAtProperties:function(r,i){"LookAtProperty"in i&&t.get(r.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){var i=e.Objects.Model[t.ID];if("Lcl_Translation"in i){var o=i.Lcl_Translation.value;void 0!==r.target?(r.target.position.fromArray(o),n.add(r.target)):r.lookAt((new THREE.Vector3).fromArray(o))}}}))},bindSkeleton:function(e,n,r){var i=this.parsePoseNodes();for(var o in e){var a=e[o];t.get(parseInt(a.ID)).parents.forEach((function(e){if(n.has(e.ID)){var o=e.ID;t.get(o).parents.forEach((function(e){r.has(e.ID)&&r.get(e.ID).bind(new THREE.Skeleton(a.bones),i[e.ID])}))}}))}},parsePoseNodes:function(){var t={};if("Pose"in e.Objects){var n=e.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach((function(e){t[e.Node]=(new THREE.Matrix4).fromArray(e.Matrix.a)})):t[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return t},createAmbientLight:function(){if("GlobalSettings"in e&&"AmbientColor"in e.GlobalSettings){var t=e.GlobalSettings.AmbientColor.value,r=t[0],i=t[1],o=t[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);n.add(new THREE.AmbientLight(a,1))}}},setupMorphMaterials:function(){n.traverse((function(e){if(e.isMesh&&(e.geometry.morphAttributes.position||e.geometry.morphAttributes.normal)){var t=e.uuid,r=e.material.uuid,i=!1;n.traverse((function(e){e.isMesh&&e.material.uuid===r&&e.uuid!==t&&(i=!0)})),!0===i&&(e.material=e.material.clone()),e.material.morphTargets=!0}}))}},o.prototype={constructor:o,parse:function(n){var r=new Map;if("Geometry"in e.Objects){var i=e.Objects.Geometry;for(var o in i){var a=t.get(parseInt(o)),s=this.parseGeometry(a,i[o],n);r.set(parseInt(o),s)}}return r},parseGeometry:function(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}},parseMeshGeometry:function(t,n,r){var i=r.skeletons,o=r.morphTargets,a=t.parents.map((function(t){return e.Objects.Model[t.ID]}));if(0!==a.length){var s=t.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null),l=t.children.reduce((function(e,t){return void 0!==o[t.ID]&&(e=o[t.ID]),e}),null),c=a[0],u={};"RotationOrder"in c&&(u.eulerOrder=c.RotationOrder.value),"GeometricTranslation"in c&&(u.translation=c.GeometricTranslation.value),"GeometricRotation"in c&&(u.rotation=c.GeometricRotation.value),"GeometricScaling"in c&&(u.scale=c.GeometricScaling.value);var h=w(u);return this.genGeometry(n,s,l,h)}},genGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;e.attrName&&(i.name=e.attrName);var o=this.parseGeoNode(e,t),a=this.genBuffers(o),s=new THREE.Float32BufferAttribute(a.vertex,3);if(r.applyToBufferAttribute(s),i.addAttribute("position",s),a.colors.length>0&&i.addAttribute("color",new THREE.Float32BufferAttribute(a.colors,3)),t&&(i.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(a.weightsIndices,4)),i.addAttribute("skinWeight",new THREE.Float32BufferAttribute(a.vertexWeights,4)),i.FBX_Deformer=t),a.normal.length>0){var l=new THREE.Float32BufferAttribute(a.normal,3);(new THREE.Matrix3).getNormalMatrix(r).applyToBufferAttribute(l),i.addAttribute("normal",l)}if(a.uvs.forEach((function(e,t){var n="uv"+(t+1).toString();0===t&&(n="uv"),i.addAttribute(n,new THREE.Float32BufferAttribute(a.uvs[t],2))})),o.material&&"AllSame"!==o.material.mappingType){var c=a.materialIndex[0],u=0;if(a.materialIndex.forEach((function(e,t){e!==c&&(i.addGroup(u,t-u,c),c=e,u=t)})),i.groups.length>0){var h=i.groups[i.groups.length-1],d=h.start+h.count;d!==a.materialIndex.length&&i.addGroup(d,a.materialIndex.length-d,c)}0===i.groups.length&&i.addGroup(0,a.materialIndex.length,a.materialIndex[0])}return this.addMorphTargets(i,e,n,r),i},parseGeoNode:function(e,t){var n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];for(var r=0;e.LayerElementUV[r];)n.uv.push(this.parseUVs(e.LayerElementUV[r])),r++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n},genBuffers:function(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],l=[],c=[],u=[],h=this;return e.vertexIndices.forEach((function(d,f){var m=!1;d<0&&(d^=-1,m=!0);var g=[],v=[];if(o.push(3*d,3*d+1,3*d+2),e.color){var y=p(f,n,d,e.color);s.push(y[0],y[1],y[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),g.push(e.id)})),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var b=[0,0,0,0],w=[0,0,0,0];v.forEach((function(e,t){var n=e,r=g[t];w.forEach((function(e,t,i){if(n>e){i[t]=n,n=e;var o=b[t];b[t]=r,r=o}}))})),g=b,v=w}for(;v.length<4;)v.push(0),g.push(0);for(var x=0;x<4;++x)c.push(v[x]),u.push(g[x])}if(e.normal){y=p(f,n,d,e.normal);a.push(y[0],y[1],y[2])}if(e.material&&"AllSame"!==e.material.mappingType)var _=p(f,n,d,e.material)[0];e.uv&&e.uv.forEach((function(e,t){var r=p(f,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(h.genFace(t,e,o,_,a,s,l,c,u,r),n++,r=0,o=[],a=[],s=[],l=[],c=[],u=[])})),t},genFace:function(e,t,n,r,i,o,a,s,l,c){for(var u=2;u<c;u++)e.vertex.push(t.vertexPositions[n[0]]),e.vertex.push(t.vertexPositions[n[1]]),e.vertex.push(t.vertexPositions[n[2]]),e.vertex.push(t.vertexPositions[n[3*(u-1)]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+1]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+2]]),e.vertex.push(t.vertexPositions[n[3*u]]),e.vertex.push(t.vertexPositions[n[3*u+1]]),e.vertex.push(t.vertexPositions[n[3*u+2]]),t.skeleton&&(e.vertexWeights.push(s[0]),e.vertexWeights.push(s[1]),e.vertexWeights.push(s[2]),e.vertexWeights.push(s[3]),e.vertexWeights.push(s[4*(u-1)]),e.vertexWeights.push(s[4*(u-1)+1]),e.vertexWeights.push(s[4*(u-1)+2]),e.vertexWeights.push(s[4*(u-1)+3]),e.vertexWeights.push(s[4*u]),e.vertexWeights.push(s[4*u+1]),e.vertexWeights.push(s[4*u+2]),e.vertexWeights.push(s[4*u+3]),e.weightsIndices.push(l[0]),e.weightsIndices.push(l[1]),e.weightsIndices.push(l[2]),e.weightsIndices.push(l[3]),e.weightsIndices.push(l[4*(u-1)]),e.weightsIndices.push(l[4*(u-1)+1]),e.weightsIndices.push(l[4*(u-1)+2]),e.weightsIndices.push(l[4*(u-1)+3]),e.weightsIndices.push(l[4*u]),e.weightsIndices.push(l[4*u+1]),e.weightsIndices.push(l[4*u+2]),e.weightsIndices.push(l[4*u+3])),t.color&&(e.colors.push(o[0]),e.colors.push(o[1]),e.colors.push(o[2]),e.colors.push(o[3*(u-1)]),e.colors.push(o[3*(u-1)+1]),e.colors.push(o[3*(u-1)+2]),e.colors.push(o[3*u]),e.colors.push(o[3*u+1]),e.colors.push(o[3*u+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),t.normal&&(e.normal.push(i[0]),e.normal.push(i[1]),e.normal.push(i[2]),e.normal.push(i[3*(u-1)]),e.normal.push(i[3*(u-1)+1]),e.normal.push(i[3*(u-1)+2]),e.normal.push(i[3*u]),e.normal.push(i[3*u+1]),e.normal.push(i[3*u+2])),t.uv&&t.uv.forEach((function(t,n){void 0===e.uvs[n]&&(e.uvs[n]=[]),e.uvs[n].push(a[n][0]),e.uvs[n].push(a[n][1]),e.uvs[n].push(a[n][2*(u-1)]),e.uvs[n].push(a[n][2*(u-1)+1]),e.uvs[n].push(a[n][2*u]),e.uvs[n].push(a[n][2*u+1])}))},addMorphTargets:function(t,n,r,i){if(null!==r){t.morphAttributes.position=[],t.morphAttributes.normal=[];var o=this;r.rawTargets.forEach((function(r){var a=e.Objects.Geometry[r.geoID];void 0!==a&&o.genMorphGeometry(t,n,a,i)}))}},genMorphGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],a=void 0!==t.Vertices?t.Vertices.a.slice():[],s=void 0!==n.Vertices?n.Vertices.a:[],l=void 0!==n.Indexes?n.Indexes.a:[],c=0;c<l.length;c++){var u=3*l[c];a[u]+=s[3*c],a[u+1]+=s[3*c+1],a[u+2]+=s[3*c+2]}var h={vertexIndices:o,vertexPositions:a},d=this.genBuffers(h),f=new THREE.Float32BufferAttribute(d.vertex,3);f.name=n.attrName,r.applyToBufferAttribute(f),e.morphAttributes.position.push(f)},parseNormals:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Normals.a,i=[];return"IndexToDirect"===n&&("NormalIndex"in e?i=e.NormalIndex.a:"NormalsIndex"in e&&(i=e.NormalsIndex.a)),{dataSize:3,buffer:r,indices:i,mappingType:t,referenceType:n}},parseUVs:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.UV.a,i=[];return"IndexToDirect"===n&&(i=e.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:t,referenceType:n}},parseVertexColors:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Colors.a,i=[];return"IndexToDirect"===n&&(i=e.ColorIndex.a),{dataSize:4,buffer:r,indices:i,mappingType:t,referenceType:n}},parseMaterialIndices:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=e.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:t,referenceType:n}},parseNurbsGeometry:function(e){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new THREE.BufferGeometry;for(var n,r,i=t-1,o=e.KnotVector.a,a=[],s=e.Points.a,l=0,c=s.length;l<c;l+=4)a.push((new THREE.Vector4).fromArray(s,l));if("Closed"===e.Form)a.push(a[0]);else if("Periodic"===e.Form){n=i,r=o.length-1-n;for(l=0;l<i;++l)a.push(a[l])}var u=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*u.length);u.forEach((function(e,t){e.toArray(h,3*t)}));var d=new THREE.BufferGeometry;return d.addAttribute("position",new THREE.BufferAttribute(h,3)),d}},a.prototype={constructor:a,parse:function(){var e=[],t=this.parseClips();if(void 0===t)return e;for(var n in t){var r=t[n],i=this.addClip(r);e.push(i)}return e},parseClips:function(){if(void 0!==e.Objects.AnimationCurve){var t=this.parseAnimationCurveNodes();this.parseAnimationCurves(t);var n=this.parseAnimationLayers(t);return this.parseAnimStacks(n)}},parseAnimationCurveNodes:function(){var t=e.Objects.AnimationCurveNode,n=new Map;for(var r in t){var i=t[r];if(null!==i.attrName.match(/S|R|T|DeformPercent/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n},parseAnimationCurves:function(n){var r=e.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(d),values:r[i].KeyValueFloat.a},a=t.get(o.id);if(void 0!==a){var s=a.parents[0].ID,l=a.parents[0].relationship;l.match(/X/)?n.get(s).curves.x=o:l.match(/Y/)?n.get(s).curves.y=o:l.match(/Z/)?n.get(s).curves.z=o:l.match(/d|DeformPercent/)&&n.has(s)&&(n.get(s).curves.morph=o)}}},parseAnimationLayers:function(n){var r=e.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=t.get(parseInt(o));if(void 0!==s){var l=s.children,c=this;l.forEach((function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(f=e.ID)}));var s=e.Objects.Model[f.toString()],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1],transform:c.getModelAnimTransform(s)};"PreRotation"in s&&(l.preRotations=s.PreRotation.value),"PostRotation"in s&&(l.postRotations=s.PostRotation.value),a[i]=l}a[i][o.attr]=o}else if(void 0!==o.curves.morph){if(void 0===a[i]){var u;t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(u=e.ID)}));var h=t.get(u).parents[0].ID,d=t.get(h).parents[0].ID,f=t.get(d).parents[0].ID;s=e.Objects.Model[f],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),morphName:e.Objects.Deformer[u].attrName};a[i]=l}a[i][o.attr]=o}}})),i.set(parseInt(o),a)}}return i},getModelAnimTransform:function(e){var t={};return"RotationOrder"in e&&(t.eulerOrder=parseInt(e.RotationOrder.value)),"Lcl_Translation"in e&&(t.translation=e.Lcl_Translation.value),"RotationOffset"in e&&(t.rotationOffset=e.RotationOffset.value),"Lcl_Rotation"in e&&(t.rotation=e.Lcl_Rotation.value),"PreRotation"in e&&(t.preRotation=e.PreRotation.value),"PostRotation"in e&&(t.postRotation=e.PostRotation.value),"Lcl_Scaling"in e&&(t.scale=e.Lcl_Scaling.value),w(t)},parseAnimStacks:function(n){var r=e.Objects.AnimationStack,i={};for(var o in r){var a=t.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i},addClip:function(e){var t=[],n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new THREE.AnimationClip(e.name,-1,t)},generateTracks:function(e){var t=[],n=new THREE.Vector3,r=new THREE.Quaternion,i=new THREE.Vector3;if(e.transform&&e.transform.decompose(n,r,i),n=n.toArray(),r=(new THREE.Euler).setFromQuaternion(r).toArray(),i=i.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){var o=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==o&&t.push(o)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var a=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotations,e.postRotations);void 0!==a&&t.push(a)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var s=this.generateVectorTrack(e.modelName,e.S.curves,i,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){var l=this.generateMorphTrack(e);void 0!==l&&t.push(l)}return t},generateVectorTrack:function(e,t,n,r){var i=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(i,t,n);return new THREE.VectorKeyframeTrack(e+"."+r,i,o)},generateRotationTrack:function(e,t,n,r,i){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(THREE.Math.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(THREE.Math.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(THREE.Math.degToRad));var o=this.getTimesForAllAxes(t),a=this.getKeyframeTrackValues(o,t,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r)),void 0!==i&&((i=i.map(THREE.Math.degToRad)).push("ZYX"),i=(new THREE.Euler).fromArray(i),i=(new THREE.Quaternion).setFromEuler(i).inverse());for(var s=new THREE.Quaternion,l=new THREE.Euler,c=[],u=0;u<a.length;u+=3)l.set(a[u],a[u+1],a[u+2],"ZYX"),s.setFromEuler(l),void 0!==r&&s.premultiply(r),void 0!==i&&s.multiply(i),s.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(e+".quaternion",o,c)},generateMorphTrack:function(e){var t=e.DeformPercent.curves.morph,r=t.values.map((function(e){return e/100})),i=n.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new THREE.NumberKeyframeTrack(e.modelName+".morphTargetInfluences["+i+"]",t.times,r)},getTimesForAllAxes:function(e){var t=[];return void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})).filter((function(e,t,n){return n.indexOf(e)==t}))},getKeyframeTrackValues:function(e,t,n){var r=n,i=[],o=-1,a=-1,s=-1;return e.forEach((function(e){if(t.x&&(o=t.x.times.indexOf(e)),t.y&&(a=t.y.times.indexOf(e)),t.z&&(s=t.z.times.indexOf(e)),-1!==o){var n=t.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var l=t.y.values[a];i.push(l),r[1]=l}else i.push(r[1]);if(-1!==s){var c=t.z.values[s];i.push(c),r[2]=c}else i.push(r[2])})),i},interpolateRotations:function(e){for(var t=1;t<e.values.length;t++){var n=e.values[t-1],r=e.values[t]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,l=e.times[t-1],c=(e.times[t]-l)/o,u=l+c,h=[],d=[];u<e.times[t];)h.push(u),u+=c,d.push(s),s+=a;e.times=A(e.times,t,h),e.values=A(e.values,t,d)}}}},s.prototype={constructor:s,getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(e){this.nodeStack.push(e),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(e,t){this.currentProp=e,this.currentPropName=t},parse:function(e){this.currentIndent=0,console.log("FBXTree: ",u),this.allNodes=new u,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,r){var i=e.match(/^[\s\t]*;/),o=e.match(/^[\s\t]*$/);if(!i&&!o){var a=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),s=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");a?t.parseNodeBegin(e,a):s?t.parseNodeProperty(e,s,n[++r]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)}})),this.allNodes},parseNodeBegin:function(e,t){var n=t[1].trim().replace(/^"/,"").replace(/"$/,""),r=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"===typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"===typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(e){var t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));var n="",r="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}},parseNodeProperty:function(e,t,n){var r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),l=parseInt(a[1]),c=i.split(",").slice(3);r="connections",function(e,t){for(var n=0,r=e.length,i=t.length;n<i;n++,r++)e[r]=t[n]}(i=[s,l],c=c.map((function(e){return e.trim().replace(/^"/,"")}))),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=_(i))}else this.parseNodeSpecialProperty(e,r,i)},parseNodePropertyContinued:function(e){var t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=_(t.a))},parseNodeSpecialProperty:function(e,t,n){var r=n.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=_(l)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:l},this.setCurrentProp(this.getPrevNode(),i)}},l.prototype={constructor:l,parse:function(e){var t=new c(e);t.skip(23);var n=t.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new u;!this.endOfContent(t);){var i=this.parseNode(t,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(e){return e.size()%16===0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32(),o=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),a=e.getString(o);if(0===r)return null;for(var s=[],l=0;l<i;l++)s.push(this.parseProperty(e));var c=s.length>0?s[0]:"",u=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){var d=this.parseNode(e,t);null!==d&&this.parseSubNode(a,n,d)}return n.propertyList=s,"number"===typeof c&&(n.id=c),""!==u&&(n.attrName=u),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(e,t,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(t[n.name]=n,n.a=r):t[n.name]=r}else if("Connections"===e&&"C"===n.name){var i=[];n.propertyList.forEach((function(e,t){0!==t&&i.push(e)})),void 0===t.connections&&(t.connections=[]),t.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],l=n.propertyList[2],c=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[a]={type:s,type2:l,flag:c,value:o}}else void 0===t[n.name]?"number"===typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":var n=e.getUint32();return e.getArrayBuffer(n);case"S":n=e.getUint32();return e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=e.getUint32(),i=e.getUint32(),o=e.getUint32();if(0===i)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}"undefined"===typeof Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new c(new Zlib.Inflate(new Uint8Array(e.getArrayBuffer(o))).decompress().buffer);switch(t){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},c.prototype={constructor:c,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1===(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getBoolean());return t},getUint8:function(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e},getInt16:function(){var e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},getInt32:function(){var e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},getInt32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt32());return t},getUint32:function(){var e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},getInt64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,4294967295===(e=4294967295&~e)&&(t=t+1&4294967295),-(4294967296*t+(e=e+1&4294967295))):4294967296*t+e},getInt64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt64());return t},getUint64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e},getFloat32:function(){var e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},getFloat32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat32());return t},getFloat64:function(){var e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},getFloat64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat64());return t},getArrayBuffer:function(e){var t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},getString:function(e){for(var t=[],n=0;n<e;n++)t[n]=this.getUint8();var r=t.indexOf(0);return r>=0&&(t=t.slice(0,r)),THREE.LoaderUtils.decodeText(new Uint8Array(t))}},u.prototype={constructor:u,add:function(e,t){this[e]=t}};var f=[];function p(e,t,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(e,t,n,r){for(var i=n,o=0;i<r;i++,o++)e[o]=t[i];return e}(f,r.buffer,o,a)}var m=new THREE.Matrix4,g=new THREE.Euler,v=new THREE.Vector3,y=new THREE.Vector3,b=new THREE.Matrix4;function w(e){var t=new THREE.Matrix4;y.set(0,0,0),b.identity();var n,r=e.eulerOrder?x(e.eulerOrder):x(0);(e.translation&&y.fromArray(e.translation),e.rotationOffset&&y.add(v.fromArray(e.rotationOffset)),e.rotation)&&((n=e.rotation.map(THREE.Math.degToRad)).push(r),b.makeRotationFromEuler(g.fromArray(n)));e.preRotation&&((n=e.preRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),b.premultiply(m));e.postRotation&&((n=e.postRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),m.getInverse(m),b.multiply(m));return e.scale&&t.scale(v.fromArray(e.scale)),t.setPosition(y),t.multiply(b),t}function x(e){var t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===e?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function _(e){return e.split(",").map((function(e){return parseFloat(e)}))}function E(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(e,t,n))}function A(e,t,n){return e.slice(0,t).concat(n).concat(e.slice(t))}return r}()},function(e,t,n){const r=n(337)(),i=function(){let e;return function(){return e=e||r("https://cdn.jsdelivr.net/gh/mrdoob/three.js@r86/examples/js/loaders/GLTFLoader.js"),e}}();e.exports=AFRAME.registerComponent("gltf-model-legacy",{schema:{type:"model"},init:function(){this.model=null,this.loader=null,this.loaderPromise=i().then(()=>{this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("Anonymous")})},update:function(){const e=this,t=this.el,n=this.data;n&&(this.remove(),this.loaderPromise.then(()=>{this.loader.load(n,(function(n){e.model=n.scene,e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}))}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(t,n){function r(t){const n=document.getElementById(t),r=n.parentNode;try{r&&r.removeChild(n)}catch(e){}}function i(e,t,n){return new n((function(n,i){const o=t.timeout||5e3,a="script_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),s=function(e,t){var n=document.createElement("script");return n.type="text/javascript",n.async=!0,n.id=t,n.src=e,n}(e,a),l=setTimeout((function(){i(new Error("Script request to "+e+" timed out")),r(a)}),o),c=function(e){clearTimeout(e)};s.addEventListener("load",(function(e){n({ok:!0}),c(l),r(a)})),s.addEventListener("error",(function(t){i(new Error("Script request to "+e+" failed "+t)),c(l),r(a)})),function(e){const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(s)}))}t.exports=function(e){return e=e||{},function(t,n){return i(t,n=n||{},e.Promise||Promise)}}},function(e,t){e.exports=AFRAME.registerComponent("object-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){let e;const t=this.data;t.src&&(this.remove(),e=new THREE.ObjectLoader,t.crossorigin&&e.setCrossOrigin(t.crossorigin),e.load(t.src,e=>{e.traverse(e=>{e instanceof THREE.SkinnedMesh&&e.material&&(e.material.skinning=!!(e.geometry&&e.geometry.bones||[]).length)}),this.load(e)}))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"json",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t,n){n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint",{schema:{offset:{default:{x:0,y:0,z:0},type:"vec3"}},init:function(){this.active=!1,this.targetEl=null,this.fire=this.fire.bind(this),this.offset=new THREE.Vector3},update:function(){this.offset.copy(this.data.offset)},play:function(){this.el.addEventListener("click",this.fire)},pause:function(){this.el.removeEventListener("click",this.fire)},remove:function(){this.pause()},fire:function(){const e=this.el.sceneEl.querySelector("[checkpoint-controls]");if(!e)throw new Error("No `checkpoint-controls` component found.");e.components["checkpoint-controls"].setCheckpoint(this.el)},getOffset:function(){return this.offset.copy(this.data.offset)}})},function(e,t){function n(e,t,n,r){e&&(t=t||[],e.traverse(e=>{if(!e.isMesh)return;var i;((i=e.material)?Array.isArray(i)?i:i.materials?i.materials:[i]:[]).forEach(e=>{e&&!("envMap"in e)||t.length&&-1===t.indexOf(e.name)||(e.envMap=n,e.reflectivity=r,e.needsUpdate=!0)})}))}e.exports=AFRAME.registerComponent("cube-env-map",{multiple:!0,schema:{path:{default:""},extension:{default:"jpg",oneOf:["jpg","png"]},format:{default:"RGBFormat",oneOf:["RGBFormat","RGBAFormat"]},enableBackground:{default:!1},reflectivity:{default:1,min:0,max:1},materials:{default:[]}},init:function(){const e=this.data;this.texture=(new THREE.CubeTextureLoader).load([e.path+"posx."+e.extension,e.path+"negx."+e.extension,e.path+"posy."+e.extension,e.path+"negy."+e.extension,e.path+"posz."+e.extension,e.path+"negz."+e.extension]),this.texture.format=THREE[e.format],this.object3dsetHandler=()=>{const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,this.texture,t.reflectivity)},this.el.addEventListener("object3dset",this.object3dsetHandler)},update:function(e){const t=this.data,r=this.el.getObject3D("mesh");let i=[],o=[];if(t.materials.length&&(e.materials?(i=t.materials.filter(t=>!e.materials.includes(t)),o=e.materials.filter(e=>!t.materials.includes(e))):i=t.materials),i.length&&n(r,i,this.texture,t.reflectivity),o.length&&n(r,o,null,1),e.materials&&t.reflectivity!==e.reflectivity){const i=t.materials.filter(t=>e.materials.includes(t));i.length&&n(r,i,this.texture,t.reflectivity)}this.data.enableBackground&&!e.enableBackground?this.setBackground(this.texture):!this.data.enableBackground&&e.enableBackground&&this.setBackground(null)},remove:function(){this.el.removeEventListener("object3dset",this.object3dsetHandler);const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,null,1),t.enableBackground&&this.setBackground(null)},setBackground:function(e){this.el.sceneEl.object3D.background=e}})},function(e,t){e.exports=AFRAME.registerComponent("grab",{init:function(){this.system=this.el.sceneEl.systems.physics,this.GRABBED_STATE="grabbed",this.grabbing=!1,this.hitEl=null,this.physics=this.el.sceneEl.systems.physics,this.constraint=null,this.onHit=this.onHit.bind(this),this.onGripOpen=this.onGripOpen.bind(this),this.onGripClose=this.onGripClose.bind(this)},play:function(){const e=this.el;e.addEventListener("hit",this.onHit),e.addEventListener("gripdown",this.onGripClose),e.addEventListener("gripup",this.onGripOpen),e.addEventListener("trackpaddown",this.onGripClose),e.addEventListener("trackpadup",this.onGripOpen),e.addEventListener("triggerdown",this.onGripClose),e.addEventListener("triggerup",this.onGripOpen)},pause:function(){const e=this.el;e.removeEventListener("hit",this.onHit),e.removeEventListener("gripdown",this.onGripClose),e.removeEventListener("gripup",this.onGripOpen),e.removeEventListener("trackpaddown",this.onGripClose),e.removeEventListener("trackpadup",this.onGripOpen),e.removeEventListener("triggerdown",this.onGripClose),e.removeEventListener("triggerup",this.onGripOpen)},onGripClose:function(){this.grabbing=!0},onGripOpen:function(){const e=this.hitEl;this.grabbing=!1,e&&(e.removeState(this.GRABBED_STATE),this.hitEl=void 0,this.system.removeConstraint(this.constraint),this.constraint=null)},onHit:function(e){const t=e.detail.el;t&&!t.is(this.GRABBED_STATE)&&this.grabbing&&!this.hitEl&&(t.addState(this.GRABBED_STATE),this.hitEl=t,this.constraint=new CANNON.LockConstraint(this.el.body,t.body),this.system.addConstraint(this.constraint))}})},function(e,t){e.exports=AFRAME.registerComponent("jump-ability",{dependencies:["velocity"],schema:{on:{default:"keydown:Space gamepadbuttondown:0"},playerHeight:{default:1.764},maxJumps:{default:1},distance:{default:5},debug:{default:!1}},init:function(){this.velocity=0,this.numJumps=0;const e=this.beginJump.bind(this),t=this.data.on.split(" ");this.bindings={};for(let n=0;n<t.length;n++)this.bindings[t[n]]=e,this.el.addEventListener(t[n],e);this.bindings.collide=this.onCollide.bind(this),this.el.addEventListener("collide",this.bindings.collide)},remove:function(){for(var e in this.bindings)this.bindings.hasOwnProperty(e)&&(this.el.removeEventListener(e,this.bindings[e]),delete this.bindings[e]);this.el.removeEventListener("collide",this.bindings.collide),delete this.bindings.collide},beginJump:function(){if(this.numJumps<this.data.maxJumps){const e=this.data,t=Math.sqrt(-2*e.distance*-24.8),n=this.el.getAttribute("velocity");this.el.setAttribute("velocity",{x:n.x,y:t,z:n.z}),this.numJumps++,this.el.emit("jumpstart")}},onCollide:function(){this.numJumps>0&&this.el.emit("jumpend"),this.numJumps=0}})},function(e,t){e.exports=AFRAME.registerComponent("kinematic-body",{dependencies:["velocity"],schema:{mass:{default:5},radius:{default:1.3},linearDamping:{default:.05},enableSlopes:{default:!0},enableJumps:{default:!1}},init:function(){this.system=this.el.sceneEl.systems.physics,this.system.addComponent(this);const e=this.el,t=this.data,n=(new CANNON.Vec3).copy(e.object3D.getWorldPosition(new THREE.Vector3));this.body=new CANNON.Body({material:this.system.getMaterial("staticMaterial"),position:n,mass:t.mass,linearDamping:t.linearDamping,fixedRotation:!0}),this.body.addShape(new CANNON.Sphere(t.radius),new CANNON.Vec3(0,t.radius,0)),this.body.el=this.el,this.el.body=this.body,this.system.addBody(this.body),e.hasAttribute("wasd-controls")&&console.warn("[kinematic-body] Not compatible with wasd-controls, use movement-controls.")},remove:function(){this.system.removeBody(this.body),this.system.removeComponent(this),delete this.el.body},beforeStep:function(e,t){if(!t)return;const n=this.el,r=this.data,i=this.body;r.enableJumps||i.velocity.set(0,0,0),i.position.copy(n.getAttribute("position"))},step:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3;return function(i,o){if(!o)return;let a,s,l=this.body,c=this.data,u=!1,h=-1/0,d=this.system.getContacts();o=Math.min(o,1e3*this.system.data.maxInterval),r.set(0,0,0),e.copy(this.el.getAttribute("velocity")),l.velocity.copy(e);for(var f,p=0;f=d[p];p++)if(f.enabled){if(l.id===f.bi.id)f.ni.negate(n);else{if(l.id!==f.bj.id)continue;n.copy(f.ni)}u=l.velocity.dot(n)<-1e-6,u&&n.y<=.5?e.projectOnPlane(n):n.y>.5&&(a=l.id===f.bi.id?Math.abs(f.rj.y+f.bj.position.y):Math.abs(f.ri.y+f.bi.position.y),a>h&&(h=a,r.copy(n),s=l.id===f.bi.id?f.bj:f.bi))}t.copy(e).normalize(),s&&(!c.enableJumps||t.y<.5)?(c.enableSlopes?r.y<.999999&&r.copy(this.raycastToGround(s,r)):r.set(0,1,0),e.projectOnPlane(r)):this.system.driver.world&&e.add(this.system.driver.world.gravity.scale(4*o/1e3)),l.velocity.copy(e),this.el.setAttribute("velocity",l.velocity),this.el.setAttribute("position",l.position)}}(),raycastToGround:function(e,t){let n,r,i=this.body.position,o=this.body.position.clone();return n=new CANNON.Ray(i,o),n._updateDirection(),n.intersectBody(e),n.hasHit?(r=n.result.hitNormalWorld,Math.abs(r.y)>Math.abs(t.y)?r:t):t}})},function(e,t){e.exports=AFRAME.registerComponent("mesh-smooth",{init:function(){this.el.addEventListener("model-loaded",e=>{e.detail.model.traverse(e=>{e.isMesh&&e.geometry.computeVertexNormals()})})}})},function(e,t){e.exports=AFRAME.registerComponent("normal-material",{init:function(){this.material=new THREE.MeshNormalMaterial({flatShading:!0}),this.applyMaterial=this.applyMaterial.bind(this),this.el.addEventListener("object3dset",this.applyMaterial)},remove:function(){this.el.removeEventListener("object3dset",this.applyMaterial)},applyMaterial:function(){this.el.object3D.traverse(e=>{e.isMesh&&(e.material=this.material)})}})},function(e,t){e.exports=AFRAME.registerComponent("sphere-collider",{schema:{objects:{default:""},state:{default:"collided"},radius:{default:.05},watch:{default:!0}},init:function(){this.observer=null,this.els=[],this.collisions=[],this.handleHit=this.handleHit.bind(this),this.handleHitEnd=this.handleHitEnd.bind(this)},remove:function(){this.pause()},play:function(){const e=this.el.sceneEl;this.data.watch&&(this.observer=new MutationObserver(this.update.bind(this,null)),this.observer.observe(e,{childList:!0,subtree:!0}))},pause:function(){this.observer&&(this.observer.disconnect(),this.observer=null)},update:function(){const e=this.data;let t;t=e.objects?this.el.sceneEl.querySelectorAll(e.objects):this.el.sceneEl.children,this.els=Array.prototype.slice.call(t)},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Box3,o=new Map;return function(){const a=this.el,s=this.data,l=a.getObject3D("mesh"),c=[];let u;var h;l&&(o.clear(),a.object3D.getWorldPosition(e),a.object3D.getWorldScale(n),u=s.radius*(h=n,Math.max.apply(null,h.toArray())),this.els.forEach((function(n){let a,s,l,h;if(!n.isEntity)return;if(s=n.getObject3D("mesh"),!s)return;if(i.setFromObject(s).getSize(r),h=Math.max(r.x,r.y,r.z)/2,a=Math.sqrt(2*h*h),i.getCenter(t),!a)return;l=e.distanceTo(t),l<a+u&&(c.push(n),o.set(n,l))})),c.sort((e,t)=>o.get(e)>o.get(t)?1:-1).forEach(this.handleHit),0===c.length&&a.emit("hit",{el:null}),this.collisions.filter(e=>!o.has(e)).forEach(this.handleHitEnd),this.collisions=c)}}(),handleHit:function(e){e.emit("hit"),e.addState(this.data.state),this.el.emit("hit",{el:e})},handleHitEnd:function(e){e.emit("hitend"),e.removeState(this.data.state),this.el.emit("hitend",{el:e})}})},function(e,t,n){n(349),n(350),n(351)},function(e,t){e.exports=AFRAME.registerComponent("nav-mesh",{init:function(){this.system=this.el.sceneEl.systems.nav,this.hasLoadedNavMesh=!1,this.el.addEventListener("object3dset",this.loadNavMesh.bind(this))},play:function(){this.hasLoadedNavMesh||this.loadNavMesh()},loadNavMesh:function(){const e=this.el.getObject3D("mesh"),t=this.el.sceneEl.object3D;if(!e)return;let n;if(e.traverse(e=>{e.isMesh&&(n=e)}),!n)return;const r=n.geometry.isBufferGeometry?(new THREE.Geometry).fromBufferGeometry(n.geometry):n.geometry.clone();t.updateMatrixWorld(),r.applyMatrix(n.matrixWorld),this.system.setNavMeshGeometry(r),this.hasLoadedNavMesh=!0}})},function(e,t){e.exports=AFRAME.registerComponent("nav-agent",{schema:{destination:{type:"vec3"},active:{default:!1},speed:{default:2}},init:function(){this.system=this.el.sceneEl.systems.nav,this.system.addAgent(this),this.group=null,this.path=[],this.raycaster=new THREE.Raycaster},remove:function(){this.system.removeAgent(this)},update:function(){this.path.length=0},updateNavLocation:function(){this.group=null,this.path=[]},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){const o=this.el,a=this.data,s=this.raycaster,l=a.speed*i/1e3;if(!a.active)return;if(!this.path.length){const t=this.el.object3D.position;this.group=this.group||this.system.getGroup(t),this.path=this.system.getPath(t,e.copy(a.destination),this.group)||[],o.emit("navigation-start")}if(!this.path.length)return console.warn("[nav] Unable to find path to %o.",a.destination),this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");const c=o.object3D.position,u=this.path[0];t.subVectors(u,c);let h;if(t.length()<l){if(this.path.shift(),!this.path.length)return this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");n.copy(c),h=this.path[0]}else n.copy(t.setLength(l)).add(c),h=u;h.y=c.y,o.object3D.lookAt(h),s.ray.origin.copy(n),s.ray.origin.y+=1.5,s.ray.direction.y=-1;const d=s.intersectObject(this.system.getNavMesh());d.length?(t.subVectors(d[0].point,c),c.add(t.setLength(l))):c.copy(n)}}()})},function(e,t,n){const{Pathfinding:r}=n(352),i=new r,o="level";e.exports=AFRAME.registerSystem("nav",{init:function(){this.navMesh=null,this.agents=new Set},setNavMeshGeometry:function(e){this.navMesh=new THREE.Mesh(e),i.setZoneData(o,r.createZone(e)),Array.from(this.agents).forEach(e=>e.updateNavLocation())},getNavMesh:function(){return this.navMesh},addAgent:function(e){this.agents.add(e)},removeAgent:function(e){this.agents.delete(e)},getPath:function(e,t,n){return this.navMesh?i.findPath(e,t,o,n):null},getGroup:function(e){return this.navMesh?i.getGroup(o,e):null},getNode:function(e,t){return this.navMesh?i.getClosestNode(e,o,t,!0):null},clampStep:function(e,t,n,r,a){return this.navMesh?r?i.clampStep(e,t,r,o,n,a):(a.copy(t),this.getNode(t,n)):(a.copy(t),null)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"Pathfinding",(function(){return m}));var r=function(){};r.computeCentroids=function(e){var t,n,r;for(t=0,n=e.faces.length;t<n;t++)(r=e.faces[t]).centroid=new THREE.Vector3(0,0,0),r.centroid.add(e.vertices[r.a]),r.centroid.add(e.vertices[r.b]),r.centroid.add(e.vertices[r.c]),r.centroid.divideScalar(3)},r.roundNumber=function(e,t){return Number(e.toFixed(t))},r.sample=function(e){return e[Math.floor(Math.random()*e.length)]},r.mergeVertexIds=function(e,t){var n=[];if(e.forEach((function(e){t.indexOf(e)>=0&&n.push(e)})),n.length<2)return[];n.includes(e[0])&&n.includes(e[e.length-1])&&e.push(e.shift()),n.includes(t[0])&&n.includes(t[t.length-1])&&t.push(t.shift()),n=[],e.forEach((function(e){t.includes(e)&&n.push(e)}));for(var r=n[1],i=n[0],o=e.slice();o[0]!==r;)o.push(o.shift());for(var a=0,s=t.slice();s[0]!==i;)if(s.push(s.shift()),a++>10)throw new Error("Unexpected state");return s.shift(),s.pop(),o.concat(s)},r.setPolygonCentroid=function(e,t){var n=new THREE.Vector3,r=t.vertices;e.vertexIds.forEach((function(e){n.add(r[e])})),n.divideScalar(e.vertexIds.length),e.centroid.copy(n)},r.cleanPolygon=function(e,t){for(var n=[],r=t.vertices,i=0;i<e.vertexIds.length;i++){var o,a,s,l=r[e.vertexIds[i]];0===i?(o=e.vertexIds[1],a=e.vertexIds[e.vertexIds.length-1]):i===e.vertexIds.length-1?(o=e.vertexIds[0],a=e.vertexIds[e.vertexIds.length-2]):(o=e.vertexIds[i+1],a=e.vertexIds[i-1]),s=r[a];var c=r[o].clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h>Math.PI-.01&&h<Math.PI+.01){var d=[];e.neighbours.forEach((function(t){t.vertexIds.includes(e.vertexIds[i])||d.push(t)})),e.neighbours=d}else n.push(e.vertexIds[i])}e.vertexIds=n,this.setPolygonCentroid(e,t)},r.isConvex=function(e,t){var n=t.vertices;if(e.vertexIds.length<3)return!1;for(var r=!0,i=[],o=0;o<e.vertexIds.length;o++){var a,s,l=n[e.vertexIds[o]];0===o?(a=n[e.vertexIds[1]],s=n[e.vertexIds[e.vertexIds.length-1]]):o===e.vertexIds.length-1?(a=n[e.vertexIds[0]],s=n[e.vertexIds[e.vertexIds.length-2]]):(a=n[e.vertexIds[o+1]],s=n[e.vertexIds[o-1]]);var c=a.clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h===Math.PI||0===h)return!1;var d=c.cross(u).y;i.push(d)}return i.forEach((function(e){0===e&&(r=!1)})),i.forEach(i[0]>0?function(e){e<0&&(r=!1)}:function(e){e>0&&(r=!1)}),r},r.distanceToSquared=function(e,t){var n=e.x-t.x,r=e.y-t.y,i=e.z-t.z;return n*n+r*r+i*i},r.isPointInPoly=function(e,t){for(var n=!1,r=-1,i=e.length,o=i-1;++r<i;o=r)(e[r].z<=t.z&&t.z<e[o].z||e[o].z<=t.z&&t.z<e[r].z)&&t.x<(e[o].x-e[r].x)*(t.z-e[r].z)/(e[o].z-e[r].z)+e[r].x&&(n=!n);return n},r.isVectorInPolygon=function(e,t,n){var r=1e5,i=-1e5,o=[];return t.vertexIds.forEach((function(e){r=Math.min(n[e].y,r),i=Math.max(n[e].y,i),o.push(n[e])})),!!(e.y<i+.5&&e.y>r-.5&&this.isPointInPoly(o,e))},r.triarea2=function(e,t,n){return(n.x-e.x)*(t.z-e.z)-(t.x-e.x)*(n.z-e.z)},r.vequal=function(e,t){return this.distanceToSquared(e,t)<1e-5};var i=function(e){this.content=[],this.scoreFunction=e};i.prototype.push=function(e){this.content.push(e),this.sinkDown(this.content.length-1)},i.prototype.pop=function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},i.prototype.remove=function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},i.prototype.size=function(){return this.content.length},i.prototype.rescoreElement=function(e){this.sinkDown(this.content.indexOf(e))},i.prototype.sinkDown=function(e){for(var t=this.content[e];e>0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)<this.scoreFunction(r)))break;this.content[n]=t,this.content[e]=r,e=n}},i.prototype.bubbleUp=function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var i=e+1<<1,o=i-1,a=null,s=void 0;if(o<t&&(s=this.scoreFunction(this.content[o]))<r&&(a=o),i<t&&this.scoreFunction(this.content[i])<(null===a?r:s)&&(a=i),null===a)break;this.content[e]=this.content[a],this.content[a]=n,e=a}};var o=function(){};o.init=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.f=0,n.g=0,n.h=0,n.cost=1,n.visited=!1,n.closed=!1,n.parent=null}},o.cleanUp=function(e){for(var t=0;t<e.length;t++){var n=e[t];delete n.f,delete n.g,delete n.h,delete n.cost,delete n.visited,delete n.closed,delete n.parent}},o.heap=function(){return new i((function(e){return e.f}))},o.search=function(e,t,n){this.init(e);var r=this.heap();for(r.push(t);r.size()>0;){var i=r.pop();if(i===n){for(var o=i,a=[];o.parent;)a.push(o),o=o.parent;return this.cleanUp(a),a.reverse()}i.closed=!0;for(var s=this.neighbours(e,i),l=0,c=s.length;l<c;l++){var u=s[l];if(!u.closed){var h=i.g+u.cost,d=u.visited;if(!d||h<u.g){if(u.visited=!0,u.parent=i,!u.centroid||!n.centroid)throw new Error("Unexpected state");u.h=u.h||this.heuristic(u.centroid,n.centroid),u.g=h,u.f=u.g+u.h,d?r.rescoreElement(u):r.push(u)}}}}return[]},o.heuristic=function(e,t){return r.distanceToSquared(e,t)},o.neighbours=function(e,t){for(var n=[],r=0;r<t.neighbours.length;r++)n.push(e[t.neighbours[r]]);return n};var a=1,s=function(){};s.buildZone=function(e){var t=this,n=this._buildNavigationMesh(e),i={};n.vertices.forEach((function(e){e.x=r.roundNumber(e.x,2),e.y=r.roundNumber(e.y,2),e.z=r.roundNumber(e.z,2)})),i.vertices=n.vertices;var o=this._buildPolygonGroups(n);i.groups=[];var a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return n};return o.forEach((function(e){var n=[];e.forEach((function(i){var o=i.neighbours.map((function(t){return a(e,t)})),s=i.neighbours.map((function(e){return t._getSharedVerticesInOrder(i,e)}));i.centroid.x=r.roundNumber(i.centroid.x,2),i.centroid.y=r.roundNumber(i.centroid.y,2),i.centroid.z=r.roundNumber(i.centroid.z,2),n.push({id:a(e,i),neighbours:o,vertexIds:i.vertexIds,centroid:i.centroid,portals:s})})),i.groups.push(n)})),i},s._buildNavigationMesh=function(e){return r.computeCentroids(e),e.mergeVertices(),this._buildPolygonsFromGeometry(e)},s._buildPolygonGroups=function(e){var t=[],n=0,r=function(e){e.neighbours.forEach((function(t){void 0===t.group&&(t.group=e.group,r(t))}))};return e.polygons.forEach((function(e){void 0===e.group&&(e.group=n++,r(e)),t[e.group]||(t[e.group]=[]),t[e.group].push(e)})),t},s._buildPolygonNeighbours=function(e,t,n){var r=new Set,i=n.get(e.vertexIds[0]),o=n.get(e.vertexIds[1]),a=n.get(e.vertexIds[2]);i.forEach((function(e){(o.has(e)||a.has(e))&&r.add(t.polygons[e])})),o.forEach((function(e){a.has(e)&&r.add(t.polygons[e])})),e.neighbours=Array.from(r)},s._buildPolygonsFromGeometry=function(e){for(var t=this,n=[],r=e.vertices,i=e.faceVertexUvs,o=new Map,s=0;s<r.length;s++)o.set(s,new Set);e.faces.forEach((function(e){n.push({id:a++,vertexIds:[e.a,e.b,e.c],centroid:e.centroid,normal:e.normal,neighbours:[]}),o.get(e.a).add(n.length-1),o.get(e.b).add(n.length-1),o.get(e.c).add(n.length-1)}));var l={polygons:n,vertices:r,faceVertexUvs:i};return n.forEach((function(e){t._buildPolygonNeighbours(e,l,o)})),l},s._getSharedVerticesInOrder=function(e,t){var n=e.vertexIds,r=t.vertexIds,i=new Set;if(n.forEach((function(e){r.includes(e)&&i.add(e)})),i.size<2)return[];i.has(n[0])&&i.has(n[n.length-1])&&n.push(n.shift()),i.has(r[0])&&i.has(r[r.length-1])&&r.push(r.shift());var o=[];return n.forEach((function(e){r.includes(e)&&o.push(e)})),o};var l=function(){this.portals=[]};l.prototype.push=function(e,t){void 0===t&&(t=e),this.portals.push({left:e,right:t})},l.prototype.stringPull=function(){var e,t,n,i=this.portals,o=[],a=0,s=0,l=0;t=i[0].left,n=i[0].right,o.push(e=i[0].left);for(var c=1;c<i.length;c++){var u=i[c].left,h=i[c].right;if(r.triarea2(e,n,h)<=0){if(!(r.vequal(e,n)||r.triarea2(e,t,h)>0)){o.push(t),t=e=t,n=e,s=a=s,l=a,c=a;continue}n=h,l=c}if(r.triarea2(e,t,u)>=0){if(!(r.vequal(e,t)||r.triarea2(e,n,u)<0)){o.push(n),t=e=n,n=e,s=a=l,l=a,c=a;continue}t=u,s=c}}return 0!==o.length&&r.vequal(o[o.length-1],i[i.length-1].left)||o.push(i[i.length-1].left),this.path=o,o};var c,u,h,d,f,p,m=function(){this.zones={}};m.createZone=function(e){return s.buildZone(e)},m.prototype.setZoneData=function(e,t){this.zones[e]=t},m.prototype.getGroup=function(e,t){if(!this.zones[e])return null;var n=null,i=Math.pow(50,2);return this.zones[e].groups.forEach((function(e,o){e.forEach((function(e){var a=r.distanceToSquared(e.centroid,t);a<i&&(n=o,i=a)}))})),n},m.prototype.getRandomNode=function(e,t,n,i){if(!this.zones[e])return new THREE.Vector3;n=n||null,i=i||0;var o=[];return this.zones[e].groups[t].forEach((function(e){n&&i?r.distanceToSquared(n,e.centroid)<i*i&&o.push(e.centroid):o.push(e.centroid)})),r.sample(o)||new THREE.Vector3},m.prototype.getClosestNode=function(e,t,n,i){void 0===i&&(i=!1);var o=this.zones[t].vertices,a=null,s=1/0;return this.zones[t].groups[n].forEach((function(t){var n=r.distanceToSquared(t.centroid,e);n<s&&(!i||r.isVectorInPolygon(e,t,o))&&(a=t,s=n)})),a},m.prototype.findPath=function(e,t,n,r){var i=this.zones[n].groups[r],a=this.zones[n].vertices,s=this.getClosestNode(e,n,r),c=this.getClosestNode(t,n,r,!0);if(!s||!c)return null;var u=o.search(i,s,c),h=function(e,t){for(var n=0;n<e.neighbours.length;n++)if(e.neighbours[n]===t.id)return e.portals[n]},d=new l;d.push(e);for(var f=0;f<u.length;f++){var p=u[f+1];if(p){var m=h(u[f],p);d.push(a[m[0]],a[m[1]])}}d.push(t),d.stringPull();var g=d.path.map((function(e){return new THREE.Vector3(e.x,e.y,e.z)}));return g.shift(),g},m.prototype.clampStep=(h=new THREE.Vector3,d=new THREE.Plane,f=new THREE.Triangle,p=new THREE.Vector3,function(e,t,n,r,i,o){var a=this.zones[r].vertices,s=this.zones[r].groups[i],l=[n],m={};m[n.id]=0,c=void 0,p.set(0,0,0),u=1/0,d.setFromCoplanarPoints(a[n.vertexIds[0]],a[n.vertexIds[1]],a[n.vertexIds[2]]),d.projectPoint(t,h),t.copy(h);for(var g=l.pop();g;g=l.pop()){f.set(a[g.vertexIds[0]],a[g.vertexIds[1]],a[g.vertexIds[2]]),f.closestPointToPoint(t,h),h.distanceToSquared(t)<u&&(c=g,p.copy(h),u=h.distanceToSquared(t));var v=m[g];if(!(v>2))for(var y=0;y<g.neighbours.length;y++){var b=s[g.neighbours[y]];b.id in m||(l.push(b),m[b.id]=v+1)}}return o.copy(p),c})},function(e,t,n){n(354),n(355),n(358),n(359)},function(e,t){e.exports=AFRAME.registerPrimitive("a-grid",{defaultComponents:{geometry:{primitive:"plane",width:75,height:75},rotation:{x:-90,y:0,z:0},material:{src:"url(https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/assets/grid.png)",repeat:"75 75"}},mappings:{width:"geometry.width",height:"geometry.height",src:"material.src"}})},function(e,t,n){const r=n(356),i=n(357);e.exports.Primitive=AFRAME.registerPrimitive("a-hexgrid",{defaultComponents:{hexgrid:{}},mappings:{src:"hexgrid.src"}}),e.exports.Component=AFRAME.registerComponent("hexgrid",{dependencies:["material"],schema:{src:{type:"asset"}},init:function(){const e=this.data;e.src?fetch(e.src).then(e=>e.json()).then(e=>this.addMesh(e)):this.addMesh(i)},addMesh:function(e){const t=new r.HexGrid;t.fromJSON(e);const n=new r.Board(t);n.generateTilemap(),this.el.setObject3D("mesh",n.group),this.addMaterial()},addMaterial:function(){const e=(this.el.components.material||{}).material;e&&this.el.object3D.traverse(t=>{t.isMesh&&(t.material=e)})},remove:function(){this.el.removeObject3D("mesh")}})},function(e,t){var n=e.exports={VERSION:"0.1.1",PI:Math.PI,TAU:2*Math.PI,DEG_TO_RAD:.0174532925,RAD_TO_DEG:57.2957795,SQRT3:Math.sqrt(3),TILE:"tile",ENT:"entity",STR:"structure",HEX:"hex",SQR:"square",ABS:"abstract"};n.Board=function(e,t){if(!e)throw new Error("You must pass in a grid system for the board to use.");this.tiles=[],this.tileGroup=null,this.group=new THREE.Object3D,this.grid=null,this.overlay=null,this.finder=new n.AStarFinder(t),n.Loader.init(),this.setGrid(e)},n.Board.prototype={setEntityOnTile:function(e,t){var n=this.grid.cellToPixel(t.cell);e.position.copy(n),e.position.y+=e.heightOffset||0,e.tile&&(e.tile.entity=null),e.tile=t,t.entity=e},addTile:function(e){-1===this.tiles.indexOf(e)&&(this.tiles.push(e),this.snapTileToGrid(e),e.position.y=0,this.tileGroup.add(e.mesh),this.grid.add(e.cell),e.cell.tile=e)},removeTile:function(e){if(e){var t=this.tiles.indexOf(e);this.grid.remove(e.cell),-1!==t&&this.tiles.splice(t,1),e.dispose()}},removeAllTiles:function(){if(this.tileGroup)for(var e=this.tileGroup.children,t=0;t<e.length;t++)this.tileGroup.remove(e[t])},getTileAtCell:function(e){var t=this.grid.cellToHash(e);return e.tile||("undefined"!=typeof this.grid.cells[t]?this.grid.cells[t].tile:null)},snapToGrid:function(e){var t=this.grid.pixelToCell(e);e.copy(this.grid.cellToPixel(t))},snapTileToGrid:function(e){if(e.cell)e.position.copy(this.grid.cellToPixel(e.cell));else{var t=this.grid.pixelToCell(e.position);e.position.copy(this.grid.cellToPixel(t))}return e},getRandomTile:function(){var e=n.Tools.randomInt(0,this.tiles.length-1);return this.tiles[e]},findPath:function(e,t,n){return this.finder.findPath(e.cell,t.cell,n,this.grid)},setGrid:function(e){this.group.remove(this.tileGroup),this.grid&&e!==this.grid&&(this.removeAllTiles(),this.tiles.forEach((function(e){this.grid.remove(e.cell),e.dispose()})),this.grid.dispose()),this.grid=e,this.tiles=[],this.tileGroup=new THREE.Object3D,this.group.add(this.tileGroup)},generateOverlay:function(e){var t=new THREE.LineBasicMaterial({color:0,opacity:.3});this.overlay&&this.group.remove(this.overlay),this.overlay=new THREE.Object3D,this.grid.generateOverlay(e,this.overlay,t),this.group.add(this.overlay)},generateTilemap:function(e){this.reset();var t=this.grid.generateTiles(e);this.tiles=t,this.tileGroup=new THREE.Object3D;for(var n=0;n<t.length;n++)this.tileGroup.add(t[n].mesh);this.group.add(this.tileGroup)},reset:function(){this.removeAllTiles(),this.tileGroup&&this.group.remove(this.tileGroup)}},n.Board.prototype.constructor=n.Board,n.Cell=function(e,t,r,i){this.q=e||0,this.r=t||0,this.s=r||0,this.h=i||1,this.tile=null,this.userData={},this.walkable=!0,this._calcCost=0,this._priority=0,this._visited=!1,this._parent=null,this.uniqueID=n.LinkedList.generateID()},n.Cell.prototype={set:function(e,t,n){return this.q=e,this.r=t,this.s=n,this},copy:function(e){return this.q=e.q,this.r=e.r,this.s=e.s,this.h=e.h,this.tile=e.tile||null,this.userData=e.userData||{},this.walkable=e.walkable,this},add:function(e){return this.q+=e.q,this.r+=e.r,this.s+=e.s,this},equals:function(e){return this.q===e.q&&this.r===e.r&&this.s===e.s}},n.Cell.prototype.constructor=n.Cell,n.HexGrid=function(e){e=e||{},this.type=n.HEX,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t,r=[];for(t=0;6>t;t++)r.push(this._createVertex(t));for(this.cellShape=new THREE.Shape,this.cellShape.moveTo(r[0].x,r[0].y),t=1;6>t;t++)this.cellShape.lineTo(r[t].x,r[t].y);this.cellShape.lineTo(r[0].x,r[0].y),this.cellShape.autoClose=!0,this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=r,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this._hashDelimeter=".",this._directions=[new n.Cell(1,-1,0),new n.Cell(1,0,-1),new n.Cell(0,1,-1),new n.Cell(-1,1,0),new n.Cell(-1,0,1),new n.Cell(0,-1,1)],this._diagonals=[new n.Cell(2,-1,-1),new n.Cell(1,1,-2),new n.Cell(-1,2,-1),new n.Cell(-2,1,1),new n.Cell(-1,-1,2),new n.Cell(1,-2,1)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.HexGrid.TWO_THIRDS=2/3,n.HexGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._cellWidth*.75,this._vec3.y=e.h,this._vec3.z=-(e.s-e.r)*this._cellLength*.5,this._vec3},pixelToCell:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel)},getCellAt:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r+this._hashDelimeter+e.s},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r),Math.abs(e.s-t.s))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){var t,r,i,o;for(e=e||{},this.size="undefined"==typeof e.size?this.size:e.size,t=-this.size;t<this.size+1;t++)for(r=-this.size;r<this.size+1;r++)i=-t-r,Math.abs(t)<=this.size&&Math.abs(r)<=this.size&&Math.abs(i)<=this.size&&(o=new n.Cell(t,r,i),this.add(o))},generateOverlay:function(e,t,r){var i,o,a,s=this.cellShape.createPointsGeometry();for(i=-e;e+1>i;i++)for(o=-e;e+1>o;o++)if(a=-i-o,Math.abs(i)<=e&&Math.abs(o)<=e&&Math.abs(a)<=e){this._cel.set(i,o,a);var l=new THREE.Line(s,r);l.position.copy(this.cellToPixel(this._cel)),l.rotation.x=90*n.DEG_TO_RAD,t.add(l)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){var i=this;n.Tools.getJSON({url:e,callback:function(e){i.fromJSON(e),t.call(r||null,e)},cache:!1,scope:i})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n},_createVertex:function(e){var t=n.TAU/6*e;return new THREE.Vector3(this.cellSize*Math.cos(t),this.cellSize*Math.sin(t),0)},_cubeRound:function(e){var t=Math.round(e.q),n=Math.round(e.r),r=Math.round(e.s),i=Math.abs(t-e.q),o=Math.abs(n-e.r),a=Math.abs(r-e.s);return i>o&&i>a?t=-n-r:o>a?n=-t-r:r=-t-n,this._cel.set(t,n,r)}},n.HexGrid.prototype.constructor=n.HexGrid,n.SqrGrid=function(e){e=e||{},this.type=n.SQR,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t=[];t.push(new THREE.Vector3),t.push(new THREE.Vector3(-this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,-this.cellSize)),this.cellShape=new THREE.Shape,this.cellShape.moveTo(-this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,-this.cellSize),this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=t,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._fullCellSize=2*this.cellSize,this._hashDelimeter=".",this._directions=[new n.Cell(1,0,0),new n.Cell(0,-1,0),new n.Cell(-1,0,0),new n.Cell(0,1,0)],this._diagonals=[new n.Cell(-1,-1,0),new n.Cell(-1,1,0),new n.Cell(1,1,0),new n.Cell(1,-1,0)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.SqrGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._fullCellSize,this._vec3.y=e.h,this._vec3.z=e.r*this._fullCellSize,this._vec3},pixelToCell:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n,0)},getCellAt:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._fullCellSize=2*this.cellSize,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){e=e||{},this.size="undefined"==typeof e.size?this.size:e.size;var t,r,i,o=Math.ceil(this.size/2);for(t=-o;o>t;t++)for(r=-o;o>r;r++)i=new n.Cell(t,r+1),this.add(i)},generateOverlay:function(e,t,r){var i,o,a=Math.ceil(e/2);for(i=-a;a>i;i++)for(o=-a;a>o;o++){this._cel.set(i,o);var s=new THREE.Line(this.cellGeo,r);s.position.copy(this.cellToPixel(this._cel)),s.rotation.x=90*n.DEG_TO_RAD,t.add(s)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){n.Tools.getJSON({url:e,callback:function(e){this.fromJSON(e),t.call(r||null,e)},cache:!1,scope:this})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._fullCellSize=2*this.cellSize,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n}},n.SqrGrid.prototype.constructor=n.SqrGrid,n.Tile=function(e){e=e||{};var t={cell:null,geometry:null,material:null};if(!(t=n.Tools.merge(t,e)).cell||!t.geometry)throw new Error("Missing vg.Tile configuration");this.cell=t.cell,this.cell.tile&&this.cell.tile!==this&&this.cell.tile.dispose(),this.cell.tile=this,this.uniqueID=n.Tools.generateID(),this.geometry=t.geometry,this.material=t.material,this.material||(this.material=new THREE.MeshPhongMaterial({color:n.Tools.randomizeRGB("30, 30, 30",13)})),this.objectType=n.TILE,this.entity=null,this.userData={},this.selected=!1,this.highlight="0x0084cc",this.mesh=new THREE.Mesh(this.geometry,this.material),this.mesh.userData.structure=this,this.position=this.mesh.position,this.rotation=this.mesh.rotation,this.rotation.x=-90*n.DEG_TO_RAD,this.mesh.scale.set(t.scale,t.scale,1),this.material.emissive?this._emissive=this.material.emissive.getHex():this._emissive=null},n.Tile.prototype={select:function(){return this.material.emissive&&this.material.emissive.setHex(this.highlight),this.selected=!0,this},deselect:function(){return null!==this._emissive&&this.material.emissive&&this.material.emissive.setHex(this._emissive),this.selected=!1,this},toggle:function(){return this.selected?this.deselect():this.select(),this},dispose:function(){this.cell&&this.cell.tile&&(this.cell.tile=null),this.cell=null,this.position=null,this.rotation=null,this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.mesh.userData.structure=null,this.mesh=null,this.material=null,this.userData=null,this.entity=null,this.geometry=null,this._emissive=null}},n.Tile.prototype.constructor=n.Tile,function(){var e=function(){this.obj=null,this.next=null,this.prev=null,this.free=!0},t=function(){this.first=null,this.last=null,this.length=0,this.objToNodeMap={},this.uniqueID=Date.now()+""+Math.floor(1e3*Math.random()),this.sortArray=[]};t.generateID=function(){return Math.random().toString(36).slice(2)+Date.now()},(t.prototype={getNode:function(e){return this.objToNodeMap[e.uniqueID]},addNode:function(n){var r=new e;if(!n.uniqueID)try{n.uniqueID=t.generateID()}catch(i){return console.error("[LinkedList.addNode] obj passed is immutable: cannot attach necessary identifier"),null}return r.obj=n,r.free=!1,this.objToNodeMap[n.uniqueID]=r,r},swapObjects:function(e,t){this.objToNodeMap[e.obj.uniqueID]=null,this.objToNodeMap[t.uniqueID]=e,e.obj=t},add:function(e){var t=this.objToNodeMap[e.uniqueID];if(t){if(!1===t.free)return;t.obj=e,t.free=!1,t.next=null,t.prev=null}else t=this.addNode(e);if(this.first){if(!this.last)throw new Error("[LinkedList.add] No last in the list -- that shouldn't happen here");this.last.next=t,t.prev=this.last,this.last=t,t.next=null}else this.first=t,this.last=t,t.next=null,t.prev=null;this.length++,this.showDebug&&this.dump("after add")},has:function(e){return!!this.objToNodeMap[e.uniqueID]},moveUp:function(e){this.dump("before move up");var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.prev){var n=t.prev,r=n.prev;t==this.last&&(this.last=n);var i=t.next;r&&(r.next=t),t.next=n,t.prev=n.prev,n.next=i,n.prev=t,this.first==n&&(this.first=t)}},moveDown:function(e){var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.next){var n=t.next;this.moveUp(n.obj),this.last==n&&(this.last=t)}},sort:function(e){var t,n,r=this.sortArray,i=this.first;for(r.length=0;i;)r.push(i.obj),i=i.next;for(this.clear(),r.sort(e),n=r.length,t=0;n>t;t++)this.add(r[t])},remove:function(e){var t=this.getNode(e);return!(!t||t.free)&&(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.prev||(this.first=t.next),t.next||(this.last=t.prev),t.free=!0,t.prev=null,t.next=null,this.length--,!0)},shift:function(){var e=this.first;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.first=e.next,e.next||(this.last=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},pop:function(){var e=this.last;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.last=e.prev,e.prev||(this.first=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},concat:function(e){for(var t=e.first;t;)this.add(t.obj),t=t.next},clear:function(){for(var e=this.first;e;)e.free=!0,e=e.next;this.first=null,this.length=0},dispose:function(){for(var e=this.first;e;)e.obj=null,e=e.next;this.first=null,this.objToNodeMap=null},dump:function(e){console.log("===================="+e+"=====================");for(var t=this.first;t;)console.log("{"+t.obj.toString()+"} previous="+(t.prev?t.prev.obj:"NULL")),t=t.next();console.log("==================================="),console.log("Last: {"+(this.last?this.last.obj:"NULL")+"} First: {"+(this.first?this.first.obj:"NULL")+"}")}}).constructor=t,n.LinkedList=t}(),function(){var e=function(e,t,n,r,i){this._listener=t,this.isOnce=n,this.context=r,this.signal=e,this._priority=i||0};(e.prototype={active:!0,params:null,execute:function(e){var t,n;return this.active&&this._listener&&(n=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,n),this.isOnce&&this.detach()),t},detach:function(){return this.isBound()?this.signal.remove(this._listener,this.context):null},isBound:function(){return!!this.signal&&!!this._listener},_destroy:function(){delete this.signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this.isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}}).constructor=e;var t=function(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){t.prototype.dispatch.apply(e,arguments)}};t.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(e,t){if("function"!=typeof e)throw new Error("Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))},_registerListener:function(t,n,r,i){var o,a=this._indexOfListener(t,r);if(-1!==a){if((o=this._bindings[a]).isOnce!==n)throw new Error("You cannot add"+(n?"":"Once")+"() then add"+(n?"Once":"")+"() the same listener without removing the relationship first.")}else o=new e(this,t,n,r,i),this._addBinding(o);return this.memorize&&this._prevParams&&o.execute(this._prevParams),o},_addBinding:function(e){var t=this._bindings.length;do{t--}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,r=this._bindings.length;r--;)if((n=this._bindings[r])._listener===e&&n.context===t)return r;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,n){return this.validateListener(e,"add"),this._registerListener(e,!1,t,n)},addOnce:function(e,t,n){return this.validateListener(e,"addOnce"),this._registerListener(e,!0,t,n)},remove:function(e,t){this.validateListener(e,"remove");var n=this._indexOfListener(e,t);return-1!==n&&(this._bindings[n]._destroy(),this._bindings.splice(n,1)),e},removeAll:function(e){"undefined"==typeof e&&(e=null);for(var t=this._bindings.length;t--;)e?this._bindings[t].context===e&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)):this._bindings[t]._destroy();e||(this._bindings.length=0)},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var e,t=Array.prototype.slice.call(arguments),n=this._bindings.length;if(this.memorize&&(this._prevParams=t),n){e=this._bindings.slice(),this._shouldPropagate=!0;do{n--}while(e[n]&&this._shouldPropagate&&!1!==e[n].execute(t))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},t.prototype.constructor=t,n.Signal=t}(),n.AStarFinder=function(e){e=e||{};var t={allowDiagonal:!1,heuristicFilter:null};t=n.Tools.merge(t,e),this.allowDiagonal=t.allowDiagonal,this.heuristicFilter=t.heuristicFilter,this.list=new n.LinkedList},n.AStarFinder.prototype={findPath:function(e,t,r,i){var o,a,s,l,c,u;for(r=r||this.heuristicFilter,i.clearPath(),this.list.clear(),this.list.add(e);this.list.length>0;){if(this.list.sort(this.compare),(o=this.list.shift())._visited=!0,o===t)return n.PathUtil.backtrace(t);for(c=0,u=(s=i.getNeighbors(o,this.allowDiagonal,r)).length;u>c;c++)if((l=s[c]).walkable&&(a=o._calcCost+i.distance(o,l),!l._visited||a<l._calcCost)){if(l._visited=!0,l._parent=o,l._calcCost=a,l._priority=a+i.distance(t,l),l===t)return n.PathUtil.backtrace(t);this.list.add(l)}}return null},compare:function(e,t){return e._priority-t._priority}},n.AStarFinder.prototype.constructor=n.AStarFinder,n.PathUtil={backtrace:function(e){for(var t=[e];e._parent;)e=e._parent,t.push(e);return t.reverse()},biBacktrace:function(e,t){var n=this.backtrace(e),r=this.backtrace(t);return n.concat(r.reverse())},pathLength:function(e){var t,n,r,i,o,a=0;for(t=1;t<e.length;++t)n=e[t-1],r=e[t],i=n[0]-r[0],o=n[1]-r[1],a+=Math.sqrt(i*i+o*o);return a},interpolate:function(e,t,n,r){var i,o,a,s,l,c,u=Math.abs,h=[];for(i=n>e?1:-1,o=r>t?1:-1,l=(a=u(n-e))-(s=u(r-t));e!==n||t!==r;)h.push([e,t]),(c=2*l)>-s&&(l-=s,e+=i),a>c&&(l+=a,t+=o);return h},expandPath:function(e){var t,n,r,i,o,a,s=[],l=e.length;if(2>l)return s;for(o=0;l-1>o;++o)for(t=e[o],n=e[o+1],i=(r=this.interpolate(t[0],t[1],n[0],n[1])).length,a=0;i-1>a;++a)s.push(r[a]);return s.push(e[l-1]),s},smoothenPath:function(e,t){var n,r,i,o,a,s,l,c,u,h,d,f,p=t.length,m=t[0][0],g=t[0][1],v=t[p-1][0],y=t[p-1][1];for(a=[[n=m,r=g]],l=2;p>l;++l){for(i=(u=t[l])[0],o=u[1],h=this.interpolate(n,r,i,o),f=!1,c=1;c<h.length;++c)if(d=h[c],!e.isWalkableAt(d[0],d[1])){f=!0;break}f&&(s=t[l-1],a.push(s),n=s[0],r=s[1])}return a.push([v,y]),a},compressPath:function(e){if(e.length<3)return e;var t,n,r,i,o,a,s=[],l=e[0][0],c=e[0][1],u=e[1][0],h=e[1][1],d=u-l,f=h-c;for(d/=o=Math.sqrt(d*d+f*f),f/=o,s.push([l,c]),a=2;a<e.length;a++)t=u,n=h,r=d,i=f,d=(u=e[a][0])-t,f=(h=e[a][1])-n,f/=o=Math.sqrt(d*d+f*f),((d/=o)!==r||f!==i)&&s.push([t,n]);return s.push([u,h]),s}},n.Loader={manager:null,imageLoader:null,crossOrigin:!1,init:function(e){this.crossOrigin=e||!1,this.manager=new THREE.LoadingManager((function(){}),(function(){}),(function(){console.warn("Error loading images")})),this.imageLoader=new THREE.ImageLoader(this.manager),this.imageLoader.crossOrigin=e},loadTexture:function(e,t,n,r){var i=new THREE.Texture(null,t);return this.imageLoader.load(e,(function(e){i.image=e,i.needsUpdate=!0,n&&n(i)}),null,(function(e){r&&r(e)})),i.sourceFile=e,i}},n.MouseCaster=function(e,t,r){this.down=!1,this.rightDown=!1,this.pickedObject=null,this.selectedObject=null,this.allHits=null,this.active=!0,this.shift=!1,this.ctrl=!1,this.wheel=0,this.position=new THREE.Vector3,this.screenPosition=new THREE.Vector2,this.signal=new n.Signal,this.group=e,this._camera=t,this._raycaster=new THREE.Raycaster,this._preventDefault=!1,(r=r||document).addEventListener("mousemove",this._onDocumentMouseMove.bind(this),!1),r.addEventListener("mousedown",this._onDocumentMouseDown.bind(this),!1),r.addEventListener("mouseup",this._onDocumentMouseUp.bind(this),!1),r.addEventListener("mousewheel",this._onMouseWheel.bind(this),!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel.bind(this),!1)},n.MouseCaster.OVER="over",n.MouseCaster.OUT="out",n.MouseCaster.DOWN="down",n.MouseCaster.UP="up",n.MouseCaster.CLICK="click",n.MouseCaster.WHEEL="wheel",n.MouseCaster.prototype={update:function(){if(this.active){this._raycaster.setFromCamera(this.screenPosition,this._camera);var e,t,r=this._raycaster.intersectObject(this.group,!0);r.length>0?(t=(e=r[0]).object.userData.structure,this.pickedObject!=t&&(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=t,this.selectedObject=null,this.signal.dispatch(n.MouseCaster.OVER,this.pickedObject)),this.position.copy(e.point),this.screenPosition.z=e.distance):(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=null,this.selectedObject=null),this.allHits=r}},preventDefault:function(){this._preventDefault=!0},_onDocumentMouseDown:function(e){return(e=e||window.event).preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.pickedObject&&(this.selectedObject=this.pickedObject),this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.down=1===e.which,this.rightDown=3===e.which,void this.signal.dispatch(n.MouseCaster.DOWN,this.pickedObject))},_onDocumentMouseUp:function(e){return e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.signal.dispatch(n.MouseCaster.UP,this.pickedObject),this.selectedObject&&this.pickedObject&&this.selectedObject.uniqueID===this.pickedObject.uniqueID&&this.signal.dispatch(n.MouseCaster.CLICK,this.pickedObject),this.down=1!==e.which&&this.down,void(this.rightDown=3!==e.which&&this.rightDown))},_onDocumentMouseMove:function(e){e.preventDefault(),this.screenPosition.x=e.clientX/window.innerWidth*2-1,this.screenPosition.y=-e.clientY/window.innerHeight*2+1},_onMouseWheel:function(e){if(this.active){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?this.wheel++:this.wheel--,this.signal.dispatch(n.MouseCaster.WHEEL,this.wheel)}}},n.MouseCaster.prototype.constructor=n.MouseCaster,n.Scene=function(e,t){var r={element:document.body,alpha:!0,antialias:!0,clearColor:"#fff",sortObjects:!1,fog:null,light:new THREE.DirectionalLight(16777215),lightPosition:null,cameraType:"PerspectiveCamera",cameraPosition:null,orthoZoom:4},i={minDistance:100,maxDistance:1e3,zoomSpeed:2,noZoom:!1};if(r=n.Tools.merge(r,e),"boolean"!=typeof t&&(i=n.Tools.merge(i,t)),this.renderer=new THREE.WebGLRenderer({alpha:r.alpha,antialias:r.antialias}),this.renderer.setClearColor(r.clearColor,0),this.renderer.sortObjects=r.sortObjects,this.width=window.innerWidth,this.height=window.innerHeight,this.orthoZoom=r.orthoZoom,this.container=new THREE.Scene,this.container.fog=r.fog,this.container.add(new THREE.AmbientLight(14540253)),r.lightPosition||r.light.position.set(-1,1,-1).normalize(),this.container.add(r.light),"OrthographicCamera"===r.cameraType){var o=window.innerWidth/this.orthoZoom,a=window.innerHeight/this.orthoZoom;this.camera=new THREE.OrthographicCamera(o/-2,o/2,a/2,a/-2,1,5e3)}else this.camera=new THREE.PerspectiveCamera(50,this.width/this.height,1,5e3);this.contolled=!!t,this.contolled&&(this.controls=new THREE.OrbitControls(this.camera,this.renderer.domElement),this.controls.minDistance=i.minDistance,this.controls.maxDistance=i.maxDistance,this.controls.zoomSpeed=i.zoomSpeed,this.controls.noZoom=i.noZoom),r.cameraPosition&&this.camera.position.copy(r.cameraPosition),window.addEventListener("resize",function(){if(this.width=window.innerWidth,this.height=window.innerHeight,"OrthographicCamera"===this.camera.type){var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2}else this.camera.aspect=this.width/this.height;this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height)}.bind(this),!1),this.attachTo(r.element)},n.Scene.prototype={attachTo:function(e){e.style.width=this.width+"px",e.style.height=this.height+"px",this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),e.appendChild(this.renderer.domElement)},add:function(e){this.container.add(e)},remove:function(e){this.container.remove(e)},render:function(){this.contolled&&this.controls.update(),this.renderer.render(this.container,this.camera)},updateOrthoZoom:function(){if(this.orthoZoom<=0)this.orthoZoom=0;else{var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2,this.camera.updateProjectionMatrix()}},focusOn:function(e){this.camera.lookAt(e.position)}},n.Scene.prototype.constructor=n.Scene,n.SelectionManager=function(e){this.mouse=e,this.onSelect=new n.Signal,this.onDeselect=new n.Signal,this.selected=null,this.toggleSelection=!1,this.mouse.signal.add(this.onMouse,this)},n.SelectionManager.prototype={select:function(e,t){e&&(t=t||!0,this.selected!==e&&this.clearSelection(t),e.selected?this.toggleSelection&&(t&&this.onDeselect.dispatch(e),e.deselect()):e.select(),this.selected=e,t&&this.onSelect.dispatch(e))},clearSelection:function(e){e=e||!0,this.selected&&(e&&this.onDeselect.dispatch(this.selected),this.selected.deselect()),this.selected=null},onMouse:function(e,t){switch(e){case n.MouseCaster.DOWN:t||this.clearSelection();break;case n.MouseCaster.CLICK:this.select(t)}}},n.SelectionManager.prototype.constructor=n.SelectionManager,n.Tools={clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},sign:function(e){return e&&e/Math.abs(e)},random:function(e,t){return 1===arguments.length?Math.random()*e-.5*e:Math.random()*(t-e)+e},randomInt:function(e,t){return 1===arguments.length?Math.random()*e-.5*e|0:Math.random()*(t-e+1)+e|0},normalize:function(e,t,n){return(e-t)/(n-t)},getShortRotation:function(e){return(e%=this.TAU)>this.PI?e-=this.TAU:e<-this.PI&&(e+=this.TAU),e},generateID:function(){return Math.random().toString(36).slice(2)+Date.now()},isPlainObject:function(e){if("object"!=typeof e||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},merge:function(e,t){var n=this,r=Array.isArray(t),i=r&&[]||{};return r?(e=e||[],i=i.concat(e),t.forEach((function(t,r){"undefined"==typeof i[r]?i[r]=t:n.isPlainObject(t)?i[r]=n.merge(e[r],t):-1===e.indexOf(t)&&i.push(t)})),i):(e&&n.isPlainObject(e)&&Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(r){t[r]&&n.isPlainObject(t[r])&&e[r]?i[r]=n.merge(e[r],t[r]):i[r]=t[r]})),i)},now:function(){return window.nwf?window.nwf.system.Performance.elapsedTime:window.performance.now()},empty:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},radixSort:function(e,t,n,r){if(r=r||31,!((t=t||0)>=(n=n||e.length)-1||0>r)){for(var i=t,o=n,a=1<<r;o>i;)if(e[i]&a){--o;var s=e[i];e[i]=e[o],e[o]=s}else++i;this.radixSort(e,t,o,r-1),this.radixSort(e,o,n,r-1)}},randomizeRGB:function(e,t){var n,r,i=e.split(","),o="rgb(";for(t=this.randomInt(t),n=0;3>n;n++)0>(r=parseInt(i[n])+t)?r=0:r>255&&(r=255),o+=r+",";return(o=o.substring(0,o.length-1))+")"},getJSON:function(e){var t=new XMLHttpRequest,n="undefined"!=typeof e.cache&&e.cache?e.url:e.url+"?t="+Math.floor(1e4*Math.random())+Date.now();t.onreadystatechange=function(){if(200!==this.status)0!==this.status&&console.warn("[Tools.getJSON] Error: "+this.status+" ("+this.statusText+") :: "+e.url);else{var t=null;try{t=JSON.parse(this.responseText)}catch(n){return}e.callback.call(e.scope||null,t)}},t.open("GET",n,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Content-Type","application/json"),t.send("")}}},function(e,t){e.exports={size:5,cellSize:10,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5},autogenerated:!0,cells:[{q:-1,r:0,s:1,h:1,walkable:!0,userData:{}},{q:0,r:-1,s:1,h:1,walkable:!0,userData:{}},{q:0,r:0,s:0,h:1,walkable:!0,userData:{}},{q:1,r:-1,s:0,h:1,walkable:!0,userData:{}},{q:-1,r:1,s:0,h:0,walkable:!0,userData:{}},{q:0,r:1,s:-1,h:0,walkable:!0,userData:{}},{q:1,r:0,s:-1,h:0,walkable:!0,userData:{}}]}},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-ocean",{defaultComponents:{ocean:{},rotation:{x:-90,y:0,z:0}},mappings:{width:"ocean.width",depth:"ocean.depth",density:"ocean.density",amplitude:"ocean.amplitude",amplitudeVariance:"ocean.amplitudeVariance",speed:"ocean.speed",speedVariance:"ocean.speedVariance",color:"ocean.color",opacity:"ocean.opacity"}}),e.exports.Component=AFRAME.registerComponent("ocean",{schema:{width:{default:10,min:0},depth:{default:10,min:0},density:{default:10},amplitude:{default:.1},amplitudeVariance:{default:.3},speed:{default:1},speedVariance:{default:2},color:{default:"#7AD2F7",type:"color"},opacity:{default:.8}},play:function(){const e=this.el,t=this.data;let n=e.components.material;const r=new THREE.PlaneGeometry(t.width,t.depth,t.density,t.density);r.mergeVertices(),this.waves=[];for(let i,o=0,a=r.vertices.length;o<a;o++)i=r.vertices[o],this.waves.push({z:i.z,ang:Math.random()*Math.PI*2,amp:t.amplitude+Math.random()*t.amplitudeVariance,speed:(t.speed+Math.random()*t.speedVariance)/1e3});n||(n={},n.material=new THREE.MeshPhongMaterial({color:t.color,transparent:t.opacity<1,opacity:t.opacity,shading:THREE.FlatShading})),this.mesh=new THREE.Mesh(r,n.material),e.setObject3D("mesh",this.mesh)},remove:function(){this.el.removeObject3D("mesh")},tick:function(e,t){if(!t)return;const n=this.mesh.geometry.vertices;for(let r,i,o=0;r=n[o];o++)i=this.waves[o],r.z=i.z+Math.sin(i.ang)*i.amp,i.ang+=i.speed*t;this.mesh.geometry.verticesNeedUpdate=!0}})},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-tube",{defaultComponents:{tube:{}},mappings:{path:"tube.path",segments:"tube.segments",radius:"tube.radius","radial-segments":"tube.radialSegments",closed:"tube.closed"}}),e.exports.Component=AFRAME.registerComponent("tube",{schema:{path:{default:[]},segments:{default:64},radius:{default:1},radialSegments:{default:8},closed:{default:!1}},init:function(){const e=this.el,t=this.data;let n=e.components.material;if(!t.path.length)return void console.error("[a-tube] `path` property expected but not found.");const r=new THREE.CatmullRomCurve3(t.path.map((function(e){return e=e.split(" "),new THREE.Vector3(Number(e[0]),Number(e[1]),Number(e[2]))}))),i=new THREE.TubeGeometry(r,t.segments,t.radius,t.radialSegments,t.closed);n||(n={},n.material=new THREE.MeshPhongMaterial),this.mesh=new THREE.Mesh(i,n.material),this.el.setObject3D("mesh",this.mesh)},update:function(e){Object.keys(e).length&&(this.remove(),this.init())},remove:function(){this.mesh&&this.el.removeObject3D("mesh")}})},function(e,t,n){const r=n(85);function i(e,t){return`\n${a(e,t)}\n${o(e)}\nreturn {Body: Body, Vector: Vector};\n`}function o(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function a(e,t){let n=r(e),i="";return t&&(i=""+n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=a,e.exports.getBodyCode=o},function(e,t,n){const r=n(85),i=n(184);function o(e){let t=r(e),n=Math.pow(2,e);return`\n${u()}\n${c(e)}\n${a(e)}\n${l(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" node.")}\n node.body = null;\n node.mass = ${t("node.mass_{var} = ",{join:""})}0;\n ${t("node.min_{var} = node.max_{var} = ",{join:""})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${t("var d{var};",{indent:4})}\n var r; \n ${t("var f{var} = 0;",{indent:4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${t("d{var} = body.pos.{var} - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${t("d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n // If s / r < \u03b8, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${i(0)} - node.min_${i(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${function(){let e=Array(11).join(" "),t=[];for(let r=0;r<n;++r)t.push(e+`if (node.quad${r}) {`),t.push(e+` queue[pushIdx] = node.quad${r};`),t.push(e+" queueLength += 1;"),t.push(e+" pushIdx += 1;"),t.push(e+"}");return t.join("\n")}()}\n }\n }\n }\n\n ${t("sourceBody.force.{var} += f{var};",{indent:4})}\n }\n\n function insertBodies(bodies) {\n ${t("var {var}min = Number.MAX_VALUE;",{indent:4})}\n ${t("var {var}max = Number.MIN_VALUE;",{indent:4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${t("if (pos.{var} < {var}min) {var}min = pos.{var};",{indent:6})}\n ${t("if (pos.{var} > {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(t+1).join(" ");for(let o=0;o<e;++o)n.push(r+`if (${i(o)} > max_${i(o)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,o)};`),n.push(r+` min_${i(o)} = max_${i(o)};`),n.push(r+` max_${i(o)} = node.max_${i(o)};`),n.push(r+"}");return n.join("\n")}(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function a(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n<t;++n){let t=0===n?" ":" else ";e.push(`${t}if (idx === ${n}) node.quad${n} = child;`)}return e.join("\n")}()}\n}`}function l(e){return`function getChild(node, idx) {\n${function(){let t=[],n=Math.pow(2,e);for(let e=0;e<n;++e)t.push(` if (idx === ${e}) return node.quad${e};`);return t.join("\n")}()}\n return null;\n}`}function c(e){let t=r(e),n=Math.pow(2,e);return`\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" this.")}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${t("this.mass_{var} = 0;",{indent:2})}\n\n // bounding box coordinates\n ${t("this.min_{var} = 0;",{indent:2})}\n ${t("this.max_{var} = 0;",{indent:2})}\n}\n`}function u(){return"\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=o(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=o,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=c,e.exports.isSamePosition=a,e.exports.getChildBodyCode=l,e.exports.setChildBodyCode=s},function(e,t,n){e.exports=function(e){let t=i(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=i;const r=n(85);function i(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},function(e,t,n){const r=n(85);function i(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=i},function(e,t,n){const r=n(85);function i(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=i},function(e,t,n){const r=n(85);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},function(e,t){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},function(e,t){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var i=t.hasOwnProperty(r),o=typeof n[r];!i||typeof t[r]!==o?t[r]=n[r]:"object"===o&&(t[r]=e(t[r],n[r]))}return t}},function(e,t){function n(e){return new r("number"===typeof e?e:+new Date)}function r(e){this.seed=e}function i(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function o(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=n,e.exports.random=n,e.exports.randomIterator=function(e,t){var r=t||n();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,i,o;for(n=e.length-1;n>0;--n)i=r.next(n+1),o=e[i],e[i]=e[n],e[n]=o,t(o);e.length&&t(e[0])},shuffle:function(){var t,n,i;for(t=e.length-1;t>0;--t)n=r.next(t+1),i=e[n],e[n]=e[t],e[t]=i;return e}}},r.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},r.prototype.nextDouble=o,r.prototype.uniform=o,r.prototype.gaussian=function(){var e,t,n;do{t=2*this.nextDouble()-1,n=2*this.nextDouble()-1,e=t*t+n*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},r.prototype.levy=function(){var e=Math.pow(i(2.5)*Math.sin(1.5*Math.PI/2)/(1.5*i(1.25)*Math.pow(2,.25)),1/1.5);return this.gaussian()*e/Math.pow(Math.abs(this.gaussian()),1/1.5)}},function(e,t,n){var r=n(185),i=n(370);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(20)),a=r(n(19)),s=r(n(6)),l=r(n(8)),c=r(n(17)),u=i(n(0)),h=n(159),d="/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/RNCSliderNativeComponent.web.js";function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=u.default.forwardRef((function(e,t){var n=e.value,r=e.minimumValue,i=void 0===r?0:r,o=e.maximumValue,s=void 0===o?0:o,f=e.step,m=void 0===f?1:f,v=e.minimumTrackTintColor,y=void 0===v?"#009688":v,b=e.maximumTrackTintColor,w=void 0===b?"#939393":b,x=e.thumbTintColor,_=void 0===x?"#009688":x,E=e.thumbStyle,A=void 0===E?{}:E,S=e.style,M=void 0===S?[]:S,T=e.inverted,C=void 0!==T&&T,O=e.enabled,R=void 0===O||O,k=e.trackHeight,P=void 0===k?4:k,L=e.thumbSize,D=void 0===L?20:L,I=e.onRNCSliderSlidingStart,N=void 0===I?function(){}:I,j=e.onRNCSliderSlidingComplete,B=void 0===j?function(){}:j,F=e.onRNCSliderValueChange,z=void 0===F?function(){}:F,H=(0,c.default)(e,["value","minimumValue","maximumValue","step","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","thumbStyle","style","inverted","enabled","trackHeight","thumbSize","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange"]),U=(0,u.useCallback)((function(e){z&&z({nativeEvent:{fromUser:!0,value:e}})}),[z]),V=(0,u.useCallback)((function(e){N&&N({nativeEvent:{fromUser:!0,value:e}})}),[N]),G=(0,u.useCallback)((function(e){B&&B({nativeEvent:{fromUser:!0,value:e}})}),[B]),W=u.default.useRef({width:0,height:0}),q=t||u.default.createRef(),X=u.default.useState(n||i),Y=(0,l.default)(X,2),K=Y[0],Q=Y[1];u.default.useLayoutEffect((function(){return ae(n)}),[n,ae]);var Z=(K-i)/(s-i),J=Z,$=1-Z,ee=h.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:"auto",flexDirection:"row",userSelect:"none",alignItems:"center",cursor:"pointer"},M),te={height:P,borderRadius:P/2,userSelect:"none"},ne=p({},te,{backgroundColor:y,flexGrow:100*J}),re=p({},te,{backgroundColor:w,flexGrow:100*$}),ie=h.StyleSheet.compose({width:D,height:D,backgroundColor:_,zIndex:1,borderRadius:D/2,overflow:"hidden",userSelect:"none"},A),oe=u.default.useRef(g(i,s,m));u.default.useEffect((function(){oe.current=g(i,s,m)}),[s,i,m]);var ae=(0,u.useCallback)((function(e){var t=oe.current<20?Number.parseFloat(e.toFixed(oe.current)):e,n=Math.max(i,Math.min(t,s));K!==n&&(Q(n),U(n))}),[i,s,K,U]),se=function(e){var t=(s-i)/10;switch(e.nativeEvent.actionName){case"increment":ae(K+(m||t));break;case"decrement":ae(K-(m||t))}};return u.default.useImperativeHandle(t,(function(){return{updateValue:function(e){ae(e)}}}),[ae]),u.default.createElement(h.View,(0,a.default)({ref:q,onLayout:function(e){var t=e.nativeEvent;return W.current=t.layout},accessibilityActions:[{name:"increment",label:"increment"},{name:"decrement",label:"decrement"}],onAccessibilityAction:se,accessible:!0,accessibleValue:K,accessibilityRole:"adjustable",style:ee,onStartShouldSetResponder:function(){return R},onMoveShouldSetResponder:function(){return R},onResponderGrant:function(){return V(K)},onResponderRelease:function(){G(K)},onResponderMove:function(e){var t=e.nativeEvent.locationX,n=W.current?W.current.width:1,r=C?s-(s-i)*t/n:i+(s-i)*t/n,o=m?Math.round(r/m)*m:r;ae(o)},onKeyDown:function(e){return function(e){switch(e){case"ArrowUp":case"ArrowRight":se({nativeEvent:{actionName:"increment"}});break;case"ArrowDown":case"ArrowLeft":se({nativeEvent:{actionName:"decrement"}})}}(e.nativeEvent.key)}},H,{__source:{fileName:d,lineNumber:324}}),u.default.createElement(h.View,{pointerEvents:"none",style:ne,__source:{fileName:d,lineNumber:345}}),u.default.createElement(h.View,{pointerEvents:"none",style:ie,__source:{fileName:d,lineNumber:346}}),u.default.createElement(h.View,{pointerEvents:"none",style:re,__source:{fileName:d,lineNumber:347}}))}));function g(e,t,n){if(n){var r=[e,t,n].map((function(e){return((e+"").split(".").pop()||"").length}));return Math.max.apply(Math,(0,o.default)(r))}return 1/0}m.displayName="RTCSliderWebComponent";var v=m;t.default=v},function(e,t,n){var r=n(187).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(153),i=n(373);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},,function(e,t,n){"use strict";n(20)},function(e,t,n){"use strict";e.exports=n(377)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case h:case d:case a:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case g:case c:return e;default:return t}}case o:return t}}}function E(e){return _(e)===d}t.AsyncMode=h,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||_(e)===h},t.isConcurrentMode=E,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===g},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===l||e===s||e===p||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===x||e.$$typeof===y)},t.typeOf=_},function(e,t,n){var r=n(379),i=n(380)(r);e.exports=i},function(e,t){e.exports=function(e,t){var n;t=t||[];var r=(e=e||[]).length,i=t.length,o=[];for(n=0;n<r;)o[o.length]=e[n],n+=1;for(n=0;n<i;)o[o.length]=t[n],n+=1;return o}},function(e,t,n){var r=n(86),i=n(39);e.exports=function(e){return i((function(t,n){return r(Math.max(0,t.length-n.length),(function(){return t.apply(this,e(n,arguments))}))}))}},function(e,t,n){var r=n(56),i=n(113),o=r((function(e){return i(e.length,e)}));e.exports=o},function(e,t,n){var r=n(86),i=n(112);e.exports=function e(t,n,o){return function(){for(var a=[],s=0,l=t,c=0;c<n.length||s<arguments.length;){var u;c<n.length&&(!i(n[c])||s>=arguments.length)?u=n[c]:(u=arguments[s],s+=1),a[c]=u,i(u)||(l-=1),c+=1}return l<=0?o.apply(this,a):r(l,e(t,a,o))}}},function(e,t,n){var r=n(86),i=n(384),o=n(205),a=n(389);e.exports=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,o(i,arguments[0],a(arguments)))}},function(e,t){e.exports=function(e,t){return function(){var n=this;return e.apply(n,arguments).then((function(e){return t.call(n,e)}))}}},function(e,t,n){var r=n(56),i=n(156),o=n(386),a=r((function(e){return!!i(e)||!!e&&("object"===typeof e&&(!o(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));e.exports=a},function(e,t){e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},function(e,t){var n=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();e.exports=function(e){return new n(e)}},function(e,t,n){var r=n(86),i=n(39)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=i},function(e,t,n){var r=n(157),i=n(56)(r("tail",n(390)(1,1/0)));e.exports=i},function(e,t,n){var r=n(157),i=n(155)(r("slice",(function(e,t,n){return Array.prototype.slice.call(n,e,t)})));e.exports=i},function(e,t,n){var r=n(114),i=Object.prototype.toString;e.exports=function(){return"[object Arguments]"===i.call(arguments)?function(e){return"[object Arguments]"===i.call(e)}:function(e){return r("callee",e)}}},function(e,t,n){var r=n(157),i=n(39)(r("forEach",(function(e,t){for(var n=t.length,r=0;r<n;)e(t[r]),r+=1;return t})));e.exports=i},function(e,t,n){var r=n(39)((function(e,t){var n={};for(var r in t)n[r]=t[r];return delete n[e],n}));e.exports=r},function(e,t,n){var r=n(395),i=n(39)((function(e,t){return r({},e,t)}));e.exports=i},function(e,t,n){var r=n(396);e.exports="function"===typeof Object.assign?Object.assign:r},function(e,t,n){var r=n(114);e.exports=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n<i;){var o=arguments[n];if(null!=o)for(var a in o)r(a,o)&&(t[a]=o[a]);n+=1}return t}},function(e,t,n){var r=n(39),i=n(398),o=r((function(e,t){return i([e],t)}));e.exports=o},function(e,t,n){var r=n(39)((function(e,t){for(var n=t,r=0;r<e.length;){if(null==n)return;n=n[e[r]],r+=1}return n}));e.exports=r},function(e,t,n){var r=n(155),i=n(113),o=r((function(e,t,n){return i(Math.max(e.length,t.length,n.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)}))}));e.exports=o},function(e,t,n){var r=n(401),i=n(39)(r);e.exports=i},function(e,t,n){var r=n(402);e.exports=function(e,t){return r(t,e,0)>=0}},function(e,t,n){var r=n(403);e.exports=function(e,t,n){var i,o;if("function"===typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(i=1/t;n<e.length;){if(0===(o=e[n])&&1/o===i)return n;n+=1}return-1}if(t!==t){for(;n<e.length;){if("number"===typeof(o=e[n])&&o!==o)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(r(e[n],t))return n;n+=1}return-1}},function(e,t,n){var r=n(39),i=n(404),o=r((function(e,t){return i(e,t,[],[])}));e.exports=o},function(e,t,n){var r=n(405),i=n(406),o=n(407),a=n(114),s=n(408),l=n(158),c=n(409);function u(e,t,n,o){var a=r(e),s=r(t);function l(e,t){return h(e,t,n.slice(),o.slice())}return!i((function(e,t){return!i(l,t,e)}),s,a)}function h(e,t,n,r){if(s(e,t))return!0;var i=c(e);if(i!==c(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===o(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var d=n.length-1;d>=0;){if(n[d]===e)return r[d]===t;d-=1}switch(i){case"Map":return e.size===t.size&&u(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&u(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=l(e);if(f.length!==l(t).length)return!1;var p=n.concat([e]),m=r.concat([t]);for(d=f.length-1;d>=0;){var g=f[d];if(!a(g,t)||!h(t[g],e[g],p,m))return!1;d-=1}return!0}e.exports=h},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t){e.exports=function(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}},function(e,t){e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},function(e,t,n){var r=n(39)((function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}));e.exports=r},function(e,t,n){var r=n(56)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},function(e,t,n){var r=n(39)((function(e,t){return e>=t}));e.exports=r},function(e,t,n){var r=n(207)(!0);e.exports=r},function(e,t,n){var r=n(39)((function(e,t){return null!=t&&t.constructor===e||t instanceof e}));e.exports=r},function(e,t,n){var r=n(56)(n(414));e.exports=r},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(56)((function(e){return null==e}));e.exports=r},function(e,t,n){var r=n(86),i=n(56),o=n(417),a=n(423),s=n(205),l=i((function(e){var t=s(a,0,o((function(e){return e[0].length}),e));return r(t,(function(){for(var t=0;t<e.length;){if(e[t][0].apply(this,arguments))return e[t][1].apply(this,arguments);t+=1}}))}));e.exports=l},function(e,t,n){var r=n(39),i=n(418),o=n(420),a=n(206),s=n(421),l=n(113),c=n(158),u=r(i(["fantasy-land/map","map"],s,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return l(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return a((function(n,r){return n[r]=e(t[r]),n}),{},c(t));default:return o(e,t)}})));e.exports=u},function(e,t,n){var r=n(156),i=n(419);e.exports=function(e,t,n){return function(){if(0===arguments.length)return n();var o=Array.prototype.slice.call(arguments,0),a=o.pop();if(!r(a)){for(var s=0;s<e.length;){if("function"===typeof a[e[s]])return a[e[s]].apply(a,o);s+=1}if(i(a)){var l=t.apply(null,o);return l(a)}}return n.apply(this,arguments)}}},function(e,t){e.exports=function(e){return"function"===typeof e["@@transducer/step"]}},function(e,t){e.exports=function(e,t){for(var n=0,r=t.length,i=Array(r);n<r;)i[n]=e(t[n]),n+=1;return i}},function(e,t,n){var r=n(39),i=n(422),o=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=i.init,e.prototype["@@transducer/result"]=i.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),a=r((function(e,t){return new o(e,t)}));e.exports=a},function(e,t){e.exports={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}}},function(e,t,n){var r=n(39)((function(e,t){return t>e?t:e}));e.exports=r},function(e,t,n){"use strict";var r=n(51),i=n(208),o=n(425),a=n(214);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(211));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(215),l.CancelToken=n(438),l.isCancel=n(210),l.all=function(e){return Promise.all(e)},l.spread=n(439),l.isAxiosError=n(440),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(51),i=n(209),o=n(426),a=n(427),s=n(214);function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(51);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(51),i=n(428),o=n(210),a=n(211);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(51);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(213);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(51);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(434),i=n(435);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(51),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(51);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(215);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},,,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(444),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(46))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i=1,o={},a=!1,s=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){u(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&u(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){u(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(u,0,e)},l.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return o[i]=a,r(i),i++},l.clearImmediate=c}function c(e){delete o[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,n(46),n(111))},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC"},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfkAQMKHDc9iQjuAAACmUlEQVRo3r3ZS2sUQRAH8M5zklwWg0K8mKBB/AIqXhTEi1cTPQe9iH4AUXBNjh79EooKgggSHyCICIIQL7NV1T2bze6EFS/xoms0ie0hs+sa9zE901U79/3R8+iu+pdSnn/VfbCAz/Um2r+XV8AO0jH9pP3vvSN2COdhGX8xInbIzNMKbv1PeEPsiLmEn2i7E+EJsSN4Az+UtjoTXpBwlG7CGnQlPCA2oFtQxZ3uRG7EBnAvjHsTOREbwB2s9bpRuZHKGCzCer9V5ELi8ehuOiIzYkejBUTYTkNkREyAV5DgdzoiE2ICuoYaUxMZEBPQdYpdCGfkzbA+rUsugDNiAnOGwJVwQipj0XlCd8IBscN0wv1GOSEmCE9qyEakREyAZ4myEqkQE+hzupydSIHE4+aUjvIQfZH6hL6QbxV9kfqEnqP1vEQPxA6YA3hReyB6IOUC3vZDdEXKBVPUG36ILkhlihbxqy+iI1KZogf4xW0zd0TWDuJD+AYWLRuyOo2P0DOxB6nM4Fv87pv4B1mdxhfY8E+0IeaIfok/OIgWEs3q97DJQyTI5xn9FBpcBFqlVDgLz6CBlu9S8SS9JlYCraKlTv2qb+QdN4FWYV0AEVkJLQH/M4kn9Sv2t0vkOxH64pt7F9f22LYLVw8D9y4sdJ40T0bgPRmVUqp+iP2MF6pWkrrrPnPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg=="},function(e,t,n){var r=n(448),i=n(449),o={};for(var a in r)r.hasOwnProperty(a)&&(o[r[a]]=a);var s=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),n="hsl";break;case"hwb":t=s.get.hwb(e),n="hwb";break;default:t=s.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var a=2*n;o[n]=parseInt(t.slice(a,a+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(o=r[t[1]])?(o[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=i(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=i(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},s.to.hsl=function(){var e=i(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=i(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return o[e.slice(0,3)]}},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){"use strict";var r=n(450),i=Array.prototype.concat,o=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n<a;n++){var s=e[n];r(s)?t=i.call(t,o.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},function(e,t){e.exports=function(e){return!(!e||"string"===typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,n){var r=n(218),i=n(453),o={};Object.keys(r).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:r[e].channels}),Object.defineProperty(o[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];o[e][n]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"===typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),o[e][n].raw=function(e){var t=function(t){return void 0===t||null===t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=o},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(218);function i(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),o=Object.keys(r[i]),a=o.length,s=0;s<a;s++){var l=o[s],c=t[l];-1===c.distance&&(c.distance=t[i].distance+1,c.parent=i,n.unshift(l))}return t}function o(e,t){return function(n){return t(e(n))}}function a(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=o(r[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}e.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),o=r.length,s=0;s<o;s++){var l=r[s];null!==t[l].parent&&(n[l]=a(l,t))}return n}},function(e,t,n){"use strict";const r=n(197),i=n(198),o=n(199),a=n(200);function s(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?i(e):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=u(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>c(t,e)):null===n?n:c(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>c(t,e));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),n(c(e,t),a,r)}for(const i of Object.keys(r)){const e=r[i];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=d(e[n],t);else r[i]=d(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=h,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&(e=>null===e||void 0===e)(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}(t),i={};for(const a of Object.keys(e))n(a)||(i[a]=e[a]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:c(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=u(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let s=t.stringify(a,n);s&&(s="?"+s);let c=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+l(e.fragmentIdentifier,n)),`${r}${s}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:s}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:a(o,n),fragmentIdentifier:s},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},,,,,,,function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r={value:()=>{}};function i(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new o(r)}function o(e){this._=e}function a(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function s(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function l(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=r,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}o.prototype=i.prototype={constructor:o,on:function(e,t){var n,r=this._,i=a(e+"",r),o=-1,c=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++o<c;)if(n=(e=i[o]).type)r[n]=l(r[n],e.name,t);else if(null==t)for(n in r)r[n]=l(r[n],e.name,null);return this}for(;++o<c;)if((n=(e=i[o]).type)&&(n=s(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new o(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},t.a=i},function(e,t,n){"use strict";var r=n(27),i=n(44);function o(e){return e.index}function a(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}t.a=function(e){var t,n,s,l,c,u,h,d=o,f=function(e){return 1/Math.min(c[e.source.index],c[e.target.index])},p=Object(r.a)(30),m=1;function g(r){for(var o=0,a=e.length;o<m;++o)for(var s,c,d,f,p,g=0,v=0,y=0,b=0;g<a;++g)c=(s=e[g]).source,v=(d=s.target).x+d.vx-c.x-c.vx||Object(i.a)(h),l>1&&(y=d.y+d.vy-c.y-c.vy||Object(i.a)(h)),l>2&&(b=d.z+d.vz-c.z-c.vz||Object(i.a)(h)),v*=f=((f=Math.sqrt(v*v+y*y+b*b))-n[g])/f*r*t[g],y*=f,b*=f,d.vx-=v*(p=u[g]),l>1&&(d.vy-=y*p),l>2&&(d.vz-=b*p),c.vx+=v*(p=1-p),l>1&&(c.vy+=y*p),l>2&&(c.vz+=b*p)}function v(){if(s){var r,i,o=s.length,l=e.length,h=new Map(s.map((e,t)=>[d(e,t,s),e]));for(r=0,c=new Array(o);r<l;++r)(i=e[r]).index=r,"object"!==typeof i.source&&(i.source=a(h,i.source)),"object"!==typeof i.target&&(i.target=a(h,i.target)),c[i.source.index]=(c[i.source.index]||0)+1,c[i.target.index]=(c[i.target.index]||0)+1;for(r=0,u=new Array(l);r<l;++r)i=e[r],u[r]=c[i.source.index]/(c[i.source.index]+c[i.target.index]);t=new Array(l),y(),n=new Array(l),b()}}function y(){if(s)for(var n=0,r=e.length;n<r;++n)t[n]=+f(e[n],n,e)}function b(){if(s)for(var t=0,r=e.length;t<r;++t)n[t]=+p(e[t],t,e)}return null==e&&(e=[]),g.initialize=function(e,...t){s=e,h=t.find(e=>"function"===typeof e)||Math.random,l=t.find(e=>[1,2,3].includes(e))||2,v()},g.links=function(t){return arguments.length?(e=t,v(),g):e},g.id=function(e){return arguments.length?(d=e,g):d},g.iterations=function(e){return arguments.length?(m=+e,g):m},g.strength=function(e){return arguments.length?(f="function"===typeof e?e:Object(r.a)(+e),y(),g):f},g.distance=function(e){return arguments.length?(p="function"===typeof e?e:Object(r.a)(+e),b(),g):p},g}},function(e,t,n){"use strict";var r=n(271),i=n(270),o=n(269),a=n(27),s=n(44),l=n(84);t.a=function(){var e,t,n,c,u,h,d=Object(a.a)(-30),f=1,p=1/0,m=.81;function g(a){var s,c=e.length,h=(1===t?Object(r.a)(e,l.b):2===t?Object(i.a)(e,l.b,l.c):3===t?Object(o.a)(e,l.b,l.c,l.d):null).visitAfter(y);for(u=a,s=0;s<c;++s)n=e[s],h.visit(b)}function v(){if(e){var t,n,r=e.length;for(h=new Array(r),t=0;t<r;++t)n=e[t],h[n.index]=+d(n,t,e)}}function y(e){var n,r,i,o,a,s,l=0,c=0,u=e.length;if(u){for(i=o=a=s=0;s<u;++s)(n=e[s])&&(r=Math.abs(n.value))&&(l+=n.value,c+=r,i+=r*(n.x||0),o+=r*(n.y||0),a+=r*(n.z||0));l*=Math.sqrt(4/u),e.x=i/c,t>1&&(e.y=o/c),t>2&&(e.z=a/c)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{l+=h[n.data.index]}while(n=n.next)}e.value=l}function b(e,r,i,o,a){if(!e.value)return!0;var l=[i,o,a][t-1],d=e.x-n.x,g=t>1?e.y-n.y:0,v=t>2?e.z-n.z:0,y=l-r,b=d*d+g*g+v*v;if(y*y/m<b)return b<p&&(0===d&&(b+=(d=Object(s.a)(c))*d),t>1&&0===g&&(b+=(g=Object(s.a)(c))*g),t>2&&0===v&&(b+=(v=Object(s.a)(c))*v),b<f&&(b=Math.sqrt(f*b)),n.vx+=d*e.value*u/b,t>1&&(n.vy+=g*e.value*u/b),t>2&&(n.vz+=v*e.value*u/b)),!0;if(!(e.length||b>=p)){(e.data!==n||e.next)&&(0===d&&(b+=(d=Object(s.a)(c))*d),t>1&&0===g&&(b+=(g=Object(s.a)(c))*g),t>2&&0===v&&(b+=(v=Object(s.a)(c))*v),b<f&&(b=Math.sqrt(f*b)));do{e.data!==n&&(y=h[e.data.index]*u/b,n.vx+=d*y,t>1&&(n.vy+=g*y),t>2&&(n.vz+=v*y))}while(e=e.next)}}return g.initialize=function(n,...r){e=n,c=r.find(e=>"function"===typeof e)||Math.random,t=r.find(e=>[1,2,3].includes(e))||2,v()},g.strength=function(e){return arguments.length?(d="function"===typeof e?e:Object(a.a)(+e),v(),g):d},g.distanceMin=function(e){return arguments.length?(f=e*e,g):Math.sqrt(f)},g.distanceMax=function(e){return arguments.length?(p=e*e,g):Math.sqrt(p)},g.theta=function(e){return arguments.length?(m=e*e,g):Math.sqrt(m)},g}},function(e,t,n){"use strict";t.a=function(e,t,n){var r,i=1;function o(){var o,a,s=r.length,l=0,c=0,u=0;for(o=0;o<s;++o)l+=(a=r[o]).x||0,c+=a.y||0,u+=a.z||0;for(l=(l/s-e)*i,c=(c/s-t)*i,u=(u/s-n)*i,o=0;o<s;++o)a=r[o],l&&(a.x-=l),c&&(a.y-=c),u&&(a.z-=u)}return null==e&&(e=0),null==t&&(t=0),null==n&&(n=0),o.initialize=function(e){r=e},o.x=function(t){return arguments.length?(e=+t,o):e},o.y=function(e){return arguments.length?(t=+e,o):t},o.z=function(e){return arguments.length?(n=+e,o):n},o.strength=function(e){return arguments.length?(i=+e,o):i},o}},function(e,t,n){"use strict";var r=n(27);t.a=function(e,t,n,i){var o,a,s,l,c=Object(r.a)(.1);function u(e){for(var r=0,c=o.length;r<c;++r){var u=o[r],h=u.x-t||1e-6,d=(u.y||0)-n||1e-6,f=(u.z||0)-i||1e-6,p=Math.sqrt(h*h+d*d+f*f),m=(l[r]-p)*s[r]*e/p;u.vx+=h*m,a>1&&(u.vy+=d*m),a>2&&(u.vz+=f*m)}}function h(){if(o){var t,n=o.length;for(s=new Array(n),l=new Array(n),t=0;t<n;++t)l[t]=+e(o[t],t,o),s[t]=isNaN(l[t])?0:+c(o[t],t,o)}}return"function"!==typeof e&&(e=Object(r.a)(+e)),null==t&&(t=0),null==n&&(n=0),null==i&&(i=0),u.initialize=function(e,...t){o=e,a=t.find(e=>[1,2,3].includes(e))||2,h()},u.strength=function(e){return arguments.length?(c="function"===typeof e?e:Object(r.a)(+e),h(),u):c},u.radius=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),h(),u):e},u.x=function(e){return arguments.length?(t=+e,u):t},u.y=function(e){return arguments.length?(n=+e,u):n},u.z=function(e){return arguments.length?(i=+e,u):i},u}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vx+=(i[o]-r.x)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.x=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vy+=(i[o]-r.y)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.y=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(27);t.a=function(e){var t,n,i,o=Object(r.a)(.1);function a(e){for(var r,o=0,a=t.length;o<a;++o)(r=t[o]).vz+=(i[o]-r.z)*n[o]*e}function s(){if(t){var r,a=t.length;for(n=new Array(a),i=new Array(a),r=0;r<a;++r)n[r]=isNaN(i[r]=+e(t[r],r,t))?0:+o(t[r],r,t)}}return"function"!==typeof e&&(e=Object(r.a)(null==e?0:+e)),a.initialize=function(e){t=e,s()},a.strength=function(e){return arguments.length?(o="function"===typeof e?e:Object(r.a)(+e),s(),a):o},a.z=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),s(),a):e},a}},function(e,t,n){"use strict";var r=n(271),i=n(270),o=n(269),a=n(27),s=n(44);function l(e){return e.x+e.vx}function c(e){return e.y+e.vy}function u(e){return e.z+e.vz}t.a=function(e){var t,n,h,d,f=1,p=1;function m(){for(var e,a,m,v,y,b,w,x,_=t.length,E=0;E<p;++E)for(a=(1===n?Object(r.a)(t,l):2===n?Object(i.a)(t,l,c):3===n?Object(o.a)(t,l,c,u):null).visitAfter(g),e=0;e<_;++e)m=t[e],w=h[m.index],x=w*w,v=m.x+m.vx,n>1&&(y=m.y+m.vy),n>2&&(b=m.z+m.vz),a.visit(A);function A(e,t,r,i,o,a,l){var c=[t,r,i,o,a,l],u=c[0],h=c[1],p=c[2],g=c[n],_=c[n+1],E=c[n+2],A=e.data,S=e.r,M=w+S;if(!A)return u>v+M||g<v-M||n>1&&(h>y+M||_<y-M)||n>2&&(p>b+M||E<b-M);if(A.index>m.index){var T=v-A.x-A.vx,C=n>1?y-A.y-A.vy:0,O=n>2?b-A.z-A.vz:0,R=T*T+C*C+O*O;R<M*M&&(0===T&&(R+=(T=Object(s.a)(d))*T),n>1&&0===C&&(R+=(C=Object(s.a)(d))*C),n>2&&0===O&&(R+=(O=Object(s.a)(d))*O),R=(M-(R=Math.sqrt(R)))/R*f,m.vx+=(T*=R)*(M=(S*=S)/(x+S)),n>1&&(m.vy+=(C*=R)*M),n>2&&(m.vz+=(O*=R)*M),A.vx-=T*(M=1-M),n>1&&(A.vy-=C*M),n>2&&(A.vz-=O*M))}}}function g(e){if(e.data)return e.r=h[e.data.index];for(var t=e.r=0;t<Math.pow(2,n);++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function v(){if(t){var n,r,i=t.length;for(h=new Array(i),n=0;n<i;++n)r=t[n],h[r.index]=+e(r,n,t)}}return"function"!==typeof e&&(e=Object(a.a)(null==e?1:+e)),m.initialize=function(e,...r){t=e,d=r.find(e=>"function"===typeof e)||Math.random,n=r.find(e=>[1,2,3].includes(e))||2,v()},m.iterations=function(e){return arguments.length?(p=+e,m):p},m.strength=function(e){return arguments.length?(f=+e,m):f},m.radius=function(t){return arguments.length?(e="function"===typeof t?t:Object(a.a)(+t),v(),m):e},m}},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(21),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(267);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){return o()(this,n),t.call(this,"ERR_UNAVAILABLE","The method or property "+e+"."+r+" is not available on "+d.a.OS+", are you sure you've linked all the native dependencies properly?")}return n}(r(254).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r=null,i=null},function(t,n,r){"use strict";var i,o,a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(9),d=r(30),f=r(20),p=r.n(f),m=r(21),g=r.n(m),v=r(23),y=r.n(v),b=r(16),w=r.n(b),x=r(24),_=r.n(x),E=r(25),A=r.n(E),S=r(18),M=r.n(S),T=r(3),C=r(5),O=r(476),R=function(e){var t=e.children;return u.createElement(u.Fragment,null,t)},k=T.a,P=2,L=3,D=5,I=r(12),N=r(34),j=["active","style"],B=["enabled"],F=["enabled","active"];function z(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}try{o=r(163)}catch(e){}var U=function(e){_()(n,e);var t=z(n);function n(){return g()(this,n),t.apply(this,arguments)}return y()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.style,r=c()(e,j);return u.createElement(T.a,H({hidden:!t,style:[n,{display:t?"flex":"none"}]},r))}}]),n}(u.Component),V=I.a.createAnimatedComponent(U),G=null===(i=o)||void 0===i?void 0:i.shouldUseActivityState,W=function(e){var t,n=e.enabled,r=c()(e,B);return n&&"web"!==h.a.OS&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?u.createElement(o.ScreenContainer,H({enabled:n},r)):u.createElement(T.a,r)},q=function(e){var t,n=e.enabled,r=e.active,i=c()(e,F);return n&&"web"===h.a.OS?u.createElement(V,H({active:r},i)):n&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?G?u.createElement(o.Screen,H({enabled:n,activityState:r},i)):u.createElement(o.Screen,H({enabled:n,active:r},i)):u.createElement(T.a,i)},X=r(8),Y=r.n(X),K=r(36),Q=r(38),Z=r(216);function J(e){return e.children}var $=r(92),ee=r(48),te=["borderless","pressColor","style","children"];function ne(){return(ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function re(e){var t=e.borderless,n=void 0!==t&&t,r=e.pressColor,i=void 0===r?"rgba(0, 0, 0, .32)":r,o=e.style,a=e.children,s=c()(e,te);return"android"===h.a.OS&&h.a.Version>=21?u.createElement($.a,ne({},s,{useForeground:$.a.canUseNativeForeground(),background:$.a.Ripple(i,n)}),u.createElement(T.a,{style:o},u.Children.only(a))):u.createElement(ee.a,ne({style:o},s),a)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){var t=e.disabled,n=e.allowFontScaling,i=e.backImage,o=e.label,a=e.labelStyle,s=e.labelVisible,l=void 0===s?"ios"===h.a.OS:s,c=e.onLabelLayout,d=e.onPress,f=e.pressColorAndroid,p=e.screenLayout,m=e.tintColor,g=e.titleLayout,v=e.truncatedLabel,y=void 0===v?"Back":v,b=e.accessibilityLabel,w=void 0===b?o&&"Back"!==o?"".concat(o,", back"):"Go back":b,x=e.style,_=Object(Z.a)(),E=_.dark,A=_.colors,S=u.useState(void 0),M=Y()(S,2),C=M[0],O=M[1],R=void 0!==m?m:h.a.select({ios:A.primary,default:A.text}),k=void 0!==f?f:E?"rgba(255, 255, 255, .32)":"rgba(0, 0, 0, .32)",P=function(e){null===c||void 0===c||c(e),O(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return u.createElement(re,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityComponentType:"button",accessibilityLabel:w,accessibilityTraits:"button",testID:"header-back",delayPressIn:0,onPress:t?void 0:function(){return d&&requestAnimationFrame(d)},pressColor:k,style:[ae.container,t&&ae.disabled,x],hitSlop:h.a.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}}),borderless:!0},u.createElement(u.Fragment,null,i?i({tintColor:R}):u.createElement(Q.a,{style:[ae.icon,Boolean(l)&&ae.iconWithLabel,Boolean(R)&&{tintColor:R}],source:r(445),fadeDuration:0}),function(){var e=!o||C&&g&&p&&(p.width-g.width)/2<C+26?y:o;if(!l||void 0===e)return null;var t=u.createElement(T.a,{style:p?[ae.labelWrapper,{minWidth:p.width/2-27}]:null},u.createElement(I.a.Text,{accessible:!1,onLayout:e===o?P:void 0,style:[ae.label,R?{color:R}:null,a],numberOfLines:1,allowFontScaling:!!n},e));return i||"ios"!==h.a.OS?t:u.createElement(J,{maskElement:u.createElement(T.a,{style:ae.iconMaskContainer},u.createElement(Q.a,{source:r(446),style:ae.iconMask}),u.createElement(T.a,{style:ae.iconMaskFillerRect}))},t)}()))}var ae=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({alignItems:"center",flexDirection:"row"},h.a.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})),disabled:{opacity:.5},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:"row",alignItems:"flex-start"},icon:h.a.select({ios:{height:21,width:13,marginLeft:8,marginRight:22,marginVertical:12,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]},default:{height:24,width:24,margin:3,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),iconWithLabel:"ios"===h.a.OS?{marginRight:6}:{},iconMaskContainer:{flex:1,flexDirection:"row",justifyContent:"center"},iconMaskFillerRect:{flex:1,backgroundColor:"#000"},iconMask:{height:21,width:13,marginLeft:-14.5,marginVertical:12,alignSelf:"center",resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),se=["style"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(){return(ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ue(e){var t=e.style,n=c()(e,se),r=Object(Z.a)().colors;return u.createElement(I.a.View,ce({style:[he.container,{backgroundColor:r.card,borderBottomColor:r.border,shadowColor:r.border},t]},n))}var he=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({flex:1},h.a.select({android:{elevation:4},ios:{shadowOpacity:.85,shadowRadius:0,shadowOffset:{width:0,height:C.a.hairlineWidth}},default:{borderBottomWidth:C.a.hairlineWidth}}))}),de=u.createContext(!1);function fe(e){var t,n;return function(){for(var r=!1,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(t){if(t.length!==o.length)r=!0;else for(var s=0;s<t.length;s++)if(t[s]!==o[s]){r=!0;break}}else r=!0;return t=o,(r||void 0===n)&&(n=e.apply(void 0,o)),n}}var pe=["height","minHeight","maxHeight","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","opacity","transform"],me=function(e,t){var n=e.width>e.height;return("ios"===h.a.OS?n&&!h.a.isPad?32:44:"android"===h.a.OS?56:64)+t};function ge(e){var t=u.useState(void 0),n=Y()(t,2),r=n[0],i=n[1],o=u.useState(void 0),a=Y()(o,2),s=a[0],l=a[1],d=u.useContext(de),f=fe((function(e,t,n,r,i,o,a){return e({current:{progress:n},next:r&&{progress:r},layouts:{header:{height:a,width:t.width},screen:t,title:i,leftLabel:o}})})),p=e.scene,m=e.layout,g=e.insets,v=e.title,y=e.leftLabel,b=e.onGoBack,w=e.headerTitle,x=e.headerTitleAlign,_=void 0===x?h.a.select({ios:"center",default:"left"}):x,E=e.headerLeft,A=void 0===E?b?function(e){return u.createElement(oe,e)}:void 0:E,S=e.headerTransparent,M=e.headerTintColor,O=e.headerBackground,R=e.headerRight,k=e.headerBackImage,P=e.headerBackTitle,L=e.headerBackTitleVisible,D=e.headerTruncatedBackTitle,N=e.headerPressColorAndroid,j=e.headerBackAccessibilityLabel,B=e.headerBackAllowFontScaling,F=e.headerTitleAllowFontScaling,z=e.headerTitleStyle,H=e.headerBackTitleStyle,U=e.headerLeftContainerStyle,V=e.headerRightContainerStyle,G=e.headerTitleContainerStyle,W=e.headerStyle,q=e.headerStatusBarHeight,X=void 0===q?d?0:g.top:q,K=e.styleInterpolator,Q=me(m,X),Z=C.a.flatten(W||{}),J=Z.height,$=void 0===J?Q:J,ee=Z.minHeight,te=Z.maxHeight,ne=Z.backgroundColor,re=Z.borderBottomColor,ie=Z.borderBottomEndRadius,ae=Z.borderBottomLeftRadius,se=Z.borderBottomRightRadius,le=Z.borderBottomStartRadius,ce=Z.borderBottomWidth,he=Z.borderColor,ge=Z.borderEndColor,ye=Z.borderEndWidth,be=Z.borderLeftColor,we=Z.borderLeftWidth,xe=Z.borderRadius,_e=Z.borderRightColor,Ee=Z.borderRightWidth,Ae=Z.borderStartColor,Se=Z.borderStartWidth,Me=Z.borderStyle,Te=Z.borderTopColor,Ce=Z.borderTopEndRadius,Oe=Z.borderTopLeftRadius,Re=Z.borderTopRightRadius,ke=Z.borderTopStartRadius,Pe=Z.borderTopWidth,Le=Z.borderWidth,De=Z.boxShadow,Ie=Z.elevation,Ne=Z.shadowColor,je=Z.shadowOffset,Be=Z.shadowOpacity,Fe=Z.shadowRadius,ze=Z.opacity,He=Z.transform;c()(Z,pe);var Ue={backgroundColor:ne,borderBottomColor:re,borderBottomEndRadius:ie,borderBottomLeftRadius:ae,borderBottomRightRadius:se,borderBottomStartRadius:le,borderBottomWidth:ce,borderColor:he,borderEndColor:ge,borderEndWidth:ye,borderLeftColor:be,borderLeftWidth:we,borderRadius:xe,borderRightColor:_e,borderRightWidth:Ee,borderStartColor:Ae,borderStartWidth:Se,borderStyle:Me,borderTopColor:Te,borderTopEndRadius:Ce,borderTopLeftRadius:Oe,borderTopRightRadius:Re,borderTopStartRadius:ke,borderTopWidth:Pe,borderWidth:Le,boxShadow:De,elevation:Ie,shadowColor:Ne,shadowOffset:je,shadowOpacity:Be,shadowRadius:Fe,opacity:ze,transform:He};for(var Ve in Ue)void 0===Ue[Ve]&&delete Ue[Ve];var Ge=f(K,m,p.progress.current,p.progress.next,s,y?r:void 0,"number"===typeof $?$:Q),We=Ge.titleStyle,qe=Ge.leftButtonStyle,Xe=Ge.leftLabelStyle,Ye=Ge.rightButtonStyle,Ke=Ge.backgroundStyle,Qe=A?A({backImage:k,pressColorAndroid:N,accessibilityLabel:j,allowFontScaling:B,onPress:b,labelVisible:L,label:void 0!==P?P:y,truncatedLabel:D,labelStyle:[Xe,H],onLabelLayout:function(e){var t=e.nativeEvent.layout,n=t.height,o=t.width;r&&n===r.height&&o===r.width||i({height:n,width:o})},screenLayout:m,titleLayout:s,tintColor:M,canGoBack:Boolean(b)}):null,Ze=R?R({tintColor:M}):null;return u.createElement(u.Fragment,null,u.createElement(I.a.View,{pointerEvents:"box-none",style:[C.a.absoluteFill,{zIndex:0},Ke]},O?O({style:Ue}):S?null:u.createElement(ue,{style:Ue})),u.createElement(I.a.View,{pointerEvents:"box-none",style:[{height:$,minHeight:ee,maxHeight:te,opacity:ze,transform:He}]},u.createElement(T.a,{pointerEvents:"none",style:{height:X}}),u.createElement(T.a,{pointerEvents:"box-none",style:ve.content},Qe?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.left,{left:g.left},qe,U]},Qe):null,u.createElement(I.a.View,{pointerEvents:"box-none",style:["left"===_?{position:"absolute",left:(Qe?72:16)+g.left,right:(Ze?72:16)+g.right}:{marginHorizontal:(Qe?32:16)+(Qe&&!1!==L?40:0)+Math.max(g.left,g.right)},We,G]},w({children:v,onLayout:function(e){var t=e.nativeEvent.layout,n=t.height,r=t.width;l((function(e){return e&&n===e.height&&r===e.width?e:{height:n,width:r}}))},allowFontScaling:F,tintColor:M,style:z})),Ze?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.right,{right:g.right},Ye,V]},Ze):null)))}var ve=C.a.create({content:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center"},left:{position:"absolute",left:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-start"},right:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-end"}}),ye=r(54),be=r(262),we=r.n(be),xe=["enabled","layout","style"];function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee=u.forwardRef((function(e,t){var n=e.enabled,r=e.layout,i=e.style,o=c()(e,xe),a=u.useState(!1),s=Y()(a,2),l=s[0],h=s[1];return u.useEffect((function(){if("undefined"!==typeof document&&document.body){var e=document.body.clientWidth,t=document.body.clientHeight;h(e===r.width&&t===r.height)}}),[r.height,r.width]),u.createElement(T.a,_e({},o,{ref:t,style:[n&&l?Ae.page:Ae.card,i]}))})),Ae=C.a.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}}),Se=u.createContext(void 0);function Me(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return K.a.isRTL?-1:1;case"horizontal-inverted":return K.a.isRTL?1:-1}}function Te(e,t){var n=Me(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}var Ce=["styleInterpolator","index","current","gesture","next","layout","insets","overlay","overlayEnabled","shadowEnabled","gestureEnabled","gestureDirection","pageOverflowEnabled","children","containerStyle","contentStyle"];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De="web"!==h.a.OS,Ie=function(e){_()(n,e);var t=ke(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Le(w()(e),"isCurrentlyMounted",!1),Le(w()(e),"isClosing",new I.a.Value(0)),Le(w()(e),"inverted",new I.a.Value(Me(e.props.gestureDirection))),Le(w()(e),"layout",{width:new I.a.Value(e.props.layout.width),height:new I.a.Value(e.props.layout.height)}),Le(w()(e),"isSwiping",new I.a.Value(0)),Le(w()(e),"interactionHandle",void 0),Le(w()(e),"pendingGestureCallback",void 0),Le(w()(e),"lastToValue",void 0),Le(w()(e),"animate",(function(t){var n=t.closing,r=t.velocity,i=e.props,o=i.gesture,a=i.transitionSpec,s=i.onOpen,l=i.onClose,c=i.onTransition,u=e.getAnimateToValue(Re(Re({},e.props),{},{closing:n}));e.lastToValue=u;var h=n?a.close:a.open,d="spring"===h.animation?I.a.spring:I.a.timing;e.setPointerEventsEnabled(!n),e.handleStartInteraction(),clearTimeout(e.pendingGestureCallback),null===c||void 0===c||c({closing:n,gesture:void 0!==r}),d(o,Re(Re({},h.config),{},{velocity:r,toValue:u,useNativeDriver:De,isInteraction:!1})).start((function(t){var r=t.finished;e.handleEndInteraction(),clearTimeout(e.pendingGestureCallback),r&&(n?l():s(),e.isCurrentlyMounted&&e.forceUpdate())}))})),Le(w()(e),"getAnimateToValue",(function(e){var t=e.closing,n=e.layout,r=e.gestureDirection;return t?Te(n,r):0})),Le(w()(e),"setPointerEventsEnabled",(function(t){var n,r=t?"box-none":"none";null===(n=e.contentRef.current)||void 0===n||n.setNativeProps({pointerEvents:r})})),Le(w()(e),"handleStartInteraction",(function(){void 0===e.interactionHandle&&(e.interactionHandle=ye.a.createInteractionHandle())})),Le(w()(e),"handleEndInteraction",(function(){void 0!==e.interactionHandle&&(ye.a.clearInteractionHandle(e.interactionHandle),e.interactionHandle=void 0)})),Le(w()(e),"handleGestureStateChange",(function(t){var n=t.nativeEvent,r=e.props,i=r.layout,o=r.onClose,a=r.onGestureBegin,s=r.onGestureCanceled,l=r.onGestureEnd,c=r.gestureDirection,u=r.gestureVelocityImpact;switch(n.state){case P:e.isSwiping.setValue(1),e.handleStartInteraction(),null===a||void 0===a||a();break;case L:e.isSwiping.setValue(0),e.handleEndInteraction();var h="vertical"===c||"vertical-inverted"===c?n.velocityY:n.velocityX;e.animate({closing:e.props.closing,velocity:h}),null===s||void 0===s||s();break;case D:var d,f,p;e.isSwiping.setValue(0),"vertical"===c||"vertical-inverted"===c?(d=i.height,f=n.translationY,p=n.velocityY):(d=i.width,f=n.translationX,p=n.velocityX);var m=(f+p*u)*Me(c)>d/2?0!==p||0!==f:e.props.closing;e.animate({closing:m,velocity:p}),m&&(e.pendingGestureCallback=setTimeout((function(){o(),e.forceUpdate()}),32)),null===l||void 0===l||l()}})),Le(w()(e),"getInterpolatedStyle",fe((function(t,n,r,i,o,a,s,l,c){return t({index:n,current:{progress:r},next:i&&{progress:i},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:o},insets:{top:a,right:s,bottom:l,left:c}})}))),Le(w()(e),"getCardAnimationContext",fe((function(t,n,r,i,o,a,s,l){return{index:t,current:{progress:n},next:r&&{progress:r},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:i},insets:{top:o,right:a,bottom:s,left:l}}}))),Le(w()(e),"contentRef",u.createRef()),e}return y()(n,[{key:"componentDidMount",value:function(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.layout,r=t.gestureDirection,i=t.closing,o=n.width,a=n.height;o!==e.layout.width&&this.layout.width.setValue(o),a!==e.layout.height&&this.layout.height.setValue(a),r!==e.gestureDirection&&this.inverted.setValue(Me(r));var s=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===s&&this.lastToValue===s||this.animate({closing:i})}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.handleEndInteraction()}},{key:"gestureActivationCriteria",value:function(){var e=this.props,t=e.layout,n=e.gestureDirection,r=e.gestureResponseDistance,i="vertical"===n||"vertical-inverted"===n?void 0!==(null===r||void 0===r?void 0:r.vertical)?r.vertical:135:void 0!==(null===r||void 0===r?void 0:r.horizontal)?r.horizontal:50;if("vertical"===n)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-t.height+i}};if("vertical-inverted"===n)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-t.height+i}};var o=-t.width+i;return 1===Me(n)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:o}}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:o}}}},{key:"render",value:function(){var e,t=this.props,n=t.styleInterpolator,r=t.index,i=t.current,o=t.gesture,a=t.next,s=t.layout,l=t.insets,h=t.overlay,d=t.overlayEnabled,f=t.shadowEnabled,p=t.gestureEnabled,m=t.gestureDirection,g=t.pageOverflowEnabled,v=t.children,y=t.containerStyle,b=t.contentStyle,w=c()(t,Ce),x=this.getInterpolatedStyle(n,r,i,a,s,l.top,l.right,l.bottom,l.left),_=this.getCardAnimationContext(r,i,a,s,l.top,l.right,l.bottom,l.left),E=x.containerStyle,A=x.cardStyle,S=x.overlayStyle,M=x.shadowStyle,O=p?I.a.event([{nativeEvent:"vertical"===m||"vertical-inverted"===m?{translationY:o}:{translationX:o}}],{useNativeDriver:De}):void 0,k=C.a.flatten(b||{}).backgroundColor,P="string"===typeof k&&0===we()(k).alpha();return u.createElement(Se.Provider,{value:_},u.createElement(I.a.View,{style:{opacity:i},collapsable:!1}),u.createElement(T.a,Pe({pointerEvents:"box-none"},w),d?u.createElement(T.a,{pointerEvents:"box-none",style:C.a.absoluteFill},h({style:S})):null,u.createElement(I.a.View,{needsOffscreenAlphaCompositing:(e=E,!!e&&null!=C.a.flatten(e).opacity),style:[Ne.container,E,y],pointerEvents:"box-none"},u.createElement(R,Pe({enabled:0!==s.width&&p,onGestureEvent:O,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),u.createElement(I.a.View,{style:[Ne.container,A]},f&&M&&!P?u.createElement(I.a.View,{style:[Ne.shadow,"horizontal"===m?[Ne.shadowHorizontal,Ne.shadowLeft]:"horizontal-inverted"===m?[Ne.shadowHorizontal,Ne.shadowRight]:"vertical"===m?[Ne.shadowVertical,Ne.shadowTop]:[Ne.shadowVertical,Ne.shadowBottom],{backgroundColor:k},M],pointerEvents:"none"}):null,u.createElement(Ee,{ref:this.contentRef,enabled:g,layout:s,style:b},v))))))}}]),n}(u.Component);Le(Ie,"defaultProps",{overlayEnabled:"ios"!==h.a.OS,shadowEnabled:!0,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:function(e){var t=e.style;return t?u.createElement(I.a.View,{pointerEvents:"none",style:[Ne.overlay,t]}):null}});var Ne=C.a.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}}),je=u.createContext(void 0),Be=u.createContext(void 0);var Fe=u.memo((function(e){var t=e.active,n=e.cardOverlay,r=e.cardOverlayEnabled,i=e.cardShadowEnabled,o=e.cardStyle,a=e.cardStyleInterpolator,s=e.closing,l=e.gesture,c=e.focused,h=e.gestureDirection,d=e.gestureEnabled,f=e.gestureResponseDistance,p=e.gestureVelocityImpact,m=e.getPreviousScene,g=e.getFocusedRoute,v=e.mode,y=e.headerMode,b=e.headerShown,w=e.headerStyleInterpolator,x=e.hasAbsoluteHeader,_=e.headerHeight,E=e.onHeaderHeightChange,A=e.isParentHeaderShown,S=e.index,M=e.layout,O=e.onCloseRoute,R=e.onOpenRoute,k=e.onPageChangeCancel,P=e.onPageChangeConfirm,L=e.onPageChangeStart,D=e.onGestureCancel,I=e.onGestureEnd,N=e.onGestureStart,j=e.onTransitionEnd,B=e.onTransitionStart,F=e.renderHeader,z=e.renderScene,H=e.safeAreaInsetBottom,U=e.safeAreaInsetLeft,V=e.safeAreaInsetRight,G=e.safeAreaInsetTop,W=e.scene,q=e.transitionSpec,X={top:G,right:V,bottom:H,left:U},K=Object(Z.a)().colors,Q=u.useState("box-none"),J=Y()(Q,2),$=J[0],ee=J[1];u.useEffect((function(){var e,t,n=null===(e=W.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,(function(e){var t=e.value;ee(t<=.1?"box-none":"none")}));return function(){var e,t;n&&(null===(e=W.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}}),[$,W.progress.next]);var te="none"!==y&&!1!==b,ne=m({route:W.route});return u.createElement(Ie,{index:S,gestureDirection:h,layout:M,insets:X,gesture:l,current:W.progress.current,next:W.progress.next,closing:s,onOpen:function(){var e=W.route;null===j||void 0===j||j({route:e},!1),R({route:e})},onClose:function(){var e=W.route;null===j||void 0===j||j({route:e},!0),O({route:e})},overlay:n,overlayEnabled:r,shadowEnabled:i,onTransition:function(e){var n=e.closing,r=e.gesture,i=W.route;r?t&&n?null===P||void 0===P||P(!1):null===k||void 0===k||k():null===P||void 0===P||P(!0),null===B||void 0===B||B({route:i},n)},onGestureBegin:function(){var e=W.route;null===L||void 0===L||L(),null===N||void 0===N||N({route:e})},onGestureCanceled:function(){var e=W.route;null===k||void 0===k||k(),null===D||void 0===D||D({route:e})},onGestureEnd:function(){var e=W.route;null===I||void 0===I||I({route:e})},gestureEnabled:d,gestureResponseDistance:f,gestureVelocityImpact:p,transitionSpec:q,styleInterpolator:a,accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",pointerEvents:t?"box-none":$,pageOverflowEnabled:"screen"===y&&"card"===v,containerStyle:x?{marginTop:_}:null,contentStyle:[{backgroundColor:K.background},o],style:[{overflow:t?void 0:"hidden"},C.a.absoluteFill]},u.createElement(T.a,{style:ze.container},u.createElement(T.a,{style:ze.scene},u.createElement(Be.Provider,{value:ne},u.createElement(de.Provider,{value:A||te},u.createElement(je.Provider,{value:_},z({route:W.route}))))),"screen"===y?F({mode:"screen",layout:M,insets:X,scenes:[ne,W],getPreviousScene:m,getFocusedRoute:g,gestureDirection:h,styleInterpolator:w,onContentHeightChange:E}):null))})),ze=C.a.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),He=r(78);function Ue(){var e=N.a.get("window");return"ios"===h.a.OS&&!h.a.isPad&&!h.a.isTVOS&&(780===e.height||780===e.width||812===e.height||812===e.width||844===e.height||844===e.width||896===e.height||896===e.width||926===e.height||926===e.width)}var Ve=I.a.add,Ge=I.a.multiply;function We(e,t,n){return Ve(Ge(e,t),Ge(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}var qe=I.a.add,Xe=I.a.multiply;function Ye(){return{}}var Ke=I.a.add;function Qe(e){var t=e.current,n=e.next,r=Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),i=r.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:i},rightButtonStyle:{opacity:i},titleStyle:{opacity:i},backgroundStyle:{opacity:r.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function Ze(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function Je(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function $e(e){var t=e.current,n=e.next,r=e.layouts.header,i=[{translateY:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-r.height,0,-r.height]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function et(){return{}}var tt=r(14),nt={animation:"spring",config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},rt={animation:"timing",config:{duration:350,easing:tt.a.out(tt.a.poly(5))}},it={animation:"timing",config:{duration:150,easing:tt.a.in(tt.a.linear)}},ot={animation:"timing",config:{duration:425,easing:tt.a.bezier(.35,.45,0,1)}},at={animation:"timing",config:{duration:400,easing:tt.a.bezier(.35,.45,0,1)}},st={gestureDirection:"horizontal",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{cardStyle:{transform:[{translateX:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.width,0],extrapolate:"clamp"}),r)},{translateX:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,-.3*i.width],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:"clamp"})},shadowStyle:{shadowOpacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},lt={gestureDirection:"vertical",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen;return{cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:"clamp"}),n)}]}}},headerStyleInterpolator:Qe},ct={gestureDirection:"vertical",transitionSpec:{open:rt,close:it},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen,i=e.closing,o=Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[.08*r.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:We(i,t.progress,t.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})),transform:[{translateY:o}]}}},headerStyleInterpolator:Qe},ut={gestureDirection:"vertical",transitionSpec:{open:ot,close:ot},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{containerStyle:{overflow:"hidden",transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height,0],extrapolate:"clamp"}),r)}]},cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height*(95.9/100)*-1,0],extrapolate:"clamp"}),r)},{translateY:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,.02*i.height*-1],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},ht={gestureDirection:"horizontal",transitionSpec:{open:at,close:at},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.closing,i=qe(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{containerStyle:{opacity:i.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:We(r,t.progress.interpolate({inputRange:[0,1],outputRange:[.9,1],extrapolate:"clamp"}),i.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.1]}))}]}}},headerStyleInterpolator:Qe},dt=h.a.select({ios:st,android:h.a.Version>=29?ht:h.a.Version>=28?ut:ct,default:ht}),ft=h.a.select({ios:lt,default:dt});function pt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(){return(vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bt=Object.freeze({options:{}}),wt=function(e,t,n,r,i,o){return e.reduce((function(e,a){var s=(r[a.key]||{}).options,l=void 0===s?{}:s,c=C.a.flatten(l.headerStyle||{}),u="number"===typeof c.height?c.height:o[a.key],h=gt(gt({},t),l.safeAreaInsets),d=l.headerStatusBarHeight,f=void 0===d?n?0:h.top:d;return e[a.key]="number"===typeof u?u:me(i,f),e}),{})},xt=function(e,t,n){var r=((null===n||void 0===n?void 0:n.options)||{}).gestureDirection;return Te(t,void 0===r?"modal"===e?ft.gestureDirection:dt.gestureDirection:r)},_t=function(e,t,n,r){var i=xt(e,{width:Math.max(1,n.width),height:Math.max(1,n.height)},r);return i>0?t.interpolate({inputRange:[0,i],outputRange:[1,0]}):t.interpolate({inputRange:[i,0],outputRange:[0,1]})},Et=function(e){_()(n,e);var t=pt(n);function n(e){var r;g()(this,n),r=t.call(this,e),yt(w()(r),"handleLayout",(function(e){var t=e.nativeEvent.layout,n=t.height,i=t.width,o={width:i,height:n};r.setState((function(e,t){return n===e.layout.height&&i===e.layout.width?null:{layout:o,headerHeights:wt(t.routes,t.insets,t.isParentHeaderShown,e.descriptors,o,e.headerHeights)}}))})),yt(w()(r),"handleHeaderLayout",(function(e){var t=e.route,n=e.height;r.setState((function(e){var r=e.headerHeights;return r[t.key]===n?null:{headerHeights:gt(gt({},r),{},s()({},t.key,n))}}))})),yt(w()(r),"getFocusedRoute",(function(){var e=r.props.state;return e.routes[e.index]})),yt(w()(r),"getPreviousScene",(function(e){var t=e.route,n=r.props.getPreviousRoute,i=r.state.scenes,o=n({route:t});if(o)return i.find((function(e){return e.route.key===o.key}))}));var i=N.a.get("window"),o=i.height,a=void 0===o?0:o,l=i.width,c=void 0===l?0:l;return r.state={routes:[],scenes:[],gestures:{},layout:{height:a,width:c},descriptors:r.props.descriptors,headerHeights:{}},r}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.mode,r=t.insets,i=t.descriptors,o=t.state,a=t.routes,s=t.closingRouteKeys,l=t.onOpenRoute,c=t.onCloseRoute,h=t.getGesturesEnabled,d=t.renderHeader,f=t.renderScene,p=t.headerMode,m=t.isParentHeaderShown,g=t.onTransitionStart,v=t.onTransitionEnd,y=t.onPageChangeStart,b=t.onPageChangeConfirm,w=t.onPageChangeCancel,x=t.onGestureStart,_=t.onGestureEnd,E=t.onGestureCancel,A=t.detachInactiveScreens,S=void 0===A?G:A,M=this.state,T=M.scenes,O=M.layout,R=M.gestures,k=M.headerHeights,P=o.routes[o.index],L=i[P.key],D=L?L.options:{},I=k[P.key],N="modal"===n?ft:dt;"screen"===p&&(N=gt(gt({},N),{},{headerStyleInterpolator:et}));for(var j=D.safeAreaInsets||{},B=j.top,F=void 0===B?r.top:B,z=j.right,H=void 0===z?r.right:z,U=j.bottom,V=void 0===U?r.bottom:U,X=j.left,Y=void 0===X?r.left:X,K=1,Q=T.length-1;Q>=0;Q--){var Z=T[Q].descriptor.options.detachPreviousScreen;if(!1!==(void 0===Z?"modal"!==n||Q!==T.length-1:Z))break;K++}var J="float"===p&&this.state.scenes.slice(-2).some((function(e){var t=e.descriptor,n=t?t.options:{},r=n.headerTransparent,i=n.headerShown;return!(!r&&!1!==(void 0===i||i))})),$="float"===p?u.createElement(u.Fragment,{key:"header"},d({mode:"float",layout:O,insets:{top:F,right:H,bottom:V,left:Y},scenes:T,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,gestureDirection:void 0!==D.gestureDirection?D.gestureDirection:N.gestureDirection,styleInterpolator:void 0!==D.headerStyleInterpolator?D.headerStyleInterpolator:N.headerStyleInterpolator,style:[At.floating,J&&[{height:I},At.absolute]]})):null;return u.createElement(u.Fragment,null,J?null:$,u.createElement(W,{enabled:S,style:At.container,onLayout:this.handleLayout},a.map((function(t,i,o){var a=P.key===t.key,A=R[t.key],M=T[i],L=1;if(G)if(i<o.length-K-1)L=0;else{var D=T[o.length-1],I=i===o.length-1?2:i>=o.length-K?1:0;L=D?D.progress.current.interpolate({inputRange:[0,.99,1],outputRange:[1,1,I],extrapolate:"clamp"}):1}else L=M.progress.next?M.progress.next.interpolate({inputRange:[0,.99,1],outputRange:[1,1,0],extrapolate:"clamp"}):1;var j=M.descriptor?M.descriptor.options:{},B=j.safeAreaInsets,F=j.headerShown,z=void 0===F||F,H=j.headerTransparent,U=j.cardShadowEnabled,V=j.cardOverlayEnabled,W=j.cardOverlay,X=j.cardStyle,Y=j.animationEnabled,Q=j.gestureResponseDistance,Z=j.gestureVelocityImpact,$=j.gestureDirection,ee=void 0===$?N.gestureDirection:$,te=j.transitionSpec,ne=void 0===te?N.transitionSpec:te,re=j.cardStyleInterpolator,ie=void 0===re?!1===Y?Ye:N.cardStyleInterpolator:re,oe=j.headerStyleInterpolator,ae={gestureDirection:ee,transitionSpec:ne,cardStyleInterpolator:ie,headerStyleInterpolator:void 0===oe?N.headerStyleInterpolator:oe};if(i!==o.length-1){var se=T[i+1];if(se){var le=se.descriptor?se.descriptor.options:{},ce=le.animationEnabled,ue=le.gestureDirection,he=void 0===ue?N.gestureDirection:ue,de=le.transitionSpec,fe=void 0===de?N.transitionSpec:de,pe=le.cardStyleInterpolator,me=void 0===pe?!1===ce?Ye:N.cardStyleInterpolator:pe,ge=le.headerStyleInterpolator;ae={gestureDirection:he,transitionSpec:fe,cardStyleInterpolator:me,headerStyleInterpolator:void 0===ge?N.headerStyleInterpolator:ge}}}var ve=B||{},ye=ve.top,be=void 0===ye?r.top:ye,we=ve.right,xe=void 0===we?r.right:we,_e=ve.bottom,Ee=void 0===_e?r.bottom:_e,Ae=ve.left,Se=void 0===Ae?r.left:Ae,Me="none"!==p&&!1!==z?k[t.key]:0;return u.createElement(q,{key:t.key,style:C.a.absoluteFill,enabled:S,active:L,pointerEvents:"box-none"},u.createElement(Fe,vt({index:i,active:i===o.length-1,focused:a,closing:s.includes(t.key),layout:O,gesture:A,scene:M,safeAreaInsetTop:be,safeAreaInsetRight:xe,safeAreaInsetBottom:Ee,safeAreaInsetLeft:Se,cardOverlay:W,cardOverlayEnabled:V,cardShadowEnabled:U,cardStyle:X,onPageChangeStart:y,onPageChangeConfirm:b,onPageChangeCancel:w,onGestureStart:x,onGestureCancel:E,onGestureEnd:_,gestureResponseDistance:Q,headerHeight:Me,isParentHeaderShown:m,onHeaderHeightChange:e.handleHeaderLayout,getPreviousScene:e.getPreviousScene,getFocusedRoute:e.getFocusedRoute,mode:n,headerMode:p,headerShown:z,hasAbsoluteHeader:J&&!H,renderHeader:d,renderScene:f,onOpenRoute:l,onCloseRoute:c,onTransitionStart:g,onTransitionEnd:v,gestureEnabled:0!==i&&h({route:t}),gestureVelocityImpact:Z},ae)))}))),J?$:null)}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;var n=e.routes.reduce((function(n,r){var i=e.descriptors[r.key],o=((null===i||void 0===i?void 0:i.options)||{}).animationEnabled;return n[r.key]=t.gestures[r.key]||new I.a.Value(e.openingRouteKeys.includes(r.key)&&!1!==o?xt(e.mode,t.layout,i):0),n}),{});return{routes:e.routes,scenes:e.routes.map((function(r,i,o){var a=o[i-1],s=o[i+1],l=t.scenes[i],c=n[r.key],u=a?n[a.key]:void 0,h=s?n[s.key]:void 0,d=e.descriptors[r.key]||t.descriptors[r.key]||(l?l.descriptor:bt),f=e.descriptors[null===s||void 0===s?void 0:s.key]||t.descriptors[null===s||void 0===s?void 0:s.key],p=e.descriptors[null===a||void 0===a?void 0:a.key]||t.descriptors[null===a||void 0===a?void 0:a.key],m={route:r,descriptor:d,progress:{current:_t(e.mode,c,t.layout,d),next:h?_t(e.mode,h,t.layout,f):void 0,previous:u?_t(e.mode,u,t.layout,p):void 0},__memo:[r,t.layout,d,f,p,c,h,u]};return l&&m.__memo.every((function(e,t){return l.__memo[t]===e}))?l:m})),gestures:n,descriptors:e.descriptors,headerHeights:wt(e.routes,e.insets,e.isParentHeaderShown,t.descriptors,t.layout,t.headerHeights)}}}]),n}(u.Component),At=C.a.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}}),St=r(60),Mt=r(121);function Tt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ot=function(e){_()(n,e);var t=Tt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Ct(w()(e),"previouslyFocusedTextInput",void 0),Ct(w()(e),"startTimestamp",0),Ct(w()(e),"keyboardTimeout",void 0),Ct(w()(e),"clearKeyboardTimeout",(function(){void 0!==e.keyboardTimeout&&(clearTimeout(e.keyboardTimeout),e.keyboardTimeout=void 0)})),Ct(w()(e),"handlePageChangeStart",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=St.a.State.currentlyFocusedInput?St.a.State.currentlyFocusedInput():St.a.State.currentlyFocusedField();St.a.State.blurTextInput(t),e.previouslyFocusedTextInput=t,e.startTimestamp=Date.now()}})),Ct(w()(e),"handlePageChangeConfirm",(function(t){if(e.props.enabled){if(e.clearKeyboardTimeout(),t)Mt.a.dismiss();else{var n=e.previouslyFocusedTextInput;n&&St.a.State.blurTextInput(n)}e.previouslyFocusedTextInput=void 0}})),Ct(w()(e),"handlePageChangeCancel",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=e.previouslyFocusedTextInput;t&&(Date.now()-e.startTimestamp<100?e.keyboardTimeout=setTimeout((function(){St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0}),100):(St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0))}})),e}return y()(n,[{key:"componentWillUnmount",value:function(){this.clearKeyboardTimeout()}},{key:"render",value:function(){return this.props.children({onPageChangeStart:this.handlePageChangeStart,onPageChangeConfirm:this.handlePageChangeConfirm,onPageChangeCancel:this.handlePageChangeCancel})}}]),n}(u.Component),Rt=["tintColor","style"];function kt(){return(kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pt(e){var t=e.tintColor,n=e.style,r=c()(e,Rt),i=Object(Z.a)().colors;return u.createElement(I.a.Text,kt({accessibilityRole:"header","aria-level":"1",numberOfLines:1},r,{style:[Lt.title,{color:void 0===t?i.text:t},n]}))}var Lt=C.a.create({title:h.a.select({ios:{fontSize:17,fontWeight:"600"},android:{fontSize:20,fontFamily:"sans-serif-medium",fontWeight:"normal"},default:{fontSize:18,fontWeight:"500"}})});function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(){return(Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var jt=u.memo((function(e){var t,n=e.scene,r=e.previous,i=e.layout,o=e.insets,a=e.navigation,s=e.styleInterpolator,l=n.descriptor.options,c="function"!==typeof l.headerTitle&&void 0!==l.headerTitle?l.headerTitle:void 0!==l.title?l.title:n.route.name;if(void 0!==l.headerBackTitle)t=l.headerBackTitle;else if(r){var h=r.descriptor.options;t="function"!==typeof h.headerTitle&&void 0!==h.headerTitle?h.headerTitle:void 0!==h.title?h.title:r.route.name}var f=u.useCallback(function(e,t){var n;return function(){if(!n){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.apply(this,i),n=setTimeout((function(){n=void 0}),t)}}}((function(){a.isFocused()&&a.canGoBack()&&a.dispatch(It(It({},d.StackActions.pop()),{},{source:n.route.key}))}),50),[a,n.route.key]);return u.createElement(ge,Nt({},l,{insets:o,layout:i,scene:n,title:c,leftLabel:t,headerTitle:"function"!==typeof l.headerTitle?function(e){return u.createElement(Pt,e)}:l.headerTitle,onGoBack:r?f:void 0,styleInterpolator:s}))}));function Bt(e){var t=e.mode,n=e.scenes,r=e.layout,i=e.insets,o=e.getPreviousScene,a=e.getFocusedRoute,s=e.onContentHeightChange,l=e.gestureDirection,c=e.styleInterpolator,h=e.style,f=a(),p=u.useContext(Be);return u.createElement(I.a.View,{pointerEvents:"box-none",style:h},n.slice(-3).map((function(e,n,a){var h;if("screen"===t&&n!==a.length-1||!e)return null;var m=e.descriptor.options||{},g=m.header,v=m.headerShown,y=void 0===v||v,b=m.headerTransparent;if(!y)return null;var w=f.key===e.route.key,x=null!==(h=o({route:e.route}))&&void 0!==h?h:p,_=a[n-1],E=a[n+1],A=((null===_||void 0===_?void 0:_.descriptor.options)||{}).headerShown,S=void 0===A||A,M=((null===E||void 0===E?void 0:E.descriptor.options)||{}).headerShown,C=!1===S&&!E||!1===(void 0===M||M),O={mode:t,layout:r,insets:i,scene:e,previous:x,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?C?"vertical"===l||"vertical-inverted"===l?$e:"horizontal-inverted"===l?Je:Ze:c:et};return u.createElement(d.NavigationContext.Provider,{key:e.route.key,value:e.descriptor.navigation},u.createElement(d.NavigationRouteContext.Provider,{value:e.route},u.createElement(T.a,{onLayout:s?function(t){var n=t.nativeEvent.layout.height;s({route:e.route,height:n})}:void 0,pointerEvents:w?"box-none":"none",accessibilityElementsHidden:!w,importantForAccessibility:w?"auto":"no-hide-descendants",style:"float"===t&&!w||b?Ft.header:null},void 0!==g?g(O):u.createElement(jt,O))))})))}var Ft=C.a.create({header:{position:"absolute",top:0,left:0,right:0}}),zt=r(473);function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ut=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({top:function(e){return h.a.select({ios:(t=e?44:30,n=20,Ue()?t:n),android:He.a.currentHeight,default:0});var t,n}(!0),bottom:Ue()?34:0,right:0,left:0},zt.b);function Vt(e){var t=e.children;return u.createElement(O.a,null,(function(e){return e?t:u.createElement(O.b,{initialSafeAreaInsets:Ut},t)}))}var Gt=["state","navigation","keyboardHandlingEnabled","mode","headerMode","descriptors"];function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Yt(){return(Yt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qt=null!==k&&void 0!==k?k:T.a,Zt=function(e){_()(n,e);var t=Xt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Kt(w()(e),"state",{routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}}),Kt(w()(e),"getGesturesEnabled",(function(t){var n=t.route,r=e.state.descriptors[n.key];if(r){var i=r.options,o=i.gestureEnabled;return!1!==i.animationEnabled&&!1!==o}return!1})),Kt(w()(e),"getPreviousRoute",(function(t){var n=t.route,r=e.state,i=r.closingRouteKeys,o=r.replacingRouteKeys,a=e.state.routes.filter((function(e){return e.key===n.key||!i.includes(e.key)&&!o.includes(e.key)})),s=a.findIndex((function(e){return e.key===n.key}));return a[s-1]})),Kt(w()(e),"renderScene",(function(t){var n=t.route,r=e.state.descriptors[n.key]||e.props.descriptors[n.key];return r?r.render():null})),Kt(w()(e),"renderHeader",(function(e){return u.createElement(Bt,e)})),Kt(w()(e),"handleOpenRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation,a=e.state,s=a.closingRouteKeys,l=a.replacingRouteKeys;s.some((function(e){return e===n.key}))&&l.every((function(e){return e!==n.key}))&&i.routeNames.includes(n.name)&&!i.routes.some((function(e){return e.key===n.key}))?o.navigate(n):e.setState((function(e){return{routes:e.replacingRouteKeys.length?e.routes.filter((function(t){return!e.replacingRouteKeys.includes(t.key)})):e.routes,openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key})),replacingRouteKeys:[]}}))})),Kt(w()(e),"handleCloseRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation;i.routes.some((function(e){return e.key===n.key}))?o.dispatch(qt(qt({},d.StackActions.pop()),{},{source:n.key,target:i.key})):e.setState((function(e){return{routes:e.routes.filter((function(e){return e.key!==n.key})),openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key}))}}))})),Kt(w()(e),"handleTransitionStart",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionStart",data:{closing:n},target:r.key})})),Kt(w()(e),"handleTransitionEnd",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionEnd",data:{closing:n},target:r.key})})),Kt(w()(e),"handleGestureStart",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureStart",target:n.key})})),Kt(w()(e),"handleGestureEnd",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureEnd",target:n.key})})),Kt(w()(e),"handleGestureCancel",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureCancel",target:n.key})})),e}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.state,r=t.navigation,i=t.keyboardHandlingEnabled,o=t.mode,a=void 0===o?"card":o,s=t.headerMode,l=void 0===s?"card"===a&&"ios"===h.a.OS?"float":"screen":s,f=(t.descriptors,c()(t,Gt)),p=this.state,m=p.routes,g=p.descriptors,v=p.openingRouteKeys,y=p.closingRouteKeys;return u.createElement(d.NavigationHelpersContext.Provider,{value:r},u.createElement(Qt,{style:Jt.container},u.createElement(Vt,null,u.createElement(O.a,null,(function(t){return u.createElement(Ot,{enabled:!1!==i},(function(r){return u.createElement(de.Consumer,null,(function(i){return u.createElement(Et,Yt({mode:a,insets:t,isParentHeaderShown:i,getPreviousRoute:e.getPreviousRoute,getGesturesEnabled:e.getGesturesEnabled,routes:m,openingRouteKeys:v,closingRouteKeys:y,onOpenRoute:e.handleOpenRoute,onCloseRoute:e.handleCloseRoute,onTransitionStart:e.handleTransitionStart,onTransitionEnd:e.handleTransitionEnd,renderHeader:e.renderHeader,renderScene:e.renderScene,headerMode:l,state:n,descriptors:g,onGestureStart:e.handleGestureStart,onGestureEnd:e.handleGestureEnd,onGestureCancel:e.handleGestureCancel},f,r))}))}))})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if((e.state.routes===t.previousRoutes||(s=e.state.routes.map((function(e){return e.key})),l=t.previousRoutes.map((function(e){return e.key})),s.length===l.length&&s.every((function(e,t){return e===l[t]}))))&&t.routes.length){var n=t.routes,r=t.previousRoutes,i=e.descriptors,o=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(i=t.routes.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{}),o=e.descriptors),e.state.routes!==t.previousRoutes){var a=e.state.routes.reduce((function(e,t){return e[t.key]=t,e}),{});n=t.routes.map((function(e){return a[e.key]||e})),r=e.state.routes}return{routes:n,previousRoutes:r,descriptors:i,previousDescriptors:o}}var s,l,c=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,u=t.openingRouteKeys,h=t.closingRouteKeys,d=t.replacingRouteKeys,f=t.previousRoutes,m=f[f.length-1],g=c[c.length-1],v=function(n){var r=e.descriptors[n]||t.descriptors[n];return!r||!1!==r.options.animationEnabled};if(m&&m.key!==g.key)f.some((function(e){return e.key===g.key}))?c.some((function(e){return e.key===m.key}))||v(m.key)&&!h.includes(m.key)&&(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==m.key})),d=d.filter((function(e){return e!==m.key})),c=[].concat(p()(c),[m])):v(g.key)&&!u.includes(g.key)&&(u=[].concat(p()(u),[g.key]),h=h.filter((function(e){return e!==g.key})),d=d.filter((function(e){return e!==g.key})),c.some((function(e){return e.key===m.key}))||(u=u.filter((function(e){return e!==m.key})),"pop"===function(n){var r;return null!==(r=(e.descriptors[n]||t.descriptors[n]).options.animationTypeForReplace)&&void 0!==r?r:"push"}(g.key)?(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==g.key})),c=[].concat(p()(c),[m])):(d=[].concat(p()(d),[m.key]),h=h.filter((function(e){return e!==m.key})),(c=c.slice()).splice(c.length-1,0,m))));else if(d.length||h.length){var y;(y=c=c.slice()).splice.apply(y,[c.length-1,0].concat(p()(t.routes.filter((function(e){var t=e.key;return!!v(t)&&(d.includes(t)||h.includes(t))})))))}if(!c.length)throw new Error("There should always be at least one route in the navigation state.");var b=c.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{});return{routes:c,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:u,closingRouteKeys:h,replacingRouteKeys:d,descriptors:b}}}]),n}(u.Component),Jt=C.a.create({container:{flex:1}}),$t=["initialRouteName","children","screenOptions"];function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.a=Object(d.createNavigatorFactory)((function(e){var t=e.initialRouteName,n=e.children,r=e.screenOptions,i=c()(e,$t),o={gestureEnabled:"ios"===h.a.OS,animationEnabled:"web"!==h.a.OS&&"windows"!==h.a.OS&&"macos"!==h.a.OS},a=Object(d.useNavigationBuilder)(d.StackRouter,{initialRouteName:t,children:n,screenOptions:"function"===typeof r?function(){return tn(tn({},o),r.apply(void 0,arguments))}:tn(tn({},o),r)}),s=a.state,l=a.descriptors,f=a.navigation;return u.useEffect((function(){var e;return null===(e=f.addListener)||void 0===e?void 0:e.call(f,"tabPress",(function(e){var t=f.isFocused();requestAnimationFrame((function(){s.index>0&&t&&!e.defaultPrevented&&f.dispatch(tn(tn({},d.StackActions.popToTop()),{},{target:s.key}))}))}))}),[f,s.index,s.key]),u.createElement(Zt,nn({},i,{state:s,descriptors:l,navigation:f}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));class r extends Map{constructor(e,t=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(i(this,e))}has(e){return super.has(i(this,e))}set(e,t){return super.set(o(this,e),t)}delete(e){return super.delete(a(this,e))}}Set;function i({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function s(e){return null!==e&&"object"===typeof e?e.valueOf():e}function l(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const c=Symbol("implicit");function u(){var e=new r,t=[],n=[],i=c;function o(r){let o=e.get(r);if(void 0===o){if(i!==c)return i;e.set(r,o=t.push(r)-1)}return n[o%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return u(t,n).unknown(i)},l.apply(o,arguments),o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return b})),n.d(t,"a",(function(){return w}));var r=n(8),i=n.n(r),o=n(0),a=n(34),s=n(5),l=n(3),c={WebkitTransition:"webkitTransitionEnd",Transition:"transitionEnd",MozTransition:"transitionend",MSTransition:"msTransitionEnd",OTransition:"oTransitionEnd"};function u(e){var t=e.children,n=e.style,r=e.onInsetsChange;return o.useEffect((function(){if("undefined"!==typeof document){var e=function(){var e=document.createElement("div"),t=e.style;return t.position="fixed",t.left="0",t.top="0",t.width="0",t.height="0",t.zIndex="-1",t.overflow="hidden",t.visibility="hidden",t.transitionDuration="0.05s",t.transitionProperty="padding",t.transitionDelay="0s",t.paddingTop=p("top"),t.paddingBottom=p("bottom"),t.paddingLeft=p("left"),t.paddingRight=p("right"),e}();document.body.appendChild(e);var t=function(){var t=window.getComputedStyle(e),n=t.paddingTop,i=t.paddingBottom,o=t.paddingLeft,a=t.paddingRight,s={top:n?parseInt(n,10):0,bottom:i?parseInt(i,10):0,left:o?parseInt(o,10):0,right:a?parseInt(a,10):0},l={x:0,y:0,width:document.documentElement.offsetWidth,height:document.documentElement.offsetHeight};r({nativeEvent:{insets:s,frame:l}})};return e.addEventListener(d(),t),t(),function(){document.body.removeChild(e),e.removeEventListener(d(),t)}}}),[r]),o.createElement(l.a,{style:n},t)}var h=null;function d(){if(null!==h)return h;var e=document.createElement("invalidtype");for(var t in h=c.Transition,c)if(void 0!==e.style[t]){h=c[t];break}return h}var f=null;function p(e){return"".concat(function(){if(null!==f)return f;var e=window.CSS;return f=e&&e.supports&&e.supports("top: constant(safe-area-inset-top)")?"constant":"env"}(),"(safe-area-inset-").concat(e,")")}var m=o.createContext(null),g=o.createContext(null);function v(e){var t,n,r,s,l,c=e.children,h=e.initialMetrics,d=e.initialSafeAreaInsets,f=e.style,p=o.useContext(m),v=o.useContext(g),b=o.useState(null!==(t=null!==(n=null!==(r=null===h||void 0===h?void 0:h.insets)&&void 0!==r?r:d)&&void 0!==n?n:p)&&void 0!==t?t:null),w=i()(b,2),x=w[0],_=w[1],E=o.useState(null!==(s=null!==(l=null===h||void 0===h?void 0:h.frame)&&void 0!==l?l:v)&&void 0!==s?s:{x:0,y:0,width:a.a.get("window").width,height:a.a.get("window").height}),A=i()(E,2),S=A[0],M=A[1],T=o.useCallback((function(e){var t=e.nativeEvent,n=t.frame,r=t.insets;!n||n.height===S.height&&n.width===S.width&&n.x===S.x&&n.y===S.y||M(n),x&&r.bottom===x.bottom&&r.left===x.left&&r.right===x.right&&r.top===x.top||_(r)}),[S,x]);return o.createElement(u,{style:[y.fill,f],onInsetsChange:T},null!=x?o.createElement(g.Provider,{value:S},o.createElement(m.Provider,{value:x},c)):null)}var y=s.a.create({fill:{flex:1}});function b(){var e=o.useContext(m);if(null==e)throw new Error("No safe area insets value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.");return e}var w=m.Consumer},function(e,t,n){"use strict";t.a=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")}]]); +//# sourceMappingURL=2.88717ad6.chunk.js.map
\ No newline at end of file |