react-globe.gl 2.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +310 -0
- package/dist/react-globe.gl.common.js +174 -0
- package/dist/react-globe.gl.d.ts +241 -0
- package/dist/react-globe.gl.js +79238 -0
- package/dist/react-globe.gl.js.map +1 -0
- package/dist/react-globe.gl.min.js +20 -0
- package/dist/react-globe.gl.module.js +166 -0
- package/package.json +65 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Version 2.18.11 react-globe.gl - https://github.com/vasturiano/react-globe.gl
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Globe=t(e.React)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(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 i(e){return function(e){if(Array.isArray(e))return o(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 o(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)?o(e,t):void 0}}function o(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){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(i(Object.entries(e).filter((function(e){var t=r(e,1)[0];return!n.has(t)})).map((function(e){var t=r(e,2);return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t[0],t[1])})))))};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l=function(e){return[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{})};function c(e){return(c="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 u(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||d(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 h(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(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 d(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}function f(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}const p={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},m=0,g=1,v=2,y=3,x=100,b=301,_=302,w=306,M=1e3,S=1001,E=1002,T=1003,C=1006,L=1008,P=1009,R=1012,q=1014,D=1015,I=1016,B=1020,O=1022,k=1023,N=1026,z=1027,F=2300,U=2301,H=2302,G=2400,j=2401,V=2402,W=2500,Q=3e3,Y=3001,X=3007,Z=3002,J=7680,K=35044,$=35048,ee="300 es";class te{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 ne=[];for(let e=0;e<256;e++)ne[e]=(e<16?"0":"")+e.toString(16);let re=1234567;const ie=Math.PI/180,ae=180/Math.PI;function oe(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(ne[255&e]+ne[e>>8&255]+ne[e>>16&255]+ne[e>>24&255]+"-"+ne[255&t]+ne[t>>8&255]+"-"+ne[t>>16&15|64]+ne[t>>24&255]+"-"+ne[63&n|128]+ne[n>>8&255]+"-"+ne[n>>16&255]+ne[n>>24&255]+ne[255&r]+ne[r>>8&255]+ne[r>>16&255]+ne[r>>24&255]).toUpperCase()}function se(e,t,n){return Math.max(t,Math.min(n,e))}function Ae(e,t){return(e%t+t)%t}function le(e,t,n){return(1-n)*e+n*t}function ce(e){return 0==(e&e-1)&&0!==e}function ue(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var he=Object.freeze({__proto__:null,DEG2RAD:ie,RAD2DEG:ae,generateUUID:oe,clamp:se,euclideanModulo:Ae,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:le,damp:function(e,t,n,r){return le(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(Ae(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&&(re=e%2147483647),re=16807*re%2147483647,(re-1)/2147483646},degToRad:function(e){return e*ie},radToDeg:function(e){return e*ae},isPowerOfTwo:ce,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:ue,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,o=Math.sin,s=a(n/2),A=o(n/2),l=a((t+r)/2),c=o((t+r)/2),u=a((t-r)/2),h=o((t-r)/2),d=a((r-t)/2),f=o((r-t)/2);switch(i){case"XYX":e.set(s*c,A*u,A*h,s*l);break;case"YZY":e.set(A*h,s*c,A*u,s*l);break;case"ZXZ":e.set(A*u,A*h,s*c,s*l);break;case"XZX":e.set(s*c,A*f,A*d,s*l);break;case"YXY":e.set(A*d,s*c,A*f,s*l);break;case"ZYZ":e.set(A*f,A*d,s*c,s*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}});class de{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,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}de.prototype.isVector2=!0;class fe{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,a,o,s,A){const l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=A,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,a=n[0],o=n[3],s=n[6],A=n[1],l=n[4],c=n[7],u=n[2],h=n[5],d=n[8],f=r[0],p=r[3],m=r[6],g=r[1],v=r[4],y=r[7],x=r[2],b=r[5],_=r[8];return i[0]=a*f+o*g+s*x,i[3]=a*p+o*v+s*b,i[6]=a*m+o*y+s*_,i[1]=A*f+l*g+c*x,i[4]=A*p+l*v+c*b,i[7]=A*m+l*y+c*_,i[2]=u*f+h*g+d*x,i[5]=u*p+h*v+d*b,i[8]=u*m+h*y+d*_,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],a=e[4],o=e[5],s=e[6],A=e[7],l=e[8];return t*a*l-t*o*A-n*i*l+n*o*s+r*i*A-r*a*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],A=e[7],l=e[8],c=l*a-o*A,u=o*s-l*i,h=A*i-a*s,d=t*c+n*u+r*h;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const f=1/d;return e[0]=c*f,e[1]=(r*A-l*n)*f,e[2]=(o*n-r*a)*f,e[3]=u*f,e[4]=(l*t-r*s)*f,e[5]=(r*i-o*t)*f,e[6]=h*f,e[7]=(n*s-A*t)*f,e[8]=(a*t-n*i)*f,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,a,o){const s=Math.cos(i),A=Math.sin(i);return this.set(n*s,n*A,-n*(s*a+A*o)+a+e,-r*A,r*s,-r*(-A*a+s*o)+o+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],a=r[3],o=r[6],s=r[1],A=r[4],l=r[7];return r[0]=t*i+n*s,r[3]=t*a+n*A,r[6]=t*o+n*l,r[1]=-n*i+t*s,r[4]=-n*a+t*A,r[7]=-n*o+t*l,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 e=0;e<9;e++)if(t[e]!==n[e])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 pe;fe.prototype.isMatrix3=!0;class me{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===pe&&(pe=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),pe.width=e.width,pe.height=e.height;const n=pe.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=pe}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 ge=0;class ve extends te{constructor(e=ve.DEFAULT_IMAGE,t=ve.DEFAULT_MAPPING,n=1001,r=1001,i=1006,a=1008,o=1023,s=1009,A=1,l=3e3){super(),Object.defineProperty(this,"id",{value:ge++}),this.uuid=oe(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=A,this.format=o,this.internalFormat=null,this.type=s,this.offset=new de(0,0),this.repeat=new de(1,1),this.center=new de(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new fe,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=l,this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}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=oe()),!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(ye(r[e].image)):t.push(ye(r[e]))}else t=ye(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 M:e.x=e.x-Math.floor(e.x);break;case S:e.x=e.x<0?0:1;break;case E: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 M:e.y=e.y-Math.floor(e.y);break;case S:e.y=e.y<0?0:1;break;case E: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 ye(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?me.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."),{})}ve.DEFAULT_IMAGE=void 0,ve.DEFAULT_MAPPING=300,ve.prototype.isTexture=!0;class xe{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,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[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 a=.01,o=.1,s=e.elements,A=s[0],l=s[4],c=s[8],u=s[1],h=s[5],d=s[9],f=s[2],p=s[6],m=s[10];if(Math.abs(l-u)<a&&Math.abs(c-f)<a&&Math.abs(d-p)<a){if(Math.abs(l+u)<o&&Math.abs(c+f)<o&&Math.abs(d+p)<o&&Math.abs(A+h+m-3)<o)return this.set(1,0,0,0),this;t=Math.PI;const e=(A+1)/2,s=(h+1)/2,g=(m+1)/2,v=(l+u)/4,y=(c+f)/4,x=(d+p)/4;return e>s&&e>g?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=v/n,i=y/n):s>g?s<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=v/r,i=x/r):g<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(g),n=y/i,r=x/i),this.set(n,r,i,t),this}let g=Math.sqrt((p-d)*(p-d)+(c-f)*(c-f)+(u-l)*(u-l));return Math.abs(g)<.001&&(g=1),this.x=(p-d)/g,this.y=(c-f)/g,this.z=(u-l)/g,this.w=Math.acos((A+h+m-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}}xe.prototype.isVector4=!0;class be extends te{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new xe(0,0,e,t),this.scissorTest=!1,this.viewport=new xe(0,0,e,t),this.texture=new ve(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:C,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"})}}be.prototype.isWebGLRenderTarget=!0;(class extends be{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=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 _e extends be{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}_e.prototype.isWebGLMultisampleRenderTarget=!0;class we{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,a,o){let s=n[r+0],A=n[r+1],l=n[r+2],c=n[r+3];const u=i[a+0],h=i[a+1],d=i[a+2],f=i[a+3];if(0===o)return e[t+0]=s,e[t+1]=A,e[t+2]=l,void(e[t+3]=c);if(1===o)return e[t+0]=u,e[t+1]=h,e[t+2]=d,void(e[t+3]=f);if(c!==f||s!==u||A!==h||l!==d){let e=1-o;const t=s*u+A*h+l*d+c*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}const i=o*n;if(s=s*e+u*i,A=A*e+h*i,l=l*e+d*i,c=c*e+f*i,e===1-o){const e=1/Math.sqrt(s*s+A*A+l*l+c*c);s*=e,A*=e,l*=e,c*=e}}e[t]=s,e[t+1]=A,e[t+2]=l,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){const o=n[r],s=n[r+1],A=n[r+2],l=n[r+3],c=i[a],u=i[a+1],h=i[a+2],d=i[a+3];return e[t]=o*d+l*c+s*h-A*u,e[t+1]=s*d+l*u+A*c-o*h,e[t+2]=A*d+l*h+o*u-s*c,e[t+3]=l*d-o*c-s*u-A*h,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,a=e._order,o=Math.cos,s=Math.sin,A=o(n/2),l=o(r/2),c=o(i/2),u=s(n/2),h=s(r/2),d=s(i/2);switch(a){case"XYZ":this._x=u*l*c+A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c-u*h*d;break;case"YXZ":this._x=u*l*c+A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c+u*h*d;break;case"ZXY":this._x=u*l*c-A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c-u*h*d;break;case"ZYX":this._x=u*l*c-A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c+u*h*d;break;case"YZX":this._x=u*l*c+A*h*d,this._y=A*h*c+u*l*d,this._z=A*l*d-u*h*c,this._w=A*l*c-u*h*d;break;case"XZY":this._x=u*l*c-A*h*d,this._y=A*h*c-u*l*d,this._z=A*l*d+u*h*c,this._w=A*l*c+u*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}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],a=t[1],o=t[5],s=t[9],A=t[2],l=t[6],c=t[10],u=n+o+c;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-A)*e,this._z=(a-r)*e}else if(n>o&&n>c){const e=2*Math.sqrt(1+n-o-c);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+A)/e}else if(o>c){const e=2*Math.sqrt(1+o-n-c);this._w=(i-A)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{const e=2*Math.sqrt(1+c-n-o);this._w=(a-r)/e,this._x=(i+A)/e,this._y=(s+l)/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(se(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,a=e._w,o=t._x,s=t._y,A=t._z,l=t._w;return this._x=n*l+a*o+r*A-i*s,this._y=r*l+a*s+i*o-n*A,this._z=i*l+a*A+n*s-r*o,this._w=a*l-n*o-r*s-i*A,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,a=this._w;let o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*a+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 A=Math.sqrt(s),l=Math.atan2(A,o),c=Math.sin((1-t)*l)/A,u=Math.sin(t*l)/A;return this._w=a*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._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(){}}we.prototype.isQuaternion=!0;class Me{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(Ee.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ee.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,a=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])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,A=s*t+a*r-o*n,l=s*n+o*t-i*r,c=s*r+i*n-a*t,u=-i*t-a*n-o*r;return this.x=A*s+u*-i+l*-o-c*-a,this.y=l*s+u*-a+c*-i-A*-o,this.z=c*s+u*-o+A*-a-l*-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,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,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 Se.copy(this).projectOnVector(e),this.sub(Se)}reflect(e){return this.sub(Se.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(se(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}}Me.prototype.isVector3=!0;const Se=new Me,Ee=new we;class Te{constructor(e=new Me(1/0,1/0,1/0),t=new Me(-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,a=-1/0,o=-1/0;for(let s=0,A=e.length;s<A;s+=3){const A=e[s],l=e[s+1],c=e[s+2];A<t&&(t=A),l<n&&(n=l),c<r&&(r=c),A>i&&(i=A),l>a&&(a=l),c>o&&(o=c)}return this.min.set(t,n,r),this.max.set(i,a,o),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0;for(let s=0,A=e.count;s<A;s++){const A=e.getX(s),l=e.getY(s),c=e.getZ(s);A<t&&(t=A),l<n&&(n=l),c<r&&(r=c),A>i&&(i=A),l>a&&(a=l),c>o&&(o=c)}return this.min.set(t,n,r),this.max.set(i,a,o),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=Le.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(),Pe.copy(t.boundingBox),Pe.applyMatrix4(e.matrixWorld),this.union(Pe));const n=e.children;for(let e=0,t=n.length;e<t;e++)this.expandByObject(n[e]);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,Le),Le.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(ke),Ne.subVectors(this.max,ke),Re.subVectors(e.a,ke),qe.subVectors(e.b,ke),De.subVectors(e.c,ke),Ie.subVectors(qe,Re),Be.subVectors(De,qe),Oe.subVectors(Re,De);let t=[0,-Ie.z,Ie.y,0,-Be.z,Be.y,0,-Oe.z,Oe.y,Ie.z,0,-Ie.x,Be.z,0,-Be.x,Oe.z,0,-Oe.x,-Ie.y,Ie.x,0,-Be.y,Be.x,0,-Oe.y,Oe.x,0];return!!Ue(t,Re,qe,De,Ne)&&(t=[1,0,0,0,1,0,0,0,1],!!Ue(t,Re,qe,De,Ne)&&(ze.crossVectors(Ie,Be),t=[ze.x,ze.y,ze.z],Ue(t,Re,qe,De,Ne)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Le.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(Le).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()||(Ce[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ce[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ce[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ce[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ce[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ce[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ce[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ce[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ce)),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)}}Te.prototype.isBox3=!0;const Ce=[new Me,new Me,new Me,new Me,new Me,new Me,new Me,new Me],Le=new Me,Pe=new Te,Re=new Me,qe=new Me,De=new Me,Ie=new Me,Be=new Me,Oe=new Me,ke=new Me,Ne=new Me,ze=new Me,Fe=new Me;function Ue(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Fe.fromArray(e,a);const o=i.x*Math.abs(Fe.x)+i.y*Math.abs(Fe.y)+i.z*Math.abs(Fe.z),s=t.dot(Fe),A=n.dot(Fe),l=r.dot(Fe);if(Math.max(-Math.max(s,A,l),Math.min(s,A,l))>o)return!1}return!0}const He=new Te,Ge=new Me,je=new Me,Ve=new Me;class We{constructor(e=new Me,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):He.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));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){Ve.subVectors(e,this.center);const t=Ve.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Ve.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return je.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Ge.copy(e.center).add(je)),this.expandByPoint(Ge.copy(e.center).sub(je)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Qe=new Me,Ye=new Me,Xe=new Me,Ze=new Me,Je=new Me,Ke=new Me,$e=new Me;class et{constructor(e=new Me,t=new Me(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,Qe)),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=Qe.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Qe.copy(this.direction).multiplyScalar(t).add(this.origin),Qe.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Ye.copy(e).add(t).multiplyScalar(.5),Xe.copy(t).sub(e).normalize(),Ze.copy(this.origin).sub(Ye);const i=.5*e.distanceTo(t),a=-this.direction.dot(Xe),o=Ze.dot(this.direction),s=-Ze.dot(Xe),A=Ze.lengthSq(),l=Math.abs(1-a*a);let c,u,h,d;if(l>0)if(c=a*s-o,u=a*o-s,d=i*l,c>=0)if(u>=-d)if(u<=d){const e=1/l;c*=e,u*=e,h=c*(c+a*u+2*o)+u*(a*c+u+2*s)+A}else u=i,c=Math.max(0,-(a*u+o)),h=-c*c+u*(u+2*s)+A;else u=-i,c=Math.max(0,-(a*u+o)),h=-c*c+u*(u+2*s)+A;else u<=-d?(c=Math.max(0,-(-a*i+o)),u=c>0?-i:Math.min(Math.max(-i,-s),i),h=-c*c+u*(u+2*s)+A):u<=d?(c=0,u=Math.min(Math.max(-i,-s),i),h=u*(u+2*s)+A):(c=Math.max(0,-(a*i+o)),u=c>0?i:Math.min(Math.max(-i,-s),i),h=-c*c+u*(u+2*s)+A);else u=a>0?-i:i,c=Math.max(0,-(a*u+o)),h=-c*c+u*(u+2*s)+A;return n&&n.copy(this.direction).multiplyScalar(c).add(this.origin),r&&r.copy(Xe).multiplyScalar(u).add(Ye),h}intersectSphere(e,t){Qe.subVectors(e.center,this.origin);const n=Qe.dot(this.direction),r=Qe.dot(Qe)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),o=n-a,s=n+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,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,a,o,s;const A=1/this.direction.x,l=1/this.direction.y,c=1/this.direction.z,u=this.origin;return A>=0?(n=(e.min.x-u.x)*A,r=(e.max.x-u.x)*A):(n=(e.max.x-u.x)*A,r=(e.min.x-u.x)*A),l>=0?(i=(e.min.y-u.y)*l,a=(e.max.y-u.y)*l):(i=(e.max.y-u.y)*l,a=(e.min.y-u.y)*l),n>a||i>r?null:((i>n||n!=n)&&(n=i),(a<r||r!=r)&&(r=a),c>=0?(o=(e.min.z-u.z)*c,s=(e.max.z-u.z)*c):(o=(e.max.z-u.z)*c,s=(e.min.z-u.z)*c),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Qe)}intersectTriangle(e,t,n,r,i){Je.subVectors(t,e),Ke.subVectors(n,e),$e.crossVectors(Je,Ke);let a,o=this.direction.dot($e);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Ze.subVectors(this.origin,e);const s=a*this.direction.dot(Ke.crossVectors(Ze,Ke));if(s<0)return null;const A=a*this.direction.dot(Je.cross(Ze));if(A<0)return null;if(s+A>o)return null;const l=-a*Ze.dot($e);return l<0?null:this.at(l/o,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 tt{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,a,o,s,A,l,c,u,h,d,f,p){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=i,m[5]=a,m[9]=o,m[13]=s,m[2]=A,m[6]=l,m[10]=c,m[14]=u,m[3]=h,m[7]=d,m[11]=f,m[15]=p,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 tt).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/nt.setFromMatrixColumn(e,0).length(),i=1/nt.setFromMatrixColumn(e,1).length(),a=1/nt.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]*a,t[9]=n[9]*a,t[10]=n[10]*a,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,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),A=Math.sin(r),l=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=a*l,n=a*c,r=o*l,i=o*c;t[0]=s*l,t[4]=-s*c,t[8]=A,t[1]=n+r*A,t[5]=e-i*A,t[9]=-o*s,t[2]=i-e*A,t[6]=r+n*A,t[10]=a*s}else if("YXZ"===e.order){const e=s*l,n=s*c,r=A*l,i=A*c;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*A,t[1]=a*c,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if("ZXY"===e.order){const e=s*l,n=s*c,r=A*l,i=A*c;t[0]=e-i*o,t[4]=-a*c,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*A,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){const e=a*l,n=a*c,r=o*l,i=o*c;t[0]=s*l,t[4]=r*A-n,t[8]=e*A+i,t[1]=s*c,t[5]=i*A+e,t[9]=n*A-r,t[2]=-A,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){const e=a*s,n=a*A,r=o*s,i=o*A;t[0]=s*l,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*l,t[9]=-o*l,t[2]=-A*l,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=a*s,n=a*A,r=o*s,i=o*A;t[0]=s*l,t[4]=-c,t[8]=A*l,t[1]=e*c+i,t[5]=a*l,t[9]=n*c-r,t[2]=r*c-n,t[6]=o*l,t[10]=i*c+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(it,e,at)}lookAt(e,t,n){const r=this.elements;return At.subVectors(e,t),0===At.lengthSq()&&(At.z=1),At.normalize(),ot.crossVectors(n,At),0===ot.lengthSq()&&(1===Math.abs(n.z)?At.x+=1e-4:At.z+=1e-4,At.normalize(),ot.crossVectors(n,At)),ot.normalize(),st.crossVectors(At,ot),r[0]=ot.x,r[4]=st.x,r[8]=At.x,r[1]=ot.y,r[5]=st.y,r[9]=At.y,r[2]=ot.z,r[6]=st.z,r[10]=At.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,a=n[0],o=n[4],s=n[8],A=n[12],l=n[1],c=n[5],u=n[9],h=n[13],d=n[2],f=n[6],p=n[10],m=n[14],g=n[3],v=n[7],y=n[11],x=n[15],b=r[0],_=r[4],w=r[8],M=r[12],S=r[1],E=r[5],T=r[9],C=r[13],L=r[2],P=r[6],R=r[10],q=r[14],D=r[3],I=r[7],B=r[11],O=r[15];return i[0]=a*b+o*S+s*L+A*D,i[4]=a*_+o*E+s*P+A*I,i[8]=a*w+o*T+s*R+A*B,i[12]=a*M+o*C+s*q+A*O,i[1]=l*b+c*S+u*L+h*D,i[5]=l*_+c*E+u*P+h*I,i[9]=l*w+c*T+u*R+h*B,i[13]=l*M+c*C+u*q+h*O,i[2]=d*b+f*S+p*L+m*D,i[6]=d*_+f*E+p*P+m*I,i[10]=d*w+f*T+p*R+m*B,i[14]=d*M+f*C+p*q+m*O,i[3]=g*b+v*S+y*L+x*D,i[7]=g*_+v*E+y*P+x*I,i[11]=g*w+v*T+y*R+x*B,i[15]=g*M+v*C+y*q+x*O,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],a=e[1],o=e[5],s=e[9],A=e[13],l=e[2],c=e[6],u=e[10],h=e[14];return e[3]*(+i*s*c-r*A*c-i*o*u+n*A*u+r*o*h-n*s*h)+e[7]*(+t*s*h-t*A*u+i*a*u-r*a*h+r*A*l-i*s*l)+e[11]*(+t*A*c-t*o*h-i*a*c+n*a*h+i*o*l-n*A*l)+e[15]*(-r*o*l-t*s*c+t*o*u+r*a*c-n*a*u+n*s*l)}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],a=e[4],o=e[5],s=e[6],A=e[7],l=e[8],c=e[9],u=e[10],h=e[11],d=e[12],f=e[13],p=e[14],m=e[15],g=c*p*A-f*u*A+f*s*h-o*p*h-c*s*m+o*u*m,v=d*u*A-l*p*A-d*s*h+a*p*h+l*s*m-a*u*m,y=l*f*A-d*c*A+d*o*h-a*f*h-l*o*m+a*c*m,x=d*c*s-l*f*s-d*o*u+a*f*u+l*o*p-a*c*p,b=t*g+n*v+r*y+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/b;return e[0]=g*_,e[1]=(f*u*i-c*p*i-f*r*h+n*p*h+c*r*m-n*u*m)*_,e[2]=(o*p*i-f*s*i+f*r*A-n*p*A-o*r*m+n*s*m)*_,e[3]=(c*s*i-o*u*i-c*r*A+n*u*A+o*r*h-n*s*h)*_,e[4]=v*_,e[5]=(l*p*i-d*u*i+d*r*h-t*p*h-l*r*m+t*u*m)*_,e[6]=(d*s*i-a*p*i-d*r*A+t*p*A+a*r*m-t*s*m)*_,e[7]=(a*u*i-l*s*i+l*r*A-t*u*A-a*r*h+t*s*h)*_,e[8]=y*_,e[9]=(d*c*i-l*f*i-d*n*h+t*f*h+l*n*m-t*c*m)*_,e[10]=(a*f*i-d*o*i+d*n*A-t*f*A-a*n*m+t*o*m)*_,e[11]=(l*o*i-a*c*i-l*n*A+t*c*A+a*n*h-t*o*h)*_,e[12]=x*_,e[13]=(l*f*r-d*c*r+d*n*u-t*f*u-l*n*p+t*c*p)*_,e[14]=(d*o*r-a*f*r-d*n*s+t*f*s+a*n*p-t*o*p)*_,e[15]=(a*c*r-l*o*r+l*n*s-t*c*s-a*n*u+t*o*u)*_,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,a=e.x,o=e.y,s=e.z,A=i*a,l=i*o;return this.set(A*a+n,A*o-r*s,A*s+r*o,0,A*o+r*s,l*o+n,l*s-r*a,0,A*s-r*o,l*s+r*a,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,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,A=i+i,l=a+a,c=o+o,u=i*A,h=i*l,d=i*c,f=a*l,p=a*c,m=o*c,g=s*A,v=s*l,y=s*c,x=n.x,b=n.y,_=n.z;return r[0]=(1-(f+m))*x,r[1]=(h+y)*x,r[2]=(d-v)*x,r[3]=0,r[4]=(h-y)*b,r[5]=(1-(u+m))*b,r[6]=(p+g)*b,r[7]=0,r[8]=(d+v)*_,r[9]=(p-g)*_,r[10]=(1-(u+f))*_,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=nt.set(r[0],r[1],r[2]).length();const a=nt.set(r[4],r[5],r[6]).length(),o=nt.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],rt.copy(this);const s=1/i,A=1/a,l=1/o;return rt.elements[0]*=s,rt.elements[1]*=s,rt.elements[2]*=s,rt.elements[4]*=A,rt.elements[5]*=A,rt.elements[6]*=A,rt.elements[8]*=l,rt.elements[9]*=l,rt.elements[10]*=l,t.setFromRotationMatrix(rt),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const o=this.elements,s=2*i/(t-e),A=2*i/(n-r),l=(t+e)/(t-e),c=(n+r)/(n-r),u=-(a+i)/(a-i),h=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=l,o[12]=0,o[1]=0,o[5]=A,o[9]=c,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=h,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,n,r,i,a){const o=this.elements,s=1/(t-e),A=1/(n-r),l=1/(a-i),c=(t+e)*s,u=(n+r)*A,h=(a+i)*l;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-c,o[1]=0,o[5]=2*A,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*l,o[14]=-h,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])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}}tt.prototype.isMatrix4=!0;const nt=new Me,rt=new tt,it=new Me(0,0,0),at=new Me(1,1,1),ot=new Me,st=new Me,At=new Me,lt=new tt,ct=new we;class ut{constructor(e=0,t=0,n=0,r=ut.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],a=r[4],o=r[8],s=r[1],A=r[5],l=r[9],c=r[2],u=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(se(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(u,A),this._z=0);break;case"YXZ":this._x=Math.asin(-se(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,h),this._z=Math.atan2(s,A)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(se(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-c,h),this._z=Math.atan2(-a,A)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-se(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,A));break;case"YZX":this._z=Math.asin(se(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,A),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(o,h));break;case"XZY":this._z=Math.asin(-se(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(u,A),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,h),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 lt.makeRotationFromQuaternion(e),this.setFromRotationMatrix(lt,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ct.setFromEuler(this),this.setFromQuaternion(ct,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 Me(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ut.prototype.isEuler=!0,ut.DefaultOrder="XYZ",ut.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class ht{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 dt=0;const ft=new Me,pt=new we,mt=new tt,gt=new Me,vt=new Me,yt=new Me,xt=new we,bt=new Me(1,0,0),_t=new Me(0,1,0),wt=new Me(0,0,1),Mt={type:"added"},St={type:"removed"};class Et extends te{constructor(){super(),Object.defineProperty(this,"id",{value:dt++}),this.uuid=oe(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Et.DefaultUp.clone();const e=new Me,t=new ut,n=new we,r=new Me(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 tt},normalMatrix:{value:new fe}}),this.matrix=new tt,this.matrixWorld=new tt,this.matrixAutoUpdate=Et.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ht,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 pt.setFromAxisAngle(e,t),this.quaternion.multiply(pt),this}rotateOnWorldAxis(e,t){return pt.setFromAxisAngle(e,t),this.quaternion.premultiply(pt),this}rotateX(e){return this.rotateOnAxis(bt,e)}rotateY(e){return this.rotateOnAxis(_t,e)}rotateZ(e){return this.rotateOnAxis(wt,e)}translateOnAxis(e,t){return ft.copy(e).applyQuaternion(this.quaternion),this.position.add(ft.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(bt,e)}translateY(e){return this.translateOnAxis(_t,e)}translateZ(e){return this.translateOnAxis(wt,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(mt.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?gt.copy(e):gt.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),vt.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?mt.lookAt(vt,gt,this.up):mt.lookAt(gt,vt,this.up),this.quaternion.setFromRotationMatrix(mt),r&&(mt.extractRotation(r.matrixWorld),pt.setFromRotationMatrix(mt),this.quaternion.premultiply(pt.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(Mt)):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(St)),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(St)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),mt.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),mt.multiply(e.parent.matrixWorld)),e.applyMatrix4(mt),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(vt,e,yt),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(vt,xt,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=a(e.geometries),r=a(e.materials),i=a(e.textures),o=a(e.images),s=a(e.shapes),A=a(e.skeletons),l=a(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),A.length>0&&(n.skeletons=A),l.length>0&&(n.animations=l)}return n.object=r,n;function a(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 t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}Et.DefaultUp=new Me(0,1,0),Et.DefaultMatrixAutoUpdate=!0,Et.prototype.isObject3D=!0;const Tt=new Me,Ct=new Me,Lt=new Me,Pt=new Me,Rt=new Me,qt=new Me,Dt=new Me,It=new Me,Bt=new Me,Ot=new Me;class kt{constructor(e=new Me,t=new Me,n=new Me){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Tt.subVectors(e,t),r.cross(Tt);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){Tt.subVectors(r,t),Ct.subVectors(n,t),Lt.subVectors(e,t);const a=Tt.dot(Tt),o=Tt.dot(Ct),s=Tt.dot(Lt),A=Ct.dot(Ct),l=Ct.dot(Lt),c=a*A-o*o;if(0===c)return i.set(-2,-1,-1);const u=1/c,h=(A*s-o*l)*u,d=(a*l-o*s)*u;return i.set(1-h-d,d,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Pt),Pt.x>=0&&Pt.y>=0&&Pt.x+Pt.y<=1}static getUV(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Pt),s.set(0,0),s.addScaledVector(i,Pt.x),s.addScaledVector(a,Pt.y),s.addScaledVector(o,Pt.z),s}static isFrontFacing(e,t,n,r){return Tt.subVectors(n,t),Ct.subVectors(e,t),Tt.cross(Ct).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 Tt.subVectors(this.c,this.b),Ct.subVectors(this.a,this.b),.5*Tt.cross(Ct).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return kt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return kt.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return kt.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return kt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return kt.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 a,o;Rt.subVectors(r,n),qt.subVectors(i,n),It.subVectors(e,n);const s=Rt.dot(It),A=qt.dot(It);if(s<=0&&A<=0)return t.copy(n);Bt.subVectors(e,r);const l=Rt.dot(Bt),c=qt.dot(Bt);if(l>=0&&c<=l)return t.copy(r);const u=s*c-l*A;if(u<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(Rt,a);Ot.subVectors(e,i);const h=Rt.dot(Ot),d=qt.dot(Ot);if(d>=0&&h<=d)return t.copy(i);const f=h*A-s*d;if(f<=0&&A>=0&&d<=0)return o=A/(A-d),t.copy(n).addScaledVector(qt,o);const p=l*d-h*c;if(p<=0&&c-l>=0&&h-d>=0)return Dt.subVectors(i,r),o=(c-l)/(c-l+(h-d)),t.copy(r).addScaledVector(Dt,o);const m=1/(p+f+u);return a=f*m,o=u*m,t.copy(n).addScaledVector(Rt,a).addScaledVector(qt,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Nt=0;class zt extends te{constructor(){super(),Object.defineProperty(this,"id",{value:Nt++}),this.uuid=oe(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.format=k,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=x,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=J,this.stencilZFail=J,this.stencilZPass=J,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.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}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.sheenTint&&this.sheenTint.isColor&&(n.sheenTint=this.sheenTint.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.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularTint&&this.specularTint.isColor&&(n.specularTint=this.specularTint.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.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularTintMap&&this.specularTintMap.isTexture&&(n.specularTintMap=this.specularTintMap.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.attenuationTint&&(n.attenuationTint=this.attenuationTint.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),this.format!==k&&(n.format=this.format),!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.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.format=e.format,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++}}zt.prototype.isMaterial=!0;const Ft={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},Ut={h:0,s:0,l:0},Ht={h:0,s:0,l:0};function Gt(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 jt(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Vt(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Wt{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=Ae(e,1),t=se(t,0,1),n=se(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=Gt(i,r,e+1/3),this.g=Gt(i,r,e),this.b=Gt(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=Ft[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=jt(e.r),this.g=jt(e.g),this.b=jt(e.b),this}copyLinearToSRGB(e){return this.r=Vt(e.r),this.g=Vt(e.g),this.b=Vt(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),a=Math.min(t,n,r);let o,s;const A=(a+i)/2;if(a===i)o=0,s=0;else{const e=i-a;switch(s=A<=.5?e/(i+a):e/(2-i-a),i){case t:o=(n-r)/e+(n<r?6:0);break;case n:o=(r-t)/e+2;break;case r:o=(t-n)/e+4}o/=6}return e.h=o,e.s=s,e.l=A,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Ut),Ut.h+=e,Ut.s+=t,Ut.l+=n,this.setHSL(Ut.h,Ut.s,Ut.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(Ut),e.getHSL(Ht);const n=le(Ut.h,Ht.h,t),r=le(Ut.s,Ht.s,t),i=le(Ut.l,Ht.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()}}Wt.NAMES=Ft,Wt.prototype.isColor=!0,Wt.prototype.r=1,Wt.prototype.g=1,Wt.prototype.b=1;class Qt extends zt{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Wt(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.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}}Qt.prototype.isMeshBasicMaterial=!0;const Yt=new Me,Xt=new de;class Zt{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=K,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 Wt),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 de),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 Me),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 xe),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++)Xt.fromBufferAttribute(this,t),Xt.applyMatrix3(e),this.setXY(t,Xt.x,Xt.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Yt.fromBufferAttribute(this,t),Yt.applyMatrix3(e),this.setXYZ(t,Yt.x,Yt.y,Yt.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Yt.x=this.getX(t),Yt.y=this.getY(t),Yt.z=this.getZ(t),Yt.applyMatrix4(e),this.setXYZ(t,Yt.x,Yt.y,Yt.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Yt.x=this.getX(t),Yt.y=this.getY(t),Yt.z=this.getZ(t),Yt.applyNormalMatrix(e),this.setXYZ(t,Yt.x,Yt.y,Yt.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Yt.x=this.getX(t),Yt.y=this.getY(t),Yt.z=this.getZ(t),Yt.transformDirection(e),this.setXYZ(t,Yt.x,Yt.y,Yt.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),this.usage!==K&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}Zt.prototype.isBufferAttribute=!0;class Jt extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Kt extends Zt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends Zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class $t extends Zt{constructor(e,t,n){super(new Float32Array(e),t,n)}}function en(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}let tn=0;const nn=new tt,rn=new Et,an=new Me,on=new Te,sn=new Te,An=new Me;class ln extends te{constructor(){super(),Object.defineProperty(this,"id",{value:tn++}),this.uuid=oe(),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(en(e)>65535?Kt:Jt)(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 fe).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 nn.makeRotationFromQuaternion(e),this.applyMatrix4(nn),this}rotateX(e){return nn.makeRotationX(e),this.applyMatrix4(nn),this}rotateY(e){return nn.makeRotationY(e),this.applyMatrix4(nn),this}rotateZ(e){return nn.makeRotationZ(e),this.applyMatrix4(nn),this}translate(e,t,n){return nn.makeTranslation(e,t,n),this.applyMatrix4(nn),this}scale(e,t,n){return nn.makeScale(e,t,n),this.applyMatrix4(nn),this}lookAt(e){return rn.lookAt(e),rn.updateMatrix(),this.applyMatrix4(rn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(an).negate(),this.translate(an.x,an.y,an.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 $t(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Te);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 Me(-1/0,-1/0,-1/0),new Me(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];on.setFromBufferAttribute(n),this.morphTargetsRelative?(An.addVectors(this.boundingBox.min,on.min),this.boundingBox.expandByPoint(An),An.addVectors(this.boundingBox.max,on.max),this.boundingBox.expandByPoint(An)):(this.boundingBox.expandByPoint(on.min),this.boundingBox.expandByPoint(on.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 We);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 Me,1/0);if(e){const n=this.boundingSphere.center;if(on.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];sn.setFromBufferAttribute(n),this.morphTargetsRelative?(An.addVectors(on.min,sn.min),on.expandByPoint(An),An.addVectors(on.max,sn.max),on.expandByPoint(An)):(on.expandByPoint(sn.min),on.expandByPoint(sn.max))}on.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)An.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(An));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],o=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)An.fromBufferAttribute(a,t),o&&(an.fromBufferAttribute(e,t),An.add(an)),r=Math.max(r,n.distanceToSquared(An))}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)}}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,a=t.uv.array,o=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new Zt(new Float32Array(4*o),4));const s=t.tangent.array,A=[],l=[];for(let e=0;e<o;e++)A[e]=new Me,l[e]=new Me;const c=new Me,u=new Me,h=new Me,d=new de,f=new de,p=new de,m=new Me,g=new Me;function v(e,t,n){c.fromArray(r,3*e),u.fromArray(r,3*t),h.fromArray(r,3*n),d.fromArray(a,2*e),f.fromArray(a,2*t),p.fromArray(a,2*n),u.sub(c),h.sub(c),f.sub(d),p.sub(d);const i=1/(f.x*p.y-p.x*f.y);isFinite(i)&&(m.copy(u).multiplyScalar(p.y).addScaledVector(h,-f.y).multiplyScalar(i),g.copy(h).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(i),A[e].add(m),A[t].add(m),A[n].add(m),l[e].add(g),l[t].add(g),l[n].add(g))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)v(n[e+0],n[e+1],n[e+2])}const x=new Me,b=new Me,_=new Me,w=new Me;function M(e){_.fromArray(i,3*e),w.copy(_);const t=A[e];x.copy(t),x.sub(_.multiplyScalar(_.dot(t))).normalize(),b.crossVectors(w,t);const n=b.dot(l[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 e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)M(n[e+0]),M(n[e+1]),M(n[e+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 Zt(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 Me,i=new Me,a=new Me,o=new Me,s=new Me,A=new Me,l=new Me,c=new Me;if(e)for(let u=0,h=e.count;u<h;u+=3){const h=e.getX(u+0),d=e.getX(u+1),f=e.getX(u+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,d),a.fromBufferAttribute(t,f),l.subVectors(a,i),c.subVectors(r,i),l.cross(c),o.fromBufferAttribute(n,h),s.fromBufferAttribute(n,d),A.fromBufferAttribute(n,f),o.add(l),s.add(l),A.add(l),n.setXYZ(h,o.x,o.y,o.z),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(f,A.x,A.y,A.z)}else for(let e=0,o=t.count;e<o;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),l.subVectors(a,i),c.subVectors(r,i),l.cross(c),n.setXYZ(e+0,l.x,l.y,l.z),n.setXYZ(e+1,l.x,l.y,l.z),n.setXYZ(e+2,l.x,l.y,l.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,a=e.attributes[r],o=a.array,s=a.itemSize*t,A=Math.min(o.length,i.length-s);for(let e=0,t=s;e<A;e++,t++)i[t]=o[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)An.fromBufferAttribute(e,t),An.normalize(),e.setXYZ(t,An.x,An.y,An.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let o=0,s=0;for(let i=0,A=t.length;i<A;i++){o=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)a[s++]=n[o++]}return new Zt(a,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new ln,n=this.index.array,r=this.attributes;for(const i in r){const a=e(r[i],n);t.setAttribute(i,a)}const i=this.morphAttributes;for(const r in i){const a=[],o=i[r];for(let t=0,r=o.length;t<r;t++){const r=e(o[t],n);a.push(r)}t.morphAttributes[r]=a}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let e=0,n=a.length;e<n;e++){const n=a[e];t.addGroup(n.start,n.count,n.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 t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];a.push(r.toJSON(e.data))}a.length>0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new ln).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 e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let e=0,t=a.length;e<t;e++){const t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}const o=e.boundingBox;null!==o&&(this.boundingBox=o.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"})}}ln.prototype.isBufferGeometry=!0;const cn=new tt,un=new et,hn=new We,dn=new Me,fn=new Me,pn=new Me,mn=new Me,gn=new Me,vn=new Me,yn=new Me,xn=new Me,bn=new Me,_n=new de,wn=new de,Mn=new de,Sn=new Me,En=new Me;class Tn extends Et{constructor(e=new ln,t=new Qt){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(),hn.copy(n.boundingSphere),hn.applyMatrix4(i),!1===e.ray.intersectsSphere(hn))return;if(cn.copy(i).invert(),un.copy(e.ray).applyMatrix4(cn),null!==n.boundingBox&&!1===un.intersectsBox(n.boundingBox))return;let a;if(n.isBufferGeometry){const i=n.index,o=n.attributes.position,s=n.morphAttributes.position,A=n.morphTargetsRelative,l=n.attributes.uv,c=n.attributes.uv2,u=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,d=u.length;n<d;n++){const d=u[n],f=r[d.materialIndex];for(let n=Math.max(d.start,h.start),r=Math.min(d.start+d.count,h.start+h.count);n<r;n+=3){const r=i.getX(n),u=i.getX(n+1),h=i.getX(n+2);a=Cn(this,f,e,un,o,s,A,l,c,r,u,h),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=d.materialIndex,t.push(a))}}else{for(let n=Math.max(0,h.start),u=Math.min(i.count,h.start+h.count);n<u;n+=3){const u=i.getX(n),h=i.getX(n+1),d=i.getX(n+2);a=Cn(this,r,e,un,o,s,A,l,c,u,h,d),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}}else if(void 0!==o)if(Array.isArray(r))for(let n=0,i=u.length;n<i;n++){const i=u[n],d=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(i.start+i.count,h.start+h.count);n<r;n+=3){a=Cn(this,d,e,un,o,s,A,l,c,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=i.materialIndex,t.push(a))}}else{for(let n=Math.max(0,h.start),i=Math.min(o.count,h.start+h.count);n<i;n+=3){a=Cn(this,r,e,un,o,s,A,l,c,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Cn(e,t,n,r,i,a,o,s,A,l,c,u){dn.fromBufferAttribute(i,l),fn.fromBufferAttribute(i,c),pn.fromBufferAttribute(i,u);const h=e.morphTargetInfluences;if(a&&h){yn.set(0,0,0),xn.set(0,0,0),bn.set(0,0,0);for(let e=0,t=a.length;e<t;e++){const t=h[e],n=a[e];0!==t&&(mn.fromBufferAttribute(n,l),gn.fromBufferAttribute(n,c),vn.fromBufferAttribute(n,u),o?(yn.addScaledVector(mn,t),xn.addScaledVector(gn,t),bn.addScaledVector(vn,t)):(yn.addScaledVector(mn.sub(dn),t),xn.addScaledVector(gn.sub(fn),t),bn.addScaledVector(vn.sub(pn),t)))}dn.add(yn),fn.add(xn),pn.add(bn)}e.isSkinnedMesh&&(e.boneTransform(l,dn),e.boneTransform(c,fn),e.boneTransform(u,pn));const d=function(e,t,n,r,i,a,o,s){let A;if(A=1===t.side?r.intersectTriangle(o,a,i,!0,s):r.intersectTriangle(i,a,o,2!==t.side,s),null===A)return null;En.copy(s),En.applyMatrix4(e.matrixWorld);const l=n.ray.origin.distanceTo(En);return l<n.near||l>n.far?null:{distance:l,point:En.clone(),object:e}}(e,t,n,r,dn,fn,pn,Sn);if(d){s&&(_n.fromBufferAttribute(s,l),wn.fromBufferAttribute(s,c),Mn.fromBufferAttribute(s,u),d.uv=kt.getUV(Sn,dn,fn,pn,_n,wn,Mn,new de)),A&&(_n.fromBufferAttribute(A,l),wn.fromBufferAttribute(A,c),Mn.fromBufferAttribute(A,u),d.uv2=kt.getUV(Sn,dn,fn,pn,_n,wn,Mn,new de));const e={a:l,b:c,c:u,normal:new Me,materialIndex:0};kt.getNormal(dn,fn,pn,e.normal),d.face=e}return d}Tn.prototype.isMesh=!0;class Ln extends ln{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const s=[],A=[],l=[],c=[];let u=0,h=0;function d(e,t,n,r,i,a,d,f,p,m,g){const v=a/p,y=d/m,x=a/2,b=d/2,_=f/2,w=p+1,M=m+1;let S=0,E=0;const T=new Me;for(let a=0;a<M;a++){const o=a*y-b;for(let s=0;s<w;s++){const u=s*v-x;T[e]=u*r,T[t]=o*i,T[n]=_,A.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=f>0?1:-1,l.push(T.x,T.y,T.z),c.push(s/p),c.push(1-a/m),S+=1}}for(let e=0;e<m;e++)for(let t=0;t<p;t++){const n=u+t+w*e,r=u+t+w*(e+1),i=u+(t+1)+w*(e+1),a=u+(t+1)+w*e;s.push(n,r,a),s.push(r,i,a),E+=6}o.addGroup(h,E,g),h+=E,u+=S}d("z","y","x",-1,-1,n,t,e,a,i,0),d("z","y","x",1,-1,n,t,-e,a,i,1),d("x","z","y",1,1,e,n,t,r,a,2),d("x","z","y",1,-1,e,n,-t,r,a,3),d("x","y","z",1,-1,e,t,n,r,i,4),d("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new $t(A,3)),this.setAttribute("normal",new $t(l,3)),this.setAttribute("uv",new $t(c,2))}static fromJSON(e){return new Ln(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Pn(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 Rn(e){const t={};for(let n=0;n<e.length;n++){const r=Pn(e[n]);for(const e in r)t[e]=r[e]}return t}const qn={clone:Pn,merge:Rn};class Dn extends zt{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.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=Pn(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.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 n in this.uniforms){const 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;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}Dn.prototype.isShaderMaterial=!0;class In extends Et{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new tt,this.projectionMatrix=new tt,this.projectionMatrixInverse=new tt}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)}}In.prototype.isCamera=!0;class Bn extends In{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*ae*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*ie*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*ae*Math.atan(Math.tan(.5*ie*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,a){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=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*ie*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}const o=this.filmOffset;0!==o&&(i+=e*o/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}}Bn.prototype.isPerspectiveCamera=!0;const On=90;class kn extends Et{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 Bn(On,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new Me(1,0,0)),this.add(r);const i=new Bn(On,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new Me(-1,0,0)),this.add(i);const a=new Bn(On,1,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(new Me(0,1,0)),this.add(a);const o=new Bn(On,1,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(new Me(0,-1,0)),this.add(o);const s=new Bn(On,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new Me(0,0,1)),this.add(s);const A=new Bn(On,1,e,t);A.layers=this.layers,A.up.set(0,-1,0),A.lookAt(new Me(0,0,-1)),this.add(A)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,a,o,s,A]=this.children,l=e.xr.enabled,c=e.getRenderTarget();e.xr.enabled=!1;const u=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,a),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=u,e.setRenderTarget(n,5),e.render(t,A),e.setRenderTarget(c),e.xr.enabled=l}}class Nn extends ve{constructor(e,t,n,r,i,a,o,s,A,l){super(e=void 0!==e?e:[],t=void 0!==t?t:b,n,r,i,a,o=void 0!==o?o:O,s,A,l),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Nn.prototype.isCubeTexture=!0;class zn extends be{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 Nn(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:C,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=k,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 Ln(5,5,5),i=new Dn({name:"CubemapFromEquirect",uniforms:Pn(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;const a=new Tn(r,i),o=t.minFilter;t.minFilter===L&&(t.minFilter=C);return new kn(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}zn.prototype.isWebGLCubeRenderTarget=!0;const Fn=new Me,Un=new Me,Hn=new fe;class Gn{constructor(e=new Me(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=Fn.subVectors(n,t).cross(Un.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(Fn),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||Hn.getNormalMatrix(e),r=this.coplanarPoint(Fn).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)}}Gn.prototype.isPlane=!0;const jn=new We,Vn=new Me;class Wn{constructor(e=new Gn,t=new Gn,n=new Gn,r=new Gn,i=new Gn,a=new Gn){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),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],a=n[2],o=n[3],s=n[4],A=n[5],l=n[6],c=n[7],u=n[8],h=n[9],d=n[10],f=n[11],p=n[12],m=n[13],g=n[14],v=n[15];return t[0].setComponents(o-r,c-s,f-u,v-p).normalize(),t[1].setComponents(o+r,c+s,f+u,v+p).normalize(),t[2].setComponents(o+i,c+A,f+h,v+m).normalize(),t[3].setComponents(o-i,c-A,f-h,v-m).normalize(),t[4].setComponents(o-a,c-l,f-d,v-g).normalize(),t[5].setComponents(o+a,c+l,f+d,v+g).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),jn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(jn)}intersectsSprite(e){return jn.center.set(0,0,0),jn.radius=.7071067811865476,jn.applyMatrix4(e.matrixWorld),this.intersectsSphere(jn)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].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(Vn.x=r.normal.x>0?e.max.x:e.min.x,Vn.y=r.normal.y>0?e.max.y:e.min.y,Vn.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Vn)<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 Qn(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),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 Yn(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 a=r.get(t);void 0===a?r.set(t,function(t,r){const i=t.array,a=t.usage,o=e.createBuffer();e.bindBuffer(r,o),e.bufferData(r,i,a),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:o,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(!function(t,r,i){const a=r.array,o=r.updateRange;e.bindBuffer(i,t),-1===o.count?e.bufferSubData(i,0,a):(n?e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a,o.offset,o.count):e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a.subarray(o.offset,o.offset+o.count)),o.count=-1)}(a.buffer,t,i),a.version=t.version)}}}class Xn extends ln{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,a=t/2,o=Math.floor(n),s=Math.floor(r),A=o+1,l=s+1,c=e/o,u=t/s,h=[],d=[],f=[],p=[];for(let e=0;e<l;e++){const t=e*u-a;for(let n=0;n<A;n++){const r=n*c-i;d.push(r,-t,0),f.push(0,0,1),p.push(n/o),p.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<o;t++){const n=t+A*e,r=t+A*(e+1),i=t+1+A*(e+1),a=t+1+A*e;h.push(n,r,a),h.push(r,i,a)}this.setIndex(h),this.setAttribute("position",new $t(d,3)),this.setAttribute("normal",new $t(f,3)),this.setAttribute("uv",new $t(p,2))}static fromJSON(e){return new Xn(e.width,e.height,e.widthSegments,e.heightSegments)}}const Zn={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 USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\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.roughness );\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:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_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_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, 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 dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * 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}\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_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 dotVH = saturate( dot( geometry.viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\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 );\n\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_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 max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\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 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 USE_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}\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\tenvColor = envMapTexelToLinear( envColor );\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#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 getIBLIrradiance( const in GeometricContext geometry ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\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\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\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 vFogDepth;\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\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\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\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = 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\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\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 getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.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 getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.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 getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.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\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\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\treflectedLight.directDiffuse += irradiance * BRDF_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_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;\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\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_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_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.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularTintFactor = specularTint;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARTINTMAP\n\t\t\tspecularTintFactor *= specularTintMapTexelToLinear( texture2D( specularTintMap, vUv ) ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularTintFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularTintFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\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.sheenTint = sheenTint;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenTint;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\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\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.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}\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.roughness;\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#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += irradiance * BRDF_Sheen( material.roughness, directLight.direction, geometry, material.sheenTint );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_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_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 USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += 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 USE_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\tgetPointLightInfo( 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\tgetSpotLightInfo( 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\tgetDirectionalLightInfo( 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 += getIBLIrradiance( geometry );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\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",normal_pars_fragment:"#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",normal_pars_vertex:"#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",normal_vertex:"#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",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 USE_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",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",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 transmissionAlpha = 1.0;\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_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationTint, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = transmission.a;\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationTint;\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 vec3 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\tvec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\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\tvec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90,\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\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\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 <alphatest_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 <alphatest_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\t#include <output_fragment>\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 <alphatest_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\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\t#include <output_fragment>\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#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\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 <clipping_planes_vertex>\n\t#include <worldpos_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 <alphatest_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_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_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\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#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 <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_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\t#include <output_fragment>\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#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_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#include <normal_vertex>\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}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_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}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_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\t#include <normal_vertex>\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}",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 <alphatest_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 <normal_pars_fragment>\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\t#include <output_fragment>\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#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 <normal_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 <normal_vertex>\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 IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularTint;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARTINTMAP\n\t\tuniform sampler2D specularTintMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenTint;\n#endif\nvarying vec3 vViewPosition;\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 <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_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 <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_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\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat;\n\t#endif\n\t#include <output_fragment>\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#ifdef USE_TRANSMISSION\n\tvarying vec3 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 <normal_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 <normal_vertex>\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.xyz;\n#endif\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 <alphatest_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 <normal_pars_fragment>\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\t#include <output_fragment>\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#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 <normal_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 <normal_vertex>\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}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_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\t#include <output_fragment>\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 <alphatest_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\t#include <output_fragment>\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}"},Jn={common:{diffuse:{value:new Wt(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new fe},uv2Transform:{value:new fe},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},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 de(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 Wt(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 Wt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new fe}},sprite:{diffuse:{value:new Wt(16777215)},opacity:{value:1},center:{value:new de(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new fe}}},Kn={basic:{uniforms:Rn([Jn.common,Jn.specularmap,Jn.envmap,Jn.aomap,Jn.lightmap,Jn.fog]),vertexShader:Zn.meshbasic_vert,fragmentShader:Zn.meshbasic_frag},lambert:{uniforms:Rn([Jn.common,Jn.specularmap,Jn.envmap,Jn.aomap,Jn.lightmap,Jn.emissivemap,Jn.fog,Jn.lights,{emissive:{value:new Wt(0)}}]),vertexShader:Zn.meshlambert_vert,fragmentShader:Zn.meshlambert_frag},phong:{uniforms:Rn([Jn.common,Jn.specularmap,Jn.envmap,Jn.aomap,Jn.lightmap,Jn.emissivemap,Jn.bumpmap,Jn.normalmap,Jn.displacementmap,Jn.fog,Jn.lights,{emissive:{value:new Wt(0)},specular:{value:new Wt(1118481)},shininess:{value:30}}]),vertexShader:Zn.meshphong_vert,fragmentShader:Zn.meshphong_frag},standard:{uniforms:Rn([Jn.common,Jn.envmap,Jn.aomap,Jn.lightmap,Jn.emissivemap,Jn.bumpmap,Jn.normalmap,Jn.displacementmap,Jn.roughnessmap,Jn.metalnessmap,Jn.fog,Jn.lights,{emissive:{value:new Wt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Zn.meshphysical_vert,fragmentShader:Zn.meshphysical_frag},toon:{uniforms:Rn([Jn.common,Jn.aomap,Jn.lightmap,Jn.emissivemap,Jn.bumpmap,Jn.normalmap,Jn.displacementmap,Jn.gradientmap,Jn.fog,Jn.lights,{emissive:{value:new Wt(0)}}]),vertexShader:Zn.meshtoon_vert,fragmentShader:Zn.meshtoon_frag},matcap:{uniforms:Rn([Jn.common,Jn.bumpmap,Jn.normalmap,Jn.displacementmap,Jn.fog,{matcap:{value:null}}]),vertexShader:Zn.meshmatcap_vert,fragmentShader:Zn.meshmatcap_frag},points:{uniforms:Rn([Jn.points,Jn.fog]),vertexShader:Zn.points_vert,fragmentShader:Zn.points_frag},dashed:{uniforms:Rn([Jn.common,Jn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Zn.linedashed_vert,fragmentShader:Zn.linedashed_frag},depth:{uniforms:Rn([Jn.common,Jn.displacementmap]),vertexShader:Zn.depth_vert,fragmentShader:Zn.depth_frag},normal:{uniforms:Rn([Jn.common,Jn.bumpmap,Jn.normalmap,Jn.displacementmap,{opacity:{value:1}}]),vertexShader:Zn.meshnormal_vert,fragmentShader:Zn.meshnormal_frag},sprite:{uniforms:Rn([Jn.sprite,Jn.fog]),vertexShader:Zn.sprite_vert,fragmentShader:Zn.sprite_frag},background:{uniforms:{uvTransform:{value:new fe},t2D:{value:null}},vertexShader:Zn.background_vert,fragmentShader:Zn.background_frag},cube:{uniforms:Rn([Jn.envmap,{opacity:{value:1}}]),vertexShader:Zn.cube_vert,fragmentShader:Zn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Zn.equirect_vert,fragmentShader:Zn.equirect_frag},distanceRGBA:{uniforms:Rn([Jn.common,Jn.displacementmap,{referencePosition:{value:new Me},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Zn.distanceRGBA_vert,fragmentShader:Zn.distanceRGBA_frag},shadow:{uniforms:Rn([Jn.lights,Jn.fog,{color:{value:new Wt(0)},opacity:{value:1}}]),vertexShader:Zn.shadow_vert,fragmentShader:Zn.shadow_frag}};function $n(e,t,n,r,i){const a=new Wt(0);let o,s,A=0,l=null,c=0,u=null;function h(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return a},setClearColor:function(e,t=1){a.set(e),A=t,h(a,A)},getClearAlpha:function(){return A},setClearAlpha:function(e){A=e,h(a,A)},render:function(n,i){let d=!1,f=!0===i.isScene?i.background:null;f&&f.isTexture&&(f=t.get(f));const p=e.xr,m=p.getSession&&p.getSession();m&&"additive"===m.environmentBlendMode&&(f=null),null===f?h(a,A):f&&f.isColor&&(h(f,1),d=!0),(e.autoClear||d)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),f&&(f.isCubeTexture||f.mapping===w)?(void 0===s&&(s=new Tn(new Ln(1,1,1),new Dn({name:"BackgroundCubeMaterial",uniforms:Pn(Kn.cube.uniforms),vertexShader:Kn.cube.vertexShader,fragmentShader:Kn.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),s.geometry.deleteAttribute("uv"),s.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(s.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(s)),s.material.uniforms.envMap.value=f,s.material.uniforms.flipEnvMap.value=f.isCubeTexture&&!1===f.isRenderTargetTexture?-1:1,l===f&&c===f.version&&u===e.toneMapping||(s.material.needsUpdate=!0,l=f,c=f.version,u=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null)):f&&f.isTexture&&(void 0===o&&(o=new Tn(new Xn(2,2),new Dn({name:"BackgroundMaterial",uniforms:Pn(Kn.background.uniforms),vertexShader:Kn.background.vertexShader,fragmentShader:Kn.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),o.geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),o.material.uniforms.uvTransform.value.copy(f.matrix),l===f&&c===f.version&&u===e.toneMapping||(o.material.needsUpdate=!0,l=f,c=f.version,u=e.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null))}}}function er(e,t,n,r){const i=e.getParameter(34921),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),o=r.isWebGL2||null!==a,s={},A=h(null);let l=A;function c(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function u(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function h(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function d(){const e=l.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function f(e){p(e,0)}function p(n,i){const a=l.newAttributes,o=l.enabledAttributes,s=l.attributeDivisors;if(a[n]=1,0===o[n]&&(e.enableVertexAttribArray(n),o[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function m(){const t=l.newAttributes,n=l.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function g(t,n,i,a,o,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,a,o,s):e.vertexAttribIPointer(t,n,i,o,s)}function v(){y(),l!==A&&(l=A,c(l.object))}function y(){A.geometry=null,A.program=null,A.wireframe=!1}return{setup:function(i,A,u,v,y){let x=!1;if(o){const t=function(t,n,i){const o=!0===i.wireframe;let A=s[t.id];void 0===A&&(A={},s[t.id]=A);let l=A[n.id];void 0===l&&(l={},A[n.id]=l);let c=l[o];void 0===c&&(c=h(r.isWebGL2?e.createVertexArray():a.createVertexArrayOES()),l[o]=c);return c}(v,u,A);l!==t&&(l=t,c(l.object)),x=function(e,t){const n=l.attributes,r=e.attributes;let i=0;for(const e in r){const t=n[e],a=r[e];if(void 0===t)return!0;if(t.attribute!==a)return!0;if(t.data!==a.data)return!0;i++}return l.attributesNum!==i||l.index!==t}(v,y),x&&function(e,t){const n={},r=e.attributes;let i=0;for(const e in r){const t=r[e],a={};a.attribute=t,t.data&&(a.data=t.data),n[e]=a,i++}l.attributes=n,l.attributesNum=i,l.index=t}(v,y)}else{const e=!0===A.wireframe;l.geometry===v.id&&l.program===u.id&&l.wireframe===e||(l.geometry=v.id,l.program=u.id,l.wireframe=e,x=!0)}!0===i.isInstancedMesh&&(x=!0),null!==y&&n.update(y,34963),x&&(!function(i,a,o,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;d();const A=s.attributes,l=o.getAttributes(),c=a.defaultAttributeValues;for(const t in l){const r=l[t];if(r.location>=0){let a=A[t];if(void 0===a&&("instanceMatrix"===t&&i.instanceMatrix&&(a=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(a=i.instanceColor)),void 0!==a){const t=a.normalized,o=a.itemSize,A=n.get(a);if(void 0===A)continue;const l=A.buffer,c=A.type,u=A.bytesPerElement;if(a.isInterleavedBufferAttribute){const n=a.data,A=n.stride,h=a.offset;if(n&&n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)p(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)f(r.location+e);e.bindBuffer(34962,l);for(let e=0;e<r.locationSize;e++)g(r.location+e,o/r.locationSize,c,t,A*u,(h+o/r.locationSize*e)*u)}else{if(a.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)p(r.location+e,a.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=a.meshPerAttribute*a.count)}else for(let e=0;e<r.locationSize;e++)f(r.location+e);e.bindBuffer(34962,l);for(let e=0;e<r.locationSize;e++)g(r.location+e,o/r.locationSize,c,t,o*u,o/r.locationSize*e*u)}}else if(void 0!==c){const n=c[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}m()}(i,A,u,v),null!==y&&e.bindBuffer(34963,n.get(y).buffer))},reset:v,resetDefaultState:y,dispose:function(){v();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)u(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 e in t){const n=t[e];for(const e in n)u(n[e].object),delete n[e];delete t[e]}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)u(r[e].object),delete r[e];delete n[e.id]}},initAttributes:d,enableAttribute:f,disableUnusedAttributes:m}}function tr(e,t,n,r){const i=r.isWebGL2;let a;this.setMode=function(e){a=e},this.render=function(t,r){e.drawArrays(a,t,r),n.update(r,a,1)},this.renderInstances=function(r,o,s){if(0===s)return;let A,l;if(i)A=e,l="drawArraysInstanced";else if(A=t.get("ANGLE_instanced_arrays"),l="drawArraysInstancedANGLE",null===A)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");A[l](a,r,o,s),n.update(o,a,s)}}function nr(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 a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let o=void 0!==n.precision?n.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const A=a||t.has("WEBGL_draw_buffers"),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=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:A,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:o,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:a?e.getParameter(36183):0}}function rr(e){const t=this;let n=null,r=0,i=!1,a=!1;const o=new Gn,s=new fe,A={value:null,needsUpdate:!1};function l(){A.value!==n&&(A.value=n,A.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function c(e,n,r,i){const a=null!==e?e.length:0;let l=null;if(0!==a){if(l=A.value,!0!==i||null===l){const t=r+4*a,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===l||l.length<t)&&(l=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)o.copy(e[t]).applyMatrix4(i,s),o.normal.toArray(l,n),l[n+3]=o.constant}A.value=l,A.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,l}this.uniform=A,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,a){const o=0!==e.length||t||0!==r||i;return i=t,n=c(e,a,0),r=e.length,o},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1,l()},this.setState=function(t,o,s){const u=t.clippingPlanes,h=t.clipIntersection,d=t.clipShadows,f=e.get(t);if(!i||null===u||0===u.length||a&&!d)a?c(null):l();else{const e=a?0:r,t=4*e;let i=f.clippingState||null;A.value=i,i=c(u,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function ir(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=b:304===t&&(e.mapping=_),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&&!1===i.isRenderTargetTexture){const a=i.mapping;if(303===a||304===a){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const a=i.image;if(a&&a.height>0){const o=e.getRenderTarget(),s=new zn(a.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(o),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}Kn.physical={uniforms:Rn([Kn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new de(1,1)},clearcoatNormalMap:{value:null},sheenTint:{value:new Wt(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new de},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationTint:{value:new Wt(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularTint:{value:new Wt(1,1,1)},specularTintMap:{value:null}}]),vertexShader:Zn.meshphysical_vert,fragmentShader:Zn.meshphysical_frag};class ar extends In{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=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=a,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,a){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=a,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,a=n+e,o=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,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,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}}ar.prototype.isOrthographicCamera=!0;class or extends Dn{constructor(e){super(e),this.type="RawShaderMaterial"}}or.prototype.isRawShaderMaterial=!0;const sr=Math.pow(2,8),Ar=[.125,.215,.35,.446,.526,.582],lr=5+Ar.length,cr=20,ur={[Q]:0,[Y]:1,[Z]:2,3004:3,3005:4,3006:5,[X]:6},hr=new ar,{_lodPlanes:dr,_sizeLods:fr,_sigmas:pr}=wr(),mr=new Wt;let gr=null;const vr=(1+Math.sqrt(5))/2,yr=1/vr,xr=[new Me(1,1,1),new Me(-1,1,1),new Me(1,1,-1),new Me(-1,1,-1),new Me(0,vr,yr),new Me(0,vr,-yr),new Me(yr,0,vr),new Me(-yr,0,vr),new Me(vr,yr,0),new Me(-vr,yr,0)];class br{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){const t=new Float32Array(e),n=new Me(0,1,0);return new or({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:ur[3e3]},outputEncoding:{value:ur[3e3]}},vertexShader:Cr(),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${Lr()}\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})}(cr),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){gr=this._renderer.getRenderTarget();const 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}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=Tr(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=Er(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let e=0;e<dr.length;e++)dr[e].dispose()}_cleanup(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(gr),e.scissorTest=!1,Sr(e,0,0,e.width,e.height)}_fromTexture(e){gr=this._renderer.getRenderTarget();const t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t}_allocateTargets(e){const t={magFilter:T,minFilter:T,generateMipmaps:!1,type:P,format:1023,encoding:_r(e)?e.encoding:Z,depthBuffer:!1},n=Mr(t);return n.depthBuffer=!e,this._pingPongRenderTarget=Mr(t),n}_compileMaterial(e){const t=new Tn(dr[0],e);this._renderer.compile(t,hr)}_sceneToCubeUV(e,t,n,r){const i=new Bn(90,1,t,n),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,A=s.autoClear,l=s.outputEncoding,c=s.toneMapping;s.getClearColor(mr),s.toneMapping=0,s.outputEncoding=Q,s.autoClear=!1;const u=new Qt({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),h=new Tn(new Ln,u);let d=!1;const f=e.background;f?f.isColor&&(u.color.copy(f),e.background=null,d=!0):(u.color.copy(mr),d=!0);for(let t=0;t<6;t++){const n=t%3;0==n?(i.up.set(0,a[t],0),i.lookAt(o[t],0,0)):1==n?(i.up.set(0,0,a[t]),i.lookAt(0,o[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,o[t])),Sr(r,n*sr,t>2?sr:0,sr,sr),s.setRenderTarget(r),d&&s.render(h,i),s.render(e,i)}h.geometry.dispose(),h.material.dispose(),s.toneMapping=c,s.outputEncoding=l,s.autoClear=A,e.background=f}_textureToCubeUV(e,t){const n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=Tr()):null==this._equirectShader&&(this._equirectShader=Er());const r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new Tn(dr[0],r),a=r.uniforms;a.envMap.value=e,e.isCubeTexture||a.texelSize.value.set(1/e.image.width,1/e.image.height),a.inputEncoding.value=ur[e.encoding],a.outputEncoding.value=ur[t.texture.encoding],Sr(t,0,0,3*sr,2*sr),n.setRenderTarget(t),n.render(i,hr)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<lr;t++){const n=Math.sqrt(pr[t]*pr[t]-pr[t-1]*pr[t-1]),r=xr[(t-1)%xr.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",i),this._halfBlur(a,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,a,o){const s=this._renderer,A=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");const l=new Tn(dr[r],A),c=A.uniforms,u=fr[n]-1,h=isFinite(i)?Math.PI/(2*u):2*Math.PI/39,d=i/h,f=isFinite(i)?1+Math.floor(3*d):cr;f>cr&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const p=[];let m=0;for(let e=0;e<cr;++e){const t=e/d,n=Math.exp(-t*t/2);p.push(n),0==e?m+=n:e<f&&(m+=2*n)}for(let e=0;e<p.length;e++)p[e]=p[e]/m;c.envMap.value=e.texture,c.samples.value=f,c.weights.value=p,c.latitudinal.value="latitudinal"===a,o&&(c.poleAxis.value=o),c.dTheta.value=h,c.mipInt.value=8-n,c.inputEncoding.value=ur[e.texture.encoding],c.outputEncoding.value=ur[e.texture.encoding];const g=fr[r];Sr(t,3*Math.max(0,sr-2*g),(0===r?0:2*sr)+2*g*(r>4?r-8+4:0),3*g,2*g),s.setRenderTarget(t),s.render(l,hr)}}function _r(e){return void 0!==e&&e.type===P&&(e.encoding===Q||e.encoding===Y||e.encoding===X)}function wr(){const e=[],t=[],n=[];let r=8;for(let i=0;i<lr;i++){const a=Math.pow(2,r);t.push(a);let o=1/a;i>4?o=Ar[i-8+4-1]:0==i&&(o=0),n.push(o);const s=1/(a-1),A=-s/2,l=1+s/2,c=[A,A,l,A,l,l,A,A,l,l,A,l],u=6,h=6,d=3,f=2,p=1,m=new Float32Array(d*h*u),g=new Float32Array(f*h*u),v=new Float32Array(p*h*u);for(let e=0;e<u;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];m.set(r,d*h*e),g.set(c,f*h*e);const i=[e,e,e,e,e,e];v.set(i,p*h*e)}const y=new ln;y.setAttribute("position",new Zt(m,d)),y.setAttribute("uv",new Zt(g,f)),y.setAttribute("faceIndex",new Zt(v,p)),e.push(y),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function Mr(e){const t=new be(3*sr,3*sr,e);return t.texture.mapping=w,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function Sr(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Er(){const e=new de(1,1);return new or({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e},inputEncoding:{value:ur[3e3]},outputEncoding:{value:ur[3e3]}},vertexShader:Cr(),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${Lr()}\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 Tr(){return new or({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:ur[3e3]},outputEncoding:{value:ur[3e3]}},vertexShader:Cr(),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${Lr()}\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 Cr(){return"\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"}function Lr(){return"\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"}function Pr(e){let t=new WeakMap,n=null;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&&!1===i.isRenderTargetTexture){const a=i.mapping,o=303===a||304===a,s=a===b||a===_;if(o||s){if(t.has(i))return t.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(e){let t=0;const n=6;for(let r=0;r<n;r++)void 0!==e[r]&&t++;return t===n}(a)){const a=e.getRenderTarget();null===n&&(n=new br(e));const s=o?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),s.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Rr(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 qr(e,t,n,r){const i={},a=new WeakMap;function o(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener("dispose",o),delete i[s.id];const A=a.get(s);A&&(t.remove(A),a.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 o=0;if(null!==r){const e=r.array;o=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{const e=i.array;o=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(en(n)>65535?Kt:Jt)(n,1);s.version=o;const A=a.get(e);A&&t.remove(A),a.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",o),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=a.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return a.get(e)}}}function Dr(e,t,n,r){const i=r.isWebGL2;let a,o,s;this.setMode=function(e){a=e},this.setIndex=function(e){o=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(a,r,o,t*s),n.update(r,a,1)},this.renderInstances=function(r,A,l){if(0===l)return;let c,u;if(i)c=e,u="drawElementsInstanced";else if(c=t.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===c)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[u](a,A,o,r*s,l),n.update(A,a,l)}}function Ir(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 Br(e,t){return e[0]-t[0]}function Or(e,t){return Math.abs(t[1])-Math.abs(e[1])}function kr(e){const t={},n=new Float32Array(8),r=[];for(let e=0;e<8;e++)r[e]=[e,0];return{update:function(i,a,o,s){const A=i.morphTargetInfluences,l=void 0===A?0:A.length;let c=t[a.id];if(void 0===c||c.length!==l){c=[];for(let e=0;e<l;e++)c[e]=[e,0];t[a.id]=c}for(let e=0;e<l;e++){const t=c[e];t[0]=e,t[1]=A[e]}c.sort(Or);for(let e=0;e<8;e++)e<l&&c[e][1]?(r[e][0]=c[e][0],r[e][1]=c[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(Br);const u=a.morphAttributes.position,h=a.morphAttributes.normal;let d=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],o=t[1];i!==Number.MAX_SAFE_INTEGER&&o?(u&&a.getAttribute("morphTarget"+e)!==u[i]&&a.setAttribute("morphTarget"+e,u[i]),h&&a.getAttribute("morphNormal"+e)!==h[i]&&a.setAttribute("morphNormal"+e,h[i]),n[e]=o,d+=o):(u&&!0===a.hasAttribute("morphTarget"+e)&&a.deleteAttribute("morphTarget"+e),h&&!0===a.hasAttribute("morphNormal"+e)&&a.deleteAttribute("morphNormal"+e),n[e]=0)}const f=a.morphTargetsRelative?1:1-d;s.getUniforms().setValue(e,"morphTargetBaseInfluence",f),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function Nr(e,t,n,r){let i=new WeakMap;function a(e){const t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const o=r.render.frame,s=e.geometry,A=t.get(e,s);return i.get(A)!==o&&(t.update(A),i.set(A,o)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",a)&&e.addEventListener("dispose",a),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),A},dispose:function(){i=new WeakMap}}}class zr extends ve{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=T,this.minFilter=T,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}zr.prototype.isDataTexture2DArray=!0;class Fr extends ve{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=T,this.minFilter=T,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Fr.prototype.isDataTexture3D=!0;const Ur=new ve,Hr=new zr,Gr=new Fr,jr=new Nn,Vr=[],Wr=[],Qr=new Float32Array(16),Yr=new Float32Array(9),Xr=new Float32Array(4);function Zr(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let a=Vr[i];if(void 0===a&&(a=new Float32Array(i),Vr[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function Jr(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 Kr(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function $r(e,t){let n=Wr[t];void 0===n&&(n=new Int32Array(t),Wr[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function ei(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function ti(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(Jr(n,t))return;e.uniform2fv(this.addr,t),Kr(n,t)}}function ni(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(Jr(n,t))return;e.uniform3fv(this.addr,t),Kr(n,t)}}function ri(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(Jr(n,t))return;e.uniform4fv(this.addr,t),Kr(n,t)}}function ii(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Jr(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Kr(n,t)}else{if(Jr(n,r))return;Xr.set(r),e.uniformMatrix2fv(this.addr,!1,Xr),Kr(n,r)}}function ai(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Jr(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Kr(n,t)}else{if(Jr(n,r))return;Yr.set(r),e.uniformMatrix3fv(this.addr,!1,Yr),Kr(n,r)}}function oi(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Jr(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Kr(n,t)}else{if(Jr(n,r))return;Qr.set(r),e.uniformMatrix4fv(this.addr,!1,Qr),Kr(n,r)}}function si(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ai(e,t){const n=this.cache;Jr(n,t)||(e.uniform2iv(this.addr,t),Kr(n,t))}function li(e,t){const n=this.cache;Jr(n,t)||(e.uniform3iv(this.addr,t),Kr(n,t))}function ci(e,t){const n=this.cache;Jr(n,t)||(e.uniform4iv(this.addr,t),Kr(n,t))}function ui(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function hi(e,t){const n=this.cache;Jr(n,t)||(e.uniform2uiv(this.addr,t),Kr(n,t))}function di(e,t){const n=this.cache;Jr(n,t)||(e.uniform3uiv(this.addr,t),Kr(n,t))}function fi(e,t){const n=this.cache;Jr(n,t)||(e.uniform4uiv(this.addr,t),Kr(n,t))}function pi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Ur,i)}function mi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Gr,i)}function gi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||jr,i)}function vi(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Hr,i)}function yi(e,t){e.uniform1fv(this.addr,t)}function xi(e,t){const n=Zr(t,this.size,2);e.uniform2fv(this.addr,n)}function bi(e,t){const n=Zr(t,this.size,3);e.uniform3fv(this.addr,n)}function _i(e,t){const n=Zr(t,this.size,4);e.uniform4fv(this.addr,n)}function wi(e,t){const n=Zr(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Mi(e,t){const n=Zr(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Si(e,t){const n=Zr(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Ei(e,t){e.uniform1iv(this.addr,t)}function Ti(e,t){e.uniform2iv(this.addr,t)}function Ci(e,t){e.uniform3iv(this.addr,t)}function Li(e,t){e.uniform4iv(this.addr,t)}function Pi(e,t){e.uniform1uiv(this.addr,t)}function Ri(e,t){e.uniform2uiv(this.addr,t)}function qi(e,t){e.uniform3uiv(this.addr,t)}function Di(e,t){e.uniform4uiv(this.addr,t)}function Ii(e,t,n){const r=t.length,i=$r(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTexture2D(t[e]||Ur,i[e])}function Bi(e,t,n){const r=t.length,i=$r(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.safeSetTextureCube(t[e]||jr,i[e])}function Oi(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return ei;case 35664:return ti;case 35665:return ni;case 35666:return ri;case 35674:return ii;case 35675:return ai;case 35676:return oi;case 5124:case 35670:return si;case 35667:case 35671:return Ai;case 35668:case 35672:return li;case 35669:case 35673:return ci;case 5125:return ui;case 36294:return hi;case 36295:return di;case 36296:return fi;case 35678:case 36198:case 36298:case 36306:case 35682:return pi;case 35679:case 36299:case 36307:return mi;case 35680:case 36300:case 36308:case 36293:return gi;case 36289:case 36303:case 36311:case 36292:return vi}}(t.type)}function ki(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return yi;case 35664:return xi;case 35665:return bi;case 35666:return _i;case 35674:return wi;case 35675:return Mi;case 35676:return Si;case 5124:case 35670:return Ei;case 35667:case 35671:return Ti;case 35668:case 35672:return Ci;case 35669:case 35673:return Li;case 5125:return Pi;case 36294:return Ri;case 36295:return qi;case 36296:return Di;case 35678:case 36198:case 36298:case 36306:case 35682:return Ii;case 35680:case 36300:case 36308:case 36293:return Bi}}(t.type)}function Ni(e){this.id=e,this.seq=[],this.map={}}ki.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Kr(t,e)},Ni.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,a=r.length;i!==a;++i){const a=r[i];a.setValue(e,t[a.id],n)}};const zi=/(\w+)(\])?(\[|\.)?/g;function Fi(e,t){e.seq.push(t),e.map[t.id]=t}function Ui(e,t,n){const r=e.name,i=r.length;for(zi.lastIndex=0;;){const a=zi.exec(r),o=zi.lastIndex;let s=a[1];const A="]"===a[2],l=a[3];if(A&&(s|=0),void 0===l||"["===l&&o+2===i){Fi(n,void 0===l?new Oi(s,e,t):new ki(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new Ni(s),Fi(n,e)),n=e}}}function Hi(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);Ui(n,e.getUniformLocation(t,n.name),this)}}function Gi(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}Hi.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},Hi.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},Hi.upload=function(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){const a=t[i],o=n[a.id];!1!==o.needsUpdate&&a.setValue(e,o.value,r)}},Hi.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 ji=0;function Vi(e){switch(e){case Q:return["Linear","( value )"];case Y:return["sRGB","( value )"];case Z: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 X:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Wi(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":n.toUpperCase()+"\n\n"+i+"\n\n"+function(e){const t=e.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(e.getShaderSource(t))}function Qi(e,t){const n=Vi(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Yi(e,t){const n=Vi(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Xi(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 Zi(e){return""!==e}function Ji(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 Ki(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const $i=/^[ \t]*#include +<([\w\d./]+)>/gm;function ea(e){return e.replace($i,ta)}function ta(e,t){const n=Zn[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return ea(n)}const na=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,ra=/#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 ia(e){return e.replace(ra,oa).replace(na,aa)}function aa(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),oa(e,t,n,r)}function oa(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function sa(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 Aa(e,t,n,r){const i=e.getContext(),a=n.defines;let o=n.vertexShader,s=n.fragmentShader;const A=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),l=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case b:case _:t="ENVMAP_TYPE_CUBE";break;case w:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),c=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case _:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),u=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),h=e.gammaFactor>0?e.gammaFactor:1,d=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)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Zi).join("\n")}(n),f=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(a),p=i.createProgram();let m,g,v=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(m=[f].filter(Zi).join("\n"),m.length>0&&(m+="\n"),g=[d,f].filter(Zi).join("\n"),g.length>0&&(g+="\n")):(m=[sa(n),"#define SHADER_NAME "+n.shaderName,f,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#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 "+c:"",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.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularTintMap?"#define USE_SPECULARTINTMAP":"",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 "+A:"",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(Zi).join("\n"),g=[d,sa(n),"#define SHADER_NAME "+n.shaderName,f,"#define GAMMA_FACTOR "+h,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 "+l:"",n.envMap?"#define "+c:"",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.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularTintMap?"#define USE_SPECULARTINTMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheenTint?"#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 "+A:"",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?Zn.tonemapping_pars_fragment:"",0!==n.toneMapping?Xi("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.format===O?"#define OPAQUE":"",Zn.encodings_pars_fragment,n.map?Qi("mapTexelToLinear",n.mapEncoding):"",n.matcap?Qi("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Qi("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Qi("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.specularTintMap?Qi("specularTintMapTexelToLinear",n.specularTintMapEncoding):"",n.lightMap?Qi("lightMapTexelToLinear",n.lightMapEncoding):"",Yi("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Zi).join("\n")),o=ea(o),o=Ji(o,n),o=Ki(o,n),s=ea(s),s=Ji(s,n),s=Ki(s,n),o=ia(o),s=ia(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(v="#version 300 es\n",m=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+m,g=["#define varying in",n.glslVersion===ee?"":"out highp vec4 pc_fragColor;",n.glslVersion===ee?"":"#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"+g);const y=v+g+s,x=Gi(i,35633,v+m+o),M=Gi(i,35632,y);if(i.attachShader(p,x),i.attachShader(p,M),void 0!==n.index0AttributeName?i.bindAttribLocation(p,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(p).trim(),t=i.getShaderInfoLog(x).trim(),n=i.getShaderInfoLog(M).trim();let r=!0,a=!0;if(!1===i.getProgramParameter(p,35714)){r=!1;const t=Wi(i,x,"vertex"),n=Wi(i,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(a=!1);a&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:m},fragmentShader:{log:n,prefix:g}})}let S,E;return i.deleteShader(x),i.deleteShader(M),this.getUniforms=function(){return void 0===S&&(S=new Hi(i,p)),S},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),a=r.name;let o=1;35674===r.type&&(o=2),35675===r.type&&(o=3),35676===r.type&&(o=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:o}}return n}(i,p)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.name=n.shaderName,this.id=ji++,this.cacheKey=t,this.usedTimes=1,this.program=p,this.vertexShader=x,this.fragmentShader=M,this}function la(e,t,n,r,i,a,o){const s=[],A=i.isWebGL2,l=i.logarithmicDepthBuffer,c=i.floatVertexTextures,u=i.maxVertexUniforms,h=i.vertexTextures;let d=i.precision;const 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","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","specularIntensityMap","specularTintMap","specularTintMapEncoding","roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","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","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","sheenTint","transmission","transmissionMap","thicknessMap"];function m(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=Q,t}return{getParameters:function(a,s,p,g,v){const y=g.fog,x=a.isMeshStandardMaterial?g.environment:null,b=(a.isMeshStandardMaterial?n:t).get(a.envMap||x),_=f[a.type],M=v.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(c)return 1024;{const e=u,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}}(v):0;let S,E;if(null!==a.precision&&(d=i.getMaxPrecision(a.precision),d!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",d,"instead.")),_){const e=Kn[_];S=e.vertexShader,E=e.fragmentShader}else S=a.vertexShader,E=a.fragmentShader;const T=e.getRenderTarget(),C=a.alphaTest>0,L=a.clearcoat>0;return{isWebGL2:A,shaderID:_,shaderName:a.type,vertexShader:S,fragmentShader:E,defines:a.defines,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:d,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null!==T?m(T.texture):e.outputEncoding,map:!!a.map,mapEncoding:m(a.map),matcap:!!a.matcap,matcapEncoding:m(a.matcap),envMap:!!b,envMapMode:b&&b.mapping,envMapEncoding:m(b),envMapCubeUV:!!b&&(b.mapping===w||307===b.mapping),lightMap:!!a.lightMap,lightMapEncoding:m(a.lightMap),aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,emissiveMapEncoding:m(a.emissiveMap),bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:1===a.normalMapType,tangentSpaceNormalMap:0===a.normalMapType,clearcoat:L,clearcoatMap:L&&!!a.clearcoatMap,clearcoatRoughnessMap:L&&!!a.clearcoatRoughnessMap,clearcoatNormalMap:L&&!!a.clearcoatNormalMap,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,specularIntensityMap:!!a.specularIntensityMap,specularTintMap:!!a.specularTintMap,specularTintMapEncoding:m(a.specularTintMap),alphaMap:!!a.alphaMap,alphaTest:C,gradientMap:!!a.gradientMap,sheenTint:!!a.sheenTint&&(a.sheenTint.r>0||a.sheenTint.g>0||a.sheenTint.b>0),transmission:a.transmission>0,transmissionMap:!!a.transmissionMap,thicknessMap:!!a.thicknessMap,combine:a.combine,vertexTangents:!!a.normalMap&&!!v.geometry&&!!v.geometry.attributes.tangent,vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!v.geometry&&!!v.geometry.attributes.color&&4===v.geometry.attributes.color.itemSize,vertexUvs:!!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatMap||a.clearcoatRoughnessMap||a.clearcoatNormalMap||a.displacementMap||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularTintMap),uvsVertexOnly:!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatNormalMap||a.transmission>0||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularTintMap||!a.displacementMap),fog:!!y,useFog:a.fog,fogExp2:y&&y.isFogExp2,flatShading:!!a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:l,skinning:!0===v.isSkinnedMesh&&M>0,maxBones:M,useVertexTexture:c,morphTargets:!!v.geometry&&!!v.geometry.morphAttributes.position,morphNormals:!!v.geometry&&!!v.geometry.morphAttributes.normal,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,format:a.format,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&p.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,depthPacking:void 0!==a.depthPacking&&a.depthPacking,index0AttributeName:a.index0AttributeName,extensionDerivatives:a.extensions&&a.extensions.derivatives,extensionFragDepth:a.extensions&&a.extensions.fragDepth,extensionDrawBuffers:a.extensions&&a.extensions.drawBuffers,extensionShaderTextureLOD:a.extensions&&a.extensions.shaderTextureLOD,rendererExtensionFragDepth:A||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:A||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:A||r.has("EXT_shader_texture_lod"),customProgramCacheKey:a.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<p.length;e++)n.push(t[p[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=Kn[t];n=qn.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=s.length;e<t;e++){const t=s[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Aa(e,n,t,a),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 ca(){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 ua(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 ha(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 da(e){const t=[];let n=0;const r=[],i=[],a=[],o={id:-1};function s(r,i,a,s,A,l){let c=t[n];const u=e.get(a);return void 0===c?(c={id:r.id,object:r,geometry:i,material:a,program:u.program||o,groupOrder:s,renderOrder:r.renderOrder,z:A,group:l},t[n]=c):(c.id=r.id,c.object=r,c.geometry=i,c.material=a,c.program=u.program||o,c.groupOrder=s,c.renderOrder=r.renderOrder,c.z=A,c.group=l),n++,c}return{opaque:r,transmissive:i,transparent:a,init:function(){n=0,r.length=0,i.length=0,a.length=0},push:function(e,t,n,o,A,l){const c=s(e,t,n,o,A,l);n.transmission>0?i.push(c):!0===n.transparent?a.push(c):r.push(c)},unshift:function(e,t,n,o,A,l){const c=s(e,t,n,o,A,l);n.transmission>0?i.unshift(c):!0===n.transparent?a.unshift(c):r.unshift(c)},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||ua),i.length>1&&i.sort(t||ha),a.length>1&&a.sort(t||ha)}}}function fa(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new da(e),t.set(n,[i])):r>=t.get(n).length?(i=new da(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function pa(){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 Me,color:new Wt};break;case"SpotLight":n={position:new Me,direction:new Me,color:new Wt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Me,color:new Wt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Me,skyColor:new Wt,groundColor:new Wt};break;case"RectAreaLight":n={color:new Wt,position:new Me,halfWidth:new Me,halfHeight:new Me}}return e[t.id]=n,n}}}let ma=0;function ga(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function va(e,t){const n=new pa,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 de};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new de,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 e=0;e<9;e++)i.probe.push(new Me);const a=new Me,o=new tt,s=new tt;return{setup:function(a,o){let s=0,A=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;a.sort(ga);const v=!0!==o?Math.PI:1;for(let e=0,t=a.length;e<t;e++){const t=a[e],o=t.color,y=t.intensity,x=t.distance,b=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)s+=o.r*y*v,A+=o.g*y*v,l+=o.b*y*v;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*v),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]=b,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(o).multiplyScalar(y*v),e.distance=x,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]=b,i.spotShadowMatrix[h]=t.shadow.matrix,g++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(o).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*v),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]=b,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*v),e.groundColor.copy(t.groundColor).multiplyScalar(y*v),i.hemi[f]=e,f++}}d>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Jn.LTC_FLOAT_1,i.rectAreaLTC2=Jn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Jn.LTC_HALF_1,i.rectAreaLTC2=Jn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=A,i.ambient[2]=l;const y=i.hash;y.directionalLength===c&&y.pointLength===u&&y.spotLength===h&&y.rectAreaLength===d&&y.hemiLength===f&&y.numDirectionalShadows===p&&y.numPointShadows===m&&y.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,y.directionalLength=c,y.pointLength=u,y.spotLength=h,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=g,i.version=ma++)},setupView:function(e,t){let n=0,r=0,A=0,l=0,c=0;const u=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(u),n++}else if(h.isSpotLight){const e=i.spot[A];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(u),A++}else if(h.isRectAreaLight){const e=i.rectArea[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),s.identity(),o.copy(h.matrixWorld),o.premultiply(u),s.extractRotation(o),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),l++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(u),r++}else if(h.isHemisphereLight){const e=i.hemi[c];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(u),e.direction.normalize(),c++}}},state:i}}function ya(e,t){const n=new va(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function xa(e,t){let n=new WeakMap;return{get:function(r,i=0){let a;return!1===n.has(r)?(a=new ya(e,t),n.set(r,[a])):i>=n.get(r).length?(a=new ya(e,t),n.get(r).push(a)):a=n.get(r)[i],a},dispose:function(){n=new WeakMap}}}class ba extends zt{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,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.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}}ba.prototype.isMeshDepthMaterial=!0;class _a extends zt{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new Me,this.nearDistance=1,this.farDistance=1e3,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.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}_a.prototype.isMeshDistanceMaterial=!0;function wa(e,t,n){let r=new Wn;const i=new de,a=new de,o=new xe,s=new ba({depthPacking:3201}),A=new _a,l={},c=n.maxTextureSize,u={0:1,1:0,2:2},h=new Dn({uniforms:{shadow_pass:{value:null},resolution:{value:new de},radius:{value:4},samples:{value:8}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\nuniform float samples;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 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, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\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;const f=new ln;f.setAttribute("position",new Zt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Tn(f,h),m=this;function g(n,r){const i=t.update(p);h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,h.uniforms.samples.value=n.blurSamples,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,d.uniforms.samples.value=n.blurSamples,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,d,p,null)}function v(t,n,r,i,a,o,c){let h=null;const d=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(h=void 0!==d?d:!0===i.isPointLight?A:s,e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length||r.displacementMap&&0!==r.displacementScale||r.alphaMap&&r.alphaTest>0){const e=h.uuid,t=r.uuid;let n=l[e];void 0===n&&(n={},l[e]=n);let i=n[t];void 0===i&&(i=h.clone(),n[t]=i),h=i}return h.visible=r.visible,h.wireframe=r.wireframe,h.side=3===c?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],h.alphaMap=r.alphaMap,h.alphaTest=r.alphaTest,h.clipShadows=r.clipShadows,h.clippingPlanes=r.clippingPlanes,h.clipIntersection=r.clipIntersection,h.displacementMap=r.displacementMap,h.displacementScale=r.displacementScale,h.displacementBias=r.displacementBias,h.wireframeLinewidth=r.wireframeLinewidth,h.linewidth=r.linewidth,!0===i.isPointLight&&!0===h.isMeshDistanceMaterial&&(h.referencePosition.setFromMatrixPosition(i.matrixWorld),h.nearDistance=a,h.farDistance=o),h}function y(n,i,a,o,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(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let A=0,l=t.length;A<l;A++){const l=t[A],c=i[l.materialIndex];if(c&&c.visible){const t=v(n,0,c,o,a.near,a.far,s);e.renderBufferDirect(a,null,r,t,n,l)}}}else if(i.visible){const t=v(n,0,i,o,a.near,a.far,s);e.renderBufferDirect(a,null,r,t,n,null)}}const A=n.children;for(let e=0,t=A.length;e<t;e++)y(A[e],i,a,o,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,s){if(!1===m.enabled)return;if(!1===m.autoUpdate&&!1===m.needsUpdate)return;if(0===t.length)return;const A=e.getRenderTarget(),l=e.getActiveCubeFace(),u=e.getActiveMipmapLevel(),h=e.state;h.setBlending(0),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let A=0,l=t.length;A<l;A++){const l=t[A],u=l.shadow;if(void 0===u){console.warn("THREE.WebGLShadowMap:",l,"has no shadow.");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;i.copy(u.mapSize);const d=u.getFrameExtents();if(i.multiply(d),a.copy(u.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/d.x),i.x=a.x*d.x,u.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/d.y),i.y=a.y*d.y,u.mapSize.y=a.y)),null===u.map&&!u.isPointLightShadow&&3===this.type){const e={minFilter:C,magFilter:C,format:k};u.map=new be(i.x,i.y,e),u.map.texture.name=l.name+".shadowMap",u.mapPass=new be(i.x,i.y,e),u.camera.updateProjectionMatrix()}if(null===u.map){const e={minFilter:T,magFilter:T,format:k};u.map=new be(i.x,i.y,e),u.map.texture.name=l.name+".shadowMap",u.camera.updateProjectionMatrix()}e.setRenderTarget(u.map),e.clear();const f=u.getViewportCount();for(let e=0;e<f;e++){const t=u.getViewport(e);o.set(a.x*t.x,a.y*t.y,a.x*t.z,a.y*t.w),h.viewport(o),u.updateMatrices(l,e),r=u.getFrustum(),y(n,s,u.camera,l,this.type)}u.isPointLightShadow||3!==this.type||g(u,s),u.needsUpdate=!1}m.needsUpdate=!1,e.setRenderTarget(A,l,u)}}function Ma(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new xe;let r=null;const i=new xe(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,a,o,s){!0===s&&(t*=o,r*=o,a*=o),n.set(t,r,a,o),!1===i.equals(n)&&(e.clearColor(t,r,a,o),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},a=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?N(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}}},o=new function(){let t=!1,n=null,r=null,i=null,a=null,o=null,s=null,A=null,l=null;return{setTest:function(e){t||(e?N(2960):z(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,o){r===t&&i===n&&a===o||(e.stencilFunc(t,n,o),r=t,i=n,a=o)},setOp:function(t,n,r){o===t&&s===n&&A===r||(e.stencilOp(t,n,r),o=t,s=n,A=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,A=null,l=null}}};let s={},A=null,l={},c=null,u=!1,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=!1,b=null,_=null,w=null,M=null,S=null;const E=e.getParameter(35661);let T=!1,C=0;const L=e.getParameter(7938);-1!==L.indexOf("WebGL")?(C=parseFloat(/^WebGL (\d)/.exec(L)[1]),T=C>=1):-1!==L.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),T=C>=2);let P=null,R={};const q=e.getParameter(3088),D=e.getParameter(2978),I=(new xe).fromArray(q),B=(new xe).fromArray(D);function O(t,n,r){const i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return a}const k={};function N(t){!0!==s[t]&&(e.enable(t),s[t]=!0)}function z(t){!1!==s[t]&&(e.disable(t),s[t]=!1)}k[3553]=O(3553,3553,1),k[34067]=O(34067,34069,6),i.setClear(0,0,0,1),a.setClear(1),o.setClear(0),N(2929),a.setFunc(3),G(!1),j(1),N(2884),H(0);const F={[x]:32774,101:32778,102:32779};if(r)F[103]=32775,F[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(F[103]=e.MIN_EXT,F[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 H(t,n,r,i,a,o,s,A){if(0!==t){if(!1===u&&(N(3042),u=!0),5===t)a=a||n,o=o||r,s=s||i,n===d&&a===m||(e.blendEquationSeparate(F[n],F[a]),d=n,m=a),r===f&&i===p&&o===g&&s===v||(e.blendFuncSeparate(U[r],U[i],U[o],U[s]),f=r,p=i,g=o,v=s),h=t,y=null;else if(t!==h||A!==y){if(d===x&&m===x||(e.blendEquation(32774),d=x,m=x),A)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)}f=null,p=null,g=null,v=null,h=t,y=A}}else!0===u&&(z(3042),u=!1)}function G(t){b!==t&&(t?e.frontFace(2304):e.frontFace(2305),b=t)}function j(t){0!==t?(N(2884),t!==_&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):z(2884),_=t}function V(t,n,r){t?(N(32823),M===n&&S===r||(e.polygonOffset(n,r),M=n,S=r)):z(32823)}function W(t){void 0===t&&(t=33984+E-1),P!==t&&(e.activeTexture(t),P=t)}return{buffers:{color:i,depth:a,stencil:o},enable:N,disable:z,bindFramebuffer:function(t,n){return null===n&&null!==A&&(n=A),l[t]!==n&&(e.bindFramebuffer(t,n),l[t]=n,r&&(36009===t&&(l[36160]=n),36160===t&&(l[36009]=n)),!0)},bindXRFramebuffer:function(t){t!==A&&(e.bindFramebuffer(36160,t),A=t)},useProgram:function(t){return c!==t&&(e.useProgram(t),c=t,!0)},setBlending:H,setMaterial:function(e,t){2===e.side?z(2884):N(2884);let n=1===e.side;t&&(n=!n),G(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),a.setFunc(e.depthFunc),a.setTest(e.depthTest),a.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;o.setTest(r),r&&(o.setMask(e.stencilWriteMask),o.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),o.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),V(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?N(32926):z(32926)},setFlipSided:G,setCullFace:j,setLineWidth:function(t){t!==w&&(T&&e.lineWidth(t),w=t)},setPolygonOffset:V,setScissorTest:function(e){e?N(3089):z(3089)},activeTexture:W,bindTexture:function(t,n){null===P&&W();let r=R[P];void 0===r&&(r={type:void 0,texture:void 0},R[P]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||k[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=R[P];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(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===I.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),I.copy(t))},viewport:function(t){!1===B.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),B.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),s={},P=null,R={},A=null,l={},c=null,u=!1,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=!1,b=null,_=null,w=null,M=null,S=null,I.set(0,0,e.canvas.width,e.canvas.height),B.set(0,0,e.canvas.width,e.canvas.height),i.reset(),a.reset(),o.reset()}}}function Sa(e,t,n,r,i,a,o){const s=i.isWebGL2,A=i.maxTextures,l=i.maxCubemapSize,c=i.maxTextureSize,u=i.maxSamples,h=new WeakMap;let d,f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function p(e,t){return f?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function m(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?ue:Math.floor,a=r(i*e.width),o=r(i*e.height);void 0===d&&(d=p(a,o));const s=n?p(a,o):d;s.width=a,s.height=o;return s.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function g(e){return ce(e.width)&&ce(e.height)}function v(e,t){return e.generateMipmaps&&t&&e.minFilter!==T&&e.minFilter!==C}function y(t,n,i,a,o=1){e.generateMipmap(t);r.get(n).__maxMipLevel=Math.log2(Math.max(i,a,o))}function x(n,r,i){if(!1===s)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 a=r;return 6403===r&&(5126===i&&(a=33326),5131===i&&(a=33325),5121===i&&(a=33321)),6407===r&&(5126===i&&(a=34837),5131===i&&(a=34843),5121===i&&(a=32849)),6408===r&&(5126===i&&(a=34836),5131===i&&(a=34842),5121===i&&(a=32856)),33325!==a&&33326!==a&&34842!==a&&34836!==a||t.get("EXT_color_buffer_float"),a}function b(e){return e===T||1004===e||1005===e?9728:9729}function _(t){const n=t.target;n.removeEventListener("dispose",_),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&h.delete(n),o.memory.textures--}function w(t){const n=t.target;n.removeEventListener("dispose",w),function(t){const n=t.texture,i=r.get(t),a=r.get(n);if(!t)return;void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);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 t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),o.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}let P=0;function F(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=o.render.frame;h.get(e)!==t&&(h.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 W(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 U(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;V(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 o=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),A=r.image[0]&&r.image[0].isDataTexture,c=[];for(let e=0;e<6;e++)c[e]=o||A?A?r.image[e].image:r.image[e]:m(r.image[e],!1,!0,l);const u=c[0],h=g(u)||s,d=a.convert(r.format),f=a.convert(r.type),p=x(r.internalFormat,d,f);let b;if(j(34067,r,h),o){for(let e=0;e<6;e++){b=c[e].mipmaps;for(let t=0;t<b.length;t++){const i=b[t];r.format!==k&&r.format!==O?null!==d?n.compressedTexImage2D(34069+e,t,p,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,p,i.width,i.height,0,d,f,i.data)}}t.__maxMipLevel=b.length-1}else{b=r.mipmaps;for(let e=0;e<6;e++)if(A){n.texImage2D(34069+e,0,p,c[e].width,c[e].height,0,d,f,c[e].data);for(let t=0;t<b.length;t++){const r=b[t].image[e].image;n.texImage2D(34069+e,t+1,p,r.width,r.height,0,d,f,r.data)}}else{n.texImage2D(34069+e,0,p,d,f,c[e]);for(let t=0;t<b.length;t++){const r=b[t];n.texImage2D(34069+e,t+1,p,d,f,r.image[e])}}t.__maxMipLevel=b.length}v(r,h)&&y(34067,r,u.width,u.height);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(o,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,o.__webglTexture))}const H={[M]:10497,[S]:33071,[E]:33648},G={[T]:9728,1004:9984,1005:9986,[C]:9729,1007:9985,[L]:9987};function j(n,a,o){if(o?(e.texParameteri(n,10242,H[a.wrapS]),e.texParameteri(n,10243,H[a.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,H[a.wrapR]),e.texParameteri(n,10240,G[a.magFilter]),e.texParameteri(n,10241,G[a.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),a.wrapS===S&&a.wrapT===S||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,b(a.magFilter)),e.texParameteri(n,10241,b(a.minFilter)),a.minFilter!==T&&a.minFilter!==C&&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 o=t.get("EXT_texture_filter_anisotropic");if(a.type===D&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&a.type===I&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function V(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",_),t.__webglTexture=e.createTexture(),o.memory.textures++)}function W(t,r,i){let o=3553;r.isDataTexture2DArray&&(o=35866),r.isDataTexture3D&&(o=32879),V(t,r),n.activeTexture(33984+i),n.bindTexture(o,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const A=function(e){return!s&&(e.wrapS!==S||e.wrapT!==S||e.minFilter!==T&&e.minFilter!==C)}(r)&&!1===g(r.image),l=m(r.image,A,!1,c),u=g(l)||s,h=a.convert(r.format);let d,f=a.convert(r.type),p=x(r.internalFormat,h,f);j(o,r,u);const b=r.mipmaps;if(r.isDepthTexture)p=6402,s?p=r.type===D?36012:r.type===q?33190:r.type===B?35056:33189:r.type===D&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===N&&6402===p&&r.type!==R&&r.type!==q&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=R,f=a.convert(r.type)),r.format===z&&6402===p&&(p=34041,r.type!==B&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=B,f=a.convert(r.type))),n.texImage2D(3553,0,p,l.width,l.height,0,h,f,null);else if(r.isDataTexture)if(b.length>0&&u){for(let e=0,t=b.length;e<t;e++)d=b[e],n.texImage2D(3553,e,p,d.width,d.height,0,h,f,d.data);r.generateMipmaps=!1,t.__maxMipLevel=b.length-1}else n.texImage2D(3553,0,p,l.width,l.height,0,h,f,l.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=b.length;e<t;e++)d=b[e],r.format!==k&&r.format!==O?null!==h?n.compressedTexImage2D(3553,e,p,d.width,d.height,0,d.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,p,d.width,d.height,0,h,f,d.data);t.__maxMipLevel=b.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,p,l.width,l.height,l.depth,0,h,f,l.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,p,l.width,l.height,l.depth,0,h,f,l.data),t.__maxMipLevel=0;else if(b.length>0&&u){for(let e=0,t=b.length;e<t;e++)d=b[e],n.texImage2D(3553,e,p,h,f,d);r.generateMipmaps=!1,t.__maxMipLevel=b.length-1}else n.texImage2D(3553,0,p,h,f,l),t.__maxMipLevel=0;v(r,u)&&y(o,r,l.width,l.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function Q(t,i,o,s,A){const l=a.convert(o.format),c=a.convert(o.type),u=x(o.internalFormat,l,c);32879===A||35866===A?n.texImage3D(A,0,u,i.width,i.height,i.depth,0,l,c,null):n.texImage2D(A,0,u,i.width,i.height,0,l,c,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,s,A,r.get(o).__webglTexture,0),n.bindFramebuffer(36160,null)}function Y(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===D?i=36012:t.type===q&&(i=33190));const r=Z(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=Z(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=a.convert(t.format),o=a.convert(t.type),s=x(t.internalFormat,i,o);if(r){const t=Z(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function X(t){const i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(a)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),F(i.depthTexture,0);const a=r.get(i.depthTexture).__webglTexture;if(i.depthTexture.format===N)e.framebufferTexture2D(36160,36096,3553,a,0);else{if(i.depthTexture.format!==z)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),Y(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),Y(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function Z(e){return s&&e.isWebGLMultisampleRenderTarget?Math.min(u,e.samples):0}let J=!1,K=!1;this.allocateTextureUnit=function(){const e=P;return e>=A&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+A),P+=1,e},this.resetTextureUnits=function(){P=0},this.setTexture2D=F,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?W(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?W(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=U,this.setupRenderTarget=function(t){const A=t.texture,l=r.get(t),c=r.get(A);t.addEventListener("dispose",w),!0!==t.isWebGLMultipleRenderTargets&&(c.__webglTexture=e.createTexture(),c.__version=A.version,o.memory.textures++);const u=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,d=!0===t.isWebGLMultisampleRenderTarget,f=A.isDataTexture3D||A.isDataTexture2DArray,p=g(t)||s;if(!s||A.format!==O||A.type!==D&&A.type!==I||(A.format=k,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),u){l.__webglFramebuffer=[];for(let t=0;t<6;t++)l.__webglFramebuffer[t]=e.createFramebuffer()}else if(l.__webglFramebuffer=e.createFramebuffer(),h)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(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(d)if(s){l.__webglMultisampledFramebuffer=e.createFramebuffer(),l.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,l.__webglColorRenderbuffer);const r=a.convert(A.format),i=a.convert(A.type),o=x(A.internalFormat,r,i),s=Z(t);e.renderbufferStorageMultisample(36161,s,o,t.width,t.height),n.bindFramebuffer(36160,l.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,l.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(l.__webglDepthRenderbuffer=e.createRenderbuffer(),Y(l.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(u){n.bindTexture(34067,c.__webglTexture),j(34067,A,p);for(let e=0;e<6;e++)Q(l.__webglFramebuffer[e],t,A,36064,34069+e);v(A,p)&&y(34067,A,t.width,t.height),n.unbindTexture()}else if(h){const e=t.texture;for(let i=0,a=e.length;i<a;i++){const a=e[i],o=r.get(a);n.bindTexture(3553,o.__webglTexture),j(3553,a,p),Q(l.__webglFramebuffer,t,a,36064+i,3553),v(a,p)&&y(3553,a,t.width,t.height)}n.unbindTexture()}else{let e=3553;if(f)if(s){e=A.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,c.__webglTexture),j(e,A,p),Q(l.__webglFramebuffer,t,A,36064,e),v(A,p)&&y(e,A,t.width,t.height,t.depth),n.unbindTexture()}t.depthBuffer&&X(t)},this.updateRenderTargetMipmap=function(e){const t=g(e)||s,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let a=0,o=i.length;a<o;a++){const o=i[a];if(v(o,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(o).__webglTexture;n.bindTexture(t,i),y(t,o,e.width,e.height),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(s){const i=t.width,a=t.height;let o=16384;t.depthBuffer&&(o|=256),t.stencilBuffer&&(o|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,a,0,0,i,a,o,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===J&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),J=!0),e=e.texture),F(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===K&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),K=!0),e=e.texture),U(e,t)}}function Ea(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(e===P)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(e===R)return 5123;if(1013===e)return 5124;if(e===q)return 5125;if(e===D)return 5126;if(e===I)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(e===O)return 6407;if(e===k)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(e===N)return 6402;if(e===z)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):e===B?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class Ta extends Bn{constructor(e=[]){super(),this.cameras=e}}Ta.prototype.isArrayCamera=!0;class Ca extends Et{constructor(){super(),this.type="Group"}}Ca.prototype.isGroup=!0;const La={type:"move"};class Pa{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ca,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 Ca,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Me,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Me),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ca,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Me,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Me),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,a=null;const o=this._targetRay,s=this._grip,A=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==o&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(La))),A&&e.hand){a=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===A.joints[r.jointName]){const e=new Ca;e.matrixAutoUpdate=!1,e.visible=!1,A.joints[r.jointName]=e,A.add(e)}const i=A.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=A.joints["index-finger-tip"],i=A.joints["thumb-tip"],o=r.position.distanceTo(i.position),s=.02,l=.005;A.inputState.pinching&&o>s+l?(A.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!A.inputState.pinching&&o<=s-l&&(A.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!==o&&(o.visible=null!==r),null!==s&&(s.visible=null!==i),null!==A&&(A.visible=null!==a),this}}class Ra extends te{constructor(e,t){super();const n=this,r=e.state;let i=null,a=1,o=null,s="local-floor",A=null,l=null,c=null,u=null,h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null;const x=[],b=new Map,_=new Bn;_.layers.enable(1),_.viewport=new xe;const w=new Bn;w.layers.enable(2),w.viewport=new xe;const M=[_,w],S=new Ta;S.layers.enable(1),S.layers.enable(2);let E=null,T=null;function C(e){const t=b.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function L(){b.forEach((function(e,t){e.disconnect(t)})),b.clear(),E=null,T=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),c&&t.deleteFramebuffer(c),f&&t.deleteFramebuffer(f),p&&t.deleteRenderbuffer(p),m&&t.deleteRenderbuffer(m),c=null,f=null,p=null,m=null,h=null,u=null,l=null,i=null,B.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function P(e){const t=i.inputSources;for(let e=0;e<x.length;e++)b.set(t[e],x[e]);for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=b.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),b.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],r=b.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=x[e];return void 0===t&&(t=new Pa,x[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=x[e];return void 0===t&&(t=new Pa,x[e]=t),t.getGripSpace()},this.getHand=function(e){let t=x[e];return void 0===t&&(t=new Pa,x[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=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 o},this.getBaseLayer=function(){return null!==u?u:h},this.getBinding=function(){return l},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(e){if(i=e,null!==i){i.addEventListener("select",C),i.addEventListener("selectstart",C),i.addEventListener("selectend",C),i.addEventListener("squeeze",C),i.addEventListener("squeezestart",C),i.addEventListener("squeezeend",C),i.addEventListener("end",L),i.addEventListener("inputsourceschange",P);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:a};h=new XRWebGLLayer(i,t,n),i.updateRenderState({baseLayer:h})}else if(t instanceof WebGLRenderingContext){const n={antialias:!0,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:a};h=new XRWebGLLayer(i,t,n),i.updateRenderState({layers:[h]})}else{d=e.antialias;let n=null;e.depth&&(y=256,e.stencil&&(y|=1024),v=e.stencil?33306:36096,n=e.stencil?35056:33190);const o={colorFormat:e.alpha?32856:32849,depthFormat:n,scaleFactor:a};l=new XRWebGLBinding(i,t),u=l.createProjectionLayer(o),c=t.createFramebuffer(),i.updateRenderState({layers:[u]}),d&&(f=t.createFramebuffer(),p=t.createRenderbuffer(),t.bindRenderbuffer(36161,p),t.renderbufferStorageMultisample(36161,4,32856,u.textureWidth,u.textureHeight),r.bindFramebuffer(36160,f),t.framebufferRenderbuffer(36160,36064,36161,p),t.bindRenderbuffer(36161,null),null!==n&&(m=t.createRenderbuffer(),t.bindRenderbuffer(36161,m),t.renderbufferStorageMultisample(36161,4,n,u.textureWidth,u.textureHeight),t.framebufferRenderbuffer(36160,v,36161,m),t.bindRenderbuffer(36161,null)),r.bindFramebuffer(36160,null))}o=await i.requestReferenceSpace(s),B.setContext(i),B.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const R=new Me,q=new Me;function D(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;S.near=w.near=_.near=e.near,S.far=w.far=_.far=e.far,E===S.near&&T===S.far||(i.updateRenderState({depthNear:S.near,depthFar:S.far}),E=S.near,T=S.far);const t=e.parent,n=S.cameras;D(S,t);for(let e=0;e<n.length;e++)D(n[e],t);S.matrixWorld.decompose(S.position,S.quaternion,S.scale),e.position.copy(S.position),e.quaternion.copy(S.quaternion),e.scale.copy(S.scale),e.matrix.copy(S.matrix),e.matrixWorld.copy(S.matrixWorld);const r=e.children;for(let e=0,t=r.length;e<t;e++)r[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){R.setFromMatrixPosition(t.matrixWorld),q.setFromMatrixPosition(n.matrixWorld);const r=R.distanceTo(q),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),A=(i[9]+1)/i[5],l=(i[9]-1)/i[5],c=(i[8]-1)/i[0],u=(a[8]+1)/a[0],h=o*c,d=o*u,f=r/(-c+u),p=f*-c;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const m=o+f,g=s+f,v=h-p,y=d+(r-p),x=A*s/g*m,b=l*s/g*m;e.projectionMatrix.makePerspective(v,y,x,b,m,g)}(S,_,w):S.projectionMatrix.copy(_.projectionMatrix)},this.getCamera=function(){return S},this.getFoveation=function(){return null!==u?u.fixedFoveation:null!==h?h.fixedFoveation:void 0},this.setFoveation=function(e){null!==u&&(u.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)};let I=null;const B=new Qn;B.setAnimationLoop((function(e,n){if(A=n.getViewerPose(o),g=n,null!==A){const e=A.views;null!==h&&r.bindXRFramebuffer(h.framebuffer);let n=!1;e.length!==S.cameras.length&&(S.cameras.length=0,n=!0);for(let i=0;i<e.length;i++){const a=e[i];let o=null;if(null!==h)o=h.getViewport(a);else{const e=l.getViewSubImage(u,a);r.bindXRFramebuffer(c),void 0!==e.depthStencilTexture&&t.framebufferTexture2D(36160,v,3553,e.depthStencilTexture,0),t.framebufferTexture2D(36160,36064,3553,e.colorTexture,0),o=e.viewport}const s=M[i];s.matrix.fromArray(a.transform.matrix),s.projectionMatrix.fromArray(a.projectionMatrix),s.viewport.set(o.x,o.y,o.width,o.height),0===i&&S.matrix.copy(s.matrix),!0===n&&S.cameras.push(s)}d&&(r.bindXRFramebuffer(f),null!==y&&t.clear(y))}const a=i.inputSources;for(let e=0;e<x.length;e++){const t=x[e],r=a[e];t.update(r,n,o)}if(I&&I(e,n),d){const e=u.textureWidth,n=u.textureHeight;r.bindFramebuffer(36008,f),r.bindFramebuffer(36009,c),t.invalidateFramebuffer(36008,[v]),t.invalidateFramebuffer(36009,[v]),t.blitFramebuffer(0,0,e,n,0,0,e,n,16384,9728),t.invalidateFramebuffer(36008,[36064]),r.bindFramebuffer(36008,null),r.bindFramebuffer(36009,null),r.bindFramebuffer(36160,f)}g=null})),this.setAnimationLoop=function(e){I=e},this.dispose=function(){}}}function qa(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),n.alphaTest>0&&(t.alphaTest.value=n.alphaTest);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,t.reflectivity.value=n.reflectivity,t.ior.value=n.ior,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,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?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:n.specularIntensityMap?i=n.specularIntensityMap:n.specularTintMap?i=n.specularTintMap:n.transmissionMap?i=n.transmissionMap:n.thicknessMap&&(i=n.thicknessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?a=n.aoMap:n.lightMap&&(a=n.lightMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),t.uv2Transform.value.copy(a.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,a,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,r){n(e,t),e.ior.value=t.ior,t.sheenTint&&e.sheenTint.value.copy(t.sheenTint);t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,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()));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationTint.value.copy(t.attenuationTint));e.specularIntensity.value=t.specularIntensity,e.specularTint.value.copy(t.specularTint),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularTintMap&&(e.specularTintMap.value=t.specularTintMap)}(e,r,o):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){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.alphaTest>0&&(e.alphaTest.value=t.alphaTest);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,a):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);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);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 Da(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,a=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,A=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,l=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let u=null,h=null;const d=[],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=Q,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const p=this;let m=!1,g=0,v=0,y=null,x=-1,b=null;const _=new xe,w=new xe;let M=null,E=t.width,C=t.height,R=1,q=null,B=null;const O=new xe(0,0,E,C),N=new xe(0,0,E,C);let z=!1;const F=[],U=new Wn;let H=!1,G=!1,j=null;const V=new tt,W=new Me,Y={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function X(){return null===y?R:1}let Z,J,K,$,ee,te,ne,re,ie,ae,oe,se,Ae,le,ce,ue,he,de,fe,pe,me,ge,ve,ye=n;function we(e,n){for(let r=0;r<e.length;r++){const i=e[r],a=t.getContext(i,n);if(null!==a)return a}return null}try{const e={alpha:r,depth:i,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:A,powerPreference:l,failIfMajorPerformanceCaveat:c};if(t.addEventListener("webglcontextlost",Te,!1),t.addEventListener("webglcontextrestored",Ce,!1),null===ye){const t=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&t.shift(),ye=we(t,e),null===ye)throw we(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ye.getShaderPrecisionFormat&&(ye.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function Se(){Z=new Rr(ye),J=new nr(ye,Z,e),Z.init(J),ge=new Ea(ye,Z,J),K=new Ma(ye,Z,J),F[0]=1029,$=new Ir(ye),ee=new ca,te=new Sa(ye,Z,K,ee,J,ge,$),ne=new ir(p),re=new Pr(p),ie=new Yn(ye,J),ve=new er(ye,Z,ie,J),ae=new qr(ye,ie,$,ve),oe=new Nr(ye,ae,ie,$),fe=new kr(ye),ue=new rr(ee),se=new la(p,ne,re,Z,J,ve,ue),Ae=new qa(ee),le=new fa(ee),ce=new xa(Z,J),de=new $n(p,ne,K,oe,s),he=new wa(p,oe,J),pe=new tr(ye,Z,$,J),me=new Dr(ye,Z,$,J),$.programs=se.programs,p.capabilities=J,p.extensions=Z,p.properties=ee,p.renderLists=le,p.shadowMap=he,p.state=K,p.info=$}Se();const Ee=new Ra(p,ye);function Te(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function Ce(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1;const e=$.autoReset,t=he.enabled,n=he.autoUpdate,r=he.needsUpdate,i=he.type;Se(),$.autoReset=e,he.enabled=t,he.autoUpdate=n,he.needsUpdate=r,he.type=i}function Le(e){const t=e.target;t.removeEventListener("dispose",Le),function(e){(function(e){const t=ee.get(e).programs;void 0!==t&&t.forEach((function(e){se.releaseProgram(e)}))})(e),ee.remove(e)}(t)}this.xr=Ee,this.getContext=function(){return ye},this.getContextAttributes=function(){return ye.getContextAttributes()},this.forceContextLoss=function(){const e=Z.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Z.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return R},this.setPixelRatio=function(e){void 0!==e&&(R=e,this.setSize(E,C,!1))},this.getSize=function(e){return e.set(E,C)},this.setSize=function(e,n,r){Ee.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(E=e,C=n,t.width=Math.floor(e*R),t.height=Math.floor(n*R),!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(E*R,C*R).floor()},this.setDrawingBufferSize=function(e,n,r){E=e,C=n,R=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(_)},this.getViewport=function(e){return e.copy(O)},this.setViewport=function(e,t,n,r){e.isVector4?O.set(e.x,e.y,e.z,e.w):O.set(e,t,n,r),K.viewport(_.copy(O).multiplyScalar(R).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),K.scissor(w.copy(N).multiplyScalar(R).floor())},this.getScissorTest=function(){return z},this.setScissorTest=function(e){K.setScissorTest(z=e)},this.setOpaqueSort=function(e){q=e},this.setTransparentSort=function(e){B=e},this.getClearColor=function(e){return e.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor.apply(de,arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha.apply(de,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),ye.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",Te,!1),t.removeEventListener("webglcontextrestored",Ce,!1),le.dispose(),ce.dispose(),ee.dispose(),ne.dispose(),re.dispose(),oe.dispose(),ve.dispose(),Ee.dispose(),Ee.removeEventListener("sessionstart",Re),Ee.removeEventListener("sessionend",qe),j&&(j.dispose(),j=null),De.stop()},this.renderBufferImmediate=function(e,t){ve.initAttributes();const n=ee.get(e);e.hasPositions&&!n.position&&(n.position=ye.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ye.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ye.createBuffer()),e.hasColors&&!n.color&&(n.color=ye.createBuffer());const r=t.getAttributes();e.hasPositions&&(ye.bindBuffer(34962,n.position),ye.bufferData(34962,e.positionArray,35048),ve.enableAttribute(r.position.location),ye.vertexAttribPointer(r.position.location,3,5126,!1,0,0)),e.hasNormals&&(ye.bindBuffer(34962,n.normal),ye.bufferData(34962,e.normalArray,35048),ve.enableAttribute(r.normal.location),ye.vertexAttribPointer(r.normal.location,3,5126,!1,0,0)),e.hasUvs&&(ye.bindBuffer(34962,n.uv),ye.bufferData(34962,e.uvArray,35048),ve.enableAttribute(r.uv.location),ye.vertexAttribPointer(r.uv.location,2,5126,!1,0,0)),e.hasColors&&(ye.bindBuffer(34962,n.color),ye.bufferData(34962,e.colorArray,35048),ve.enableAttribute(r.color.location),ye.vertexAttribPointer(r.color.location,3,5126,!1,0,0)),ve.disableUnusedAttributes(),ye.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=Y);const o=i.isMesh&&i.matrixWorld.determinant()<0,s=Fe(e,t,r,i);K.setMaterial(r,o);let A=n.index;const l=n.attributes.position;if(null===A){if(void 0===l||0===l.count)return}else if(0===A.count)return;let c,u=1;!0===r.wireframe&&(A=ae.getWireframeAttribute(n),u=2),void 0===n.morphAttributes.position&&void 0===n.morphAttributes.normal||fe.update(i,n,r,s),ve.setup(i,r,s,n,A);let h=pe;null!==A&&(c=ie.get(A),h=me,h.setIndex(c));const d=null!==A?A.count:l.count,f=n.drawRange.start*u,p=n.drawRange.count*u,m=null!==a?a.start*u:0,g=null!==a?a.count*u:1/0,v=Math.max(f,m),y=Math.min(d,f+p,m+g)-1,x=Math.max(0,y-v+1);if(0!==x){if(i.isMesh)!0===r.wireframe?(K.setLineWidth(r.wireframeLinewidth*X()),h.setMode(1)):h.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),K.setLineWidth(e*X()),i.isLineSegments?h.setMode(1):i.isLineLoop?h.setMode(2):h.setMode(3)}else i.isPoints?h.setMode(0):i.isSprite&&h.setMode(4);if(i.isInstancedMesh)h.renderInstances(v,x,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(v,x,e)}else h.render(v,x)}},this.compile=function(e,t){h=ce.get(e),h.init(),f.push(h),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(h.pushLight(e),e.castShadow&&h.pushShadow(e))})),h.setupLights(p.physicallyCorrectLights),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Ne(n[r],e,t)}else Ne(n,e,t)})),f.pop(),h=null};let Pe=null;function Re(){De.stop()}function qe(){De.start()}const De=new Qn;function Ie(e,t,n,r){if(!1===e.visible)return;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)h.pushLight(e),e.castShadow&&h.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||U.intersectsSprite(e)){r&&W.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=oe.update(e),i=e.material;i.visible&&u.push(e,t,i,n,W.z,null)}}else if(e.isImmediateRenderObject)r&&W.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V),u.push(e,null,e.material,n,W.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==$.render.frame&&(e.skeleton.update(),e.skeleton.frame=$.render.frame),!e.frustumCulled||U.intersectsObject(e))){r&&W.setFromMatrixPosition(e.matrixWorld).applyMatrix4(V);const t=oe.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let a=0,o=r.length;a<o;a++){const o=r[a],s=i[o.materialIndex];s&&s.visible&&u.push(e,t,s,n,W.z,o)}}else i.visible&&u.push(e,t,i,n,W.z,null)}const i=e.children;for(let e=0,a=i.length;e<a;e++)Ie(i[e],t,n,r)}function Be(e,t,n,r){const i=e.opaque,a=e.transmissive,s=e.transparent;h.setupLightsView(n),a.length>0&&function(e,t,n){if(null===j){const e=!0===o&&!0===J.isWebGL2;j=new(e?_e:be)(1024,1024,{generateMipmaps:!0,type:null!==ge.convert(I)?I:P,minFilter:L,magFilter:T,wrapS:S,wrapT:S})}const r=p.getRenderTarget();p.setRenderTarget(j),p.clear();const i=p.toneMapping;p.toneMapping=0,Oe(e,t,n),p.toneMapping=i,te.updateMultisampleRenderTarget(j),te.updateRenderTargetMipmap(j),p.setRenderTarget(r)}(i,t,n),r&&K.viewport(_.copy(r)),i.length>0&&Oe(i,t,n),a.length>0&&Oe(a,t,n),s.length>0&&Oe(s,t,n)}function Oe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){const a=e[i],o=a.object,s=a.geometry,A=null===r?a.material:r,l=a.group;o.layers.test(n.layers)&&ke(o,t,n,s,A,l)}}function ke(e,t,n,r,i,a){if(e.onBeforeRender(p,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Fe(n,t,i,e);K.setMaterial(i),ve.reset(),function(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}(e,r)}else!0===i.transparent&&2===i.side?(i.side=1,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,a),i.side=0,i.needsUpdate=!0,p.renderBufferDirect(n,t,r,i,e,a),i.side=2):p.renderBufferDirect(n,t,r,i,e,a);e.onAfterRender(p,t,n,r,i,a)}function Ne(e,t,n){!0!==t.isScene&&(t=Y);const r=ee.get(e),i=h.state.lights,a=h.state.shadowsArray,o=i.state.version,s=se.getParameters(e,i.state,a,t,n),A=se.getProgramCacheKey(s);let l=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?re:ne).get(e.envMap||r.environment),void 0===l&&(e.addEventListener("dispose",Le),l=new Map,r.programs=l);let c=l.get(A);if(void 0!==c){if(r.currentProgram===c&&r.lightsStateVersion===o)return ze(e,s),c}else s.uniforms=se.getUniforms(e),e.onBuild(s,p),e.onBeforeCompile(s,p),c=se.acquireProgram(s,A),l.set(A,c),r.uniforms=s.uniforms;const u=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(u.clippingPlanes=ue.uniform),ze(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=o,r.needsLights&&(u.ambientLightColor.value=i.state.ambient,u.lightProbe.value=i.state.probe,u.directionalLights.value=i.state.directional,u.directionalLightShadows.value=i.state.directionalShadow,u.spotLights.value=i.state.spot,u.spotLightShadows.value=i.state.spotShadow,u.rectAreaLights.value=i.state.rectArea,u.ltc_1.value=i.state.rectAreaLTC1,u.ltc_2.value=i.state.rectAreaLTC2,u.pointLights.value=i.state.point,u.pointLightShadows.value=i.state.pointShadow,u.hemisphereLights.value=i.state.hemi,u.directionalShadowMap.value=i.state.directionalShadowMap,u.directionalShadowMatrix.value=i.state.directionalShadowMatrix,u.spotShadowMap.value=i.state.spotShadowMap,u.spotShadowMatrix.value=i.state.spotShadowMatrix,u.pointShadowMap.value=i.state.pointShadowMap,u.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=c.getUniforms(),f=Hi.seqWithValue(d.seq,u);return r.currentProgram=c,r.uniformsList=f,c}function ze(e,t){const n=ee.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents}function Fe(e,t,n,r){!0!==t.isScene&&(t=Y),te.resetTextureUnits();const i=t.fog,a=n.isMeshStandardMaterial?t.environment:null,o=null===y?p.outputEncoding:y.texture.encoding,s=(n.isMeshStandardMaterial?re:ne).get(n.envMap||a),A=!0===n.vertexColors&&!!r.geometry&&!!r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,l=!!r.geometry&&!!r.geometry.attributes.tangent,c=!!r.geometry&&!!r.geometry.morphAttributes.position,u=!!r.geometry&&!!r.geometry.morphAttributes.normal,d=ee.get(n),f=h.state.lights;if(!0===H&&(!0===G||e!==b)){const t=e===b&&n.id===x;ue.setState(n,e,t)}let m=!1;n.version===d.__version?d.needsLights&&d.lightsStateVersion!==f.state.version||d.outputEncoding!==o||r.isInstancedMesh&&!1===d.instancing?m=!0:r.isInstancedMesh||!0!==d.instancing?r.isSkinnedMesh&&!1===d.skinning?m=!0:r.isSkinnedMesh||!0!==d.skinning?d.envMap!==s||n.fog&&d.fog!==i?m=!0:void 0===d.numClippingPlanes||d.numClippingPlanes===ue.numPlanes&&d.numIntersection===ue.numIntersection?(d.vertexAlphas!==A||d.vertexTangents!==l||d.morphTargets!==c||d.morphNormals!==u)&&(m=!0):m=!0:m=!0:m=!0:(m=!0,d.__version=n.version);let g=d.currentProgram;!0===m&&(g=Ne(n,t,r));let v=!1,_=!1,w=!1;const M=g.getUniforms(),S=d.uniforms;if(K.useProgram(g.program)&&(v=!0,_=!0,w=!0),n.id!==x&&(x=n.id,_=!0),v||b!==e){if(M.setValue(ye,"projectionMatrix",e.projectionMatrix),J.logarithmicDepthBuffer&&M.setValue(ye,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),b!==e&&(b=e,_=!0,w=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=M.map.cameraPosition;void 0!==t&&t.setValue(ye,W.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&M.setValue(ye,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&M.setValue(ye,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){M.setOptional(ye,r,"bindMatrix"),M.setOptional(ye,r,"bindMatrixInverse");const e=r.skeleton;e&&(J.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),M.setValue(ye,"boneTexture",e.boneTexture,te),M.setValue(ye,"boneTextureSize",e.boneTextureSize)):M.setOptional(ye,e,"boneMatrices"))}var E,T;return(_||d.receiveShadow!==r.receiveShadow)&&(d.receiveShadow=r.receiveShadow,M.setValue(ye,"receiveShadow",r.receiveShadow)),_&&(M.setValue(ye,"toneMappingExposure",p.toneMappingExposure),d.needsLights&&(T=w,(E=S).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),i&&n.fog&&Ae.refreshFogUniforms(S,i),Ae.refreshMaterialUniforms(S,n,R,C,j),Hi.upload(ye,d.uniformsList,S,te)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Hi.upload(ye,d.uniformsList,S,te),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&M.setValue(ye,"center",r.center),M.setValue(ye,"modelViewMatrix",r.modelViewMatrix),M.setValue(ye,"normalMatrix",r.normalMatrix),M.setValue(ye,"modelMatrix",r.matrixWorld),g}De.setAnimationLoop((function(e){Pe&&Pe(e)})),"undefined"!=typeof window&&De.setContext(window),this.setAnimationLoop=function(e){Pe=e,Ee.setAnimationLoop(e),null===e?De.stop():De.start()},Ee.addEventListener("sessionstart",Re),Ee.addEventListener("sessionend",qe),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===m)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===Ee.enabled&&!0===Ee.isPresenting&&(!0===Ee.cameraAutoUpdate&&Ee.updateCamera(t),t=Ee.getCamera()),!0===e.isScene&&e.onBeforeRender(p,e,t,y),h=ce.get(e,f.length),h.init(),f.push(h),V.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),U.setFromProjectionMatrix(V),G=this.localClippingEnabled,H=ue.init(this.clippingPlanes,G,t),u=le.get(e,d.length),u.init(),d.push(u),Ie(e,t,0,p.sortObjects),u.finish(),!0===p.sortObjects&&u.sort(q,B),!0===H&&ue.beginShadows();const n=h.state.shadowsArray;if(he.render(n,e,t),!0===H&&ue.endShadows(),!0===this.info.autoReset&&this.info.reset(),de.render(u,e),h.setupLights(p.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Be(u,e,r,r.viewport)}}else Be(u,e,t);null!==y&&(te.updateMultisampleRenderTarget(y),te.updateRenderTargetMipmap(y)),!0===e.isScene&&e.onAfterRender(p,e,t),K.buffers.depth.setTest(!0),K.buffers.depth.setMask(!0),K.buffers.color.setMask(!0),K.setPolygonOffset(!1),ve.resetDefaultState(),x=-1,b=null,f.pop(),h=f.length>0?f[f.length-1]:null,d.pop(),u=d.length>0?d[d.length-1]:null},this.getActiveCubeFace=function(){return g},this.getActiveMipmapLevel=function(){return v},this.getRenderTarget=function(){return y},this.setRenderTarget=function(e,t=0,n=0){y=e,g=t,v=n,e&&void 0===ee.get(e).__webglFramebuffer&&te.setupRenderTarget(e);let r=null,i=!1,a=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(a=!0);const o=ee.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=o[t],i=!0):r=e.isWebGLMultisampleRenderTarget?ee.get(e).__webglMultisampledFramebuffer:o,_.copy(e.viewport),w.copy(e.scissor),M=e.scissorTest}else _.copy(O).multiplyScalar(R).floor(),w.copy(N).multiplyScalar(R).floor(),M=z;if(K.bindFramebuffer(36160,r)&&J.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&&(J.isWebGL2?ye.drawBuffers(F):Z.get("WEBGL_draw_buffers").drawBuffersWEBGL(F))}if(K.viewport(_),K.scissor(w),K.setScissorTest(M),i){const r=ee.get(e.texture);ye.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(a){const r=ee.get(e.texture),i=t||0;ye.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}x=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=ee.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){K.bindFramebuffer(36160,s);try{const o=e.texture,s=o.format,A=o.type;if(s!==k&&ge.convert(s)!==ye.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const l=A===I&&(Z.has("EXT_color_buffer_half_float")||J.isWebGL2&&Z.has("EXT_color_buffer_float"));if(!(A===P||ge.convert(A)===ye.getParameter(35738)||A===D&&(J.isWebGL2||Z.has("OES_texture_float")||Z.has("WEBGL_color_buffer_float"))||l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ye.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ye.readPixels(t,n,r,i,ge.convert(s),ge.convert(A),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==y?ee.get(y).__webglFramebuffer:null;K.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);let o=ge.convert(t.format);J.isWebGL2&&(6407===o&&(o=32849),6408===o&&(o=32856)),te.setTexture2D(t,0),ye.copyTexImage2D(3553,n,o,e.x,e.y,i,a,0),K.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,o=ge.convert(n.format),s=ge.convert(n.type);te.setTexture2D(n,0),ye.pixelStorei(37440,n.flipY),ye.pixelStorei(37441,n.premultiplyAlpha),ye.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ye.texSubImage2D(3553,r,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?ye.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):ye.texSubImage2D(3553,r,e.x,e.y,o,s,t.image),0===r&&n.generateMipmaps&&ye.generateMipmap(3553),K.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(p.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,A=ge.convert(r.format),l=ge.convert(r.type);let c;if(r.isDataTexture3D)te.setTexture3D(r,0),c=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");te.setTexture2DArray(r,0),c=35866}ye.pixelStorei(37440,r.flipY),ye.pixelStorei(37441,r.premultiplyAlpha),ye.pixelStorei(3317,r.unpackAlignment);const u=ye.getParameter(3314),h=ye.getParameter(32878),d=ye.getParameter(3316),f=ye.getParameter(3315),m=ye.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ye.pixelStorei(3314,g.width),ye.pixelStorei(32878,g.height),ye.pixelStorei(3316,e.min.x),ye.pixelStorei(3315,e.min.y),ye.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ye.texSubImage3D(c,i,t.x,t.y,t.z,a,o,s,A,l,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ye.compressedTexSubImage3D(c,i,t.x,t.y,t.z,a,o,s,A,g.data)):ye.texSubImage3D(c,i,t.x,t.y,t.z,a,o,s,A,l,g),ye.pixelStorei(3314,u),ye.pixelStorei(32878,h),ye.pixelStorei(3316,d),ye.pixelStorei(3315,f),ye.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ye.generateMipmap(c),K.unbindTexture()},this.initTexture=function(e){te.setTexture2D(e,0),K.unbindTexture()},this.resetState=function(){g=0,v=0,y=null,K.reset(),ve.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}(class extends Da{}).prototype.isWebGL1Renderer=!0;class Ia extends Et{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}}Ia.prototype.isScene=!0;class Ba{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=K,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=oe()}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=oe()),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=oe()),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}}}Ba.prototype.isInterleavedBuffer=!0;const Oa=new Me;class ka{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++)Oa.x=this.getX(t),Oa.y=this.getY(t),Oa.z=this.getZ(t),Oa.applyMatrix4(e),this.setXYZ(t,Oa.x,Oa.y,Oa.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Oa.x=this.getX(t),Oa.y=this.getY(t),Oa.z=this.getZ(t),Oa.applyNormalMatrix(e),this.setXYZ(t,Oa.x,Oa.y,Oa.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Oa.x=this.getX(t),Oa.y=this.getY(t),Oa.z=this.getZ(t),Oa.transformDirection(e),this.setXYZ(t,Oa.x,Oa.y,Oa.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 Zt(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 ka(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}}}ka.prototype.isInterleavedBufferAttribute=!0;class Na extends zt{constructor(e){super(),this.type="SpriteMaterial",this.color=new Wt(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 za;Na.prototype.isSpriteMaterial=!0;const Fa=new Me,Ua=new Me,Ha=new Me,Ga=new de,ja=new de,Va=new tt,Wa=new Me,Qa=new Me,Ya=new Me,Xa=new de,Za=new de,Ja=new de;function Ka(e,t,n,r,i,a){Ga.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(ja.x=a*Ga.x-i*Ga.y,ja.y=i*Ga.x+a*Ga.y):ja.copy(Ga),e.copy(t),e.x+=ja.x,e.y+=ja.y,e.applyMatrix4(Va)}(class extends Et{constructor(e){if(super(),this.type="Sprite",void 0===za){za=new ln;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 Ba(e,5);za.setIndex([0,1,2,0,2,3]),za.setAttribute("position",new ka(t,3,0,!1)),za.setAttribute("uv",new ka(t,2,3,!1))}this.geometry=za,this.material=void 0!==e?e:new Na,this.center=new de(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ua.setFromMatrixScale(this.matrixWorld),Va.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ha.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Ua.multiplyScalar(-Ha.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;Ka(Wa.set(-.5,-.5,0),Ha,a,Ua,r,i),Ka(Qa.set(.5,-.5,0),Ha,a,Ua,r,i),Ka(Ya.set(.5,.5,0),Ha,a,Ua,r,i),Xa.set(0,0),Za.set(1,0),Ja.set(1,1);let o=e.ray.intersectTriangle(Wa,Qa,Ya,!1,Fa);if(null===o&&(Ka(Qa.set(-.5,.5,0),Ha,a,Ua,r,i),Za.set(0,1),o=e.ray.intersectTriangle(Wa,Ya,Qa,!1,Fa),null===o))return;const s=e.ray.origin.distanceTo(Fa);s<e.near||s>e.far||t.push({distance:s,point:Fa.clone(),uv:kt.getUV(Fa,Wa,Qa,Ya,Xa,Za,Ja,new de),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}).prototype.isSprite=!0;const $a=new Me,eo=new xe,to=new xe,no=new Me,ro=new tt;class io extends Tn{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new tt,this.bindMatrixInverse=new tt}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 xe,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;eo.fromBufferAttribute(r.attributes.skinIndex,e),to.fromBufferAttribute(r.attributes.skinWeight,e),$a.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=to.getComponent(e);if(0!==r){const i=eo.getComponent(e);ro.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(no.copy($a).applyMatrix4(ro),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}io.prototype.isSkinnedMesh=!0;(class extends Et{constructor(){super(),this.type="Bone"}}).prototype.isBone=!0;(class extends ve{constructor(e=null,t=1,n=1,r,i,a,o,s,A=1003,l=1003,c,u){super(null,a,o,s,A,l,r,i,c,u),this.image={data:e,width:t,height:n},this.magFilter=A,this.minFilter=l,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}).prototype.isDataTexture=!0;class ao extends Zt{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}}ao.prototype.isInstancedBufferAttribute=!0;const oo=new tt,so=new tt,Ao=[],lo=new Tn;(class extends Tn{constructor(e,t,n){super(e,t),this.instanceMatrix=new ao(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(lo.geometry=this.geometry,lo.material=this.material,void 0!==lo.material)for(let i=0;i<r;i++){this.getMatrixAt(i,oo),so.multiplyMatrices(n,oo),lo.matrixWorld=so,lo.raycast(e,Ao);for(let e=0,n=Ao.length;e<n;e++){const n=Ao[e];n.instanceId=i,n.object=this,t.push(n)}Ao.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new ao(new Float32Array(3*this.instanceMatrix.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"})}}).prototype.isInstancedMesh=!0;class co extends zt{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Wt(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",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}}co.prototype.isLineBasicMaterial=!0;const uo=new Me,ho=new Me,fo=new tt,po=new et,mo=new We;class go extends Et{constructor(e=new ln,t=new co){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++)uo.fromBufferAttribute(t,e-1),ho.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=uo.distanceTo(ho);e.setAttribute("lineDistance",new $t(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,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),mo.copy(n.boundingSphere),mo.applyMatrix4(r),mo.radius+=i,!1===e.ray.intersectsSphere(mo))return;fo.copy(r).invert(),po.copy(e.ray).applyMatrix4(fo);const o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,A=new Me,l=new Me,c=new Me,u=new Me,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,a.start),o=Math.min(r.count,a.start+a.count)-1;n<o;n+=h){const a=r.getX(n),o=r.getX(n+1);A.fromBufferAttribute(i,a),l.fromBufferAttribute(i,o);if(po.distanceSqToSegment(A,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(u);h<e.near||h>e.far||t.push({distance:h,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,a.start),r=Math.min(i.count,a.start+a.count)-1;n<r;n+=h){A.fromBufferAttribute(i,n),l.fromBufferAttribute(i,n+1);if(po.distanceSqToSegment(A,l,u,c)>s)continue;u.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(u);r<e.near||r>e.far||t.push({distance:r,point:c.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.")}}}go.prototype.isLine=!0;const vo=new Me,yo=new Me;class xo extends go{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)vo.fromBufferAttribute(t,e),yo.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+vo.distanceTo(yo);e.setAttribute("lineDistance",new $t(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}}xo.prototype.isLineSegments=!0;(class extends go{constructor(e,t){super(e,t),this.type="LineLoop"}}).prototype.isLineLoop=!0;class bo extends zt{constructor(e){super(),this.type="PointsMaterial",this.color=new Wt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,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}}bo.prototype.isPointsMaterial=!0;const _o=new tt,wo=new et,Mo=new We,So=new Me;function Eo(e,t,n,r,i,a,o){const s=wo.distanceSqToPoint(e);if(s<n){const n=new Me;wo.closestPointToPoint(e,n),n.applyMatrix4(r);const A=i.ray.origin.distanceTo(n);if(A<i.near||A>i.far)return;a.push({distance:A,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:o})}}(class extends Et{constructor(e=new ln,t=new bo){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,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Mo.copy(n.boundingSphere),Mo.applyMatrix4(r),Mo.radius+=i,!1===e.ray.intersectsSphere(Mo))return;_o.copy(r).invert(),wo.copy(e.ray).applyMatrix4(_o);const o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o;if(n.isBufferGeometry){const i=n.index,o=n.attributes.position;if(null!==i){for(let n=Math.max(0,a.start),A=Math.min(i.count,a.start+a.count);n<A;n++){const a=i.getX(n);So.fromBufferAttribute(o,a),Eo(So,a,s,r,e,t,this)}}else{for(let n=Math.max(0,a.start),i=Math.min(o.count,a.start+a.count);n<i;n++)So.fromBufferAttribute(o,n),Eo(So,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.")}}}).prototype.isPoints=!0;(class extends ve{constructor(e,t,n,r,i,a,o,s,A){super(e,t,n,r,i,a,o,s,A),this.format=void 0!==o?o:O,this.minFilter=void 0!==a?a:C,this.magFilter=void 0!==i?i:C,this.generateMipmaps=!1;const l=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){l.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 extends ve{constructor(e,t,n,r,i,a,o,s,A,l,c,u){super(null,a,o,s,A,l,r,i,c,u),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isCompressedTexture=!0;(class extends ve{constructor(e,t,n,r,i,a,o,s,A){super(e,t,n,r,i,a,o,s,A),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;(class extends ve{constructor(e,t,n,r,i,a,o,s,A,l){if((l=void 0!==l?l:N)!==N&&l!==z)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===N&&(n=R),void 0===n&&l===z&&(n=B),super(null,r,i,a,o,s,l,n,A),this.image={width:e,height:t},this.magFilter=void 0!==o?o:T,this.minFilter=void 0!==s?s:T,this.flipY=!1,this.generateMipmaps=!1}}).prototype.isDepthTexture=!0;class To extends ln{constructor(e=1,t=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],o=[],s=[],A=new Me,l=new de;a.push(0,0,0),o.push(0,0,1),s.push(.5,.5);for(let i=0,c=3;i<=t;i++,c+=3){const u=n+i/t*r;A.x=e*Math.cos(u),A.y=e*Math.sin(u),a.push(A.x,A.y,A.z),o.push(0,0,1),l.x=(a[c]/e+1)/2,l.y=(a[c+1]/e+1)/2,s.push(l.x,l.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new $t(a,3)),this.setAttribute("normal",new $t(o,3)),this.setAttribute("uv",new $t(s,2))}static fromJSON(e){return new To(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Co extends ln{constructor(e=1,t=1,n=1,r=8,i=1,a=!1,o=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s};const A=this;r=Math.floor(r),i=Math.floor(i);const l=[],c=[],u=[],h=[];let d=0;const f=[],p=n/2;let m=0;function g(n){const i=d,a=new de,f=new Me;let g=0;const v=!0===n?e:t,y=!0===n?1:-1;for(let e=1;e<=r;e++)c.push(0,p*y,0),u.push(0,y,0),h.push(.5,.5),d++;const x=d;for(let e=0;e<=r;e++){const t=e/r*s+o,n=Math.cos(t),i=Math.sin(t);f.x=v*i,f.y=p*y,f.z=v*n,c.push(f.x,f.y,f.z),u.push(0,y,0),a.x=.5*n+.5,a.y=.5*i*y+.5,h.push(a.x,a.y),d++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?l.push(r,r+1,t):l.push(r+1,r,t),g+=3}A.addGroup(m,g,!0===n?1:2),m+=g}!function(){const a=new Me,g=new Me;let v=0;const y=(t-e)/n;for(let A=0;A<=i;A++){const l=[],m=A/i,v=m*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+o,A=Math.sin(i),f=Math.cos(i);g.x=v*A,g.y=-m*n+p,g.z=v*f,c.push(g.x,g.y,g.z),a.set(A,y,f).normalize(),u.push(a.x,a.y,a.z),h.push(t,1-m),l.push(d++)}f.push(l)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=f[t][e],r=f[t+1][e],i=f[t+1][e+1],a=f[t][e+1];l.push(n,r,a),l.push(r,i,a),v+=6}A.addGroup(m,v,0),m+=v}(),!1===a&&(e>0&&g(!0),t>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new $t(c,3)),this.setAttribute("normal",new $t(u,3)),this.setAttribute("uv",new $t(h,2))}static fromJSON(e){return new Co(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}new Me,new Me,new Me,new kt;class Lo{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 a=1;a<=e;a++)n=this.getPoint(a/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 a;a=t||e*n[i-1];let o,s=0,A=i-1;for(;s<=A;)if(r=Math.floor(s+(A-s)/2),o=n[r]-a,o<0)s=r+1;else{if(!(o>0)){A=r;break}A=r-1}if(r=A,n[r]===a)return r/(i-1);const l=n[r];return(r+(a-l)/(n[r+1]-l))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new de:new Me);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new Me,r=[],i=[],a=[],o=new Me,s=new tt;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new Me),r[t].normalize()}i[0]=new Me,a[0]=new Me;let A=Number.MAX_VALUE;const l=Math.abs(r[0].x),c=Math.abs(r[0].y),u=Math.abs(r[0].z);l<=A&&(A=l,n.set(1,0,0)),c<=A&&(A=c,n.set(0,1,0)),u<=A&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(se(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(se(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}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 Po extends Lo{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t){const n=t||new de,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const o=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(o),A=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=A-this.aY;s=n*e-r*t+this.aX,A=n*t+r*e+this.aY}return n.set(s,A)}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}}Po.prototype.isEllipseCurve=!0;class Ro extends Po{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.type="ArcCurve"}}function qo(){let e=0,t=0,n=0,r=0;function i(i,a,o,s){e=i,t=o,n=-3*i+3*a-2*o-s,r=2*i-2*a+o+s}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,o,s){let A=(t-e)/a-(n-e)/(a+o)+(n-t)/o,l=(n-t)/o-(r-t)/(o+s)+(r-n)/s;A*=o,l*=o,i(t,n,A,l)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}Ro.prototype.isArcCurve=!0;const Do=new Me,Io=new qo,Bo=new qo,Oo=new qo;class ko extends Lo{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 Me){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let o,s,A=Math.floor(a),l=a-A;this.closed?A+=A>0?0:(Math.floor(Math.abs(A)/i)+1)*i:0===l&&A===i-1&&(A=i-2,l=1),this.closed||A>0?o=r[(A-1)%i]:(Do.subVectors(r[0],r[1]).add(r[0]),o=Do);const c=r[A%i],u=r[(A+1)%i];if(this.closed||A+2<i?s=r[(A+2)%i]:(Do.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=Do),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(o.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),Io.initNonuniformCatmullRom(o.x,c.x,u.x,s.x,t,n,r),Bo.initNonuniformCatmullRom(o.y,c.y,u.y,s.y,t,n,r),Oo.initNonuniformCatmullRom(o.z,c.z,u.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(Io.initCatmullRom(o.x,c.x,u.x,s.x,this.tension),Bo.initCatmullRom(o.y,c.y,u.y,s.y,this.tension),Oo.initCatmullRom(o.z,c.z,u.z,s.z,this.tension));return n.set(Io.calc(l),Bo.calc(l),Oo.calc(l)),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 Me).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function No(e,t,n,r,i){const a=.5*(r-t),o=.5*(i-n),s=e*e;return(2*n-2*r+a+o)*(e*s)+(-3*n+3*r-2*a-o)*s+a*e+n}function zo(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 Fo(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)}ko.prototype.isCatmullRomCurve3=!0;class Uo extends Lo{constructor(e=new de,t=new de,n=new de,r=new de){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new de){const n=t,r=this.v0,i=this.v1,a=this.v2,o=this.v3;return n.set(Fo(e,r.x,i.x,a.x,o.x),Fo(e,r.y,i.y,a.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.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}}Uo.prototype.isCubicBezierCurve=!0;class Ho extends Lo{constructor(e=new Me,t=new Me,n=new Me,r=new Me){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Me){const n=t,r=this.v0,i=this.v1,a=this.v2,o=this.v3;return n.set(Fo(e,r.x,i.x,a.x,o.x),Fo(e,r.y,i.y,a.y,o.y),Fo(e,r.z,i.z,a.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.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}}Ho.prototype.isCubicBezierCurve3=!0;class Go extends Lo{constructor(e=new de,t=new de){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new de){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 de;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}}Go.prototype.isLineCurve=!0;class jo extends Lo{constructor(e=new de,t=new de,n=new de){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new de){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(zo(e,r.x,i.x,a.x),zo(e,r.y,i.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}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}}jo.prototype.isQuadraticBezierCurve=!0;class Vo extends Lo{constructor(e=new Me,t=new Me,n=new Me){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Me){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(zo(e,r.x,i.x,a.x),zo(e,r.y,i.y,a.y),zo(e,r.z,i.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}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}}Vo.prototype.isQuadraticBezierCurve3=!0;class Wo extends Lo{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new de){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),o=i-a,s=r[0===a?a:a-1],A=r[a],l=r[a>r.length-2?r.length-1:a+1],c=r[a>r.length-3?r.length-1:a+2];return n.set(No(o,s.x,A.x,l.x,c.x),No(o,s.y,A.y,l.y,c.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 de).fromArray(n))}return this}}Wo.prototype.isSplineCurve=!0;var Qo=Object.freeze({__proto__:null,ArcCurve:Ro,CatmullRomCurve3:ko,CubicBezierCurve:Uo,CubicBezierCurve3:Ho,EllipseCurve:Po,LineCurve:Go,LineCurve3:class extends Lo{constructor(e=new Me,t=new Me){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new Me){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:jo,QuadraticBezierCurve3:Vo,SplineCurve:Wo});const Yo=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=Xo(e,0,i,n,!0);const o=[];if(!a||a.next===a.prev)return o;let s,A,l,c,u,h,d;if(r&&(a=function(e,t,n,r){const i=[];let a,o,s,A,l;for(a=0,o=t.length;a<o;a++)s=t[a]*r,A=a<o-1?t[a+1]*r:e.length,l=Xo(e,s,A,r,!1),l===l.next&&(l.steiner=!0),i.push(os(l));for(i.sort(ns),a=0;a<i.length;a++)rs(i[a],n),n=Zo(n,n.next);return n}(e,t,a,n)),e.length>80*n){s=l=e[0],A=c=e[1];for(let t=n;t<i;t+=n)u=e[t],h=e[t+1],u<s&&(s=u),h<A&&(A=h),u>l&&(l=u),h>c&&(c=h);d=Math.max(l-s,c-A),d=0!==d?1/d:0}return Jo(a,o,n,s,A,d),o};function Xo(e,t,n,r,i){let a,o;if(i===function(e,t,n,r){let i=0;for(let a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}(e,t,n,r)>0)for(a=t;a<n;a+=r)o=ms(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=ms(a,e[a],e[a+1],o);return o&&cs(o,o.next)&&(gs(o),o=o.next),o}function Zo(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!cs(r,r.next)&&0!==ls(r.prev,r,r.next))r=r.next;else{if(gs(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Jo(e,t,n,r,i,a,o){if(!e)return;!o&&a&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=as(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,a,o,s,A,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ,r);t++);for(A=l;s>0||A>0&&r;)0!==s&&(0===A||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,A--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1)}(i)}(e,r,i,a);let s,A,l=e;for(;e.prev!==e.next;)if(s=e.prev,A=e.next,a?$o(e,r,i,a):Ko(e))t.push(s.i/n),t.push(e.i/n),t.push(A.i/n),gs(e),e=A.next,l=A.next;else if((e=A)===l){o?1===o?Jo(e=es(Zo(e),t,n),t,n,r,i,a,2):2===o&&ts(e,t,n,r,i,a):Jo(Zo(e),t,n,r,i,a,1);break}}function Ko(e){const t=e.prev,n=e,r=e.next;if(ls(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(ss(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&ls(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function $o(e,t,n,r){const i=e.prev,a=e,o=e.next;if(ls(i,a,o)>=0)return!1;const s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,A=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,l=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=as(s,A,t,n,r),h=as(l,c,t,n,r);let d=e.prevZ,f=e.nextZ;for(;d&&d.z>=u&&f&&f.z<=h;){if(d!==e.prev&&d!==e.next&&ss(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ls(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&ss(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&ls(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&ss(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ls(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&ss(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&ls(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function es(e,t,n){let r=e;do{const i=r.prev,a=r.next.next;!cs(i,a)&&us(i,r,r.next,a)&&fs(i,a)&&fs(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),gs(r),gs(r.next),r=e=a),r=r.next}while(r!==e);return Zo(r)}function ts(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&As(o,e)){let s=ps(o,e);return o=Zo(o,o.next),s=Zo(s,s.next),Jo(o,t,n,r,i,a),void Jo(s,t,n,r,i,a)}e=e.next}o=o.next}while(o!==e)}function ns(e,t){return e.x-t.x}function rs(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let a,o=-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>o){if(o=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}a=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!a)return null;if(r===o)return a;const s=a,A=a.x,l=a.y;let c,u=1/0;n=a;do{r>=n.x&&n.x>=A&&r!==n.x&&ss(i<l?r:o,i,A,l,i<l?o:r,i,n.x,n.y)&&(c=Math.abs(i-n.y)/(r-n.x),fs(n,e)&&(c<u||c===u&&(n.x>a.x||n.x===a.x&&is(a,n)))&&(a=n,u=c)),n=n.next}while(n!==s);return a}(e,t)){const n=ps(t,e);Zo(t,t.next),Zo(n,n.next)}}function is(e,t){return ls(e.prev,e,t.prev)<0&&ls(t.next,e,e.next)<0}function as(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 os(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 ss(e,t,n,r,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function As(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&&us(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(fs(e,t)&&fs(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(ls(e.prev,e,t.prev)||ls(e,t.prev,t))||cs(e,t)&&ls(e.prev,e,e.next)>0&&ls(t.prev,t,t.next)>0)}function ls(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function cs(e,t){return e.x===t.x&&e.y===t.y}function us(e,t,n,r){const i=ds(ls(e,t,n)),a=ds(ls(e,t,r)),o=ds(ls(n,r,e)),s=ds(ls(n,r,t));return i!==a&&o!==s||(!(0!==i||!hs(e,n,t))||(!(0!==a||!hs(e,r,t))||(!(0!==o||!hs(n,e,r))||!(0!==s||!hs(n,t,r)))))}function hs(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 ds(e){return e>0?1:e<0?-1:0}function fs(e,t){return ls(e.prev,e,e.next)<0?ls(e,t,e.next)>=0&&ls(e,e.prev,t)>=0:ls(e,t,e.prev)<0||ls(e,e.next,t)<0}function ps(e,t){const n=new vs(e.i,e.x,e.y),r=new vs(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function ms(e,t,n,r){const i=new vs(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 gs(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 vs(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 ys{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 ys.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];xs(e),bs(n,e);let a=e.length;t.forEach(xs);for(let e=0;e<t.length;e++)r.push(a),a+=t[e].length,bs(n,t[e]);const o=Yo(n,r);for(let e=0;e<o.length;e+=3)i.push(o.slice(e,e+3));return i}}function xs(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function bs(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class _s extends ln{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 t=0,n=e.length;t<n;t++){a(e[t])}function a(e){const a=[],o=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let A=void 0!==t.depth?t.depth:100,l=void 0===t.bevelEnabled||t.bevelEnabled,c=void 0!==t.bevelThickness?t.bevelThickness:6,u=void 0!==t.bevelSize?t.bevelSize:c-2,h=void 0!==t.bevelOffset?t.bevelOffset:0,d=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,p=void 0!==t.UVGenerator?t.UVGenerator:ws;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),A=t.amount);let m,g,v,y,x,b=!1;f&&(m=f.getSpacedPoints(s),b=!0,l=!1,g=f.computeFrenetFrames(s,!1),v=new Me,y=new Me,x=new Me),l||(d=0,c=0,u=0,h=0);const _=e.extractPoints(o);let w=_.shape;const M=_.holes;if(!ys.isClockWise(w)){w=w.reverse();for(let e=0,t=M.length;e<t;e++){const t=M[e];ys.isClockWise(t)&&(M[e]=t.reverse())}}const S=ys.triangulateShape(w,M),E=w;for(let e=0,t=M.length;e<t;e++){const t=M[e];w=w.concat(t)}function T(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const C=w.length,L=S.length;function P(e,t,n){let r,i,a;const o=e.x-t.x,s=e.y-t.y,A=n.x-e.x,l=n.y-e.y,c=o*o+s*s,u=o*l-s*A;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(c),h=Math.sqrt(A*A+l*l),d=t.x-s/u,f=t.y+o/u,p=((n.x-l/h-d)*l-(n.y+A/h-f)*A)/(o*l-s*A);r=d+o*p-e.x,i=f+s*p-e.y;const m=r*r+i*i;if(m<=2)return new de(r,i);a=Math.sqrt(m/2)}else{let e=!1;o>Number.EPSILON?A>Number.EPSILON&&(e=!0):o<-Number.EPSILON?A<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(l)&&(e=!0),e?(r=-s,i=o,a=Math.sqrt(c)):(r=o,i=s,a=Math.sqrt(c/2))}return new de(r/a,i/a)}const R=[];for(let e=0,t=E.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),R[e]=P(E[e],E[n],E[r]);const q=[];let D,I=R.concat();for(let e=0,t=M.length;e<t;e++){const t=M[e];D=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),D[e]=P(t[e],t[r],t[i]);q.push(D),I=I.concat(D)}for(let e=0;e<d;e++){const t=e/d,n=c*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=T(E[e],R[e],r);k(t.x,t.y,-n)}for(let e=0,t=M.length;e<t;e++){const t=M[e];D=q[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],D[e],r);k(i.x,i.y,-n)}}}const B=u+h;for(let e=0;e<C;e++){const t=l?T(w[e],I[e],B):w[e];b?(y.copy(g.normals[0]).multiplyScalar(t.x),v.copy(g.binormals[0]).multiplyScalar(t.y),x.copy(m[0]).add(y).add(v),k(x.x,x.y,x.z)):k(t.x,t.y,0)}for(let e=1;e<=s;e++)for(let t=0;t<C;t++){const n=l?T(w[t],I[t],B):w[t];b?(y.copy(g.normals[e]).multiplyScalar(n.x),v.copy(g.binormals[e]).multiplyScalar(n.y),x.copy(m[e]).add(y).add(v),k(x.x,x.y,x.z)):k(n.x,n.y,A/s*e)}for(let e=d-1;e>=0;e--){const t=e/d,n=c*Math.cos(t*Math.PI/2),r=u*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=T(E[e],R[e],r);k(t.x,t.y,A+n)}for(let e=0,t=M.length;e<t;e++){const t=M[e];D=q[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],D[e],r);b?k(i.x,i.y+m[s-1].y,m[s-1].x+n):k(i.x,i.y,A+n)}}}function O(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*d;e<n;e++){const n=C*e,a=C*(e+1);z(t+r+n,t+i+n,t+i+a,t+r+a)}}}function k(e,t,n){a.push(e),a.push(t),a.push(n)}function N(e,t,i){F(e),F(t),F(i);const a=r.length/3,o=p.generateTopUV(n,r,a-3,a-2,a-1);U(o[0]),U(o[1]),U(o[2])}function z(e,t,i,a){F(e),F(t),F(a),F(t),F(i),F(a);const o=r.length/3,s=p.generateSideWallUV(n,r,o-6,o-3,o-2,o-1);U(s[0]),U(s[1]),U(s[3]),U(s[1]),U(s[2]),U(s[3])}function F(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function U(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(l){let e=0,t=C*e;for(let e=0;e<L;e++){const n=S[e];N(n[2]+t,n[1]+t,n[0]+t)}e=s+2*d,t=C*e;for(let e=0;e<L;e++){const n=S[e];N(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<L;e++){const t=S[e];N(t[2],t[1],t[0])}for(let e=0;e<L;e++){const t=S[e];N(t[0]+C*s,t[1]+C*s,t[2]+C*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;O(E,t),t+=E.length;for(let e=0,n=M.length;e<n;e++){const n=M[e];O(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new $t(r,3)),this.setAttribute("uv",new $t(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.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 r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Qo[r.type]).fromJSON(r)),new _s(n,e.options)}}const ws={generateTopUV:function(e,t,n,r,i){const a=t[3*n],o=t[3*n+1],s=t[3*r],A=t[3*r+1],l=t[3*i],c=t[3*i+1];return[new de(a,o),new de(s,A),new de(l,c)]},generateSideWallUV:function(e,t,n,r,i,a){const o=t[3*n],s=t[3*n+1],A=t[3*n+2],l=t[3*r],c=t[3*r+1],u=t[3*r+2],h=t[3*i],d=t[3*i+1],f=t[3*i+2],p=t[3*a],m=t[3*a+1],g=t[3*a+2];return Math.abs(s-c)<Math.abs(o-l)?[new de(o,1-A),new de(l,1-u),new de(h,1-f),new de(p,1-g)]:[new de(s,1-A),new de(c,1-u),new de(d,1-f),new de(m,1-g)]}};class Ms extends ln{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let o=0,s=0;if(!1===Array.isArray(e))A(e);else for(let t=0;t<e.length;t++)A(e[t]),this.addGroup(o,s,t),o+=s,s=0;function A(e){const o=r.length/3,A=e.extractPoints(t);let l=A.shape;const c=A.holes;!1===ys.isClockWise(l)&&(l=l.reverse());for(let e=0,t=c.length;e<t;e++){const t=c[e];!0===ys.isClockWise(t)&&(c[e]=t.reverse())}const u=ys.triangulateShape(l,c);for(let e=0,t=c.length;e<t;e++){const t=c[e];l=l.concat(t)}for(let e=0,t=l.length;e<t;e++){const t=l[e];r.push(t.x,t.y,0),i.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=u.length;e<t;e++){const t=u[e],r=t[0]+o,i=t[1]+o,a=t[2]+o;n.push(r,i,a),s+=3}}this.setIndex(n),this.setAttribute("position",new $t(r,3)),this.setAttribute("normal",new $t(i,3)),this.setAttribute("uv",new $t(a,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 Ms(n,e.curveSegments)}}class Ss extends ln{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(a+o,Math.PI);let A=0;const l=[],c=new Me,u=new Me,h=[],d=[],f=[],p=[];for(let h=0;h<=n;h++){const m=[],g=h/n;let v=0;0==h&&0==a?v=.5/t:h==n&&s==Math.PI&&(v=-.5/t);for(let n=0;n<=t;n++){const s=n/t;c.x=-e*Math.cos(r+s*i)*Math.sin(a+g*o),c.y=e*Math.cos(a+g*o),c.z=e*Math.sin(r+s*i)*Math.sin(a+g*o),d.push(c.x,c.y,c.z),u.copy(c).normalize(),f.push(u.x,u.y,u.z),p.push(s+v,1-g),m.push(A++)}l.push(m)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=l[e][r+1],i=l[e][r],o=l[e+1][r],A=l[e+1][r+1];(0!==e||a>0)&&h.push(t,i,A),(e!==n-1||s<Math.PI)&&h.push(i,o,A)}this.setIndex(h),this.setAttribute("position",new $t(d,3)),this.setAttribute("normal",new $t(f,3)),this.setAttribute("uv",new $t(p,2))}static fromJSON(e){return new Ss(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Es extends ln{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 a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const o=new Me,s=new Me,A=new de;let l=new Me;const c=[],u=[],h=[],d=[];function f(i){l=e.getPointAt(i/t,l);const A=a.normals[i],h=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);s.x=a*A.x+i*h.x,s.y=a*A.y+i*h.y,s.z=a*A.z+i*h.z,s.normalize(),u.push(s.x,s.y,s.z),o.x=l.x+n*s.x,o.y=l.y+n*s.y,o.z=l.z+n*s.z,c.push(o.x,o.y,o.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)A.x=e/t,A.y=n/r,h.push(A.x,A.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),a=(r+1)*e+t,o=(r+1)*(e-1)+t;d.push(n,i,o),d.push(i,a,o)}}()}(),this.setIndex(d),this.setAttribute("position",new $t(c,3)),this.setAttribute("normal",new $t(u,3)),this.setAttribute("uv",new $t(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Es((new Qo[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}function Ts(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r,i),!0)}(class extends zt{constructor(e){super(),this.type="ShadowMaterial",this.color=new Wt(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}).prototype.isShadowMaterial=!0;class Cs extends zt{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Wt(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 Wt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new de(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.flatShading=!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.flatShading=e.flatShading,this}}Cs.prototype.isMeshStandardMaterial=!0;(class extends Cs{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new de(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return se(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenTint=new Wt(0),this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationTint=new Wt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularTint=new Wt(1,1,1),this.specularTintMap=null,this._clearcoat=0,this._transmission=0,this.setValues(e)}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=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.ior=e.ior,this.sheenTint.copy(e.sheenTint),this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationTint.copy(e.attenuationTint),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularTint.copy(e.specularTint),this.specularTintMap=e.specularTintMap,this}}).prototype.isMeshPhysicalMaterial=!0;class Ls extends zt{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Wt(16777215),this.specular=new Wt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new de(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.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.flatShading=e.flatShading,this}}Ls.prototype.isMeshPhongMaterial=!0;(class extends zt{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Wt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new de(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.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}}).prototype.isMeshToonMaterial=!0;(class extends zt{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!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.flatShading=e.flatShading,this}}).prototype.isMeshNormalMaterial=!0;class Ps extends zt{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Wt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Wt(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.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}}Ps.prototype.isMeshLambertMaterial=!0;(class extends zt{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Wt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new de(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.flatShading=e.flatShading,this}}).prototype.isMeshMatcapMaterial=!0;(class extends co{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}}).prototype.isLineDashedMaterial=!0;const Rs={arraySlice:function(e,t,n){return Rs.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 e=0;e!==t;++e)n[e]=e;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 a=0,o=0;o!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[o++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let o=a[r];if(void 0!==o)if(Array.isArray(o))do{o=a[r],void 0!==o&&(t.push(a.time),n.push.apply(n,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[r],void 0!==o&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{o=a[r],void 0!==o&&(t.push(a.time),n.push(o)),a=e[i++]}while(void 0!==a)},subclip:function(e,t,n,r,i=30){const a=e.clone();a.name=t;const o=[];for(let e=0;e<a.tracks.length;++e){const t=a.tracks[e],s=t.getValueSize(),A=[],l=[];for(let e=0;e<t.times.length;++e){const a=t.times[e]*i;if(!(a<n||a>=r)){A.push(t.times[e]);for(let n=0;n<s;++n)l.push(t.values[e*s+n])}}0!==A.length&&(t.times=Rs.convertArray(A,t.times.constructor),t.values=Rs.convertArray(l,t.values.constructor),o.push(t))}a.tracks=o;let s=1/0;for(let e=0;e<a.tracks.length;++e)s>a.tracks[e].times[0]&&(s=a.tracks[e].times[0]);for(let e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*s);return a.resetDuration(),a},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,a=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const o=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===o)continue;let s=0;const A=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=A/3);let l=0;const c=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(l=c/3);const u=r.times.length-1;let h;if(a<=r.times[0]){const e=s,t=A-s;h=Rs.arraySlice(r.values,e,t)}else if(a>=r.times[u]){const e=u*A+s,t=e+A-s;h=Rs.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=s,n=A-s;e.evaluate(a),h=Rs.arraySlice(e.resultBuffer,t,n)}if("quaternion"===i){(new we).fromArray(h).normalize().conjugate().toArray(h)}const d=o.times.length;for(let e=0;e<d;++e){const t=e*c+l;if("quaternion"===i)we.multiplyQuaternionsFlat(o.values,t,h,0,o.values,t);else{const e=c-2*l;for(let n=0;n<e;++n)o.values[t+n]-=h[n]}}}return e.blendMode=2501,e}};class qs{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 a;n:{r:if(!(e<r)){for(let 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,r=t[++n],e<r)break t}a=t.length;break n}if(e>=i)break e;{const o=t[1];e<o&&(n=2,i=o);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0}}for(;n<a;){const r=n+a>>>1;e<t[r]?a=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 e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}qs.prototype.beforeStart_=qs.prototype.copySampleValue_,qs.prototype.afterEnd_=qs.prototype.copySampleValue_;class Ds extends qs{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:G,endingEnd:G}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,o=r[i],s=r[a];if(void 0===o)switch(this.getSettings_().endingStart){case j:i=e,o=2*t-n;break;case V:i=r.length-2,o=t+r[i]-r[i+1];break;default:i=e,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case j:a=e,s=2*n-t;break;case V:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}const A=.5*(n-t),l=this.valueSize;this._weightPrev=A/(t-o),this._weightNext=A/(s-n),this._offsetPrev=i*l,this._offsetNext=a*l}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,A=s-o,l=this._offsetPrev,c=this._offsetNext,u=this._weightPrev,h=this._weightNext,d=(n-t)/(r-t),f=d*d,p=f*d,m=-u*p+2*u*f-u*d,g=(1+u)*p+(-1.5-2*u)*f+(-.5+u)*d+1,v=(-1-h)*p+(1.5+h)*f+.5*d,y=h*p-h*f;for(let e=0;e!==o;++e)i[e]=m*a[l+e]+g*a[A+e]+v*a[s+e]+y*a[c+e];return i}}class Is extends qs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,A=s-o,l=(n-t)/(r-t),c=1-l;for(let e=0;e!==o;++e)i[e]=a[A+e]*c+a[s+e]*l;return i}}class Bs extends qs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Os{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=Rs.convertArray(t,this.TimeBufferType),this.values=Rs.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:Rs.convertArray(e.times,Array),values:Rs.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Bs(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Is(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ds(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case F:t=this.InterpolantFactoryMethodDiscrete;break;case U:t=this.InterpolantFactoryMethodLinear;break;case H: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 F;case this.InterpolantFactoryMethodLinear:return U;case this.InterpolantFactoryMethodSmooth:return H}}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,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=Rs.arraySlice(n,i,a),this.values=Rs.arraySlice(this.values,i*e,a*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 a=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&Rs.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Rs.arraySlice(this.times),t=Rs.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===H,i=e.length-1;let a=1;for(let o=1;o<i;++o){let i=!1;const s=e[o];if(s!==e[o+1]&&(1!==o||s!==e[0]))if(r)i=!0;else{const e=o*n,r=e-n,a=e+n;for(let o=0;o!==n;++o){const n=t[e+o];if(n!==t[r+o]||n!==t[a+o]){i=!0;break}}}if(i){if(o!==a){e[a]=e[o];const r=o*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a!==e.length?(this.times=Rs.arraySlice(e,0,a),this.values=Rs.arraySlice(t,0,a*n)):(this.times=e,this.values=t),this}clone(){const e=Rs.arraySlice(this.times,0),t=Rs.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Os.prototype.TimeBufferType=Float32Array,Os.prototype.ValueBufferType=Float32Array,Os.prototype.DefaultInterpolation=U;class ks extends Os{}ks.prototype.ValueTypeName="bool",ks.prototype.ValueBufferType=Array,ks.prototype.DefaultInterpolation=F,ks.prototype.InterpolantFactoryMethodLinear=void 0,ks.prototype.InterpolantFactoryMethodSmooth=void 0;class Ns extends Os{}Ns.prototype.ValueTypeName="color";class zs extends Os{}zs.prototype.ValueTypeName="number";class Fs extends qs{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t);let A=e*o;for(let e=A+o;A!==e;A+=4)we.slerpFlat(i,0,a,A-o,a,A,s);return i}}class Us extends Os{InterpolantFactoryMethodLinear(e){return new Fs(this.times,this.values,this.getValueSize(),e)}}Us.prototype.ValueTypeName="quaternion",Us.prototype.DefaultInterpolation=U,Us.prototype.InterpolantFactoryMethodSmooth=void 0;class Hs extends Os{}Hs.prototype.ValueTypeName="string",Hs.prototype.ValueBufferType=Array,Hs.prototype.DefaultInterpolation=F,Hs.prototype.InterpolantFactoryMethodLinear=void 0,Hs.prototype.InterpolantFactoryMethodSmooth=void 0;class Gs extends Os{}Gs.prototype.ValueTypeName="vector";class js{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=oe(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(Vs(n[e]).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 e=0,r=n.length;e!==r;++e)t.push(Os.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let e=0;e<i;e++){let o=[],s=[];o.push((e+i-1)%i,e,(e+1)%i),s.push(0,1,0);const A=Rs.getKeyframeOrder(o);o=Rs.sortedArray(o,1,A),s=Rs.sortedArray(s,1,A),r||0!==o[0]||(o.push(i),s.push(s[0])),a.push(new zs(".morphTargetInfluences["+t[e].name+"]",o,s).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=n.name.match(i);if(a&&a.length>1){const e=a[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const a=[];for(const e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}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 a=[],o=[];Rs.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.fps||30,o=e.blendMode;let s=e.length||-1;const A=e.hierarchy||[];for(let e=0;e<A.length;e++){const i=A[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],a=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),a.push(r.morphTarget===n?1:0)}r.push(new zs(".morphTargetInfluence["+n+"]",e,a))}s=e.length*(a||1)}else{const a=".bones["+t[e].name+"]";n(Gs,a+".position",i,"pos",r),n(Us,a+".quaternion",i,"rot",r),n(Gs,a+".scale",i,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,o)}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 Vs(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 zs;case"vector":case"vector2":case"vector3":case"vector4":return Gs;case"color":return Ns;case"quaternion":return Us;case"bool":case"boolean":return ks;case"string":return Hs}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Rs.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 Ws={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={}}};const Qs=new class{constructor(e,t,n){const r=this;let i,a=!1,o=0,s=0;const A=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===a&&void 0!==r.onStart&&r.onStart(e,o,s),a=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,s),o===s&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return A.push(e,t),this},this.removeHandler=function(e){const t=A.indexOf(e);return-1!==t&&A.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=A.length;t<n;t+=2){const n=A[t],r=A[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}};class Ys{constructor(e){this.manager=void 0!==e?e:Qs,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 Xs={};class Zs extends Ys{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,a=Ws.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;if(void 0!==Xs[e])return void Xs[e].push({onLoad:t,onProgress:n,onError:r});const o=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(o){const n=o[1],a=!!o[2];let s=o[3];s=decodeURIComponent(s),a&&(s=atob(s));try{let r;const a=(this.responseType||"").toLowerCase();switch(a){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let t=0;t<s.length;t++)e[t]=s.charCodeAt(t);r="blob"===a?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(t){setTimeout((function(){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{Xs[e]=[],Xs[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=Xs[e];if(delete Xs[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Ws.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=Xs[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=Xs[e];delete Xs[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=Xs[e];delete Xs[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 Js extends Ys{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,a=Ws.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",A,!1),Ws.add(e,this),t&&t(this),i.manager.itemEnd(e)}function A(t){o.removeEventListener("load",s,!1),o.removeEventListener("error",A,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return o.addEventListener("load",s,!1),o.addEventListener("error",A,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(e),o.src=e,o}}class Ks extends Ys{constructor(e){super(e)}load(e,t,n,r){const i=new Nn,a=new Js(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let o=0;function s(n){a.load(e[n],(function(e){i.images[n]=e,o++,6===o&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)s(t);return i}}class $s extends Ys{constructor(e){super(e)}load(e,t,n,r){const i=new ve,a=new Js(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?O:k,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class eA extends Lo{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 Go(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],a=i.getLength(),o=0===a?0:1-e/a;return i.getPointAt(o)}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 a=i[r],o=a&&a.isEllipseCurve?2*e:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o);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 Qo[n.type]).fromJSON(n))}return this}}class tA extends eA{constructor(e){super(),this.type="Path",this.currentPoint=new de,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 Go(this.currentPoint.clone(),new de(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new jo(this.currentPoint.clone(),new de(e,t),new de(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const o=new Uo(this.currentPoint.clone(),new de(e,t),new de(n,r),new de(i,a));return this.curves.push(o),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Wo(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const o=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+o,t+s,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,o,s){const A=this.currentPoint.x,l=this.currentPoint.y;return this.absellipse(e+A,t+l,n,r,i,a,o,s),this}absellipse(e,t,n,r,i,a,o,s){const A=new Po(e,t,n,r,i,a,o,s);if(this.curves.length>0){const e=A.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(A);const l=A.getPoint(1);return this.currentPoint.copy(l),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 nA extends tA{constructor(e){super(e),this.uuid=oe(),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 tA).fromJSON(n))}return this}}class rA extends Et{constructor(e,t=1){super(),this.type="Light",this.color=new Wt(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}}rA.prototype.isLight=!0;(class extends rA{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Et.DefaultUp),this.updateMatrix(),this.groundColor=new Wt(t)}copy(e){return rA.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}).prototype.isHemisphereLight=!0;const iA=new tt,aA=new Me,oA=new Me;class sA{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new de(512,512),this.map=null,this.mapPass=null,this.matrix=new tt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Wn,this._frameExtents=new de(1,1),this._viewportCount=1,this._viewports=[new xe(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;aA.setFromMatrixPosition(e.matrixWorld),t.position.copy(aA),oA.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(oA),t.updateMatrixWorld(),iA.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iA),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 AA extends sA{constructor(){super(new Bn(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*ae*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}}AA.prototype.isSpotLightShadow=!0;(class extends rA{constructor(e,t,n=0,r=Math.PI/3,i=0,a=1){super(e,t),this.type="SpotLight",this.position.copy(Et.DefaultUp),this.updateMatrix(),this.target=new Et,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.shadow=new AA}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}}).prototype.isSpotLight=!0;const lA=new tt,cA=new Me,uA=new Me;class hA extends sA{constructor(){super(new Bn(90,1,.5,500)),this._frameExtents=new de(4,2),this._viewportCount=6,this._viewports=[new xe(2,1,1,1),new xe(0,1,1,1),new xe(3,1,1,1),new xe(1,1,1,1),new xe(3,0,1,1),new xe(1,0,1,1)],this._cubeDirections=[new Me(1,0,0),new Me(-1,0,0),new Me(0,0,1),new Me(0,0,-1),new Me(0,1,0),new Me(0,-1,0)],this._cubeUps=[new Me(0,1,0),new Me(0,1,0),new Me(0,1,0),new Me(0,1,0),new Me(0,0,1),new Me(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()),cA.setFromMatrixPosition(e.matrixWorld),n.position.copy(cA),uA.copy(n.position),uA.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(uA),n.updateMatrixWorld(),r.makeTranslation(-cA.x,-cA.y,-cA.z),lA.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(lA)}}hA.prototype.isPointLightShadow=!0;(class extends rA{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new hA}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}}).prototype.isPointLight=!0;class dA extends sA{constructor(){super(new ar(-5,5,5,-5,.5,500))}}dA.prototype.isDirectionalLightShadow=!0;class fA extends rA{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Et.DefaultUp),this.updateMatrix(),this.target=new Et,this.shadow=new dA}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}fA.prototype.isDirectionalLight=!0;class pA extends rA{constructor(e,t){super(e,t),this.type="AmbientLight"}}pA.prototype.isAmbientLight=!0;(class extends rA{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}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}}).prototype.isRectAreaLight=!0;class mA{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Me)}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,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[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)}}mA.prototype.isSphericalHarmonics3=!0;class gA extends rA{constructor(e=new mA,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}}gA.prototype.isLightProbe=!0;class vA extends ln{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}}vA.prototype.isInstancedBufferGeometry=!0;(class extends Ys{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,a=Ws.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const o={};o.credentials="anonymous"===this.crossOrigin?"same-origin":"include",o.headers=this.requestHeader,fetch(e,o).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Ws.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 yA{constructor(){this.type="ShapePath",this.color=new Wt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new tA,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,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),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 nA;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,a=0;a<n;i=a++){let n=t[i],o=t[a],s=o.x-n.x,A=o.y-n.y;if(Math.abs(A)>Number.EPSILON){if(A<0&&(n=t[a],s=-s,o=t[i],A=-A),e.y<n.y||e.y>o.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=A*(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(o.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=o.x)return!0}}return r}const i=ys.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);let o,s,A;const l=[];if(1===a.length)return s=a[0],A=new nA,A.curves=s.curves,l.push(A),l;let c=!i(a[0].getPoints());c=e?!c:c;const u=[],h=[];let d,f,p=[],m=0;h[m]=void 0,p[m]=[];for(let t=0,n=a.length;t<n;t++)s=a[t],d=s.getPoints(),o=i(d),o=e?!o:o,o?(!c&&h[m]&&m++,h[m]={s:new nA,p:d},h[m].s.curves=s.curves,c&&m++,p[m]=[]):p[m].push({h:s,p:d[0]});if(!h[0])return n(a);if(h.length>1){let e=!1;const t=[];for(let e=0,t=h.length;e<t;e++)u[e]=[];for(let n=0,i=h.length;n<i;n++){const i=p[n];for(let a=0;a<i.length;a++){const o=i[a];let s=!0;for(let i=0;i<h.length;i++)r(o.p,h[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:a}),s?(s=!1,u[i].push(o)):e=!0);s&&u[n].push(o)}}t.length>0&&(e||(p=u))}for(let e=0,t=h.length;e<t;e++){A=h[e].s,l.push(A),f=p[e];for(let e=0,t=f.length;e<t;e++)A.holes.push(f[e].h)}return l}}class xA{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,a=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,o=[];let s=0,A=0;for(let e=0;e<r.length;e++){const t=r[e];if("\n"===t)s=0,A-=a;else{const e=bA(t,i,s,A,n);s+=e.offsetX,o.push(e.path)}}return o}(e,t,this.data);for(let e=0,t=r.length;e<t;e++)Array.prototype.push.apply(n,r[e].toShapes());return n}}function bA(e,t,n,r,i){const a=i.glyphs[e]||i.glyphs["?"];if(!a)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const o=new yA;let s,A,l,c,u,h,d,f;if(a.o){const e=a._cachedOutline||(a._cachedOutline=a.o.split(" "));for(let i=0,a=e.length;i<a;){switch(e[i++]){case"m":s=e[i++]*t+n,A=e[i++]*t+r,o.moveTo(s,A);break;case"l":s=e[i++]*t+n,A=e[i++]*t+r,o.lineTo(s,A);break;case"q":l=e[i++]*t+n,c=e[i++]*t+r,u=e[i++]*t+n,h=e[i++]*t+r,o.quadraticCurveTo(u,h,l,c);break;case"b":l=e[i++]*t+n,c=e[i++]*t+r,u=e[i++]*t+n,h=e[i++]*t+r,d=e[i++]*t+n,f=e[i++]*t+r,o.bezierCurveTo(u,h,d,f,l,c)}}}return{offsetX:a.ha*t,path:o}}let _A;xA.prototype.isFont=!0;const wA=function(){return void 0===_A&&(_A=new(window.AudioContext||window.webkitAudioContext)),_A};class MA extends Ys{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new Zs(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{const e=n.slice(0);wA().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}(class extends gA{constructor(e,t,n=1){super(void 0,n);const r=(new Wt).set(e),i=(new Wt).set(t),a=new Me(r.r,r.g,r.b),o=new Me(i.r,i.g,i.b),s=Math.sqrt(Math.PI),A=s*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s),this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(A)}}).prototype.isHemisphereLightProbe=!0;(class extends gA{constructor(e,t=1){super(void 0,t);const n=(new Wt).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class SA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=EA(),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=EA();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function EA(){return("undefined"==typeof performance?Date:performance).now()}class TA{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,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 a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}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,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){o.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 e=n,i=r;e!==i;++e)t[e]=t[r+e%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 r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){we.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;we.multiplyQuaternionsFlat(e,a,e,t,e,n),we.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]*a+e[n+o]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const CA="\\[\\]\\.:\\/",LA=new RegExp("[\\[\\]\\.:\\/]","g"),PA="[^\\[\\]\\.:\\/]",RA="[^"+CA.replace("\\.","")+"]",qA=/((?:WC+[\/:])*)/.source.replace("WC",PA),DA=/(WCOD+)?/.source.replace("WCOD",RA),IA=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",PA),BA=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",PA),OA=new RegExp("^"+qA+DA+IA+BA+"$"),kA=["material","materials","bones"];class NA{constructor(e,t,n){this.path=t,this.parsedPath=n||NA.parseTrackName(t),this.node=NA.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 NA.Composite(e,t,n):new NA(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(LA,"")}static parseTrackName(e){const t=OA.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!==kA.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 a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[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=NA.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 a=e[r];if(void 0===a){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 o=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(o=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=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(s=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}NA.Composite=class{constructor(e,t,n){const r=n||NA.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()}},NA.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},NA.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},NA.prototype.GetterByBindingType=[NA.prototype._getValue_direct,NA.prototype._getValue_array,NA.prototype._getValue_arrayElement,NA.prototype._getValue_toArray],NA.prototype.SetterByBindingTypeAndVersioning=[[NA.prototype._setValue_direct,NA.prototype._setValue_direct_setNeedsUpdate,NA.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[NA.prototype._setValue_array,NA.prototype._setValue_array_setNeedsUpdate,NA.prototype._setValue_array_setMatrixWorldNeedsUpdate],[NA.prototype._setValue_arrayElement,NA.prototype._setValue_arrayElement_setNeedsUpdate,NA.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[NA.prototype._setValue_fromArray,NA.prototype._setValue_fromArray_setNeedsUpdate,NA.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class zA{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,o=new Array(a),s={endingStart:G,endingEnd:G};for(let e=0;e!==a;++e){const t=i[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(a),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,a=n/r;e.warp(1,i,t),this.warp(a,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,a=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);const s=o.parameterPositions,A=o.sampleValues;return s[0]=i,s[1]=i+n,A[0]=e/a,A[1]=t/a,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 a=this._updateTime(t),o=this._updateWeight(e);if(o>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(a),t[n].accumulateAdditive(o);break;case W:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,o)}}}_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 a=2202===n;if(0===e)return-1===i?r:a&&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,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const o=this.repetitions-i;if(o<=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===o){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=j,r.endingEnd=j):(r.endingStart=e?this.zeroSlopeAtStart?j:G:V,r.endingEnd=t?this.zeroSlopeAtEnd?j:G:V)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}(class extends te{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,a=e._propertyBindings,o=e._interpolants,s=n.uuid,A=this._bindingsByRootAndName;let l=A[s];void 0===l&&(l={},A[s]=l);for(let e=0;e!==i;++e){const i=r[e],A=i.name;let c=l[A];if(void 0!==c)a[e]=c;else{if(c=a[e],void 0!==c){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,s,A));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;c=new TA(NA.create(n,A,r),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,s,A),a[e]=c}o[e].resultBuffer=c.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 a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{const t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),a.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,a=this._actionsByClip,o=a[i],s=o.knownActions,A=s[s.length-1],l=e._byClipCacheIndex;A._byClipCacheIndex=l,s[l]=A,s.pop(),e._byClipCacheIndex=null;delete o.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete a[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_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 a=r[t];void 0===a&&(a={},r[t]=a),a[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,a=this._bindingsByRootAndName,o=a[r],s=t[t.length-1],A=e._cacheIndex;s._cacheIndex=A,t[A]=s,t.pop(),delete o[i],0===Object.keys(o).length&&delete a[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 Is(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 a="string"==typeof e?js.findByName(r,e):e;const o=null!==a?a.uuid:e,s=this._actionsByClip[o];let A=null;if(void 0===n&&(n=null!==a?a.blendMode:W),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;A=s.knownActions[0],null===a&&(a=A._clip)}if(null===a)return null;const l=new zA(this,a,t,n);return this._bindAction(l,A),this._addInactiveAction(l,o,i),l}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?js.findByName(n,e):e,a=i?i.uuid:e,o=this._actionsByClip[a];return void 0!==o&&o.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),a=this._accuIndex^=1;for(let o=0;o!==n;++o){t[o]._update(r,e,i,a)}const o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].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,a=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,a._cacheIndex=i,t[i]=a,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class FA extends Ba{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}}FA.prototype.isInstancedInterleavedBuffer=!0;function UA(e,t){return e.distance-t.distance}function HA(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++)HA(r[e],t,n,!0)}}class GA{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(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,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(se(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const jA=new Me,VA=new Me;class WA{constructor(e=new Me,t=new Me){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){jA.subVectors(e,this.start),VA.subVectors(this.end,this.start);const n=VA.dot(VA);let r=VA.dot(jA)/n;return t&&(r=se(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)}}(class extends Et{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 QA=new Me,YA=new tt,XA=new tt;function ZA(e){const t=[];e&&e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,ZA(e.children[n]));return t}const JA=new Float32Array(1);new Int32Array(JA.buffer);function KA(e,t,n){var r,i,a,o,s;function A(){var l=Date.now()-o;l<t&&l>=0?r=setTimeout(A,t-l):(r=null,n||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var l=function(){a=this,i=arguments,o=Date.now();var l=n&&!r;return r||(r=setTimeout(A,t)),l&&(s=e.apply(a,i),a=i=null),s};return l.clear=function(){r&&(clearTimeout(r),r=null)},l.flush=function(){r&&(s=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},l}Lo.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Lo.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},tA.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},class extends xo{constructor(e=10,t=10,n=4473924,r=8947848){n=new Wt(n),r=new Wt(r);const i=t/2,a=e/t,o=e/2,s=[],A=[];for(let e=0,l=0,c=-o;e<=t;e++,c+=a){s.push(-o,0,c,o,0,c),s.push(c,0,-o,c,0,o);const t=e===i?n:r;t.toArray(A,l),l+=3,t.toArray(A,l),l+=3,t.toArray(A,l),l+=3,t.toArray(A,l),l+=3}const l=new ln;l.setAttribute("position",new $t(s,3)),l.setAttribute("color",new $t(A,3));super(l,new co({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 xo{constructor(e){const t=ZA(e),n=new ln,r=[],i=[],a=new Wt(0,0,1),o=new Wt(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(a.r,a.g,a.b),i.push(o.r,o.g,o.b))}n.setAttribute("position",new $t(r,3)),n.setAttribute("color",new $t(i,3));super(n,new co({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");XA.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(YA.multiplyMatrices(XA,i.matrixWorld),QA.setFromMatrixPosition(YA),r.setXYZ(n,QA.x,QA.y,QA.z),YA.multiplyMatrices(XA,i.parent.matrixWorld),QA.setFromMatrixPosition(YA),r.setXYZ(n+1,QA.x,QA.y,QA.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Ys.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),class{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}.extractUrlBase(e)},Ys.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.")}},Te.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Te.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Te.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Te.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Te.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},We.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Wn.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},WA.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},fe.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},fe.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},fe.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},fe.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},fe.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},fe.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},tt.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},tt.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},tt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Me).setFromMatrixColumn(this,3)},tt.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},tt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},tt.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},tt.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},tt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},tt.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},tt.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},tt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},tt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},tt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},tt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},tt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},tt.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},tt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},tt.prototype.makeFrustum=function(e,t,n,r,i,a){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,a)},tt.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Gn.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},we.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},we.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},et.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},et.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},et.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},kt.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},kt.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},kt.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},kt.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},kt.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},kt.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),kt.getBarycoord(e,t,n,r,i)},kt.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),kt.getNormal(e,t,n,r)},nA.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},nA.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new _s(this,e)},nA.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ms(this,e)},de.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},de.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},de.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Me.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},Me.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},Me.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},Me.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},Me.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},Me.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},Me.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Me.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},Me.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},xe.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},xe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Et.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Et.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Et.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Et.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Et.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Et.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.")}}}),Tn.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(Tn.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.")}}}),io.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Bn.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(rA.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(Zt.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."),this.usage===$},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage($)}}}),Zt.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?$:K),this},Zt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Zt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},ln.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},ln.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 Zt(arguments[1],arguments[2])))},ln.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)},ln.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},ln.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},ln.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},ln.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(ln.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}}}),Ba.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?$:K),this},Ba.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},_s.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},_s.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},_s.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Ia.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Object.defineProperties(zt.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 Wt}},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}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(Dn.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}}}),Da.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)},Da.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},Da.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},Da.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},Da.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},Da.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},Da.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},Da.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},Da.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},Da.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},Da.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},Da.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},Da.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},Da.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},Da.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},Da.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},Da.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},Da.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},Da.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},Da.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},Da.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},Da.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},Da.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},Da.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},Da.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(Da.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?Y:Q}},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(wa.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(be.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}}}),class extends Et{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}}.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new MA).load(e,(function(e){t.setBuffer(e)})),this},kn.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},kn.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},me.crossOrigin=void 0,me.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new $s;i.setCrossOrigin(this.crossOrigin);const a=i.load(e,n,void 0,r);return t&&(a.mapping=t),a},me.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new Ks;i.setCrossOrigin(this.crossOrigin);const a=i.load(e,n,void 0,r);return t&&(a.mapping=t),a},me.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},me.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:"132"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="132"),KA.debounce=KA;var $A=KA;function el(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tl(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 tl(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 tl(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 nl=function e(t,n){var r=n.default,i=void 0===r?null:r,a=n.triggerUpdate,o=void 0===a||a,s=n.onChange,A=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=o,this.onChange=A};function rl(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,i=void 0===r?{}:r,a=e.methods,o=void 0===a?{}:a,s=e.aliases,A=void 0===s?{}:s,l=e.init,c=void 0===l?function(){}:l,u=e.update,h=void 0===u?function(){}:u,d=Object.keys(i).map((function(e){return new nl(e,i[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 i(t){return a(t,e),s(),i}var a=function(e,n){c.call(i,e,t,n),t.initialised=!0},s=$A((function(){t.initialised&&(h.call(i,t,r),r={})}),1);return d.forEach((function(e){i[e.name]=function(e){var n=e.name,a=e.triggerUpdate,o=void 0!==a&&a,A=e.onChange,l=void 0===A?function(e,t){}:A,c=e.defaultVal,u=void 0===c?null:c;return function(e){var a=t[n];if(!arguments.length)return a;var A=void 0===e?u:e;return t[n]=A,l.call(i,A,t,a),!r.hasOwnProperty(n)&&(r[n]=a),o&&s(),i}}(e)})),Object.keys(o).forEach((function(e){i[e]=function(){for(var n,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return(n=o[e]).call.apply(n,[i,t].concat(a))}})),Object.entries(A).forEach((function(e){var t=el(e,2),n=t[0],r=t[1];return i[n]=i[r]})),i.resetProps=function(){return d.forEach((function(e){i[e.name](e.defaultVal)})),i},i.resetProps(),t._rerender=s,i}}var il,al={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-al.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*al.Bounce.In(2*e):.5*al.Bounce.Out(2*e-1)+.5}}},ol="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[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()},sl=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=ol()),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 r=0;r<n.length;r++){var i=this._tweens[n[r]],a=!t;i&&!1===i.update(e,a)&&!t&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),Al={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=Al.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=Al.Utils.Bernstein,o=0;o<=r;o++)n+=i(1-t,r-o)*i(t,o)*e[o]*a(r,o);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=Al.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=Al.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(il=[1],function(e){var t=1;if(il[e])return il[e];for(var n=e;n>1;n--)t*=n;return il[e]=t,t}),CatmullRom:function(e,t,n,r,i){var a=.5*(n-e),o=.5*(r-t),s=i*i;return(2*t-2*n+a+o)*(i*s)+(-3*t+3*n-2*a-o)*s+a*i+t}}},ll=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),cl=new sl,ul=function(){function e(e,t){void 0===t&&(t=cl),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=al.Linear.None,this._interpolationFunction=Al.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=ll.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?ol()+parseFloat(e):e:ol(),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 a=e[i],o=Array.isArray(a),s=o?"array":typeof a,A=!o&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(A){var l=n[i];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,a)),n[i]=[a].concat(l)}if("object"!==s&&!o||!a||A)void 0===t[i]&&(t[i]=a),o||(t[i]*=1),r[i]=A?n[i].slice().reverse():t[i]||0;else{for(var c in t[i]=o?[]:{},a)t[i][c]=a[c];r[i]=o?[]:{},this._setupProperties(a,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=ol()),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=ol()),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=ol()),void 0===t&&(t=!0),this._isPaused)return!0;var n,r,i=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>i)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),r=(e-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){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 o=0,s=this._chainedTweens.length;o<s;o++)this._chainedTweens[o].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 a=t[i]||0,o=n[i],s=Array.isArray(e[i]),A=Array.isArray(o);!s&&A?e[i]=this._interpolationFunction(o,r):"object"==typeof o&&o?this._updateProperties(e[i],a,o,r):"number"==typeof(o=this._handleRelativeValue(a,o))&&(e[i]=a+(o-a)*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}(),hl=ll.nextId,dl=cl,fl=dl.getAll.bind(dl),pl=dl.removeAll.bind(dl),ml=dl.add.bind(dl),gl=dl.remove.bind(dl),vl=dl.update.bind(dl),yl={Easing:al,Group:sl,Interpolation:Al,now:ol,Sequence:ll,nextId:hl,Tween:ul,VERSION:"18.6.4",getAll:fl,removeAll:pl,add:ml,remove:gl,update:vl},xl={exports:{}};function bl(e,t,n){n=n||2;var r,i,a,o,s,A,l,c=t&&t.length,u=c?t[0]*n:e.length,h=_l(e,0,u,n,!0),d=[];if(!h||h.next===h.prev)return d;if(c&&(h=function(e,t,n,r){var i,a,o,s=[];for(i=0,a=t.length;i<a;i++)(o=_l(e,t[i]*r,i<a-1?t[i+1]*r:e.length,r,!1))===o.next&&(o.steiner=!0),s.push(Dl(o));for(s.sort(Ll),i=0;i<s.length;i++)n=wl(n=Pl(s[i],n),n.next);return n}(e,t,h,n)),e.length>80*n){r=a=e[0],i=o=e[1];for(var f=n;f<u;f+=n)(s=e[f])<r&&(r=s),(A=e[f+1])<i&&(i=A),s>a&&(a=s),A>o&&(o=A);l=0!==(l=Math.max(a-r,o-i))?1/l:0}return Ml(h,d,n,r,i,l),d}function _l(e,t,n,r,i){var a,o;if(i===Wl(e,t,n,r)>0)for(a=t;a<n;a+=r)o=Gl(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=Gl(a,e[a],e[a+1],o);return o&&kl(o,o.next)&&(jl(o),o=o.next),o}function wl(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!kl(r,r.next)&&0!==Ol(r.prev,r,r.next))r=r.next;else{if(jl(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Ml(e,t,n,r,i,a,o){if(e){!o&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=ql(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,a,o,s,A,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<l&&(s++,r=r.nextZ);t++);for(A=l;s>0||A>0&&r;)0!==s&&(0===A||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,A--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1)}(i)}(e,r,i,a);for(var s,A,l=e;e.prev!==e.next;)if(s=e.prev,A=e.next,a?El(e,r,i,a):Sl(e))t.push(s.i/n),t.push(e.i/n),t.push(A.i/n),jl(e),e=A.next,l=A.next;else if((e=A)===l){o?1===o?Ml(e=Tl(wl(e),t,n),t,n,r,i,a,2):2===o&&Cl(e,t,n,r,i,a):Ml(wl(e),t,n,r,i,a,1);break}}}function Sl(e){var t=e.prev,n=e,r=e.next;if(Ol(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Il(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Ol(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function El(e,t,n,r){var i=e.prev,a=e,o=e.next;if(Ol(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,A=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,l=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=ql(s,A,t,n,r),h=ql(l,c,t,n,r),d=e.prevZ,f=e.nextZ;d&&d.z>=u&&f&&f.z<=h;){if(d!==e.prev&&d!==e.next&&Il(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ol(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&Il(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Ol(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&Il(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ol(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&Il(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Ol(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Tl(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!kl(i,a)&&Nl(i,r,r.next,a)&&Ul(i,a)&&Ul(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),jl(r),jl(r.next),r=e=a),r=r.next}while(r!==e);return wl(r)}function Cl(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Bl(o,s)){var A=Hl(o,s);return o=wl(o,o.next),A=wl(A,A.next),Ml(o,t,n,r,i,a),void Ml(A,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function Ll(e,t){return e.x-t.x}function Pl(e,t){var n=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===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===o)return n;var A,l=n,c=n.x,u=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&Il(a<u?i:o,a,c,u,a<u?o:i,a,r.x,r.y)&&(A=Math.abs(a-r.y)/(i-r.x),Ul(r,e)&&(A<h||A===h&&(r.x>n.x||r.x===n.x&&Rl(n,r)))&&(n=r,h=A)),r=r.next}while(r!==l);return n}(e,t);if(!n)return t;var r=Hl(n,e),i=wl(n,n.next);return wl(r,r.next),t===n?i:t}function Rl(e,t){return Ol(e.prev,e,t.prev)<0&&Ol(t.next,e,e.next)<0}function ql(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 Dl(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 Il(e,t,n,r,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function Bl(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&&Nl(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Ul(e,t)&&Ul(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Ol(e.prev,e,t.prev)||Ol(e,t.prev,t))||kl(e,t)&&Ol(e.prev,e,e.next)>0&&Ol(t.prev,t,t.next)>0)}function Ol(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function kl(e,t){return e.x===t.x&&e.y===t.y}function Nl(e,t,n,r){var i=Fl(Ol(e,t,n)),a=Fl(Ol(e,t,r)),o=Fl(Ol(n,r,e)),s=Fl(Ol(n,r,t));return i!==a&&o!==s||(!(0!==i||!zl(e,n,t))||(!(0!==a||!zl(e,r,t))||(!(0!==o||!zl(n,e,r))||!(0!==s||!zl(n,t,r)))))}function zl(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 Fl(e){return e>0?1:e<0?-1:0}function Ul(e,t){return Ol(e.prev,e,e.next)<0?Ol(e,t,e.next)>=0&&Ol(e,e.prev,t)>=0:Ol(e,t,e.prev)<0||Ol(e,e.next,t)<0}function Hl(e,t){var n=new Vl(e.i,e.x,e.y),r=new Vl(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function Gl(e,t,n,r){var i=new Vl(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 jl(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 Vl(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}function Wl(e,t,n,r){for(var i=0,a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}xl.exports=bl,xl.exports.default=bl,bl.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(Wl(e,0,a,n));if(i)for(var s=0,A=t.length;s<A;s++){var l=t[s]*n,c=s<A-1?t[s+1]*n:e.length;o-=Math.abs(Wl(e,l,c,n))}var u=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,d=r[s+1]*n,f=r[s+2]*n;u+=Math.abs((e[h]-e[f])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[f+1]-e[h+1]))}return 0===o&&0===u?0:Math.abs((u-o)/o)},bl.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)n.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n};var Ql=xl.exports;function Yl(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xl(e){let t=e,n=e,r=e;function i(e,t,i=0,a=e.length){if(i<a){if(0!==n(t,t))return a;do{const n=i+a>>>1;r(e[n],t)<0?i=n+1:a=n}while(i<a)}return i}return 1===e.length&&(t=(t,n)=>e(t)-n,n=Yl,r=(t,n)=>Yl(e(t),n)),{left:i,center:function(e,n,r=0,a=e.length){const o=i(e,n,r,a-1);return o>r&&t(e[o-1],n)>-t(e[o],n)?o-1:o},right:function(e,t,i=0,a=e.length){if(i<a){if(0!==n(t,t))return a;do{const n=i+a>>>1;r(e[n],t)<=0?i=n+1:a=n}while(i<a)}return i}}}const Zl=Xl(Yl).right;Xl((function(e){return null===e?NaN:+e})).center;var Jl=Zl;class Kl{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],a=e+i,o=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);o&&(t[n++]=o),e=a}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,a=0;if(i>0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}var $l=Math.sqrt(50),ec=Math.sqrt(10),tc=Math.sqrt(2);function nc(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=$l?10:a>=ec?5:a>=tc?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=$l?10:a>=ec?5:a>=tc?2:1)}function rc(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function ic(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function ac(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}var oc=1e-6,sc=Math.PI,Ac=sc/2,lc=sc/4,cc=2*sc,uc=180/sc,hc=sc/180,dc=Math.abs,fc=Math.atan2,pc=Math.cos,mc=Math.ceil,gc=Math.sin,vc=Math.sign||function(e){return e>0?1:e<0?-1:0},yc=Math.sqrt;function xc(e){return e>1?Ac:e<-1?-Ac:Math.asin(e)}function bc(e){return(e=gc(e/2))*e}function _c(){}function wc(e,t){e&&Sc.hasOwnProperty(e.type)&&Sc[e.type](e,t)}var Mc={Feature:function(e,t){wc(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)wc(n[r].geometry,t)}},Sc={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Ec(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ec(n[r],t,0)},Polygon:function(e,t){Tc(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Tc(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)wc(n[r],t)}};function Ec(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function Tc(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Ec(e[n],t,1);t.polygonEnd()}function Cc(e,t){e&&Mc.hasOwnProperty(e.type)?Mc[e.type](e,t):wc(e,t)}var Lc,Pc,Rc,qc,Dc,Ic,Bc,Oc,kc,Nc,zc,Fc,Uc,Hc,Gc,jc,Vc=new Kl,Wc=new Kl,Qc={point:_c,lineStart:_c,lineEnd:_c,polygonStart:function(){Vc=new Kl,Qc.lineStart=Yc,Qc.lineEnd=Xc},polygonEnd:function(){var e=+Vc;Wc.add(e<0?cc+e:e),this.lineStart=this.lineEnd=this.point=_c},sphere:function(){Wc.add(cc)}};function Yc(){Qc.point=Zc}function Xc(){Jc(Lc,Pc)}function Zc(e,t){Qc.point=Jc,Lc=e,Pc=t,Rc=e*=hc,qc=pc(t=(t*=hc)/2+lc),Dc=gc(t)}function Jc(e,t){var n=(e*=hc)-Rc,r=n>=0?1:-1,i=r*n,a=pc(t=(t*=hc)/2+lc),o=gc(t),s=Dc*o,A=qc*a+s*pc(i),l=s*r*gc(i);Vc.add(fc(l,A)),Rc=e,qc=a,Dc=o}function Kc(e){var t=e[0],n=e[1],r=pc(n);return[r*pc(t),r*gc(t),gc(n)]}function $c(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function eu(e){var t=yc(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var tu,nu,ru,iu,au={point:ou,lineStart:Au,lineEnd:lu,polygonStart:function(){au.point=cu,au.lineStart=uu,au.lineEnd=hu,Hc=new Kl,Qc.polygonStart()},polygonEnd:function(){Qc.polygonEnd(),au.point=ou,au.lineStart=Au,au.lineEnd=lu,Vc<0?(Ic=-(Oc=180),Bc=-(kc=90)):Hc>oc?kc=90:Hc<-1e-6&&(Bc=-90),jc[0]=Ic,jc[1]=Oc},sphere:function(){Ic=-(Oc=180),Bc=-(kc=90)}};function ou(e,t){Gc.push(jc=[Ic=e,Oc=e]),t<Bc&&(Bc=t),t>kc&&(kc=t)}function su(e,t){var n=Kc([e*hc,t*hc]);if(Uc){var r=$c(Uc,n),i=$c([r[1],-r[0],0],r);eu(i),i=function(e){return[fc(e[1],e[0]),xc(e[2])]}(i);var a,o=e-Nc,s=o>0?1:-1,A=i[0]*uc*s,l=dc(o)>180;l^(s*Nc<A&&A<s*e)?(a=i[1]*uc)>kc&&(kc=a):l^(s*Nc<(A=(A+360)%360-180)&&A<s*e)?(a=-i[1]*uc)<Bc&&(Bc=a):(t<Bc&&(Bc=t),t>kc&&(kc=t)),l?e<Nc?du(Ic,e)>du(Ic,Oc)&&(Oc=e):du(e,Oc)>du(Ic,Oc)&&(Ic=e):Oc>=Ic?(e<Ic&&(Ic=e),e>Oc&&(Oc=e)):e>Nc?du(Ic,e)>du(Ic,Oc)&&(Oc=e):du(e,Oc)>du(Ic,Oc)&&(Ic=e)}else Gc.push(jc=[Ic=e,Oc=e]);t<Bc&&(Bc=t),t>kc&&(kc=t),Uc=n,Nc=e}function Au(){au.point=su}function lu(){jc[0]=Ic,jc[1]=Oc,au.point=ou,Uc=null}function cu(e,t){if(Uc){var n=e-Nc;Hc.add(dc(n)>180?n+(n>0?360:-360):n)}else zc=e,Fc=t;Qc.point(e,t),su(e,t)}function uu(){Qc.lineStart()}function hu(){cu(zc,Fc),Qc.lineEnd(),dc(Hc)>oc&&(Ic=-(Oc=180)),jc[0]=Ic,jc[1]=Oc,Uc=null}function du(e,t){return(t-=e)<0?t+360:t}function fu(e,t){return e[0]-t[0]}function pu(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function mu(e){var t,n,r,i,a,o,s;if(kc=Oc=-(Ic=Bc=1/0),Gc=[],Cc(e,au),n=Gc.length){for(Gc.sort(fu),t=1,a=[r=Gc[0]];t<n;++t)pu(r,(i=Gc[t])[0])||pu(r,i[1])?(du(r[0],i[1])>du(r[0],r[1])&&(r[1]=i[1]),du(i[0],r[1])>du(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,t=0,r=a[n=a.length-1];t<=n;r=i,++t)i=a[t],(s=du(r[1],i[0]))>o&&(o=s,Ic=i[0],Oc=r[1])}return Gc=jc=null,Ic===1/0||Bc===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ic,Bc],[Oc,kc]]}function gu(e){return dc(e[0])<=sc?e[0]:vc(e[0])*((dc(e[0])+sc)%cc-sc)}var vu={sphere:_c,point:_c,lineStart:function(){vu.point=xu,vu.lineEnd=yu},lineEnd:_c,polygonStart:_c,polygonEnd:_c};function yu(){vu.point=vu.lineEnd=_c}function xu(e,t){nu=e*=hc,ru=gc(t*=hc),iu=pc(t),vu.point=bu}function bu(e,t){e*=hc;var n=gc(t*=hc),r=pc(t),i=dc(e-nu),a=pc(i),o=r*gc(i),s=iu*n-ru*r*a,A=ru*n+iu*r*a;tu.add(fc(yc(o*o+s*s),A)),nu=e,ru=n,iu=r}var _u=[null,null],wu={type:"LineString",coordinates:_u};function Mu(e,t){return _u[0]=e,_u[1]=t,function(e){return tu=new Kl,Cc(e,vu),+tu}(wu)}var Su={Feature:function(e,t){return Tu(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Tu(n[r].geometry,t))return!0;return!1}},Eu={Sphere:function(){return!0},Point:function(e,t){return Cu(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Cu(n[r],t))return!0;return!1},LineString:function(e,t){return Lu(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Lu(n[r],t))return!0;return!1},Polygon:function(e,t){return Pu(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Pu(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Tu(n[r],t))return!0;return!1}};function Tu(e,t){return!(!e||!Eu.hasOwnProperty(e.type))&&Eu[e.type](e,t)}function Cu(e,t){return 0===Mu(e,t)}function Lu(e,t){for(var n,r,i,a=0,o=e.length;a<o;a++){if(0===(r=Mu(e[a],t)))return!0;if(a>0&&(i=Mu(e[a],e[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Pu(e,t){return!!function(e,t){var n=gu(t),r=t[1],i=gc(r),a=[gc(n),-pc(n),0],o=0,s=0,A=new Kl;1===i?r=Ac+oc:-1===i&&(r=-Ac-oc);for(var l=0,c=e.length;l<c;++l)if(h=(u=e[l]).length)for(var u,h,d=u[h-1],f=gu(d),p=d[1]/2+lc,m=gc(p),g=pc(p),v=0;v<h;++v,f=x,m=_,g=w,d=y){var y=u[v],x=gu(y),b=y[1]/2+lc,_=gc(b),w=pc(b),M=x-f,S=M>=0?1:-1,E=S*M,T=E>sc,C=m*_;if(A.add(fc(C*S*gc(E),g*w+C*pc(E))),o+=T?M+S*cc:M,T^f>=n^x>=n){var L=$c(Kc(d),Kc(y));eu(L);var P=$c(a,L);eu(P);var R=(T^M>=0?-1:1)*xc(P[2]);(r>R||r===R&&(L[0]||L[1]))&&(s+=T^M>=0?1:-1)}}return(o<-1e-6||o<oc&&A<-1e-12)^1&s}(e.map(Ru),qu(t))}function Ru(e){return(e=e.map(qu)).pop(),e}function qu(e){return[e[0]*hc,e[1]*hc]}function Du(e,t){return(e&&Su.hasOwnProperty(e.type)?Su[e.type]:Tu)(e,t)}function Iu(e,t,n){var r=ac(e,t-oc,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Bu(e,t,n){var r=ac(e,t-oc,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function Ou(){return function(){var e,t,n,r,i,a,o,s,A,l,c,u,h=10,d=h,f=90,p=360,m=2.5;function g(){return{type:"MultiLineString",coordinates:v()}}function v(){return ac(mc(r/f)*f,n,f).map(c).concat(ac(mc(s/p)*p,o,p).map(u)).concat(ac(mc(t/h)*h,e,h).filter((function(e){return dc(e%f)>oc})).map(A)).concat(ac(mc(a/d)*d,i,d).filter((function(e){return dc(e%p)>oc})).map(l))}return g.lines=function(){return v().map((function(e){return{type:"LineString",coordinates:e}}))},g.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(u(o).slice(1),c(n).reverse().slice(1),u(s).reverse().slice(1))]}},g.extent=function(e){return arguments.length?g.extentMajor(e).extentMinor(e):g.extentMinor()},g.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),g.precision(m)):[[r,s],[n,o]]},g.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),g.precision(m)):[[t,a],[e,i]]},g.step=function(e){return arguments.length?g.stepMajor(e).stepMinor(e):g.stepMinor()},g.stepMajor=function(e){return arguments.length?(f=+e[0],p=+e[1],g):[f,p]},g.stepMinor=function(e){return arguments.length?(h=+e[0],d=+e[1],g):[h,d]},g.precision=function(h){return arguments.length?(m=+h,A=Iu(a,i,90),l=Bu(t,e,m),c=Iu(s,o,90),u=Bu(r,n,m),g):m},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function ku(e,t){var n=e[0]*hc,r=e[1]*hc,i=t[0]*hc,a=t[1]*hc,o=pc(r),s=gc(r),A=pc(a),l=gc(a),c=o*pc(n),u=o*gc(n),h=A*pc(i),d=A*gc(i),f=2*xc(yc(bc(a-r)+o*A*bc(i-n))),p=gc(f),m=f?function(e){var t=gc(e*=f)/p,n=gc(f-e)/p,r=n*c+t*h,i=n*u+t*d,a=n*s+t*l;return[fc(i,r)*uc,fc(a,yc(r*r+i*i))*uc]}:function(){return[n*uc,r*uc]};return m.distance=f,m}function Nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zu(e){return(zu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fu(e,t){return(Fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uu(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 Hu(e){var t=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 n,r=zu(e);if(t){var i=zu(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Uu(this,n)}}function Gu(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||ju(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 ju(e,t){if(e){if("string"==typeof e)return Vu(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)?Vu(e,t):void 0}}function Vu(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 Wu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=null;return e.forEach((function(e){if(r){var i=180*Mu(e,r)/Math.PI;if(i>t)for(var a=ku(r,e),o=1/Math.ceil(i/t),s=o;s<1;)n.push(a(s)),s+=o}n.push(r=e)})),n},Qu="undefined"!=typeof window&&window.THREE?window.THREE:{BufferGeometry:ln,Float32BufferAttribute:$t},Yu=(new Qu.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Xu=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&&Fu(e,t)}(n,e);var t=Hu(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;Nu(this,n),(r=t.call(this)).type="GeoJsonGeometry",r.parameters={geoJson:e,radius:i,resolution:a};var o=({Point:c,MultiPoint:u,LineString:h,MultiLineString:d,Polygon:f,MultiPolygon:p}[e.type]||function(){return[]})(e.coordinates,i),s=[],A=[],l=0;function c(e,t){return[{vertices:Ku(e[1],e[0],t),indices:[]}]}function u(e,t){var n={vertices:[],indices:[]};return e.map((function(e){return c(e,t)})).forEach((function(e){var t=Gu(e,1)[0];Zu(n,t)})),[n]}function h(e,t){for(var n=Wu(e,a).map((function(e){var n=Gu(e,2),r=n[0];return Ku(n[1],r,t)})),r=Ql.flatten([n]).vertices,i=Math.round(r.length/3),o=[],s=1;s<i;s++)o.push(s-1,s);return[{vertices:r,indices:o}]}function d(e,t){var n={vertices:[],indices:[]};return e.map((function(e){return h(e,t)})).forEach((function(e){var t=Gu(e,1)[0];Zu(n,t)})),[n]}function f(e,t){for(var n=e.map((function(e){return Wu(e,a).map((function(e){var n=Gu(e,2),r=n[0];return Ku(n[1],r,t)}))})),r=Ql.flatten(n),i=r.vertices,o=r.holes,s=o[0]||1/0,A=i.slice(0,s),l=i.slice(s),c=new Set(o),u=Math.round(i.length/3),h=[],d=[],f=1;f<u;f++)c.has(f)||(f<s?h.push(f-1,f):d.push(f-1-s,f-s));var p=[{indices:h,vertices:A}];return o.length&&p.push({indices:d,vertices:l}),p}function p(e,t){var n={vertices:[],indices:[]},r={vertices:[],indices:[]};e.map((function(e){return f(e,t)})).forEach((function(e){var t=Gu(e,2),i=t[0],a=t[1];Zu(n,i),a&&Zu(r,a)}));var i=[n];return r.vertices.length&&i.push(r),i}return o.forEach((function(e){var t=s.length;Zu({indices:s,vertices:A},e),r.addGroup(t,s.length-t,l++)})),s.length&&r.setIndex(s),A.length&&r[Yu]("position",new Qu.Float32BufferAttribute(A,3)),r}return n}(Qu.BufferGeometry);function Zu(e,t){var n=Math.round(e.vertices.length/3);Ju(e.vertices,t.vertices),Ju(e.indices,t.indices.map((function(e){return e+n})))}function Ju(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ju(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.push(i)}}catch(e){r.e(e)}finally{r.f()}}function Ku(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180;return[n*Math.sin(r)*Math.cos(i),n*Math.cos(r),n*Math.sin(r)*Math.sin(i)]}function $u(e){let t,n,r,i=0;for(let a=0;a<e.length;++a){const o=e[a];if(o.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===t&&(t=o.array.constructor),t!==o.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=o.itemSize),n!==o.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=o.normalized),r!==o.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=o.array.length}const a=new t(i);let o=0;for(let t=0;t<e.length;++t)a.set(e[t].array,o),o+=e[t].array.length;return new Zt(a,n,r)}var eh=Object.freeze({__proto__:null,computeTangents:function(e){e.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},mergeBufferGeometries:function(e,t=!1){const n=null!==e[0].index,r=new Set(Object.keys(e[0].attributes)),i=new Set(Object.keys(e[0].morphAttributes)),a={},o={},s=e[0].morphTargetsRelative,A=new ln;let l=0;for(let c=0;c<e.length;++c){const u=e[c];let h=0;if(n!==(null!==u.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const e in u.attributes){if(!r.has(e))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+e+'" attribute exists among all geometries, or in none of them.'),null;void 0===a[e]&&(a[e]=[]),a[e].push(u.attributes[e]),h++}if(h!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==u.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const e in u.morphAttributes){if(!i.has(e))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;void 0===o[e]&&(o[e]=[]),o[e].push(u.morphAttributes[e])}if(A.userData.mergedUserData=A.userData.mergedUserData||[],A.userData.mergedUserData.push(u.userData),t){let e;if(n)e=u.index.count;else{if(void 0===u.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;e=u.attributes.position.count}A.addGroup(l,e,c),l+=e}}if(n){let t=0;const n=[];for(let r=0;r<e.length;++r){const i=e[r].index;for(let e=0;e<i.count;++e)n.push(i.getX(e)+t);t+=e[r].attributes.position.count}A.setIndex(n)}for(const e in a){const t=$u(a[e]);if(!t)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" attribute."),null;A.setAttribute(e,t)}for(const e in o){const t=o[e][0].length;if(0===t)break;A.morphAttributes=A.morphAttributes||{},A.morphAttributes[e]=[];for(let n=0;n<t;++n){const t=[];for(let r=0;r<o[e].length;++r)t.push(o[e][r][n]);const r=$u(t);if(!r)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+e+" morphAttribute."),null;A.morphAttributes[e].push(r)}}return A},mergeBufferAttributes:$u,interleaveAttributes:function(e){let t,n=0,r=0;for(let i=0,a=e.length;i<a;++i){const 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}const i=new Ba(new t(n),r);let a=0;const o=[],s=["getX","getY","getZ","getW"],A=["setX","setY","setZ","setW"];for(let t=0,n=e.length;t<n;t++){const n=e[t],r=n.itemSize,l=n.count,c=new ka(i,r,a,n.normalized);o.push(c),a+=r;for(let e=0;e<l;e++)for(let t=0;t<r;t++)c[A[t]](e,n[s[t]](e))}return o},estimateBytesUsed:function(e){let t=0;for(const n in e.attributes){const r=e.getAttribute(n);t+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}const n=e.getIndex();return t+=n?n.count*n.itemSize*n.array.BYTES_PER_ELEMENT:0,t},mergeVertices:function(e,t=1e-4){t=Math.max(t,Number.EPSILON);const n={},r=e.getIndex(),i=e.getAttribute("position"),a=r?r.count:i.count;let o=0;const s=Object.keys(e.attributes),A={},l={},c=[],u=["getX","getY","getZ","getW"];for(let t=0,n=s.length;t<n;t++){const n=s[t];A[n]=[];const r=e.morphAttributes[n];r&&(l[n]=new Array(r.length).fill().map((()=>[])))}const h=Math.log10(1/t),d=Math.pow(10,h);for(let t=0;t<a;t++){const i=r?r.getX(t):t;let a="";for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),o=r.itemSize;for(let e=0;e<o;e++)a+=~~(r[u[e]](i)*d)+","}if(a in n)c.push(n[a]);else{for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),a=e.morphAttributes[n],o=r.itemSize,c=A[n],h=l[n];for(let e=0;e<o;e++){const t=u[e];if(c.push(r[t](i)),a)for(let e=0,n=a.length;e<n;e++)h[e].push(a[e][t](i))}}n[a]=o,c.push(o),o++}}const f=e.clone();for(let t=0,n=s.length;t<n;t++){const n=s[t],r=e.getAttribute(n),i=new r.array.constructor(A[n]),a=new Zt(i,r.itemSize,r.normalized);if(f.setAttribute(n,a),n in l)for(let t=0;t<l[n].length;t++){const r=e.morphAttributes[n][t],i=new r.array.constructor(l[n][t]),a=new Zt(i,r.itemSize,r.normalized);f.morphAttributes[n][t]=a}}return f.setIndex(c),f},toTrianglesDrawMode:function(e,t){if(0===t)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(2===t||1===t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(2===t)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const a=e.clone();return a.setIndex(i),a.clearGroups(),a}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 BufferGeometry."),null;const t=new Me,n=new Me,r=new Me,i=new Me,a=new Me,o=new Me,s=new Me,A=new Me,l=new Me;function c(e,c,u,h,d,f,p,m,g){t.fromBufferAttribute(u,f),n.fromBufferAttribute(u,p),r.fromBufferAttribute(u,m);const v=e.morphTargetInfluences;if(c.morphTargets&&h&&v){s.set(0,0,0),A.set(0,0,0),l.set(0,0,0);for(let e=0,c=h.length;e<c;e++){const c=v[e],u=h[e];0!==c&&(i.fromBufferAttribute(u,f),a.fromBufferAttribute(u,p),o.fromBufferAttribute(u,m),d?(s.addScaledVector(i,c),A.addScaledVector(a,c),l.addScaledVector(o,c)):(s.addScaledVector(i.sub(t),c),A.addScaledVector(a.sub(n),c),l.addScaledVector(o.sub(r),c)))}t.add(s),n.add(A),r.add(l)}e.isSkinnedMesh&&(e.boneTransform(f,t),e.boneTransform(p,n),e.boneTransform(m,r)),g[3*f+0]=t.x,g[3*f+1]=t.y,g[3*f+2]=t.z,g[3*p+0]=n.x,g[3*p+1]=n.y,g[3*p+2]=n.z,g[3*m+0]=r.x,g[3*m+1]=r.y,g[3*m+2]=r.z}const u=e.geometry,h=e.material;let d,f,p;const m=u.index,g=u.attributes.position,v=u.morphAttributes.position,y=u.morphTargetsRelative,x=u.attributes.normal,b=u.morphAttributes.position,_=u.groups,w=u.drawRange;let M,S,E,T,C,L,P,R;const q=new Float32Array(g.count*g.itemSize),D=new Float32Array(x.count*x.itemSize);if(null!==m)if(Array.isArray(h))for(M=0,E=_.length;M<E;M++)for(C=_[M],L=h[C.materialIndex],P=Math.max(C.start,w.start),R=Math.min(C.start+C.count,w.start+w.count),S=P,T=R;S<T;S+=3)d=m.getX(S),f=m.getX(S+1),p=m.getX(S+2),c(e,L,g,v,y,d,f,p,q),c(e,L,x,b,y,d,f,p,D);else for(P=Math.max(0,w.start),R=Math.min(m.count,w.start+w.count),M=P,E=R;M<E;M+=3)d=m.getX(M),f=m.getX(M+1),p=m.getX(M+2),c(e,h,g,v,y,d,f,p,q),c(e,h,x,b,y,d,f,p,D);else if(void 0!==g)if(Array.isArray(h))for(M=0,E=_.length;M<E;M++)for(C=_[M],L=h[C.materialIndex],P=Math.max(C.start,w.start),R=Math.min(C.start+C.count,w.start+w.count),S=P,T=R;S<T;S+=3)d=S,f=S+1,p=S+2,c(e,L,g,v,y,d,f,p,q),c(e,L,x,b,y,d,f,p,D);else for(P=Math.max(0,w.start),R=Math.min(g.count,w.start+w.count),M=P,E=R;M<E;M+=3)d=M,f=M+1,p=M+2,c(e,h,g,v,y,d,f,p,q),c(e,h,x,b,y,d,f,p,D);return{positionAttribute:g,normalAttribute:x,morphedPositionAttribute:new $t(q,3),morphedNormalAttribute:new $t(D,3)}}}),th=function(e){return e instanceof Function?e:"string"==typeof e?function(t){return t[e]}:function(t){return e}},nh={exports:{}};!function(e){!function(t){var n=/^\s+/,r=/\s+$/,i=0,a=t.round,o=t.min,s=t.max,A=t.random;function l(e,A){if(A=A||{},(e=e||"")instanceof l)return e;if(!(this instanceof l))return new l(e,A);var c=function(e){var i={r:0,g:0,b:0},a=1,A=null,l=null,c=null,u=!1,h=!1;"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(r,"").toLowerCase();var t,i=!1;if(T[e])e=T[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=F.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=F.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=F.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=F.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=F.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=F.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=F.hex8.exec(e))return{r:q(t[1]),g:q(t[2]),b:q(t[3]),a:O(t[4]),format:i?"name":"hex8"};if(t=F.hex6.exec(e))return{r:q(t[1]),g:q(t[2]),b:q(t[3]),format:i?"name":"hex"};if(t=F.hex4.exec(e))return{r:q(t[1]+""+t[1]),g:q(t[2]+""+t[2]),b:q(t[3]+""+t[3]),a:O(t[4]+""+t[4]),format:i?"name":"hex8"};if(t=F.hex3.exec(e))return{r:q(t[1]+""+t[1]),g:q(t[2]+""+t[2]),b:q(t[3]+""+t[3]),format:i?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(d=e.r,f=e.g,p=e.b,i={r:255*P(d,255),g:255*P(f,255),b:255*P(p,255)},u=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(A=I(e.s),l=I(e.v),i=function(e,n,r){e=6*P(e,360),n=P(n,100),r=P(r,100);var i=t.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),A=r*(1-(1-a)*n),l=i%6;return{r:255*[r,s,o,o,A,r][l],g:255*[A,r,r,s,o,o][l],b:255*[o,o,A,r,r,s][l]}}(e.h,A,l),u=!0,h="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(A=I(e.s),c=I(e.l),i=function(e,t,n){var r,i,a;function o(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=P(e,360),t=P(t,100),n=P(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,A=2*n-s;r=o(A,s,e+1/3),i=o(A,s,e),a=o(A,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,A,c),u=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a));var d,f,p;return a=L(a),{ok:u,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=a(100*this._a)/100,this._format=A.format||c.format,this._gradientType=A.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=c.ok,this._tc_id=i++}function c(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,i,a=s(e,t,n),A=o(e,t,n),l=(a+A)/2;if(a==A)r=i=0;else{var c=a-A;switch(i=l>.5?c/(2-a-A):c/(a+A),a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,l:l}}function u(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,i,a=s(e,t,n),A=o(e,t,n),l=a,c=a-A;if(i=0===a?0:c/a,a==A)r=0;else{switch(a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,v:l}}function h(e,t,n,r){var i=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(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 d(e,t,n,r){return[D(B(r)),D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=R(n.s),l(n)}function p(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=R(n.s),l(n)}function m(e){return l(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=R(n.l),l(n)}function v(e,t){t=0===t?0:t||10;var n=l(e).toRgb();return n.r=s(0,o(255,n.r-a(-t/100*255))),n.g=s(0,o(255,n.g-a(-t/100*255))),n.b=s(0,o(255,n.b-a(-t/100*255))),l(n)}function y(e,t){t=0===t?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=R(n.l),l(n)}function x(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function b(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function _(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function w(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function M(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function S(e,t,n){t=t||6,n=n||30;var r=l(e).toHsl(),i=360/n,a=[l(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(l(r));return a}function E(e,t){t=t||6;for(var n=l(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(l({h:r,s:i,v:a})),a=(a+s)%1;return o}l.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,n,r,i=this.toRgb();return e=i.r/255,n=i.g/255,r=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=u(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return h(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=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16)),D(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:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*P(this._r,255))+"%",g:a(100*P(this._g,255))+"%",b:a(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%)":"rgba("+a(100*P(this._r,255))+"%, "+a(100*P(this._g,255))+"%, "+a(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=l(e);n="#"+d(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 l(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(g,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(p,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},l.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:I(e[r]));e=n}return l(e,t)},l.equals=function(e,t){return!(!e||!t)&&l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:A(),g:A(),b:A()})},l.mix=function(e,t,n){n=0===n?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),a=n/100;return l({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},
|
|
3
|
+
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
4
|
+
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
5
|
+
l.readability=function(e,n){var r=l(e),i=l(n);return(t.max(r.getLuminance(),i.getLuminance())+.05)/(t.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r,i,a=l.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=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},l.mostReadable=function(e,t,n){var r,i,a,o,s=null,A=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var c=0;c<t.length;c++)(r=l.readability(e,t[c]))>A&&(A=r,s=l(t[c]));return l.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,l.mostReadable(e,["#fff","#000"],n))};var T=l.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"},C=l.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(T);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(e,n){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=o(n,s(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),t.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function R(e){return o(1,s(0,e))}function q(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function B(e){return t.round(255*parseFloat(e)).toString(16)}function O(e){return q(e)/255}var k,N,z,F=(N="[\\s|\\(]+("+(k="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",z="[\\s|\\(]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",{CSS_UNIT:new RegExp(k),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+z),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 U(e){return!!F.CSS_UNIT.exec(e)}e.exports?e.exports=l:window.tinycolor=l}(Math)}(nh);var rh=nh.exports;function ih(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ah(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||sh(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 oh(e){return function(e){if(Array.isArray(e))return Ah(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sh(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 sh(e,t){if(e){if("string"==typeof e)return Ah(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)?Ah(e,t):void 0}}function Ah(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 lh(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)}var ch=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],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),a=e.reduce((function(e,t){var r=e,a=t;return i.forEach((function(e,t){var o,s=e.keyAccessor;if(e.isProp){var A=a,l=A[s],c=ih(A,[s].map(lh));o=l,a=c}else o=s(a,t);t+1<i.length?(r.hasOwnProperty(o)||(r[o]={}),r=r[o]):n?(r.hasOwnProperty(o)||(r[o]=[]),r[o].push(a)):r[o]=a})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(a);var o=a;return r&&(o=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===i.length?o.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=ah(t,2),i=r[0],a=r[1];return e(a,[].concat(oh(n),[i]))}))}(a),t instanceof Array&&0===t.length&&1===o.length&&(o[0].keys=[])),o};function uh(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 hh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dh(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fh(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||mh(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 ph(e){return function(e){if(Array.isArray(e))return gh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mh(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 mh(e,t){if(e){if("string"==typeof e)return gh(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)?gh(e,t):void 0}}function gh(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 vh(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,a=n.dataBindAttr,o=void 0===a?"__data":a,s=n.idAccessor,A=n.purge,l=void 0!==A&&A,c=function(e){return e.hasOwnProperty(o)},u=t.filter((function(e){return!c(e)})),h=t.filter(c).map((function(e){return e[o]})),d=l?{enter:e,exit:h,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=ch(e,n,!1),a=ch(t,n,!1),o=Object.assign({},i,a);Object.entries(o).forEach((function(e){var t=fh(e,2),n=t[0],o=t[1],s=i.hasOwnProperty(n)?a.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],a[n]]:o)}))}else{var s=new Set(e),A=new Set(t);new Set([].concat(ph(s),ph(A))).forEach((function(e){var t=s.has(e)?A.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(h,e,s);return d.update=d.update.map((function(e){var t=fh(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][o]=r),r})),d.exit=d.exit.concat(u.map((function(e){return hh({},i,e)}))),d}function yh(e,t,n,r,i){var a=i.createObj,o=void 0===a?function(e){return{}}:a,s=i.updateObj,A=void 0===s?function(e,t){}:s,l=i.exitObj,c=void 0===l?function(e){}:l,u=i.objBindAttr,h=void 0===u?"__obj":u,d=i.dataBindAttr,f=void 0===d?"__data":d,p=dh(i,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),m=vh(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uh(Object(n),!0).forEach((function(t){hh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:h,dataBindAttr:f},p)),g=m.enter,v=m.update;m.exit.forEach((function(e){var t=e[h];delete e[h],c(t),r(t)}));var y=function(e){var t=[];return e.forEach((function(e){var n=o(e);n&&(n[f]=e,e[h]=n,t.push(n))})),t}(g);!function(e){e.forEach((function(e){var t=e[h];t&&(t[f]=e,A(t,e))}))}([].concat(ph(g),ph(v))),y.forEach(n)}var xh={exports:{}};!function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r=n(1),i=function(){function e(e,t,n){void 0===e&&(e=NaN),void 0===t&&(t=NaN),void 0===n&&(n=!1),this._minFPS=t,this._maxFPS=e,this._timeScale=1,this._currentTick=0,this._currentTime=0,this._tickDeltaTime=0,this._isRunning=!1,this._maxInterval=isNaN(this._minFPS)?NaN:1e3/this._minFPS,this._minInterval=isNaN(this._maxFPS)?NaN:1e3/this._maxFPS,this._onResume=new r.default,this._onPause=new r.default,this._onTick=new r.default,this._onTickOncePerFrame=new r.default,n||this.resume()}return e.prototype.updateOnce=function(e){e(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},e.prototype.resume=function(){this._isRunning||(this._isRunning=!0,this._lastTimeUpdated=this.getTimer(),this._onResume.dispatch(),this.animateOnce())},e.prototype.pause=function(){this._isRunning&&(this._isRunning=!1,this._onPause.dispatch(),window.cancelAnimationFrame(this._animationFrameHandle))},e.prototype.dispose=function(){this.pause(),this._onResume.removeAll(),this._onPause.removeAll(),this._onTick.removeAll()},Object.defineProperty(e.prototype,"currentTick",{get:function(){return this._currentTick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTimeSeconds",{get:function(){return this._currentTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tickDeltaTimeSeconds",{get:function(){return this._tickDeltaTime/1e3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeScale",{get:function(){return this._timeScale},set:function(e){this._timeScale!==e&&(this._timeScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onResume",{get:function(){return this._onResume},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onPause",{get:function(){return this._onPause},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTick",{get:function(){return this._onTick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTickOncePerFrame",{get:function(){return this._onTickOncePerFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRunning",{get:function(){return this._isRunning},enumerable:!0,configurable:!0}),e.prototype.animateOnce=function(){var e=this;this._animationFrameHandle=window.requestAnimationFrame((function(){return e.onFrame()}))},e.prototype.onFrame=function(){if(this._now=this.getTimer(),this._frameDeltaTime=this._now-this._lastTimeUpdated,isNaN(this._minInterval)||this._frameDeltaTime>=this._minInterval)if(isNaN(this._maxInterval))this.update(this._frameDeltaTime*this._timeScale,!0),this._lastTimeUpdated=this._now;else for(this._interval=Math.min(this._frameDeltaTime,this._maxInterval);this._now>=this._lastTimeUpdated+this._interval;)this.update(this._interval*this._timeScale,this._now<=this._lastTimeUpdated+2*this._maxInterval),this._lastTimeUpdated+=this._interval;this._isRunning&&this.animateOnce()},e.prototype.update=function(e,t){void 0===t&&(t=!0),this._currentTick++,this._currentTime+=e,this._tickDeltaTime=e,this._onTick.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick),t&&this._onTickOncePerFrame.dispatch(this.currentTimeSeconds,this.tickDeltaTimeSeconds,this.currentTick)},e.prototype.getTimer=function(){return Date.now()},e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){!function(t,n){e.exports=n()}(0,(function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){var n=function(){function e(){this.functions=[]}return e.prototype.add=function(e){return-1===this.functions.indexOf(e)&&(this.functions.push(e),!0)},e.prototype.remove=function(e){var t=this.functions.indexOf(e);return t>-1&&(this.functions.splice(t,1),!0)},e.prototype.removeAll=function(){return this.functions.length>0&&(this.functions.length=0,!0)},e.prototype.dispatch=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.functions.concat().forEach((function(t){t.apply(void 0,e)}))},Object.defineProperty(e.prototype,"numItems",{get:function(){return this.functions.length},enumerable:!0,configurable:!0}),e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}])}))}])}(xh);var bh=A(xh.exports);function _h(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function wh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Mh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Sh(){}var Eh=.7,Th=1/Eh,Ch="\\s*([+-]?\\d+)\\s*",Lh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ph="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rh=/^#([0-9a-f]{3,8})$/,qh=new RegExp("^rgb\\("+[Ch,Ch,Ch]+"\\)$"),Dh=new RegExp("^rgb\\("+[Ph,Ph,Ph]+"\\)$"),Ih=new RegExp("^rgba\\("+[Ch,Ch,Ch,Lh]+"\\)$"),Bh=new RegExp("^rgba\\("+[Ph,Ph,Ph,Lh]+"\\)$"),Oh=new RegExp("^hsl\\("+[Lh,Ph,Ph]+"\\)$"),kh=new RegExp("^hsla\\("+[Lh,Ph,Ph,Lh]+"\\)$"),Nh={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 zh(){return this.rgb().formatHex()}function Fh(){return this.rgb().formatRgb()}function Uh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Rh.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Hh(t):3===n?new Wh(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Gh(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Gh(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=qh.exec(e))?new Wh(t[1],t[2],t[3],1):(t=Dh.exec(e))?new Wh(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ih.exec(e))?Gh(t[1],t[2],t[3],t[4]):(t=Bh.exec(e))?Gh(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Oh.exec(e))?Zh(t[1],t[2]/100,t[3]/100,1):(t=kh.exec(e))?Zh(t[1],t[2]/100,t[3]/100,t[4]):Nh.hasOwnProperty(e)?Hh(Nh[e]):"transparent"===e?new Wh(NaN,NaN,NaN,0):null}function Hh(e){return new Wh(e>>16&255,e>>8&255,255&e,1)}function Gh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Wh(e,t,n,r)}function jh(e){return e instanceof Sh||(e=Uh(e)),e?new Wh((e=e.rgb()).r,e.g,e.b,e.opacity):new Wh}function Vh(e,t,n,r){return 1===arguments.length?jh(e):new Wh(e,t,n,null==r?1:r)}function Wh(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Qh(){return"#"+Xh(this.r)+Xh(this.g)+Xh(this.b)}function Yh(){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 Xh(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kh(e,t,n,r)}function Jh(e){if(e instanceof Kh)return new Kh(e.h,e.s,e.l,e.opacity);if(e instanceof Sh||(e=Uh(e)),!e)return new Kh;if(e instanceof Kh)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,A=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=A<.5?a+i:2-a-i,o*=60):s=A>0&&A<1?0:o,new Kh(o,s,A,e.opacity)}function Kh(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function $h(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}wh(Sh,Uh,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:zh,formatHex:zh,formatHsl:function(){return Jh(this).formatHsl()},formatRgb:Fh,toString:Fh}),wh(Wh,Vh,Mh(Sh,{brighter:function(e){return e=null==e?Th:Math.pow(Th,e),new Wh(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Eh:Math.pow(Eh,e),new Wh(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:Qh,formatHex:Qh,formatRgb:Yh,toString:Yh})),wh(Kh,(function(e,t,n,r){return 1===arguments.length?Jh(e):new Kh(e,t,n,null==r?1:r)}),Mh(Sh,{brighter:function(e){return e=null==e?Th:Math.pow(Th,e),new Kh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Eh:Math.pow(Eh,e),new Kh(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 Wh($h(e>=240?e-240:e+120,i,r),$h(e,i,r),$h(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 ed=e=>()=>e;function td(e){return 1==(e=+e)?nd: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):ed(isNaN(t)?n:t)}}function nd(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ed(isNaN(e)?t:e)}var rd=function e(t){var n=td(t);function r(e,t){var r=n((e=Vh(e)).r,(t=Vh(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=nd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function id(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function ad(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function od(e,t){return(ad(t)?id:sd)(e,t)}function sd(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=fd(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}function Ad(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ld(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function cd(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=fd(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var ud=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hd=new RegExp(ud.source,"g");function dd(e,t){var n,r,i,a=ud.lastIndex=hd.lastIndex=0,o=-1,s=[],A=[];for(e+="",t+="";(n=ud.exec(e))&&(r=hd.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,A.push({i:o,x:ld(n,r)})),a=hd.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?A[0]?function(e){return function(t){return e(t)+""}}(A[0].x):function(e){return function(){return e}}(t):(t=A.length,function(e){for(var n,r=0;r<t;++r)s[(n=A[r]).i]=n.x(e);return s.join("")})}function fd(e,t){var n,r=typeof t;return null==t||"boolean"===r?ed(t):("number"===r?ld:"string"===r?(n=Uh(t))?(t=n,rd):dd:t instanceof Uh?rd:t instanceof Date?Ad:ad(t)?id:Array.isArray(t)?sd:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?cd:ld)(e,t)}function pd(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function md(e){return+e}var gd=[0,1];function vd(e){return e}function yd(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function xd(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=yd(i,r),a=n(o,a)):(r=yd(r,i),a=n(a,o)),function(e){return a(r(e))}}function bd(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=yd(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=Jl(e,t,1,r)-1;return a[n](i[n](t))}}function _d(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wd(){var e,t,n,r,i,a,o=gd,s=gd,A=fd,l=vd;function c(){var e=Math.min(o.length,s.length);return l!==vd&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?bd:xd,i=a=null,u}function u(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,A)))(e(l(t)))}return u.invert=function(n){return l(t((a||(a=r(s,o.map(e),ld)))(n)))},u.domain=function(e){return arguments.length?(o=Array.from(e,md),c()):o.slice()},u.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},u.rangeRound=function(e){return s=Array.from(e),A=pd,c()},u.clamp=function(e){return arguments.length?(l=!!e||vd,c()):l!==vd},u.interpolate=function(e){return arguments.length?(A=e,c()):A},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,c()}}function Md(){return wd()(vd,vd)}function Sd(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ed(e){return(e=Sd(Math.abs(e)))?e[1]:NaN}var Td,Cd=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ld(e){if(!(t=Cd.exec(e)))throw new Error("invalid format: "+e);var t;return new Pd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Pd(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Rd(e,t){var n=Sd(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ld.prototype=Pd.prototype,Pd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qd={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Rd(100*e,t),r:Rd,s:function(e,t){var n=Sd(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Td=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Sd(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Dd(e){return e}var Id,Bd,Od,kd=Array.prototype.map,Nd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zd(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Dd:(t=kd.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],A=0;i>0&&s>0&&(A+s+1>r&&(s=Math.max(1,r-A)),a.push(e.substring(i-=s,i+s)),!((A+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Dd:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(kd.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=Ld(e)).fill,n=e.align,u=e.sign,h=e.symbol,d=e.zero,f=e.width,p=e.comma,m=e.precision,g=e.trim,v=e.type;"n"===v?(p=!0,v="g"):qd[v]||(void 0===m&&(m=12),g=!0,v="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var y="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?a:/[%p]/.test(v)?A:"",b=qd[v],_=/[defgprs%]/.test(v);function w(e){var i,a,A,h=y,w=x;if("c"===v)w=b(e)+w,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),m),g&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0==+e&&"+"!==u&&(M=!1),h=(M?"("===u?u:l:"-"===u||"("===u?"":u)+h,w=("s"===v?Nd[8+Td/3]:"")+w+(M&&"("===u?")":""),_)for(i=-1,a=e.length;++i<a;)if(48>(A=e.charCodeAt(i))||A>57){w=(46===A?o+e.slice(i+1):e.slice(i))+w,e=e.slice(0,i);break}}p&&!d&&(e=r(e,1/0));var S=h.length+e.length+w.length,E=S<f?new Array(f-S+1).join(t):"";switch(p&&d&&(e=r(E+e,E.length?f-w.length:1/0),E=""),n){case"<":e=h+e+w+E;break;case"=":e=h+E+e+w;break;case"^":e=E.slice(0,S=E.length>>1)+h+e+w+E.slice(S);break;default:e=E+h+e+w}return s(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),w.toString=function(){return e+""},w}return{format:u,formatPrefix:function(e,t){var n=u(((e=Ld(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ed(t)/3))),i=Math.pow(10,-r),a=Nd[8+r/3];return function(e){return n(i*e)+a}}}}function Fd(e,t,n,r){var i,a=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=$l?i*=10:a>=ec?i*=5:a>=tc&&(i*=2),t<e?-i:i}(e,t,n);switch((r=Ld(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ed(t)/3)))-Ed(Math.abs(e)))}(a,o))||(r.precision=i),Od(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ed(t)-Ed(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Ed(Math.abs(e)))}(a))||(r.precision=i-2*("%"===r.type))}return Bd(r)}function Ud(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,a,o,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(o=nc(e,t,n))||!isFinite(o))return[];if(o>0){let n=Math.round(e/o),r=Math.round(t/o);for(n*o<e&&++n,r*o>t&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o}else{o=-o;let n=Math.round(e*o),r=Math.round(t*o);for(n/o<e&&++n,r/o>t&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o}return r&&a.reverse(),a}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Fd(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,a=t(),o=0,s=a.length-1,A=a[o],l=a[s],c=10;for(l<A&&(i=A,A=l,l=i,i=o,o=s,s=i);c-- >0;){if((i=nc(A,l,n))===r)return a[o]=A,a[s]=l,t(a);if(i>0)A=Math.floor(A/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;A=Math.ceil(A*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function Hd(){var e=Md();return e.copy=function(){return _d(e,Hd())},_h.apply(e,arguments),Ud(e)}Id=zd({thousands:",",grouping:[3],currency:["$",""]}),Bd=Id.format,Od=Id.formatPrefix;const Gd=134217729;function jd(e,t,n,r,i){let a,o,s,A,l=t[0],c=r[0],u=0,h=0;c>l==c>-l?(a=l,l=t[++u]):(a=c,c=r[++h]);let d=0;if(u<e&&h<n)for(c>l==c>-l?(o=l+a,s=a-(o-l),l=t[++u]):(o=c+a,s=a-(o-c),c=r[++h]),a=o,0!==s&&(i[d++]=s);u<e&&h<n;)c>l==c>-l?(o=a+l,A=o-a,s=a-(o-A)+(l-A),l=t[++u]):(o=a+c,A=o-a,s=a-(o-A)+(c-A),c=r[++h]),a=o,0!==s&&(i[d++]=s);for(;u<e;)o=a+l,A=o-a,s=a-(o-A)+(l-A),l=t[++u],a=o,0!==s&&(i[d++]=s);for(;h<n;)o=a+c,A=o-a,s=a-(o-A)+(c-A),c=r[++h],a=o,0!==s&&(i[d++]=s);return 0===a&&0!==d||(i[d++]=a),d}function Vd(e){return new Float64Array(e)}const Wd=Vd(4),Qd=Vd(8),Yd=Vd(12),Xd=Vd(16),Zd=Vd(4);function Jd(e,t,n,r,i,a){const o=(t-a)*(n-i),s=(e-i)*(r-a),A=o-s;if(0===o||0===s||o>0!=s>0)return A;const l=Math.abs(o+s);return Math.abs(A)>=33306690738754716e-32*l?A:-function(e,t,n,r,i,a,o){let s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,M;const S=e-i,E=n-i,T=t-a,C=r-a;x=S*C,h=Gd*S,d=h-(h-S),f=S-d,h=Gd*C,p=h-(h-C),m=C-p,b=f*m-(x-d*p-f*p-d*m),_=T*E,h=Gd*T,d=h-(h-T),f=T-d,h=Gd*E,p=h-(h-E),m=E-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,Wd[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,Wd[1]=y-(g+u)+(u-_),M=v+g,u=M-v,Wd[2]=v-(M-u)+(g-u),Wd[3]=M;let L=function(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}(4,Wd),P=22204460492503146e-32*o;if(L>=P||-L>=P)return L;if(u=e-S,s=e-(S+u)+(u-i),u=n-E,l=n-(E+u)+(u-i),u=t-T,A=t-(T+u)+(u-a),u=r-C,c=r-(C+u)+(u-a),0===s&&0===A&&0===l&&0===c)return L;if(P=11093356479670487e-47*o+33306690738754706e-32*Math.abs(L),L+=S*c+C*s-(T*l+E*A),L>=P||-L>=P)return L;x=s*C,h=Gd*s,d=h-(h-s),f=s-d,h=Gd*C,p=h-(h-C),m=C-p,b=f*m-(x-d*p-f*p-d*m),_=A*E,h=Gd*A,d=h-(h-A),f=A-d,h=Gd*E,p=h-(h-E),m=E-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,Zd[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,Zd[1]=y-(g+u)+(u-_),M=v+g,u=M-v,Zd[2]=v-(M-u)+(g-u),Zd[3]=M;const R=jd(4,Wd,4,Zd,Qd);x=S*c,h=Gd*S,d=h-(h-S),f=S-d,h=Gd*c,p=h-(h-c),m=c-p,b=f*m-(x-d*p-f*p-d*m),_=T*l,h=Gd*T,d=h-(h-T),f=T-d,h=Gd*l,p=h-(h-l),m=l-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,Zd[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,Zd[1]=y-(g+u)+(u-_),M=v+g,u=M-v,Zd[2]=v-(M-u)+(g-u),Zd[3]=M;const q=jd(R,Qd,4,Zd,Yd);x=s*c,h=Gd*s,d=h-(h-s),f=s-d,h=Gd*c,p=h-(h-c),m=c-p,b=f*m-(x-d*p-f*p-d*m),_=A*l,h=Gd*A,d=h-(h-A),f=A-d,h=Gd*l,p=h-(h-l),m=l-p,w=f*m-(_-d*p-f*p-d*m),g=b-w,u=b-g,Zd[0]=b-(g+u)+(u-w),v=x+g,u=v-x,y=x-(v-u)+(g-u),g=y-_,u=y-g,Zd[1]=y-(g+u)+(u-_),M=v+g,u=M-v,Zd[2]=v-(M-u)+(g-u),Zd[3]=M;const D=jd(q,Yd,4,Zd,Xd);return Xd[D-1]}(e,t,n,r,i,a,l)}const Kd=Math.pow(2,-52),$d=new Uint32Array(512);class ef{static from(e,t=sf,n=Af){const r=e.length,i=new Float64Array(2*r);for(let a=0;a<r;a++){const r=e[a];i[2*a]=t(r),i[2*a+1]=n(r)}return new ef(i)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=e.length>>1;let o=1/0,s=1/0,A=-1/0,l=-1/0;for(let t=0;t<a;t++){const n=e[2*t],r=e[2*t+1];n<o&&(o=n),r<s&&(s=r),n>A&&(A=n),r>l&&(l=r),this._ids[t]=t}const c=(o+A)/2,u=(s+l)/2;let h,d,f,p=1/0;for(let t=0;t<a;t++){const n=tf(c,u,e[2*t],e[2*t+1]);n<p&&(h=t,p=n)}const m=e[2*h],g=e[2*h+1];p=1/0;for(let t=0;t<a;t++){if(t===h)continue;const n=tf(m,g,e[2*t],e[2*t+1]);n<p&&n>0&&(d=t,p=n)}let v=e[2*d],y=e[2*d+1],x=1/0;for(let t=0;t<a;t++){if(t===h||t===d)continue;const n=rf(m,g,v,y,e[2*t],e[2*t+1]);n<x&&(f=t,x=n)}let b=e[2*f],_=e[2*f+1];if(x===1/0){for(let t=0;t<a;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];af(this._ids,this._dists,0,a-1);const t=new Uint32Array(a);let n=0;for(let e=0,r=-1/0;e<a;e++){const i=this._ids[e];this._dists[i]>r&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Jd(m,g,v,y,b,_)<0){const e=d,t=v,n=y;d=f,v=b,y=_,f=e,b=t,_=n}const w=function(e,t,n,r,i,a){const o=n-e,s=r-t,A=i-e,l=a-t,c=o*o+s*s,u=A*A+l*l,h=.5/(o*l-s*A);return{x:e+(l*c-s*u)*h,y:t+(o*u-A*c)*h}}(m,g,v,y,b,_);this._cx=w.x,this._cy=w.y;for(let t=0;t<a;t++)this._dists[t]=tf(e[2*t],e[2*t+1],w.x,w.y);af(this._ids,this._dists,0,a-1),this._hullStart=h;let M=3;n[h]=t[f]=d,n[d]=t[h]=f,n[f]=t[d]=h,r[h]=0,r[d]=1,r[f]=2,i.fill(-1),i[this._hashKey(m,g)]=h,i[this._hashKey(v,y)]=d,i[this._hashKey(b,_)]=f,this.trianglesLen=0,this._addTriangle(h,d,f,-1,-1,-1);for(let a,o,s=0;s<this._ids.length;s++){const A=this._ids[s],l=e[2*A],c=e[2*A+1];if(s>0&&Math.abs(l-a)<=Kd&&Math.abs(c-o)<=Kd)continue;if(a=l,o=c,A===h||A===d||A===f)continue;let u=0;for(let e=0,t=this._hashKey(l,c);e<this._hashSize&&(u=i[(t+e)%this._hashSize],-1===u||u===n[u]);e++);u=t[u];let p,m=u;for(;p=n[m],Jd(l,c,e[2*m],e[2*m+1],e[2*p],e[2*p+1])>=0;)if(m=p,m===u){m=-1;break}if(-1===m)continue;let g=this._addTriangle(m,A,n[m],-1,-1,r[m]);r[A]=this._legalize(g+2),r[m]=g,M++;let v=n[m];for(;p=n[v],Jd(l,c,e[2*v],e[2*v+1],e[2*p],e[2*p+1])<0;)g=this._addTriangle(v,A,p,r[A],-1,r[v]),r[A]=this._legalize(g+2),n[v]=v,M--,v=p;if(m===u)for(;p=t[m],Jd(l,c,e[2*p],e[2*p+1],e[2*m],e[2*m+1])<0;)g=this._addTriangle(p,A,m,-1,r[m],r[p]),this._legalize(g+2),r[p]=g,n[m]=m,M--,m=p;this._hullStart=t[A]=m,n[m]=t[v]=A,n[A]=v,i[this._hashKey(l,c)]=A,i[this._hashKey(e[2*m],e[2*m+1])]=m}this.hull=new Uint32Array(M);for(let e=0,t=this._hullStart;e<M;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[e],s=e-e%3;if(a=s+(e+2)%3,-1===o){if(0===i)break;e=$d[--i];continue}const A=o-o%3,l=s+(e+1)%3,c=A+(o+2)%3,u=t[a],h=t[e],d=t[l],f=t[c];if(nf(r[2*u],r[2*u+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1])){t[e]=f,t[o]=u;const r=n[c];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===c){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(o,n[a]),this._link(a,c);const s=A+(o+1)%3;i<$d.length&&($d[i++]=s)}else{if(0===i)break;e=$d[--i]}}return a}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,a){const o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}function tf(e,t,n,r){const i=e-n,a=t-r;return i*i+a*a}function nf(e,t,n,r,i,a,o,s){const A=e-o,l=t-s,c=n-o,u=r-s,h=i-o,d=a-s,f=c*c+u*u,p=h*h+d*d;return A*(u*p-f*d)-l*(c*p-f*h)+(A*A+l*l)*(c*d-u*h)<0}function rf(e,t,n,r,i,a){const o=n-e,s=r-t,A=i-e,l=a-t,c=o*o+s*s,u=A*A+l*l,h=.5/(o*l-s*A),d=(l*c-s*u)*h,f=(o*u-A*c)*h;return d*d+f*f}function af(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=e[i],a=t[r];let o=i-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+1,a=r;of(e,n+r>>1,i),t[e[n]]>t[e[r]]&&of(e,n,r),t[e[i]]>t[e[r]]&&of(e,i,r),t[e[n]]>t[e[i]]&&of(e,n,i);const o=e[i],s=t[o];for(;;){do{i++}while(t[e[i]]<s);do{a--}while(t[e[a]]>s);if(a<i)break;of(e,i,a)}e[n+1]=e[a],e[a]=o,r-i+1>=a-n?(af(e,t,i,r),af(e,t,n,a-1)):(af(e,t,n,a-1),af(e,t,i,r))}}function of(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function sf(e){return e[0]}function Af(e){return e[1]}function lf(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r,i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),a="Feature"===(r=t).type?r.geometry:r,o=a.type,s=t.bbox,A=a.coordinates;if(s&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(i,s))return!1;"Polygon"===o&&(A=[A]);for(var l=!1,c=0;c<A.length&&!l;c++)if(cf(i,A[c][0],n.ignoreBoundary)){for(var u=!1,h=1;h<A[c].length&&!u;)cf(i,A[c][h],!n.ignoreBoundary)&&(u=!0),h++;u||(l=!0)}return l}function cf(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var o=t[i][0],s=t[i][1],A=t[a][0],l=t[a][1];if(e[1]*(o-A)+s*(A-e[0])+l*(e[0]-o)==0&&(o-e[0])*(A-e[0])<=0&&(s-e[1])*(l-e[1])<=0)return!n;s>e[1]!=l>e[1]&&e[0]<(A-o)*(e[1]-s)/(l-s)+o&&(r=!r)}return r}const uf=Math.pow(2,-52),hf=new Uint32Array(512);class df{static from(e,t=bf,n=_f){const r=e.length,i=new Float64Array(2*r);for(let a=0;a<r;a++){const r=e[a];i[2*a]=t(r),i[2*a+1]=n(r)}return new df(i)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=e.length>>1;let o=1/0,s=1/0,A=-1/0,l=-1/0;for(let t=0;t<a;t++){const n=e[2*t],r=e[2*t+1];n<o&&(o=n),r<s&&(s=r),n>A&&(A=n),r>l&&(l=r),this._ids[t]=t}const c=(o+A)/2,u=(s+l)/2;let h,d,f,p=1/0;for(let t=0;t<a;t++){const n=ff(c,u,e[2*t],e[2*t+1]);n<p&&(h=t,p=n)}const m=e[2*h],g=e[2*h+1];p=1/0;for(let t=0;t<a;t++){if(t===h)continue;const n=ff(m,g,e[2*t],e[2*t+1]);n<p&&n>0&&(d=t,p=n)}let v=e[2*d],y=e[2*d+1],x=1/0;for(let t=0;t<a;t++){if(t===h||t===d)continue;const n=vf(m,g,v,y,e[2*t],e[2*t+1]);n<x&&(f=t,x=n)}let b=e[2*f],_=e[2*f+1];if(x===1/0){for(let t=0;t<a;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];yf(this._ids,this._dists,0,a-1);const t=new Uint32Array(a);let n=0;for(let e=0,r=-1/0;e<a;e++){const i=this._ids[e];this._dists[i]>r&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(mf(m,g,v,y,b,_)){const e=d,t=v,n=y;d=f,v=b,y=_,f=e,b=t,_=n}const w=function(e,t,n,r,i,a){const o=n-e,s=r-t,A=i-e,l=a-t,c=o*o+s*s,u=A*A+l*l,h=.5/(o*l-s*A);return{x:e+(l*c-s*u)*h,y:t+(o*u-A*c)*h}}(m,g,v,y,b,_);this._cx=w.x,this._cy=w.y;for(let t=0;t<a;t++)this._dists[t]=ff(e[2*t],e[2*t+1],w.x,w.y);yf(this._ids,this._dists,0,a-1),this._hullStart=h;let M=3;n[h]=t[f]=d,n[d]=t[h]=f,n[f]=t[d]=h,r[h]=0,r[d]=1,r[f]=2,i.fill(-1),i[this._hashKey(m,g)]=h,i[this._hashKey(v,y)]=d,i[this._hashKey(b,_)]=f,this.trianglesLen=0,this._addTriangle(h,d,f,-1,-1,-1);for(let a,o,s=0;s<this._ids.length;s++){const A=this._ids[s],l=e[2*A],c=e[2*A+1];if(s>0&&Math.abs(l-a)<=uf&&Math.abs(c-o)<=uf)continue;if(a=l,o=c,A===h||A===d||A===f)continue;let u=0;for(let e=0,t=this._hashKey(l,c);e<this._hashSize&&(u=i[(t+e)%this._hashSize],-1===u||u===n[u]);e++);u=t[u];let p,m=u;for(;p=n[m],!mf(l,c,e[2*m],e[2*m+1],e[2*p],e[2*p+1]);)if(m=p,m===u){m=-1;break}if(-1===m)continue;let g=this._addTriangle(m,A,n[m],-1,-1,r[m]);r[A]=this._legalize(g+2),r[m]=g,M++;let v=n[m];for(;p=n[v],mf(l,c,e[2*v],e[2*v+1],e[2*p],e[2*p+1]);)g=this._addTriangle(v,A,p,r[A],-1,r[v]),r[A]=this._legalize(g+2),n[v]=v,M--,v=p;if(m===u)for(;p=t[m],mf(l,c,e[2*p],e[2*p+1],e[2*m],e[2*m+1]);)g=this._addTriangle(p,A,m,-1,r[m],r[p]),this._legalize(g+2),r[p]=g,n[m]=m,M--,m=p;this._hullStart=t[A]=m,n[m]=t[v]=A,n[A]=v,i[this._hashKey(l,c)]=A,i[this._hashKey(e[2*m],e[2*m+1])]=m}this.hull=new Uint32Array(M);for(let e=0,t=this._hullStart;e<M;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,a=0;for(;;){const o=n[e],s=e-e%3;if(a=s+(e+2)%3,-1===o){if(0===i)break;e=hf[--i];continue}const A=o-o%3,l=s+(e+1)%3,c=A+(o+2)%3,u=t[a],h=t[e],d=t[l],f=t[c];if(gf(r[2*u],r[2*u+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*f],r[2*f+1])){t[e]=f,t[o]=u;const r=n[c];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===c){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(o,n[a]),this._link(a,c);const s=A+(o+1)%3;i<hf.length&&(hf[i++]=s)}else{if(0===i)break;e=hf[--i]}}return a}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,a){const o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}function ff(e,t,n,r){const i=e-n,a=t-r;return i*i+a*a}function pf(e,t,n,r,i,a){const o=(r-t)*(i-e),s=(n-e)*(a-t);return Math.abs(o-s)>=33306690738754716e-32*Math.abs(o+s)?o-s:0}function mf(e,t,n,r,i,a){return(pf(i,a,e,t,n,r)||pf(e,t,n,r,i,a)||pf(n,r,i,a,e,t))<0}function gf(e,t,n,r,i,a,o,s){const A=e-o,l=t-s,c=n-o,u=r-s,h=i-o,d=a-s,f=c*c+u*u,p=h*h+d*d;return A*(u*p-f*d)-l*(c*p-f*h)+(A*A+l*l)*(c*d-u*h)<0}function vf(e,t,n,r,i,a){const o=n-e,s=r-t,A=i-e,l=a-t,c=o*o+s*s,u=A*A+l*l,h=.5/(o*l-s*A),d=(l*c-s*u)*h,f=(o*u-A*c)*h;return d*d+f*f}function yf(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=e[i],a=t[r];let o=i-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+1,a=r;xf(e,n+r>>1,i),t[e[n]]>t[e[r]]&&xf(e,n,r),t[e[i]]>t[e[r]]&&xf(e,i,r),t[e[n]]>t[e[i]]&&xf(e,n,i);const o=e[i],s=t[o];for(;;){do{i++}while(t[e[i]]<s);do{a--}while(t[e[a]]>s);if(a<i)break;xf(e,i,a)}e[n+1]=e[a],e[a]=o,r-i+1>=a-n?(yf(e,t,i,r),yf(e,t,n,a-1)):(yf(e,t,n,a-1),yf(e,t,i,r))}}function xf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function bf(e){return e[0]}function _f(e){return e[1]}const wf=1e-6;class Mf{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>wf||Math.abs(this._y1-i)>wf)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Sf{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Ef{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let t,r,a=0,o=0,s=n.length;a<s;a+=3,o+=2){const s=2*n[a],A=2*n[a+1],l=2*n[a+2],c=e[s],u=e[s+1],h=e[A],d=e[A+1],f=e[l],p=e[l+1],m=h-c,g=d-u,v=f-c,y=p-u,x=m*m+g*g,b=v*v+y*y,_=2*(m*y-g*v);if(_)if(Math.abs(_)<1e-8)t=(c+f)/2,r=(u+p)/2;else{const e=1/_;t=c+(y*x-g*b)*e,r=u+(m*b-v*x)*e}else t=(c+f)/2-1e8*y,r=(u+p)/2+1e8*v;i[o]=t,i[o+1]=r}let a,o,s,A=t[t.length-1],l=4*A,c=e[2*A],u=e[2*A+1];r.fill(0);for(let n=0;n<t.length;++n)A=t[n],a=l,o=c,s=u,l=4*A,c=e[2*A],u=e[2*A+1],r[a+2]=r[l]=s-u,r[a+3]=r[l+1]=c-o}render(e){const t=null==e?e=new Mf:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){const r=n[t];if(r<t)continue;const i=2*Math.floor(t/3),o=2*Math.floor(r/3),s=a[i],A=a[i+1],l=a[o],c=a[o+1];this._renderSegment(s,A,l,c,e)}let s,A=i[i.length-1];for(let t=0;t<i.length;++t){s=A,A=i[t];const n=2*Math.floor(r[A]/3),l=a[n],c=a[n+1],u=4*s,h=this._project(l,c,o[u+2],o[u+3]);h&&this._renderSegment(l,c,h[0],h[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new Mf:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new Mf:void 0,r=this._clip(e);if(null===r||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)r[e]===r[e-2]&&r[e+1]===r[e-1]||t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new Sf;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let a;const o=this._regioncode(e,t),s=this._regioncode(n,r);0===o&&0===s?(i.moveTo(e,t),i.lineTo(n,r)):(a=this._clipSegment(e,t,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let r=0,i=t.length;r<i;r+=2)for(let a=0,o=e.length;a<o;a+=2)if(t[r]==e[a]&&t[r+1]==e[a+1]&&t[(r+2)%i]==e[(a+o-2)%o]&&t[(r+3)%i]==e[(a+o-1)%o]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[e];if(-1===a)return null;const o=[];let s=a;do{const n=Math.floor(s/3);if(o.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==a&&-1!==s);return o}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,r=4*e;return n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t)}_clipFinite(e,t){const n=t.length;let r,i,a,o,s,A=null,l=t[n-2],c=t[n-1],u=this._regioncode(l,c);for(let h=0;h<n;h+=2)if(r=l,i=c,l=t[h],c=t[h+1],a=u,u=this._regioncode(l,c),0===a&&0===u)o=s,s=0,A?A.push(l,c):A=[l,c];else{let t,n,h,d,f;if(0===a){if(null===(t=this._clipSegment(r,i,l,c,a,u)))continue;[n,h,d,f]=t}else{if(null===(t=this._clipSegment(l,c,r,i,u,a)))continue;[d,f,n,h]=t,o=s,s=this._edgecode(n,h),o&&s&&this._edge(e,o,s,A,A.length),A?A.push(n,h):A=[n,h]}o=s,s=this._edgecode(d,f),o&&s&&this._edge(e,o,s,A,A.length),A?A.push(d,f):A=[d,f]}if(A)o=s,s=this._edgecode(A[0],A[1]),o&&s&&this._edge(e,o,s,A,A.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return A}_clipSegment(e,t,n,r,i,a){for(;;){if(0===i&&0===a)return[e,t,n,r];if(i&a)return null;let o,s,A=i||a;8&A?(o=e+(n-e)*(this.ymax-t)/(r-t),s=this.ymax):4&A?(o=e+(n-e)*(this.ymin-t)/(r-t),s=this.ymin):2&A?(s=t+(r-t)*(this.xmax-e)/(n-e),o=this.xmax):(s=t+(r-t)*(this.xmin-e)/(n-e),o=this.xmin),i?(e=o,t=s,i=this._regioncode(e,t)):(n=o,r=s,a=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,a){let o,s=Array.from(t);if((o=this._project(s[0],s[1],n,r))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],i,a))&&s.push(o[0],o[1]),s=this._clipFinite(e,s))for(let t,n=0,r=s.length,i=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)t=i,i=this._edgecode(s[n],s[n+1]),t&&i&&(n=this._edge(e,t,i,s,n),r=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,r,i){for(;t!==n;){let n,a;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,a=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,a=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,a=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,a=this.ymin}r[i]===n&&r[i+1]===a||!this.contains(e,n,a)||(r.splice(i,0,n,a),i+=2)}if(r.length>4)for(let e=0;e<r.length;e+=2){const t=(e+2)%r.length,n=(e+4)%r.length;(r[e]===r[t]&&r[t]===r[n]||r[e+1]===r[t+1]&&r[t+1]===r[n+1])&&(r.splice(t,2),e-=2)}return i}_project(e,t,n,r){let i,a,o,s=1/0;if(r<0){if(t<=this.ymin)return null;(i=(this.ymin-t)/r)<s&&(o=this.ymin,a=e+(s=i)*n)}else if(r>0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)<s&&(o=this.ymax,a=e+(s=i)*n)}if(n>0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)<s&&(a=this.xmax,o=t+(s=i)*r)}else if(n<0){if(e<=this.xmin)return null;(i=(this.xmin-e)/n)<s&&(a=this.xmin,o=t+(s=i)*r)}return[a,o]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}}const Tf=2*Math.PI,Cf=Math.pow;function Lf(e){return e[0]}function Pf(e){return e[1]}function Rf(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class qf{static from(e,t=Lf,n=Pf,r){return new qf("length"in e?function(e,t,n,r){const i=e.length,a=new Float64Array(2*i);for(let o=0;o<i;++o){const i=e[o];a[2*o]=t.call(r,i,o,e),a[2*o+1]=n.call(r,i,o,e)}return a}(e,t,n,r):Float64Array.from(function*(e,t,n,r){let i=0;for(const a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}(e,t,n,r)))}constructor(e){this._delaunator=new df(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const r=2*t[e],i=2*t[e+1],a=2*t[e+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){const n=Rf(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new df(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=i[e%3==2?e-2:e+1];-1!==n[e]&&-1!==a[t]||(a[t]=e)}for(let e=0,t=r.length;e<t;++e)o[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],this.triangles[1]=r[1],this.triangles[2]=r[1],a[r[0]]=1,2===r.length&&(a[r[1]]=0))}voronoi(e){return new Ef(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){const t=o.indexOf(e);return t>0&&(yield o[t-1]),void(t<o.length-1&&(yield o[t+1]))}const s=t[e];if(-1===s)return;let A=s,l=-1;do{if(yield l=a[A],A=A%3==2?A-2:A+1,a[A]!==e)return;if(A=i[A],-1===A){const t=n[(r[e]+1)%n.length];return void(t!==l&&(yield t))}}while(A!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const r=n;let i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:A}=this;if(-1===r[e]||!A.length)return(e+1)%(A.length>>1);let l=e,c=Cf(t-A[2*e],2)+Cf(n-A[2*e+1],2);const u=r[e];let h=u;do{let r=s[h];const u=Cf(t-A[2*r],2)+Cf(n-A[2*r+1],2);if(u<c&&(c=u,l=r),h=h%3==2?h-2:h+1,s[h]!==e)break;if(h=o[h],-1===h){if(h=i[(a[e]+1)%i.length],h!==r&&Cf(t-A[2*h],2)+Cf(n-A[2*h+1],2)<c)return h;break}}while(h!==u);return l}render(e){const t=null==e?e=new Mf:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,a=r.length;t<a;++t){const a=r[t];if(a<t)continue;const o=2*i[t],s=2*i[a];e.moveTo(n[o],n[o+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t=2){const n=null==e?e=new Mf:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){const i=r[n],a=r[n+1];e.moveTo(i+t,a),e.arc(i,a,t,0,Tf)}return n&&n.value()}renderHull(e){const t=null==e?e=new Mf:void 0,{hull:n,points:r}=this,i=2*n[0],a=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<a;++t){const i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new Sf;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new Mf:void 0,{points:r,triangles:i}=this,a=2*i[e*=3],o=2*i[e+1],s=2*i[e+2];return t.moveTo(r[a],r[a+1]),t.lineTo(r[o],r[o+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new Sf;return this.renderTriangle(e,t),t.value()}}function Df(){return new If}function If(){this.reset()}If.prototype={constructor:If,reset:function(){this.s=this.t=0},add:function(e){Of(Bf,e,this.t),Of(this,Bf.s,this.s),this.s?this.t+=Bf.t:this.s=Bf.t},valueOf:function(){return this.s}};var Bf=new If;function Of(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}var kf=1e-6,Nf=Math.PI,zf=Nf/2,Ff=Nf/4,Uf=2*Nf,Hf=180/Nf,Gf=Nf/180,jf=Math.abs,Vf=Math.atan,Wf=Math.atan2,Qf=Math.cos,Yf=Math.sin,Xf=Math.sign||function(e){return e>0?1:e<0?-1:0},Zf=Math.sqrt;function Jf(e){return e>1?zf:e<-1?-zf:Math.asin(e)}function Kf(){}function $f(e,t){e&&gp.hasOwnProperty(e.type)&&gp[e.type](e,t)}var ep,tp,np,rp,ip,ap,op,sp,Ap,lp,cp,up,hp,dp,fp,pp,mp={Feature:function(e,t){$f(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)$f(n[r].geometry,t)}},gp={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){vp(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)vp(n[r],t,0)},Polygon:function(e,t){yp(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)yp(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)$f(n[r],t)}};function vp(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function yp(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)vp(e[n],t,1);t.polygonEnd()}function xp(e,t){e&&mp.hasOwnProperty(e.type)?mp[e.type](e,t):$f(e,t)}function bp(e){return[Wf(e[1],e[0]),Jf(e[2])]}function _p(e){var t=e[0],n=e[1],r=Qf(n);return[r*Qf(t),r*Yf(t),Yf(n)]}function wp(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Mp(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Sp(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Ep(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Tp(e){var t=Zf(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Cp={sphere:Kf,point:Lp,lineStart:Rp,lineEnd:Ip,polygonStart:function(){Cp.lineStart=Bp,Cp.lineEnd=Op},polygonEnd:function(){Cp.lineStart=Rp,Cp.lineEnd=Ip}};function Lp(e,t){e*=Gf;var n=Qf(t*=Gf);Pp(n*Qf(e),n*Yf(e),Yf(t))}function Pp(e,t,n){++ep,np+=(e-np)/ep,rp+=(t-rp)/ep,ip+=(n-ip)/ep}function Rp(){Cp.point=qp}function qp(e,t){e*=Gf;var n=Qf(t*=Gf);dp=n*Qf(e),fp=n*Yf(e),pp=Yf(t),Cp.point=Dp,Pp(dp,fp,pp)}function Dp(e,t){e*=Gf;var n=Qf(t*=Gf),r=n*Qf(e),i=n*Yf(e),a=Yf(t),o=Wf(Zf((o=fp*a-pp*i)*o+(o=pp*r-dp*a)*o+(o=dp*i-fp*r)*o),dp*r+fp*i+pp*a);tp+=o,ap+=o*(dp+(dp=r)),op+=o*(fp+(fp=i)),sp+=o*(pp+(pp=a)),Pp(dp,fp,pp)}function Ip(){Cp.point=Lp}function Bp(){Cp.point=kp}function Op(){Np(up,hp),Cp.point=Lp}function kp(e,t){up=e,hp=t,e*=Gf,t*=Gf,Cp.point=Np;var n=Qf(t);dp=n*Qf(e),fp=n*Yf(e),pp=Yf(t),Pp(dp,fp,pp)}function Np(e,t){e*=Gf;var n=Qf(t*=Gf),r=n*Qf(e),i=n*Yf(e),a=Yf(t),o=fp*a-pp*i,s=pp*r-dp*a,A=dp*i-fp*r,l=Zf(o*o+s*s+A*A),c=Jf(l),u=l&&-c/l;Ap+=u*o,lp+=u*s,cp+=u*A,tp+=c,ap+=c*(dp+(dp=r)),op+=c*(fp+(fp=i)),sp+=c*(pp+(pp=a)),Pp(dp,fp,pp)}function zp(e){ep=tp=np=rp=ip=ap=op=sp=Ap=lp=cp=0,xp(e,Cp);var t=Ap,n=lp,r=cp,i=t*t+n*n+r*r;return i<1e-12&&(t=ap,n=op,r=sp,tp<kf&&(t=np,n=rp,r=ip),(i=t*t+n*n+r*r)<1e-12)?[NaN,NaN]:[Wf(n,t)*Hf,Jf(r/Zf(i))*Hf]}function Fp(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Up(e,t){return[jf(e)>Nf?e+Math.round(-e/Uf)*Uf:e,t]}function Hp(e,t,n){return(e%=Uf)?t||n?Fp(jp(e),Vp(t,n)):jp(e):t||n?Vp(t,n):Up}function Gp(e){return function(t,n){return[(t+=e)>Nf?t-Uf:t<-Nf?t+Uf:t,n]}}function jp(e){var t=Gp(e);return t.invert=Gp(-e),t}function Vp(e,t){var n=Qf(e),r=Yf(e),i=Qf(t),a=Yf(t);function o(e,t){var o=Qf(t),s=Qf(e)*o,A=Yf(e)*o,l=Yf(t),c=l*n+s*r;return[Wf(A*i-c*a,s*n-l*r),Jf(c*i+A*a)]}return o.invert=function(e,t){var o=Qf(t),s=Qf(e)*o,A=Yf(e)*o,l=Yf(t),c=l*i-A*a;return[Wf(A*i+l*a,s*n+c*r),Jf(c*n-s*r)]},o}function Wp(e,t){(t=_p(t))[0]-=e,Tp(t);var n,r=(n=-t[1])>1?0:n<-1?Nf:Math.acos(n);return((-t[2]<0?-r:r)+Uf-kf)%Uf}function Qp(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:Kf,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Yp(e,t){return jf(e[0]-t[0])<kf&&jf(e[1]-t[1])<kf}function Xp(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Zp(e,t,n,r,i){var a,o,s=[],A=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if(Yp(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Xp(r,e,null,!0)),A.push(n.o=new Xp(r,null,n,!1)),s.push(n=new Xp(o,e,null,!1)),A.push(n.o=new Xp(o,null,n,!0))}})),s.length){for(A.sort(t),Jp(s),Jp(A),a=0,o=A.length;a<o;++a)A[a].e=n=!n;for(var l,c,u=s[0];;){for(var h=u,d=!0;h.v;)if((h=h.n)===u)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(a=0,o=l.length;a<o;++a)i.point((c=l[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(l=h.p.z,a=l.length-1;a>=0;--a)i.point((c=l[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function Jp(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}Up.invert=Up;var Kp,$p,em=Df();function tm(e){return jf(e[0])<=Nf?e[0]:Xf(e[0])*((jf(e[0])+Nf)%Uf-Nf)}function nm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function rm(e){for(var t,n,r,i=e.length,a=-1,o=0;++a<i;)o+=e[a].length;for(n=new Array(o);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n}function im(e,t,n,r){return function(i){var a,o,s,A=t(i),l=Qp(),c=t(l),u=!1,h={point:d,lineStart:p,lineEnd:m,polygonStart:function(){h.point=g,h.lineStart=v,h.lineEnd=y,o=[],a=[]},polygonEnd:function(){h.point=d,h.lineStart=p,h.lineEnd=m,o=rm(o);var e=function(e,t){var n=tm(t),r=t[1],i=Yf(r),a=[Yf(n),-Qf(n),0],o=0,s=0;em.reset(),1===i?r=zf+kf:-1===i&&(r=-zf-kf);for(var A=0,l=e.length;A<l;++A)if(u=(c=e[A]).length)for(var c,u,h=c[u-1],d=tm(h),f=h[1]/2+Ff,p=Yf(f),m=Qf(f),g=0;g<u;++g,d=y,p=b,m=_,h=v){var v=c[g],y=tm(v),x=v[1]/2+Ff,b=Yf(x),_=Qf(x),w=y-d,M=w>=0?1:-1,S=M*w,E=S>Nf,T=p*b;if(em.add(Wf(T*M*Yf(S),m*_+T*Qf(S))),o+=E?w+M*Uf:w,E^d>=n^y>=n){var C=Mp(_p(h),_p(v));Tp(C);var L=Mp(a,C);Tp(L);var P=(E^w>=0?-1:1)*Jf(L[2]);(r>P||r===P&&(C[0]||C[1]))&&(s+=E^w>=0?1:-1)}}return(o<-kf||o<kf&&em<-kf)^1&s}(a,r);o.length?(u||(i.polygonStart(),u=!0),Zp(o,om,e,n,i)):e&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(t,n){e(t,n)&&i.point(t,n)}function f(e,t){A.point(e,t)}function p(){h.point=f,A.lineStart()}function m(){h.point=d,A.lineEnd()}function g(e,t){s.push([e,t]),c.point(e,t)}function v(){c.lineStart(),s=[]}function y(){g(s[0][0],s[0][1]),c.lineEnd();var e,t,n,r,A=c.clean(),h=l.result(),d=h.length;if(s.pop(),a.push(s),s=null,d)if(1&A){if((t=(n=h[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else d>1&&2&A&&h.push(h.pop().concat(h.shift())),o.push(h.filter(am))}return h}}function am(e){return e.length>1}function om(e,t){return((e=e.x)[0]<0?e[1]-zf-kf:zf-e[1])-((t=t.x)[0]<0?t[1]-zf-kf:zf-t[1])}1===(Kp=nm).length&&($p=Kp,Kp=function(e,t){return nm($p(e),t)});var sm=im((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?Nf:-Nf,A=jf(a-n);jf(A-Nf)<kf?(e.point(n,r=(r+o)/2>0?zf:-zf),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&A>=Nf&&(jf(n-i)<kf&&(n-=i*kf),jf(a-s)<kf&&(a-=s*kf),r=function(e,t,n,r){var i,a,o=Yf(e-n);return jf(o)>kf?Vf((Yf(t)*(a=Qf(r))*Yf(n)-Yf(r)*(i=Qf(t))*Yf(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*zf,r.point(-Nf,i),r.point(0,i),r.point(Nf,i),r.point(Nf,0),r.point(Nf,-i),r.point(0,-i),r.point(-Nf,-i),r.point(-Nf,0),r.point(-Nf,i);else if(jf(e[0]-t[0])>kf){var a=e[0]<t[0]?Nf:-Nf;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-Nf,-zf]);function Am(e){var t=Qf(e),n=6*Gf,r=t>0,i=jf(t)>kf;function a(e,n){return Qf(e)*Qf(n)>t}function o(e,n,r){var i=[1,0,0],a=Mp(_p(e),_p(n)),o=wp(a,a),s=a[0],A=o-s*s;if(!A)return!r&&e;var l=t*o/A,c=-t*s/A,u=Mp(i,a),h=Ep(i,l);Sp(h,Ep(a,c));var d=u,f=wp(h,d),p=wp(d,d),m=f*f-p*(wp(h,h)-1);if(!(m<0)){var g=Zf(m),v=Ep(d,(-f-g)/p);if(Sp(v,h),v=bp(v),!r)return v;var y,x=e[0],b=n[0],_=e[1],w=n[1];b<x&&(y=x,x=b,b=y);var M=b-x,S=jf(M-Nf)<kf;if(!S&&w<_&&(y=_,_=w,w=y),S||M<kf?S?_+w>0^v[1]<(jf(v[0]-x)<kf?_:w):_<=v[1]&&v[1]<=w:M>Nf^(x<=v[0]&&v[0]<=b)){var E=Ep(d,(-f+g)/p);return Sp(E,h),[v,bp(E)]}}}function s(t,n){var i=r?e:Nf-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return im(a,(function(e){var t,n,A,l,c;return{lineStart:function(){l=A=!1,c=1},point:function(u,h){var d,f=[u,h],p=a(u,h),m=r?p?0:s(u,h):p?s(u+(u<0?Nf:-Nf),h):0;if(!t&&(l=A=p)&&e.lineStart(),p!==A&&(!(d=o(t,f))||Yp(t,d)||Yp(f,d))&&(f[2]=1),p!==A)c=0,p?(e.lineStart(),d=o(f,t),e.point(d[0],d[1])):(d=o(t,f),e.point(d[0],d[1],2),e.lineEnd()),t=d;else if(i&&t&&r^p){var g;m&n||!(g=o(f,t,!0))||(c=0,r?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1],3)))}!p||t&&Yp(t,f)||e.point(f[0],f[1]),t=f,A=p,n=m},lineEnd:function(){A&&e.lineEnd(),t=null},clean:function(){return c|(l&&A)<<1}}}),(function(t,r,i,a){!function(e,t,n,r,i,a){if(n){var o=Qf(t),s=Yf(t),A=r*n;null==i?(i=t+r*Uf,a=t-A/2):(i=Wp(o,i),a=Wp(o,a),(r>0?i<a:i>a)&&(i+=r*Uf));for(var l,c=i;r>0?c>a:c<a;c-=A)l=bp([o,-s*Qf(c),-s*Yf(c)]),e.point(l[0],l[1])}}(a,e,n,i,t,r)}),r?[0,-e]:[-Nf,e-Nf])}var lm=1e9,cm=-lm;function um(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var c=0,u=0;if(null==i||(c=o(i,s))!==(u=o(a,s))||A(i,a)<0^s>0)do{l.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==u);else l.point(a[0],a[1])}function o(r,i){return jf(r[0]-e)<kf?i>0?0:3:jf(r[0]-n)<kf?i>0?2:1:jf(r[1]-t)<kf?i>0?1:0:i>0?3:2}function s(e,t){return A(e.x,t.x)}function A(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var A,l,c,u,h,d,f,p,m,g,v,y=o,x=Qp(),b={point:_,lineStart:function(){b.point=w,l&&l.push(c=[]);g=!0,m=!1,f=p=NaN},lineEnd:function(){A&&(w(u,h),d&&m&&x.rejoin(),A.push(x.result()));b.point=_,m&&y.lineEnd()},polygonStart:function(){y=x,A=[],l=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=l.length;n<i;++n)for(var a,o,s=l[n],A=1,c=s.length,u=s[0],h=u[0],d=u[1];A<c;++A)a=h,o=d,h=(u=s[A])[0],d=u[1],o<=r?d>r&&(h-a)*(r-o)>(d-o)*(e-a)&&++t:d<=r&&(h-a)*(r-o)<(d-o)*(e-a)&&--t;return t}(),n=v&&t,i=(A=rm(A)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Zp(A,s,t,a,o),o.polygonEnd());y=o,A=l=c=null}};function _(e,t){i(e,t)&&y.point(e,t)}function w(a,o){var s=i(a,o);if(l&&c.push([a,o]),g)u=a,h=o,d=s,g=!1,s&&(y.lineStart(),y.point(a,o));else if(s&&m)y.point(a,o);else{var A=[f=Math.max(cm,Math.min(lm,f)),p=Math.max(cm,Math.min(lm,p))],x=[a=Math.max(cm,Math.min(lm,a)),o=Math.max(cm,Math.min(lm,o))];!function(e,t,n,r,i,a){var o,s=e[0],A=e[1],l=0,c=1,u=t[0]-s,h=t[1]-A;if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<l)return;o<c&&(c=o)}else if(u>0){if(o>c)return;o>l&&(l=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>c)return;o>l&&(l=o)}else if(u>0){if(o<l)return;o<c&&(c=o)}if(o=r-A,h||!(o>0)){if(o/=h,h<0){if(o<l)return;o<c&&(c=o)}else if(h>0){if(o>c)return;o>l&&(l=o)}if(o=a-A,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>l&&(l=o)}else if(h>0){if(o<l)return;o<c&&(c=o)}return l>0&&(e[0]=s+l*u,e[1]=A+l*h),c<1&&(t[0]=s+c*u,t[1]=A+c*h),!0}}}}}(A,x,e,t,n,r)?s&&(y.lineStart(),y.point(a,o),v=!1):(m||(y.lineStart(),y.point(A[0],A[1])),y.point(x[0],x[1]),s||y.lineEnd(),v=!1)}f=a,p=o,m=s}return b}}var hm,dm,fm,pm=Df(),mm={sphere:Kf,point:Kf,lineStart:function(){mm.point=vm,mm.lineEnd=gm},lineEnd:Kf,polygonStart:Kf,polygonEnd:Kf};function gm(){mm.point=mm.lineEnd=Kf}function vm(e,t){hm=e*=Gf,dm=Yf(t*=Gf),fm=Qf(t),mm.point=ym}function ym(e,t){e*=Gf;var n=Yf(t*=Gf),r=Qf(t),i=jf(e-hm),a=Qf(i),o=r*Yf(i),s=fm*n-dm*r*a,A=dm*n+fm*r*a;pm.add(Wf(Zf(o*o+s*s),A)),hm=e,dm=n,fm=r}var xm=[null,null],bm={type:"LineString",coordinates:xm};function _m(e,t){return xm[0]=e,xm[1]=t,function(e){return pm.reset(),xp(e,mm),+pm}(bm)}function wm(e){return e}var Mm=1/0,Sm=Mm,Em=-Mm,Tm=Em;var Cm={point:function(e,t){e<Mm&&(Mm=e);e>Em&&(Em=e);t<Sm&&(Sm=t);t>Tm&&(Tm=t)},lineStart:Kf,lineEnd:Kf,polygonStart:Kf,polygonEnd:Kf,result:function(){var e=[[Mm,Sm],[Em,Tm]];return Em=Tm=-(Sm=Mm=1/0),e}};function Lm(e){return function(t){var n=new Pm;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Pm(){}function Rm(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),xp(n,e.stream(Cm)),t(Cm.result()),null!=r&&e.clipExtent(r),e}function qm(e,t,n){return Rm(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}Pm.prototype={constructor:Pm,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Dm=Qf(30*Gf);function Im(e,t){return+t?function(e,t){function n(r,i,a,o,s,A,l,c,u,h,d,f,p,m){var g=l-r,v=c-i,y=g*g+v*v;if(y>4*t&&p--){var x=o+h,b=s+d,_=A+f,w=Zf(x*x+b*b+_*_),M=Jf(_/=w),S=jf(jf(_)-1)<kf||jf(a-u)<kf?(a+u)/2:Wf(b,x),E=e(S,M),T=E[0],C=E[1],L=T-r,P=C-i,R=v*L-g*P;(R*R/y>t||jf((g*L+v*P)/y-.5)>.3||o*h+s*d+A*f<Dm)&&(n(r,i,a,o,s,A,T,C,S,x/=w,b/=w,_,p,m),m.point(T,C),n(T,C,S,x,b,_,l,c,u,h,d,f,p,m))}}return function(t){var r,i,a,o,s,A,l,c,u,h,d,f,p={point:m,lineStart:g,lineEnd:y,polygonStart:function(){t.polygonStart(),p.lineStart=x},polygonEnd:function(){t.polygonEnd(),p.lineStart=g}};function m(n,r){n=e(n,r),t.point(n[0],n[1])}function g(){c=NaN,p.point=v,t.lineStart()}function v(r,i){var a=_p([r,i]),o=e(r,i);n(c,u,l,h,d,f,c=o[0],u=o[1],l=r,h=a[0],d=a[1],f=a[2],16,t),t.point(c,u)}function y(){p.point=m,t.lineEnd()}function x(){g(),p.point=b,p.lineEnd=_}function b(e,t){v(r=e,t),i=c,a=u,o=h,s=d,A=f,p.point=v}function _(){n(c,u,l,h,d,f,i,a,r,o,s,A,16,t),p.lineEnd=y,y()}return p}}(e,t):function(e){return Lm({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var Bm=Lm({point:function(e,t){this.stream.point(e*Gf,t*Gf)}});function Om(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function km(e,t,n,r,i,a){var o=Qf(a),s=Yf(a),A=o*e,l=s*e,c=o/e,u=s/e,h=(s*n-o*t)/e,d=(s*t+o*n)/e;function f(e,a){return[A*(e*=r)-l*(a*=i)+t,n-l*e-A*a]}return f.invert=function(e,t){return[r*(c*e-u*t+h),i*(d-u*e-c*t)]},f}function Nm(e){return function(e){var t,n,r,i,a,o,s,A,l,c,u=150,h=480,d=250,f=0,p=0,m=0,g=0,v=0,y=0,x=1,b=1,_=null,w=sm,M=null,S=wm,E=.5;function T(e){return A(e[0]*Gf,e[1]*Gf)}function C(e){return(e=A.invert(e[0],e[1]))&&[e[0]*Hf,e[1]*Hf]}function L(){var e=km(u,0,0,x,b,y).apply(null,t(f,p)),r=(y?km:Om)(u,h-e[0],d-e[1],x,b,y);return n=Hp(m,g,v),s=Fp(t,r),A=Fp(n,s),o=Im(s,E),P()}function P(){return l=c=null,T}return T.stream=function(e){return l&&c===e?l:l=Bm(function(e){return Lm({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(w(o(S(c=e)))))},T.preclip=function(e){return arguments.length?(w=e,_=void 0,P()):w},T.postclip=function(e){return arguments.length?(S=e,M=r=i=a=null,P()):S},T.clipAngle=function(e){return arguments.length?(w=+e?Am(_=e*Gf):(_=null,sm),P()):_*Hf},T.clipExtent=function(e){return arguments.length?(S=null==e?(M=r=i=a=null,wm):um(M=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),P()):null==M?null:[[M,r],[i,a]]},T.scale=function(e){return arguments.length?(u=+e,L()):u},T.translate=function(e){return arguments.length?(h=+e[0],d=+e[1],L()):[h,d]},T.center=function(e){return arguments.length?(f=e[0]%360*Gf,p=e[1]%360*Gf,L()):[f*Hf,p*Hf]},T.rotate=function(e){return arguments.length?(m=e[0]%360*Gf,g=e[1]%360*Gf,v=e.length>2?e[2]%360*Gf:0,L()):[m*Hf,g*Hf,v*Hf]},T.angle=function(e){return arguments.length?(y=e%360*Gf,L()):y*Hf},T.reflectX=function(e){return arguments.length?(x=e?-1:1,L()):x<0},T.reflectY=function(e){return arguments.length?(b=e?-1:1,L()):b<0},T.precision=function(e){return arguments.length?(o=Im(s,E=e*e),P()):Zf(E)},T.fitExtent=function(e,t){return qm(T,e,t)},T.fitSize=function(e,t){return function(e,t,n){return qm(e,[[0,0],t],n)}(T,e,t)},T.fitWidth=function(e,t){return function(e,t,n){return Rm(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}(T,e,t)},T.fitHeight=function(e,t){return function(e,t,n){return Rm(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&C,L()}}((function(){return e}))()}function zm(e,t){var n=Qf(t),r=1+Qf(e)*n;return[n*Yf(e)/r,Yf(t)/r]}function Fm(){return Nm(zm).scale(250).clipAngle(142)}function Um(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}zm.invert=function(e){return function(t,n){var r=Zf(t*t+n*n),i=e(r),a=Yf(i),o=Qf(i);return[Wf(t*a,r*o),Jf(r&&n*a/r)]}}((function(e){return 2*Vf(e)}));var Hm=Math.PI,Gm=Hm/2,jm=180/Hm,Vm=Hm/180,Wm=Math.atan2,Qm=Math.cos,Ym=Math.max,Xm=Math.min,Zm=Math.sin,Jm=Math.sign||function(e){return e>0?1:e<0?-1:0},Km=Math.sqrt;function $m(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function eg(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function tg(e,t){return[e[0]+t[0],e[1]+t[1],e[2]+t[2]]}function ng(e){var t=Km(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);return[e[0]/t,e[1]/t,e[2]/t]}function rg(e){return[Wm(e[1],e[0])*jm,(t=Ym(-1,Xm(1,e[2])),(t>1?Gm:t<-1?-Gm:Math.asin(t))*jm)];var t}function ig(e){var t=e[0]*Vm,n=e[1]*Vm,r=Qm(n);return[r*Qm(t),r*Zm(t),Zm(n)]}function ag(e){return $m((e=e.map((e=>ig(e))))[0],eg(e[2],e[1]))}function og(e){const t=function(e){if(e.length<2)return{};let t=0;for(;isNaN(e[t][0]+e[t][1])&&t++<e.length;);const n=function(e){function t(t){return(t=e(t[0]*Gf,t[1]*Gf))[0]*=Hf,t[1]*=Hf,t}return e=Hp(e[0]*Gf,e[1]*Gf,e.length>2?e[2]*Gf:0),t.invert=function(t){return(t=e.invert(t[0]*Gf,t[1]*Gf))[0]*=Hf,t[1]*=Hf,t},t}(e[t]),r=Fm().translate([0,0]).scale(1).rotate(n.invert([180,0]));e=e.map(r);const i=[];let a=1;for(let t=0,n=e.length;t<n;t++){let n=e[t][0]**2+e[t][1]**2;!isFinite(n)||n>1e32?i.push(t):n>a&&(a=n)}const o=1e6*Km(a);i.forEach((t=>e[t]=[o,0])),e.push([0,o]),e.push([-o,0]),e.push([0,-o]);const s=qf.from(e);s.projection=r;const{triangles:A,halfedges:l,inedges:c}=s;for(let n=0,r=l.length;n<r;n++)if(l[n]<0){const e=n%3==2?n-2:n+1,r=n%3==0?n+2:n-1,i=l[e],a=l[r];l[i]=a,l[a]=i,l[e]=l[r]=-1,A[n]=A[e]=A[r]=t,c[A[i]]=i%3==0?i+2:i-1,c[A[a]]=a%3==0?a+2:a-1,n+=2-n%3}else A[n]>e.length-3-1&&(A[n]=t);return s}(e),n=function(e){const{triangles:t}=e;if(!t)return[];const n=[];for(let e=0,r=t.length/3;e<r;e++){const r=t[3*e],i=t[3*e+1],a=t[3*e+2];r!==i&&i!==a&&n.push([r,a,i])}return n}(t),r=function(e,t){const n={};return 2===t.length?[[0,1]]:(e.forEach((e=>{if(e[0]!==e[1]&&!(ag(e.map((e=>t[e])))<0))for(let t,r=0;r<3;r++)t=(r+1)%3,n[Um([e[r],e[t]]).join("-")]=!0})),Object.keys(n).map((e=>e.split("-").map(Number))))}(n,e),i=function(e,t){const n=[];e.forEach(((e,t)=>{for(let t=0;t<3;t++){const r=e[t],i=e[(t+1)%3];e[(t+2)%3],n[r]=n[r]||[],n[r].push(i)}})),0===e.length&&(2===t?(n[0]=[1],n[1]=[0]):1===t&&(n[0]=[]));return n}(n,e.length),a=function(e,t){function n(e,t){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}return function(r,i,a){void 0===a&&(a=0);let o,s,A=a;const l=ig([r,i]);do{o=a,a=null,s=n(l,ig(t[o])),e[o].forEach((e=>{let r=n(l,ig(t[e]));if(r<s)return s=r,a=e,void(A=e)}))}while(null!==a);return A}}(i,e),o=function(e,t){return e.map((e=>{const n=e.map((e=>t[e])).map(ig);return rg(ng(tg(tg(eg(n[1],n[0]),eg(n[2],n[1])),eg(n[0],n[2]))))}))}(n,e),{polygons:s,centers:A}=function(e,t,n){const r=[],i=e.slice();if(0===t.length){if(n.length<2)return{polygons:r,centers:i};if(2===n.length){const e=ig(n[0]),t=ig(n[1]),o=ng(tg(e,t)),s=ng(eg(e,t)),A=eg(o,s),l=[o,eg(o,A),eg(eg(o,A),A),eg(eg(eg(o,A),A),A)].map(rg).map(a);return r.push(l),r.push(l.slice().reverse()),{polygons:r,centers:i}}}t.forEach(((e,t)=>{for(let n=0;n<3;n++){const i=e[n],a=e[(n+1)%3],o=e[(n+2)%3];r[i]=r[i]||[],r[i].push([a,o,t,[i,a,o]])}}));function a(e){let n=-1;return i.slice(t.length,1/0).forEach(((r,i)=>{r[0]===e[0]&&r[1]===e[1]&&(n=i+t.length)})),n<0&&(n=i.length,i.push(e)),n}return{polygons:r.map((e=>{const t=[e[0][2]];let r=e[0][1];for(let n=1;n<e.length;n++)for(let n=0;n<e.length;n++)if(e[n][0]==r){r=e[n][1],t.push(e[n][2]);break}if(t.length>2)return t;if(2==t.length){const r=sg(n[e[0][3][0]],n[e[0][3][1]],i[t[0]]),o=sg(n[e[0][3][2]],n[e[0][3][0]],i[t[0]]),s=a(r),A=a(o);return[t[0],A,t[1],s]}})),centers:i}}(o,n,e),l=function(e){const t=[];return e.forEach((e=>{if(!e)return;let n=e[e.length-1];for(let r of e)r>n&&t.push([n,r]),n=r})),t}(s),c=function(e,t){const n={},r=[];e.map((e=>{if(!(ag(e.map((e=>t[e>t.length?0:e])))<0))for(let t=0;t<3;t++){let r=[e[t],e[(t+1)%3]],i=`${r[1]}-${r[0]}`;n[i]?delete n[i]:n[r.join("-")]=!0}}));const i={};let a;if(Object.keys(n).forEach((e=>{e=e.split("-").map(Number),i[e[0]]=e[1],a=e[0]})),void 0===a)return r;let o=a;do{r.push(o);let e=i[o];i[o]=-1,o=e}while(o>-1&&o!==a);return r}(n,e),u=function(e,t){return function(n){const r={},i={};return e.forEach(((e,t)=>{const a=e.join("-");r[a]=n[t],i[a]=!0})),t.forEach((e=>{let t=0,n=-1;for(var a=0;a<3;a++){let i=Um([e[a],e[(a+1)%3]]).join("-");r[i]>t&&(t=r[i],n=i)}i[n]=!1})),e.map((e=>i[e.join("-")]))}}(r,n);return{delaunay:t,edges:r,triangles:n,centers:A,neighbors:i,polygons:s,mesh:l,hull:c,urquhart:u,find:a}}function sg(e,t,n){e=ig(e),t=ig(t),n=ig(n);const r=Jm($m(eg(t,e),n));return rg(ng(tg(e,t)).map((e=>r*e)))}function Ag(e){const t=function(e){if(t.delaunay=null,t._data=e,"object"==typeof t._data&&"FeatureCollection"===t._data.type&&(t._data=t._data.features),"object"==typeof t._data){const e=t._data.map((e=>[t._vx(e),t._vy(e),e])).filter((e=>isFinite(e[0]+e[1])));t.points=e.map((e=>[e[0],e[1]])),t.valid=e.map((e=>e[2])),t.delaunay=og(t.points)}return t};return t._vx=function(e){return"object"==typeof e&&"type"in e?zp(e)[0]:0 in e?e[0]:void 0},t._vy=function(e){return"object"==typeof e&&"type"in e?zp(e)[1]:1 in e?e[1]:void 0},t.x=function(e){return e?(t._vx=e,t):t._vx},t.y=function(e){return e?(t._vy=e,t):t._vy},t.polygons=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const n={type:"FeatureCollection",features:[]};return 0===t.valid.length||(t.delaunay.polygons.forEach(((e,r)=>n.features.push({type:"Feature",geometry:e?{type:"Polygon",coordinates:[[...e,e[0]].map((e=>t.delaunay.centers[e]))]}:null,properties:{site:t.valid[r],sitecoordinates:t.points[r],neighbours:t.delaunay.neighbors[r]}}))),1===t.valid.length&&n.features.push({type:"Feature",geometry:{type:"Sphere"},properties:{site:t.valid[0],sitecoordinates:t.points[0],neighbours:[]}})),n},t.triangles=function(e){return void 0!==e&&t(e),!!t.delaunay&&{type:"FeatureCollection",features:t.delaunay.triangles.map(((e,n)=>((e=e.map((e=>t.points[e]))).center=t.delaunay.centers[n],e))).filter((e=>ag(e)>0)).map((e=>({type:"Feature",properties:{circumcenter:e.center},geometry:{type:"Polygon",coordinates:[[...e,e[0]]]}})))}},t.links=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const n=t.delaunay.edges.map((e=>_m(t.points[e[0]],t.points[e[1]]))),r=t.delaunay.urquhart(n);return{type:"FeatureCollection",features:t.delaunay.edges.map(((e,i)=>({type:"Feature",properties:{source:t.valid[e[0]],target:t.valid[e[1]],length:n[i],urquhart:!!r[i]},geometry:{type:"LineString",coordinates:[t.points[e[0]],t.points[e[1]]]}})))}},t.mesh=function(e){return void 0!==e&&t(e),!!t.delaunay&&{type:"MultiLineString",coordinates:t.delaunay.edges.map((e=>[t.points[e[0]],t.points[e[1]]]))}},t.cellMesh=function(e){if(void 0!==e&&t(e),!t.delaunay)return!1;const{centers:n,polygons:r}=t.delaunay,i=[];for(const e of r)if(e)for(let t=e.length,r=e[t-1],a=e[0],o=0;o<t;r=a,a=e[++o])a>r&&i.push([n[r],n[a]]);return{type:"MultiLineString",coordinates:i}},t._found=void 0,t.find=function(e,n,r){if(t._found=t.delaunay.find(e,n,t._found),!r||_m([e,n],t.points[t._found])<r)return t._found},t.hull=function(e){void 0!==e&&t(e);const n=t.delaunay.hull,r=t.points;return 0===n.length?null:{type:"Polygon",coordinates:[[...n.map((e=>r[e])),r[n[0]]]]}},e?t(e):t}function lg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}!function(e){1===e.length&&(e=function(e){return function(t,n){return lg(e(t),n)}}(e))}(lg);var cg="$";function ug(){}function hg(e,t){var n=new ug;if(e instanceof ug)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,a=e.length;if(null==t)for(;++i<a;)n.set(i,e[i]);else for(;++i<a;)n.set(t(r=e[i],i,e),r)}else if(e)for(var o in e)n.set(o,e[o]);return n}function dg(){}ug.prototype=hg.prototype={constructor:ug,has:function(e){return cg+e in this},get:function(e){return this[cg+e]},set:function(e,t){return this[cg+e]=t,this},remove:function(e){var t=cg+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===cg&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===cg&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===cg&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===cg&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===cg&&++e;return e},empty:function(){for(var e in this)if(e[0]===cg)return!1;return!0},each:function(e){for(var t in this)t[0]===cg&&e(this[t],t.slice(1),this)}};var fg=hg.prototype;function pg(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function gg(){}dg.prototype={constructor:dg,has:fg.has,add:function(e){return this[cg+(e+="")]=e,this},remove:fg.remove,clear:fg.clear,values:fg.keys,size:fg.size,empty:fg.empty,each:fg.each};var vg=.7,yg=1/vg,xg="\\s*([+-]?\\d+)\\s*",bg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_g="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wg=/^#([0-9a-f]{3,8})$/,Mg=new RegExp("^rgb\\("+[xg,xg,xg]+"\\)$"),Sg=new RegExp("^rgb\\("+[_g,_g,_g]+"\\)$"),Eg=new RegExp("^rgba\\("+[xg,xg,xg,bg]+"\\)$"),Tg=new RegExp("^rgba\\("+[_g,_g,_g,bg]+"\\)$"),Cg=new RegExp("^hsl\\("+[bg,_g,_g]+"\\)$"),Lg=new RegExp("^hsla\\("+[bg,_g,_g,bg]+"\\)$"),Pg={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 Rg(){return this.rgb().formatHex()}function qg(){return this.rgb().formatRgb()}function Dg(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ig(t):3===n?new kg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Bg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Bg(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=Mg.exec(e))?new kg(t[1],t[2],t[3],1):(t=Sg.exec(e))?new kg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Eg.exec(e))?Bg(t[1],t[2],t[3],t[4]):(t=Tg.exec(e))?Bg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Cg.exec(e))?Ug(t[1],t[2]/100,t[3]/100,1):(t=Lg.exec(e))?Ug(t[1],t[2]/100,t[3]/100,t[4]):Pg.hasOwnProperty(e)?Ig(Pg[e]):"transparent"===e?new kg(NaN,NaN,NaN,0):null}function Ig(e){return new kg(e>>16&255,e>>8&255,255&e,1)}function Bg(e,t,n,r){return r<=0&&(e=t=n=NaN),new kg(e,t,n,r)}function Og(e){return e instanceof gg||(e=Dg(e)),e?new kg((e=e.rgb()).r,e.g,e.b,e.opacity):new kg}function kg(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ng(){return"#"+Fg(this.r)+Fg(this.g)+Fg(this.b)}function zg(){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 Fg(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ug(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Gg(e,t,n,r)}function Hg(e){if(e instanceof Gg)return new Gg(e.h,e.s,e.l,e.opacity);if(e instanceof gg||(e=Dg(e)),!e)return new Gg;if(e instanceof Gg)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,A=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=A<.5?a+i:2-a-i,o*=60):s=A>0&&A<1?0:o,new Gg(o,s,A,e.opacity)}function Gg(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function jg(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}pg(gg,Dg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Rg,formatHex:Rg,formatHsl:function(){return Hg(this).formatHsl()},formatRgb:qg,toString:qg}),pg(kg,(function(e,t,n,r){return 1===arguments.length?Og(e):new kg(e,t,n,null==r?1:r)}),mg(gg,{brighter:function(e){return e=null==e?yg:Math.pow(yg,e),new kg(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?vg:Math.pow(vg,e),new kg(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:Ng,formatHex:Ng,formatRgb:zg,toString:zg})),pg(Gg,(function(e,t,n,r){return 1===arguments.length?Hg(e):new Gg(e,t,n,null==r?1:r)}),mg(gg,{brighter:function(e){return e=null==e?yg:Math.pow(yg,e),new Gg(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?vg:Math.pow(vg,e),new Gg(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 kg(jg(e>=240?e-240:e+120,i,r),jg(e,i,r),jg(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 Vg=Math.PI/180,Wg=180/Math.PI,Qg=-.14861,Yg=1.78277,Xg=-.29227,Zg=-.90649,Jg=1.97294,Kg=Jg*Zg,$g=Jg*Yg,ev=Yg*Xg-Zg*Qg;function tv(e){if(e instanceof rv)return new rv(e.h,e.s,e.l,e.opacity);e instanceof kg||(e=Og(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(ev*r+Kg*t-$g*n)/(ev+Kg-$g),a=r-i,o=(Jg*(n-i)-Xg*a)/Zg,s=Math.sqrt(o*o+a*a)/(Jg*i*(1-i)),A=s?Math.atan2(o,a)*Wg-120:NaN;return new rv(A<0?A+360:A,s,i,e.opacity)}function nv(e,t,n,r){return 1===arguments.length?tv(e):new rv(e,t,n,null==r?1:r)}function rv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function iv(e){return function(){return e}}function av(e,t){return function(n){return e+n*t}}function ov(e,t){var n=t-e;return n?av(e,n):iv(isNaN(e)?t:e)}function sv(e){return function t(n){function r(t,r){var i=e((t=nv(t)).h,(r=nv(r)).h),a=ov(t.s,r.s),o=ov(t.l,r.l),s=ov(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}pg(rv,nv,mg(gg,{brighter:function(e){return e=null==e?yg:Math.pow(yg,e),new rv(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?vg:Math.pow(vg,e),new rv(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Vg,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new kg(255*(t+n*(Qg*r+Yg*i)),255*(t+n*(Xg*r+Zg*i)),255*(t+n*(Jg*r)),this.opacity)}})),sv((function(e,t){var n=t-e;return n?av(e,n>180||n<-180?n-360*Math.round(n/360):n):iv(isNaN(e)?t:e)}));var Av=sv(ov);function lv(e){return e.match(/.{6}/g).map((function(e){return"#"+e}))}function cv(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function uv(e){return(uv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hv(e,t){return(hv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dv(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fv(e){var t=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 n,r=uv(e);if(t){var i=uv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dv(this,n)}}function pv(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||gv(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 mv(e){return function(e){if(Array.isArray(e))return vv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gv(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 gv(e,t){if(e){if("string"==typeof e)return vv(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)?vv(e,t):void 0}}function vv(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 yv(e,t){return e.map((function(e){var n,r=[];return e.forEach((function(e){if(n){var i=180*Mu(e,n)/Math.PI;if(i>t)for(var a=ku(n,e),o=1/Math.ceil(i/t),s=o;s<1;)r.push(a(s)),s+=o}r.push(n=e)})),r}))}function xv(e,t){var n={type:"Polygon",coordinates:e},r=pv(mu(n),2),i=pv(r[0],2),a=i[0],o=i[1],s=pv(r[1],2),A=s[0],l=s[1];if(Math.min(Math.abs(A-a),Math.abs(l-o))<t)return[];var c=a>A||l>=89||o<=-89;return function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minLng,r=t.maxLng,i=t.minLat,a=t.maxLat,o=Math.round(Math.pow(360/e,2)/Math.PI),s=(1+Math.sqrt(5))/2,A=function(e){return e/s*360%360-180},l=function(e){return Math.acos(2*e/o-1)/Math.PI*180-90},c=function(e){return o*(Math.cos((e+90)*Math.PI/180)+1)/2},u=[void 0!==a?Math.ceil(c(a)):0,void 0!==i?Math.floor(c(i)):o-1],h=void 0===n&&void 0===r?function(){return!0}:void 0===n?function(e){return e<=r}:void 0===r?function(e){return e>=n}:r>=n?function(e){return e>=n&&e<=r}:function(e){return e>=n||e<=r},d=[],f=u[0];f<=u[1];f++){var p=A(f);h(p)&&d.push([p,l(f)])}return d}(t,{minLng:a,maxLng:A,minLat:o,maxLat:l}).filter((function(e){return bv(e,n,c)}))}function bv(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n?Du(t,e):lf(e,t)}lv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),lv("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),lv("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),lv("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Av(nv(300,.5,0),nv(-240,.5,1)),Av(nv(-100,.75,.35),nv(80,1.5,.8)),Av(nv(260,.75,.35),nv(80,1.5,.8)),nv(),cv(lv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),cv(lv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cv(lv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),cv(lv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var _v=window.THREE?window.THREE:{BufferGeometry:ln,Float32BufferAttribute:$t},wv=(new _v.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Mv=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&&hv(e,t)}(n,e);var t=fv(n);function n(e,r,i,a,o,s,A){var l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(l=t.call(this)).type="ConicPolygonBufferGeometry",l.parameters={polygonGeoJson:e,startHeight:r,endHeight:i,closedBottom:a,closedTop:o,includeSides:s,curvatureResolution:A},r=r||0,i=i||1,a=void 0===a||a,o=void 0===o||o,s=void 0===s||s;var c=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).resolution,n=void 0===t?1/0:t,r=yv(e,n),i=ic(r),a=xv(e,n),o=[].concat(mv(i),mv(a)),s={type:"Polygon",coordinates:e},A=pv(mu(s),2),l=pv(A[0],2),c=l[0],u=l[1],h=pv(A[1],2),d=h[0],f=h[1],p=c>d||f>=89||u<=-89,m=[];if(p){var g=Ag(o).triangles(),v=new Map(o.map((function(e,t){var n=pv(e,2),r=n[0],i=n[1];return["".concat(r,"-").concat(i),t]})));g.features.forEach((function(e){var t,n=e.geometry.coordinates[0].slice(0,3).reverse(),r=[];if(n.forEach((function(e){var t=pv(e,2),n=t[0],i=t[1],a="".concat(n,"-").concat(i);v.has(a)&&r.push(v.get(a))})),3===r.length){if(r.some((function(e){return e<i.length}))&&!bv(e.properties.circumcenter,s,p))return;(t=m).push.apply(t,r)}}))}else if(a.length)!function(){for(var e=ef.from(o),t=function(t,n){var r,a=[2,1,0].map((function(n){return e.triangles[t+n]})),A=a.map((function(e){return o[e]}));if(a.some((function(e){return e<i.length}))&&!bv([0,1].map((function(e){return rc(A,(function(t){return t[e]}))})),s,p))return"continue";(r=m).push.apply(r,mv(a))},n=0,r=e.triangles.length;n<r;n+=3)t(n)}();else{var y=Ql.flatten(r),x=y.vertices,b=y.holes;m=Ql(x,void 0===b?[]:b,2)}return{contour:r,triangles:{points:o,indices:m}}}(e,{resolution:A=A||5}),u=c.contour,h=c.triangles,d=[],f=[],p=0,m=function(e){var t=Math.round(d.length/3),n=f.length;d=d.concat(e.vertices),f=f.concat(t?e.indices.map((function(e){return e+t})):e.indices),l.addGroup(n,f.length-n,p++)};function g(e,t){var n=e.map((function(e){return e.map((function(e){var n=pv(e,2),r=n[0];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180;return[n*Math.sin(r)*Math.cos(i),n*Math.cos(r),n*Math.sin(r)*Math.sin(i)]}(n[1],r,t)}))}));return Ql.flatten(n)}function v(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{indices:t?h.indices:h.indices.slice().reverse(),vertices:g([h.points],e).vertices}}return s&&m(function(){for(var e=g(u,r),t=e.vertices,n=e.holes,a=g(u,i).vertices,o=ic([a,t]),s=Math.round(a.length/3),A=new Set(n),l=0,c=[],h=0;h<s;h++){var d=h+1;if(d===s)d=l;else if(A.has(d)){var f=d;d=l,l=f}c.push(h,h+s,d+s),c.push(d+s,d,h)}return{indices:c,vertices:o}}()),a&&m(v(r,!1)),o&&m(v(i,!0)),l.setIndex(f),l[wv]("position",new _v.Float32BufferAttribute(d,3)),l.computeVertexNormals(),l}return n}(_v.BufferGeometry);var Sv=function(e){var t,n=void 0!==(e=e||{})?e:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);var i,a,o,s,A;i="object"==typeof window,a="function"==typeof importScripts,s="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,o=s&&!i&&!a,A=!i&&!o&&!a;var l,c,u,h,d,f="";o?(f=__dirname+"/",l=function(e,t){var n;return(n=ie(e))||(h||(h=require("fs")),d||(d=require("path")),e=d.normalize(e),n=h.readFileSync(e)),t?n:n.toString()},u=function(e){var t=l(e,!0);return t.buffer||(t=new Uint8Array(t)),x(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),n.inspect=function(){return"[Emscripten Module object]"}):A?("undefined"!=typeof read&&(l=function(e){var t=ie(e);return t?ne(t):read(e)}),u=function(e){var t;return(t=ie(e))?t:"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(x("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(i||a)&&(a?f=self.location.href:document.currentScript&&(f=document.currentScript.src),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",l=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(t){var n=ie(e);if(n)return ne(n);throw t}},a&&(u=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(t){var n=ie(e);if(n)return n;throw t}}),c=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var i=ie(e);i?t(i.buffer):n()}},r.onerror=n,r.send(null)});var p=n.print||console.log.bind(console),m=n.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=null,n.arguments,n.thisProgram;var g=0,v=function(){return g};var y=!1;function x(e,t){e||ve("Assertion failed: "+t)}function b(e){var t=n["_"+e];return x(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function _(e,t,n,r,i){var a={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);(function(e,t,n){(function(e,t,n,r){if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(e,S,t,n)})(e,t=le(n),n)}return t},array:function(e){var t=le(e.length);return function(e,t){M.set(e,t)}(e,t),t}};var o=b(e),s=[],A=0;if(r)for(var l=0;l<r.length;l++){var c=a[n[l]];c?(0===A&&(A=ue()),s[l]=c(r[l])):s[l]=r[l]}var u=o.apply(null,s);return u=function(e){return"string"===t?R(e):"boolean"===t?Boolean(e):e}(u),0!==A&&ce(A),u}var w,M,S,E,T,C,L,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(e,t){return e?function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&P)return P.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var A=63&e[t++];if((o=224==(240&o)?(15&o)<<12|s<<6|A:(7&o)<<18|s<<12|A<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(S,e,t):""}function q(e,t){return e%t>0&&(e+=t-e%t),e}function D(e){w=e,n.HEAP8=M=new Int8Array(e),n.HEAP16=E=new Int16Array(e),n.HEAP32=T=new Int32Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=L=new Float64Array(e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var I=n.TOTAL_MEMORY||33554432;function B(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}I=(w=n.buffer?n.buffer:new ArrayBuffer(I)).byteLength,D(w),T[6004]=5266928;var O=[],k=[],N=[],z=[];var F=Math.abs,U=Math.ceil,H=Math.floor,G=Math.min,j=0,V=null;n.preloadedImages={},n.preloadedAudios={};var W,Q,Y=null,X="data:application/octet-stream;base64,";function Z(e){return String.prototype.startsWith?e.startsWith(X):0===e.indexOf(X)}Y="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";function J(e){return e}function K(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function $(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function ee(){return M.length}function te(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(M),oe(t),D(t),1}catch(e){}}function ne(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r>255&&(r&=255),t.push(String.fromCharCode(r))}return t.join("")}var re="function"==typeof atob?atob:function(e){var t,n,r,i,a,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="",l=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(l++))<<2|(i=s.indexOf(e.charAt(l++)))>>4,n=(15&i)<<4|(a=s.indexOf(e.charAt(l++)))>>2,r=(3&a)<<6|(o=s.indexOf(e.charAt(l++))),A+=String.fromCharCode(t),64!==a&&(A+=String.fromCharCode(n)),64!==o&&(A+=String.fromCharCode(r))}while(l<e.length);return A};function ie(e){if(Z(e))return function(e){if("boolean"==typeof o&&o){var t;try{t=Buffer.from(e,"base64")}catch(n){t=new Buffer(e,"base64")}return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}try{for(var n=re(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}catch(e){throw new Error("Converting base64 string to bytes failed.")}}(e.slice(X.length))}var ae=function(e,t,n){var r=new e.Int8Array(n),i=new e.Int32Array(n);new e.Uint8Array(n),new e.Float32Array(n);var a=new e.Float64Array(n),o=0|t.p,s=e.Math.floor,A=e.Math.abs,l=e.Math.sqrt,c=e.Math.pow,u=e.Math.cos,h=e.Math.sin,d=e.Math.tan,f=e.Math.acos,p=e.Math.asin,m=e.Math.atan,g=e.Math.atan2,v=e.Math.ceil,y=e.Math.imul,x=e.Math.min,b=e.Math.clz32,_=t.b,w=t.c,M=t.d,S=t.e,E=t.f,T=t.g,C=t.h,L=t.i,P=24048;function R(e,t,n,r){var i,a;0|q(e|=0,t|=0,n|=0,r|=0,0)&&(Lt(0|r,0,(a=1+(0|y(3*n|0,n+1|0))|0)<<3|0),(i=0|yt(a,4))&&(D(e,t,n,r,i,a,0),vt(i)))}function q(e,t,n,r,a){e|=0,t|=0,n|=0,a|=0;var o,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0;if(o=P,P=P+16|0,f=o,i[(s=r|=0)>>2]=e,i[s+4>>2]=t,(s=0!=(0|a))&&(i[a>>2]=0),0|Ie(e,t))return P=o,0|(f=1);i[f>>2]=0;e:do{if((0|n)>=1)if(s)for(u=0,h=1,d=1,A=0,s=e;;){if(!(A|u)){if(0==(0|(s=0|I(s,t,4,f)))&0==(0|(t=0|w()))){s=2;break e}if(0|Ie(s,t)){s=1;break e}}if(0==(0|(s=0|I(s,t,0|i[16+(u<<2)>>2],f)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(d<<3)|0)>>2]=s,i[e+4>>2]=t,i[a+(d<<2)>>2]=h,e=(0|(A=A+1|0))==(0|h),c=6==(0|(l=u+1|0)),0|Ie(s,t)){s=1;break e}if((0|(h=h+(c&e&1)|0))>(0|n)){s=0;break}u=e?c?0:l:u,d=d+1|0,A=e?0:A}else for(u=0,h=1,d=1,A=0,s=e;;){if(!(A|u)){if(0==(0|(s=0|I(s,t,4,f)))&0==(0|(t=0|w()))){s=2;break e}if(0|Ie(s,t)){s=1;break e}}if(0==(0|(s=0|I(s,t,0|i[16+(u<<2)>>2],f)))&0==(0|(t=0|w()))){s=2;break e}if(i[(e=r+(d<<3)|0)>>2]=s,i[e+4>>2]=t,e=(0|(A=A+1|0))==(0|h),c=6==(0|(l=u+1|0)),0|Ie(s,t)){s=1;break e}if((0|(h=h+(c&e&1)|0))>(0|n)){s=0;break}u=e?c?0:l:u,d=d+1|0,A=e?0:A}else s=0}while(0);return P=o,0|(f=s)}function D(e,t,n,r,a,o,s){n|=0,r|=0,a|=0,o|=0,s|=0;var A,l,c=0,u=0,h=0,d=0,f=0;if(l=P,P=P+16|0,A=l,0==(0|(e|=0))&0==(0|(t|=0)))P=l;else{if(c=0|wt(0|e,0|t,0|o,((0|o)<0)<<31>>31|0),w(),!(0==(0|(f=0|i[(d=u=r+(c<<3)|0)>>2]))&0==(0|(d=0|i[d+4>>2]))|(h=(0|f)==(0|e)&(0|d)==(0|t))))do{h=(0|(d=0|i[(f=u=r+((c=(c+1|0)%(0|o)|0)<<3)|0)>>2]))==(0|e)&(0|(f=0|i[f+4>>2]))==(0|t)}while(!(0==(0|d)&0==(0|f)|h));c=a+(c<<2)|0,h&&(0|i[c>>2])<=(0|s)||(i[(f=u)>>2]=e,i[f+4>>2]=t,i[c>>2]=s,(0|s)>=(0|n)||(f=s+1|0,i[A>>2]=0,D(d=0|I(e,t,2,A),0|w(),n,r,a,o,f),i[A>>2]=0,D(d=0|I(e,t,3,A),0|w(),n,r,a,o,f),i[A>>2]=0,D(d=0|I(e,t,1,A),0|w(),n,r,a,o,f),i[A>>2]=0,D(d=0|I(e,t,5,A),0|w(),n,r,a,o,f),i[A>>2]=0,D(d=0|I(e,t,4,A),0|w(),n,r,a,o,f),i[A>>2]=0,D(d=0|I(e,t,6,A),0|w(),n,r,a,o,f))),P=l}}function I(e,t,n,r){e|=0,t|=0,n|=0;var a,o,s=0,A=0,l=0,c=0,u=0,h=0,d=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|Ae(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}a=0|Mt(0|e,0|t,45),w(),o=127&a,A=0|Be(e,t),s=0|Mt(0|e,0|t,52),w(),s&=15;e:do{if(s)for(;;){if(h=0|Mt(0|e,0|t,0|(u=3*(15-s|0)|0)),w(),h&=7,d=0==(0|Fe(s)),s=s+-1|0,c=0|St(7,0,0|u),t&=~(0|w()),e=(u=0|St(0|i[(d?464:48)+(28*h|0)+(n<<2)>>2],0,0|u))|e&~c,t|=0|w(),!(n=0|i[(d?672:256)+(28*h|0)+(n<<2)>>2])){n=0;break e}if(!s){l=6;break}}else l=6}while(0);6==(0|l)&&(e|=h=0|St(0|(d=0|i[880+(28*o|0)+(n<<2)>>2]),0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*o|0)+(n<<2)>>2],127==(127&d|0)&&(d=0|St(0|i[880+(28*o|0)+20>>2],0,45),t=0|w()|-1040385&t,n=0|i[4304+(28*o|0)+20>>2],e=0|ke(d|e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]))),l=0|Mt(0|e,0|t,45),w(),l&=127;e:do{if(0|O(l)){t:do{if(1==(0|Be(e,t))){if((0|o)!=(0|l)){if(0|F(l,0|i[7728+(28*o|0)>>2])){e=0|ze(e,t),A=1,t=0|w();break}e=0|ke(e,t),A=1,t=0|w();break}switch(0|A){case 5:e=0|ze(e,t),t=0|w(),i[r>>2]=5+(0|i[r>>2]),A=0;break t;case 3:e=0|ke(e,t),t=0|w(),i[r>>2]=1+(0|i[r>>2]),A=0;break t;default:return d=0,_(0|(h=0)),0|d}}else A=0}while(0);if((0|n)>0){s=0;do{e=0|Oe(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}if((0|o)!=(0|l)){if(!(0|k(l))){if(0!=(0|A)|5!=(0|Be(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&a){case 8:case 118:break e}3!=(0|Be(e,t))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{e=0|ke(e,t),t=0|w(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,d=e,_(0|(h=t)),0|d}function B(e,t,n,r,o,s){t|=0,n|=0,r|=0,o|=0,s|=0;var A,l,c,u,h,d,f,p,m,g=0,v=0,y=0,x=0,b=0,_=0,M=0,S=0,E=0,T=0,C=0,L=0,R=0,q=0;if(m=P,P=P+48|0,d=m+32|0,f=m+16|0,p=m,(0|(g=0|i[(e|=0)>>2]))<=0)return P=m,0|(L=0);A=e+4|0,l=d+8|0,c=f+8|0,u=p+8|0,h=((0|t)<0)<<31>>31,C=0;e:for(;;){E=(v=0|i[A>>2])+(C<<4)|0,i[d>>2]=i[E>>2],i[d+4>>2]=i[E+4>>2],i[d+8>>2]=i[E+8>>2],i[d+12>>2]=i[E+12>>2],(0|C)==(g+-1|0)?(i[f>>2]=i[v>>2],i[f+4>>2]=i[v+4>>2],i[f+8>>2]=i[v+8>>2],i[f+12>>2]=i[v+12>>2]):(E=v+(C+1<<4)|0,i[f>>2]=i[E>>2],i[f+4>>2]=i[E+4>>2],i[f+8>>2]=i[E+8>>2],i[f+12>>2]=i[E+12>>2]),E=0|W(d,f,n);t:do{if((0|E)>0){T=+(0|E),S=0;n:for(;;){q=+(E-S|0),R=+(0|S),a[p>>3]=+a[d>>3]*q/T+ +a[f>>3]*R/T,a[u>>3]=+a[l>>3]*q/T+ +a[c>>3]*R/T,v=0|wt(0|(_=0|Ue(p,n)),0|(M=0|w()),0|t,0|h),w(),x=0|i[(y=g=s+(v<<3)|0)>>2],y=0|i[y+4>>2];r:do{if(0==(0|x)&0==(0|y))L=14;else for(b=0;;){if((0|b)>(0|t)){g=1;break r}if((0|x)==(0|_)&(0|y)==(0|M)){g=7;break r}if(0==(0|(x=0|i[(y=g=s+((v=(v+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(y=0|i[y+4>>2]))){L=14;break}b=b+1|0}}while(0);switch(14==(0|L)&&(L=0,0==(0|_)&0==(0|M)?g=7:(i[g>>2]=_,i[g+4>>2]=M,g=0|i[r>>2],i[(b=o+(g<<3)|0)>>2]=_,i[b+4>>2]=M,i[r>>2]=g+1,g=0)),7&g){case 7:case 0:break;default:break n}if((0|E)<=(0|(S=S+1|0))){L=8;break t}}if(0|g){g=-1,L=20;break e}}else L=8}while(0);if(8==(0|L)&&(L=0),(0|(C=C+1|0))>=(0|(g=0|i[e>>2]))){g=0,L=20;break}}return 20==(0|L)?(P=m,0|g):0}function O(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function k(e){return 4==(0|(e|=0))|117==(0|e)|0}function N(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)>>2]}function z(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)+4>>2]}function F(e,t){return t|=0,(0|i[7728+(28*(e|=0)|0)+20>>2])==(0|t)?0|(t=1):0|(t=(0|i[7728+(28*e|0)+24>>2])==(0|t))}function U(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function H(e,t){return t|=0,(0|i[880+(28*(e|=0)|0)>>2])==(0|t)?0|(t=0):(0|i[880+(28*e|0)+4>>2])==(0|t)?0|(t=1):(0|i[880+(28*e|0)+8>>2])==(0|t)?0|(t=2):(0|i[880+(28*e|0)+12>>2])==(0|t)?0|(t=3):(0|i[880+(28*e|0)+16>>2])==(0|t)?0|(t=4):(0|i[880+(28*e|0)+20>>2])==(0|t)?0|(t=5):0|((0|i[880+(28*e|0)+24>>2])==(0|t)?6:7)}function G(e){return+a[(e|=0)+16>>3]<+a[e+24>>3]|0}function j(e,t){e|=0;var n,r,i=0;return(i=+a[(t|=0)>>3])>=+a[e+8>>3]&&i<=+a[e>>3]?(n=+a[e+16>>3],i=+a[e+24>>3],t=(r=+a[t+8>>3])>=i,e=r<=n&1,n<i?t&&(e=1):t||(e=0),0|(t=0!=(0|e))):0|(t=0)}function V(e,t){e|=0,t|=0;var n,r,o,s,l,c,u=0,h=0;s=P,P=P+288|0,n=s+264|0,r=s+96|0,h=(u=o=s)+96|0;do{i[u>>2]=0,u=u+4|0}while((0|u)<(0|h));return We(t,o),je(h=0|i[(u=o)>>2],u=0|i[u+4>>2],n),Ve(h,u,r),l=+Ce(n,r+8|0),a[n>>3]=+a[e>>3],a[(u=n+8|0)>>3]=+a[e+16>>3],a[r>>3]=+a[e+8>>3],a[(h=r+8|0)>>3]=+a[e+24>>3],c=+Ce(n,r),h=~~+v(+c*c/+Et(+ +A(+(+a[u>>3]-+a[h>>3])/(+a[n>>3]-+a[r>>3])),3)/(l*(2.59807621135*l)*.8)),P=s,0|(0==(0|h)?1:h)}function W(e,t,n){e|=0,t|=0,n|=0;var r,a,o,s,A,l=0,c=0;s=P,P=P+288|0,r=s+264|0,a=s+96|0,c=(l=o=s)+96|0;do{i[l>>2]=0,l=l+4|0}while((0|l)<(0|c));return We(n,o),je(l=0|i[(c=o)>>2],c=0|i[c+4>>2],r),Ve(l,c,a),A=+Ce(r,a+8|0),c=~~+v(+ +Ce(e,t)/(2*A)),P=s,0|(0==(0|c)?1:c)}function Q(e,t,n,r){t|=0,n|=0,r|=0,i[(e|=0)>>2]=t,i[e+4>>2]=n,i[e+8>>2]=r}function Y(e,t){e|=0;var n,r,o,s,l=0,c=0,u=0,h=0,d=0,f=0,p=0;i[(s=(t|=0)+8|0)>>2]=0,r=+a[e>>3],h=+A(+r),o=+a[e+8>>3],h+=.5*(d=+A(+o)/.8660254037844386),h-=+(0|(l=~~h)),d-=+(0|(e=~~d));do{if(h<.5){if(h<.3333333333333333){if(i[t>>2]=l,d<.5*(h+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(d<(p=1-h)))+e|0,i[t+4>>2]=e,p<=d&d<2*h){l=l+1|0,i[t>>2]=l;break}i[t>>2]=l;break}if(!(h<.6666666666666666)){if(l=l+1|0,i[t>>2]=l,d<.5*h){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(d<1-h){if(i[t+4>>2]=e,2*h-1<d){i[t>>2]=l;break}}else e=e+1|0,i[t+4>>2]=e;l=l+1|0,i[t>>2]=l}while(0);do{if(r<0){if(1&e){l=~~(+(0|l)-(2*(+((f=0|xt(0|l,((0|l)<0)<<31>>31|0,0|(f=(e+1|0)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))+1)),i[t>>2]=l;break}l=~~(+(0|l)-2*(+((f=0|xt(0|l,((0|l)<0)<<31>>31|0,0|(f=(0|e)/2|0),((0|f)<0)<<31>>31|0))>>>0)+4294967296*+(0|w()))),i[t>>2]=l;break}}while(0);f=t+4|0,o<0&&(l=l-((1|e<<1)/2|0)|0,i[t>>2]=l,e=0-e|0,i[f>>2]=e),c=e-l|0,(0|l)<0?(u=0-l|0,i[f>>2]=c,i[s>>2]=u,i[t>>2]=0,e=c,l=0):u=0,(0|e)<0&&(l=l-e|0,i[t>>2]=l,u=u-e|0,i[s>>2]=u,i[f>>2]=0,e=0),n=l-u|0,c=e-u|0,(0|u)<0&&(i[t>>2]=n,i[f>>2]=c,i[s>>2]=0,e=c,l=n,u=0),(0|(c=(0|u)<(0|(c=(0|e)<(0|l)?e:l))?u:c))<=0||(i[t>>2]=l-c,i[f>>2]=e-c,i[s>>2]=u-c)}function X(e){var t,n=0,r=0,a=0,o=0,s=0;n=0|i[(e|=0)>>2],r=0|i[(t=e+4|0)>>2],(0|n)<0&&(r=r-n|0,i[t>>2]=r,i[(s=e+8|0)>>2]=(0|i[s>>2])-n,i[e>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[e>>2]=n,o=(0|i[(s=e+8|0)>>2])-r|0,i[s>>2]=o,i[t>>2]=0,r=0):(s=o=e+8|0,o=0|i[o>>2]),(0|o)<0&&(n=n-o|0,i[e>>2]=n,r=r-o|0,i[t>>2]=r,i[s>>2]=0,o=0),(0|(a=(0|o)<(0|(a=(0|r)<(0|n)?r:n))?o:a))<=0||(i[e>>2]=n-a,i[t>>2]=r-a,i[s>>2]=o-a)}function Z(e,t){t|=0;var n,r;r=0|i[(e|=0)+8>>2],n=+((0|i[e+4>>2])-r|0),a[t>>3]=+((0|i[e>>2])-r|0)-.5*n,a[t+8>>3]=.8660254037844386*n}function J(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[t>>2])+(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])+(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])+(0|i[e+8>>2])}function K(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[e>>2])-(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])-(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])-(0|i[t+8>>2])}function $(e,t){t|=0;var n,r=0;r=0|y(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|y(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|y(0|i[(e=e+8|0)>>2],t),i[e>>2]=t}function ee(e){var t,n,r=0,a=0,o=0,s=0,A=0;A=(0|(n=0|i[(e|=0)>>2]))<0,e=(e=(a=(0|(s=((t=(0|(o=(0|i[e+4>>2])-(A?n:0)|0))<0)?0-o|0:0)+((0|i[e+8>>2])-(A?n:0))|0))<0)?0:s)-((o=(0|(a=(0|e)<(0|(a=(0|(r=(t?0:o)-(a?s:0)|0))<(0|(s=(A?0:n)-(t?o:0)-(a?s:0)|0))?r:s))?e:a))>0)?a:0)|0,r=r-(o?a:0)|0;e:do{switch(s-(o?a:0)|0){case 0:switch(0|r){case 0:return 0|(A=0==(0|e)?0:1==(0|e)?1:7);case 1:return 0|(A=0==(0|e)?2:1==(0|e)?3:7);default:break e}case 1:switch(0|r){case 0:return 0|(A=0==(0|e)?4:1==(0|e)?5:7);case 1:if(e)break e;return 0|(e=6);default:break e}}}while(0);return 0|(A=7)}function te(e){var t,n,r=0,a=0,o=0,s=0,A=0;a=0|i[(t=(e|=0)+8|0)>>2],o=0|mt(+((3*(r=(0|i[e>>2])-a|0)|0)-(a=(0|i[(n=e+4|0)>>2])-a|0)|0)/7),i[e>>2]=o,r=0|mt(+((a<<1)+r|0)/7),i[n>>2]=r,i[t>>2]=0,a=r-o|0,(0|o)<0?(A=0-o|0,i[n>>2]=a,i[t>>2]=A,i[e>>2]=0,r=a,o=0,a=A):a=0,(0|r)<0&&(o=o-r|0,i[e>>2]=o,a=a-r|0,i[t>>2]=a,i[n>>2]=0,r=0),A=o-a|0,s=r-a|0,(0|a)<0?(i[e>>2]=A,i[n>>2]=s,i[t>>2]=0,r=s,s=A,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|r)<(0|s)?r:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=r-o,i[t>>2]=a-o)}function ne(e){var t,n,r=0,a=0,o=0,s=0,A=0;a=0|i[(t=(e|=0)+8|0)>>2],o=0|mt(+(((r=(0|i[e>>2])-a|0)<<1)+(a=(0|i[(n=e+4|0)>>2])-a|0)|0)/7),i[e>>2]=o,r=0|mt(+((3*a|0)-r|0)/7),i[n>>2]=r,i[t>>2]=0,a=r-o|0,(0|o)<0?(A=0-o|0,i[n>>2]=a,i[t>>2]=A,i[e>>2]=0,r=a,o=0,a=A):a=0,(0|r)<0&&(o=o-r|0,i[e>>2]=o,a=a-r|0,i[t>>2]=a,i[n>>2]=0,r=0),A=o-a|0,s=r-a|0,(0|a)<0?(i[e>>2]=A,i[n>>2]=s,i[t>>2]=0,r=s,s=A,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|r)<(0|s)?r:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=r-o,i[t>>2]=a-o)}function re(e){var t,n,r,a=0,o=0,s=0,A=0;a=0|i[(e|=0)>>2],o=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],A=o+(3*a|0)|0,i[e>>2]=A,o=s+(3*o|0)|0,i[n>>2]=o,a=(3*s|0)+a|0,i[r>>2]=a,s=o-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=s,i[r>>2]=a,i[e>>2]=0,o=s,s=0):s=A,(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,A=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,a=0):A=o,(0|(o=(0|a)<(0|(o=(0|A)<(0|s)?A:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=A-o,i[r>>2]=a-o)}function ie(e){var t,n,r,a=0,o=0,s=0,A=0;A=0|i[(e|=0)>>2],s=(3*(a=0|i[(n=e+4|0)>>2])|0)+A|0,A=(o=0|i[(r=e+8|0)>>2])+(3*A|0)|0,i[e>>2]=A,i[n>>2]=s,a=(3*o|0)+a|0,i[r>>2]=a,o=s-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,A=0):o=s,(0|o)<0&&(A=A-o|0,i[e>>2]=A,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=A-a|0,s=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,A=t,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|s)<(0|A)?s:A))?a:o))<=0||(i[e>>2]=A-o,i[n>>2]=s-o,i[r>>2]=a-o)}function ae(e,t){e|=0;var n,r,a,o=0,s=0,A=0;((t|=0)+-1|0)>>>0>=6||(A=(0|i[15472+(12*t|0)>>2])+(0|i[e>>2])|0,i[e>>2]=A,a=e+4|0,s=(0|i[15472+(12*t|0)+4>>2])+(0|i[a>>2])|0,i[a>>2]=s,r=e+8|0,t=(0|i[15472+(12*t|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=t,o=s-A|0,(0|A)<0?(t=t-A|0,i[a>>2]=o,i[r>>2]=t,i[e>>2]=0,s=0):(o=s,s=A),(0|o)<0&&(s=s-o|0,i[e>>2]=s,t=t-o|0,i[r>>2]=t,i[a>>2]=0,o=0),n=s-t|0,A=o-t|0,(0|t)<0?(i[e>>2]=n,i[a>>2]=A,i[r>>2]=0,s=n,t=0):A=o,(0|(o=(0|t)<(0|(o=(0|A)<(0|s)?A:s))?t:o))<=0||(i[e>>2]=s-o,i[a>>2]=A-o,i[r>>2]=t-o))}function oe(e){var t,n,r,a=0,o=0,s=0,A=0;A=0|i[(e|=0)>>2],s=(a=0|i[(n=e+4|0)>>2])+A|0,A=(o=0|i[(r=e+8|0)>>2])+A|0,i[e>>2]=A,i[n>>2]=s,a=o+a|0,i[r>>2]=a,o=s-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,s=0):(o=s,s=A),(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,A=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,a=0):A=o,(0|(o=(0|a)<(0|(o=(0|A)<(0|s)?A:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=A-o,i[r>>2]=a-o)}function se(e){var t,n,r,a=0,o=0,s=0,A=0;a=0|i[(e|=0)>>2],s=0|i[(n=e+4|0)>>2],o=0|i[(r=e+8|0)>>2],A=s+a|0,i[e>>2]=A,s=o+s|0,i[n>>2]=s,a=o+a|0,i[r>>2]=a,o=s-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,s=0):(o=s,s=A),(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,A=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,a=0):A=o,(0|(o=(0|a)<(0|(o=(0|A)<(0|s)?A:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=A-o,i[r>>2]=a-o)}function Ae(e){switch(0|(e|=0)){case 1:e=5;break;case 5:e=4;break;case 4:e=6;break;case 6:e=2;break;case 2:e=3;break;case 3:e=1}return 0|e}function le(e){switch(0|(e|=0)){case 1:e=3;break;case 3:e=2;break;case 2:e=6;break;case 6:e=4;break;case 4:e=5;break;case 5:e=1}return 0|e}function ce(e){var t,n,r,a=0,o=0,s=0,A=0;a=0|i[(e|=0)>>2],o=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],A=o+(a<<1)|0,i[e>>2]=A,o=s+(o<<1)|0,i[n>>2]=o,a=(s<<1)+a|0,i[r>>2]=a,s=o-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=s,i[r>>2]=a,i[e>>2]=0,o=s,s=0):s=A,(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,A=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=A,i[r>>2]=0,s=t,a=0):A=o,(0|(o=(0|a)<(0|(o=(0|A)<(0|s)?A:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=A-o,i[r>>2]=a-o)}function ue(e){var t,n,r,a=0,o=0,s=0,A=0;A=0|i[(e|=0)>>2],s=((a=0|i[(n=e+4|0)>>2])<<1)+A|0,A=(o=0|i[(r=e+8|0)>>2])+(A<<1)|0,i[e>>2]=A,i[n>>2]=s,a=(o<<1)+a|0,i[r>>2]=a,o=s-A|0,(0|A)<0?(a=a-A|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,A=0):o=s,(0|o)<0&&(A=A-o|0,i[e>>2]=A,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=A-a|0,s=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,A=t,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|s)<(0|A)?s:A))?a:o))<=0||(i[e>>2]=A-o,i[n>>2]=s-o,i[r>>2]=a-o)}function he(e,t){t|=0;var n,r,a,o=0,s=0,A=0;return a=(0|(r=(0|i[(e|=0)>>2])-(0|i[t>>2])|0))<0,n=(0|(s=(0|i[e+4>>2])-(0|i[t+4>>2])-(a?r:0)|0))<0,t=(t=(e=(0|(A=(a?0-r|0:0)+(0|i[e+8>>2])-(0|i[t+8>>2])+(n?0-s|0:0)|0))<0)?0:A)-((s=(0|(e=(0|t)<(0|(e=(0|(o=(n?0:s)-(e?A:0)|0))<(0|(A=(a?0:r)-(n?s:0)-(e?A:0)|0))?o:A))?t:e))>0)?e:0)|0,o=o-(s?e:0)|0,0|((0|(e=(0|(e=A-(s?e:0)|0))>-1?e:0-e|0))>(0|(t=(0|(o=(0|o)>-1?o:0-o|0))>(0|(t=(0|t)>-1?t:0-t|0))?o:t))?e:t)}function de(e,t){t|=0;var n;n=0|i[(e|=0)+8>>2],i[t>>2]=(0|i[e>>2])-n,i[t+4>>2]=(0|i[e+4>>2])-n}function fe(e,t){t|=0;var n,r,a,o=0,s=0,A=0;s=0|i[(e|=0)>>2],i[t>>2]=s,e=0|i[e+4>>2],i[(r=t+4|0)>>2]=e,i[(a=t+8|0)>>2]=0,o=e-s|0,(0|s)<0?(e=0-s|0,i[r>>2]=o,i[a>>2]=e,i[t>>2]=0,s=0):(o=e,e=0),(0|o)<0&&(s=s-o|0,i[t>>2]=s,e=e-o|0,i[a>>2]=e,i[r>>2]=0,o=0),n=s-e|0,A=o-e|0,(0|e)<0?(i[t>>2]=n,i[r>>2]=A,i[a>>2]=0,o=A,A=n,e=0):A=s,(0|(s=(0|e)<(0|(s=(0|o)<(0|A)?o:A))?e:s))<=0||(i[t>>2]=A-s,i[r>>2]=o-s,i[a>>2]=e-s)}function pe(e){var t,n,r,a;n=(a=0|i[(t=(e|=0)+8|0)>>2])-(0|i[e>>2])|0,i[e>>2]=n,e=(0|i[(r=e+4|0)>>2])-a|0,i[r>>2]=e,i[t>>2]=0-(e+n)}function me(e){var t,n,r=0,a=0,o=0,s=0,A=0;r=0-(a=0|i[(e|=0)>>2])|0,i[e>>2]=r,i[(t=e+8|0)>>2]=0,s=(o=0|i[(n=e+4|0)>>2])+a|0,(0|a)>0?(i[n>>2]=s,i[t>>2]=a,i[e>>2]=0,r=0,o=s):a=0,(0|o)<0?(A=r-o|0,i[e>>2]=A,a=a-o|0,i[t>>2]=a,i[n>>2]=0,s=A-a|0,r=0-a|0,(0|a)<0?(i[e>>2]=s,i[n>>2]=r,i[t>>2]=0,o=r,a=0):(o=0,s=A)):s=r,(0|(r=(0|a)<(0|(r=(0|o)<(0|s)?o:s))?a:r))<=0||(i[e>>2]=s-r,i[n>>2]=o-r,i[t>>2]=a-r)}function ge(e,t,n,r){t|=0,n|=0,r|=0;var o,s=0,A=0,l=0,c=0;if(o=P,P=P+32|0,function(e,t){t|=0;var n=0,r=0,i=0;n=+a[(e=e|0)>>3],r=+u(+n),n=+h(+n),a[t+16>>3]=n,n=+a[e+8>>3],i=r*+u(+n),a[t>>3]=i,n=r*+h(+n),a[t+8>>3]=n}(e|=0,A=o),i[n>>2]=0,s=+At(15888,A),(l=+At(15912,A))<s&&(i[n>>2]=1,s=l),(l=+At(15936,A))<s&&(i[n>>2]=2,s=l),(l=+At(15960,A))<s&&(i[n>>2]=3,s=l),(l=+At(15984,A))<s&&(i[n>>2]=4,s=l),(l=+At(16008,A))<s&&(i[n>>2]=5,s=l),(l=+At(16032,A))<s&&(i[n>>2]=6,s=l),(l=+At(16056,A))<s&&(i[n>>2]=7,s=l),(l=+At(16080,A))<s&&(i[n>>2]=8,s=l),(l=+At(16104,A))<s&&(i[n>>2]=9,s=l),(l=+At(16128,A))<s&&(i[n>>2]=10,s=l),(l=+At(16152,A))<s&&(i[n>>2]=11,s=l),(l=+At(16176,A))<s&&(i[n>>2]=12,s=l),(l=+At(16200,A))<s&&(i[n>>2]=13,s=l),(l=+At(16224,A))<s&&(i[n>>2]=14,s=l),(l=+At(16248,A))<s&&(i[n>>2]=15,s=l),(l=+At(16272,A))<s&&(i[n>>2]=16,s=l),(l=+At(16296,A))<s&&(i[n>>2]=17,s=l),(l=+At(16320,A))<s&&(i[n>>2]=18,s=l),(l=+At(16344,A))<s&&(i[n>>2]=19,s=l),(l=+f(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(P=o);if(n=0|i[n>>2],s=+Ee((s=+a[16368+(24*n|0)>>3])-+Ee(+function(e,t){e|=0;var n=0,r=0,i=0,o=0,s=0;return o=+a[(t=t|0)>>3],r=+u(+o),i=+a[t+8>>3]-+a[e+8>>3],s=r*+h(+i),n=+a[e>>3],+ +g(+s,+(+h(+o)*+u(+n)-+u(+i)*(r*+h(+n))))}(15568+(n<<4)|0,e))),c=0|Fe(t)?+Ee(s+-.3334731722518321):s,s=+d(+l)/.381966011250105,(0|t)>0){A=0;do{s*=2.6457513110645907,A=A+1|0}while((0|A)!=(0|t))}l=+u(+c)*s,a[r>>3]=l,c=+h(+c)*s,a[r+8>>3]=c,P=o}function ve(e,t,n,r,o){t|=0,n|=0,r|=0,o|=0;var s=0,c=0;if((s=+function(e){var t=0,n=0;return n=+a[(e=e|0)>>3],t=+a[e+8>>3],+ +l(+(n*n+t*t))}(e|=0))<1e-16)return t=15568+(t<<4)|0,i[o>>2]=i[t>>2],i[o+4>>2]=i[t+4>>2],i[o+8>>2]=i[t+8>>2],void(i[o+12>>2]=i[t+12>>2]);if(c=+g(+ +a[e+8>>3],+ +a[e>>3]),(0|n)>0){e=0;do{s/=2.6457513110645907,e=e+1|0}while((0|e)!=(0|n))}r?(s/=3,n=0==(0|Fe(n)),s=+m(.381966011250105*(n?s:s/2.6457513110645907))):(s=+m(.381966011250105*s),0|Fe(n)&&(c=+Ee(c+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,r|=0;var o=0,s=0,l=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],void(i[r+12>>2]=i[e+12>>2]);s=t<0?t+6.283185307179586:t,s=t>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(o=+A(+(s+-3.141592653589793))<1e-16,t=+a[e>>3],o){t-=n,a[r>>3]=t,o=r;break}if(l=+u(+n),n=+h(+n),t=l*+h(+t)+ +u(+s)*(n*+u(+t)),t=+p(+((t=t>1?1:t)<-1?-1:t)),a[r>>3]=t,+A(+(t+-1.5707963267948966))<1e-16)return a[r>>3]=1.5707963267948966,void(a[r+8>>3]=0);if(+A(+(t+1.5707963267948966))<1e-16)return a[r>>3]=-1.5707963267948966,void(a[r+8>>3]=0);if(c=+u(+t),s=n*+h(+s)/c,n=+a[e>>3],t=(l-+h(+t)*+h(+n))/+u(+n)/c,l=s>1?1:s,t=t>1?1:t,(t=+a[e+8>>3]+ +g(+(l<-1?-1:l),+(t<-1?-1:t)))>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);return void(a[r+8>>3]=t)}t=+a[e>>3]+n,a[r>>3]=t,o=r}while(0);if(+A(+(t+-1.5707963267948966))<1e-16)return a[o>>3]=1.5707963267948966,void(a[r+8>>3]=0);if(+A(+(t+1.5707963267948966))<1e-16)return a[o>>3]=-1.5707963267948966,void(a[r+8>>3]=0);if((t=+a[e+8>>3])>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);a[r+8>>3]=t}(15568+(t<<4)|0,+Ee(+a[16368+(24*t|0)>>3]-c),s,o)}function ye(e,t,n){t|=0,n|=0;var r,a;r=P,P=P+16|0,Z((e|=0)+4|0,a=r),ve(a,0|i[e>>2],t,0,n),P=r}function xe(e,t,n,r,o){e|=0,t|=0,n|=0,r|=0,o|=0;var s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,S,E,T,C,L,R=0,q=0,D=0,I=0,B=0,O=0;if(L=P,P=P+272|0,I=L+240|0,E=L,T=L+224|0,C=L+208|0,g=L+176|0,v=L+160|0,y=L+192|0,x=L+144|0,b=L+128|0,_=L+112|0,w=L+96|0,S=L+80|0,i[(R=L+256|0)>>2]=t,i[I>>2]=i[e>>2],i[I+4>>2]=i[e+4>>2],i[I+8>>2]=i[e+8>>2],i[I+12>>2]=i[e+12>>2],be(I,R,E),i[o>>2]=0,(0|(I=r+n+(5==(0|r)&1)|0))<=(0|n))P=L;else{A=T+4|0,l=g+4|0,c=n+5|0,u=16848+((s=0|i[R>>2])<<2)|0,h=16928+(s<<2)|0,d=b+8|0,f=_+8|0,p=w+8|0,m=C+4|0,D=n;e:for(;;){q=E+(((0|D)%5|0)<<4)|0,i[C>>2]=i[q>>2],i[C+4>>2]=i[q+4>>2],i[C+8>>2]=i[q+8>>2],i[C+12>>2]=i[q+12>>2];do{}while(2==(0|_e(C,s,0,1)));if((0|D)>(0|n)&0!=(0|Fe(t))){if(i[g>>2]=i[C>>2],i[g+4>>2]=i[C+4>>2],i[g+8>>2]=i[C+8>>2],i[g+12>>2]=i[C+12>>2],Z(A,v),r=0|i[g>>2],R=0|i[17008+(80*r|0)+(i[T>>2]<<2)>>2],i[g>>2]=i[18608+(80*r|0)+(20*R|0)>>2],(0|(q=0|i[18608+(80*r|0)+(20*R|0)+16>>2]))>0){e=0;do{oe(l),e=e+1|0}while((0|e)<(0|q))}switch(q=18608+(80*r|0)+(20*R|0)+4|0,i[y>>2]=i[q>>2],i[y+4>>2]=i[q+4>>2],i[y+8>>2]=i[q+8>>2],$(y,3*(0|i[u>>2])|0),J(l,y,l),X(l),Z(l,x),B=+(0|i[h>>2]),a[b>>3]=3*B,a[d>>3]=0,O=-1.5*B,a[_>>3]=O,a[f>>3]=2.598076211353316*B,a[w>>3]=O,a[p>>3]=-2.598076211353316*B,0|i[17008+(80*(0|i[g>>2])|0)+(i[C>>2]<<2)>>2]){case 1:e=_,r=b;break;case 3:e=w,r=_;break;case 2:e=b,r=w;break;default:e=12;break e}ot(v,x,r,e,S),ve(S,0|i[g>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])}if((0|D)<(0|c)&&(Z(m,g),ve(g,0|i[C>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])),i[T>>2]=i[C>>2],i[T+4>>2]=i[C+4>>2],i[T+8>>2]=i[C+8>>2],i[T+12>>2]=i[C+12>>2],(0|(D=D+1|0))>=(0|I)){e=3;break}}3!=(0|e)?12==(0|e)&&M(22474,22521,581,22531):P=L}}function be(e,t,n){e|=0,t|=0,n|=0;var r,a=0,o=0,s=0,A=0,l=0;r=P,P=P+128|0,o=r,A=20208,l=(s=a=r+64|0)+60|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));A=20272,l=(s=o)+60|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));a=(l=0==(0|Fe(0|i[t>>2])))?a:o,ce(o=e+4|0),ue(o),0|Fe(0|i[t>>2])&&(ie(o),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],J(o,a,t=n+4|0),X(t),i[n+16>>2]=i[e>>2],J(o,a+12|0,t=n+20|0),X(t),i[n+32>>2]=i[e>>2],J(o,a+24|0,t=n+36|0),X(t),i[n+48>>2]=i[e>>2],J(o,a+36|0,t=n+52|0),X(t),i[n+64>>2]=i[e>>2],J(o,a+48|0,n=n+68|0),X(n),P=r}function _e(e,t,n,r){n|=0,r|=0;var a,o,s,A,l,c,u=0,h=0,d=0,f=0,p=0;if(c=P,P=P+32|0,l=c+12|0,o=c,p=(e|=0)+4|0,f=0|i[16928+((t|=0)<<2)>>2],f=(A=0!=(0|r))?3*f|0:f,u=0|i[p>>2],a=0|i[(s=e+8|0)>>2],A){if((0|(u=a+u+(r=0|i[(h=e+12|0)>>2])|0))==(0|f))return P=c,0|(p=1);d=h}else u=a+u+(r=0|i[(d=e+12|0)>>2])|0;if((0|u)<=(0|f))return P=c,0|(p=0);do{if((0|r)>0){if(r=0|i[e>>2],(0|a)>0){h=18608+(80*r|0)+60|0,r=e;break}r=18608+(80*r|0)+40|0,n?(Q(l,f,0,0),K(p,l,o),se(o),J(o,l,p),h=r,r=e):(h=r,r=e)}else h=18608+(80*(0|i[e>>2])|0)+20|0,r=e}while(0);if(i[r>>2]=i[h>>2],(0|i[(u=h+16|0)>>2])>0){r=0;do{oe(p),r=r+1|0}while((0|r)<(0|i[u>>2]))}return e=h+4|0,i[l>>2]=i[e>>2],i[l+4>>2]=i[e+4>>2],i[l+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],$(l,A?3*t|0:t),J(p,l,p),X(p),r=A&&((0|i[s>>2])+(0|i[p>>2])+(0|i[d>>2])|0)==(0|f)?1:2,P=c,0|(p=r)}function we(e,t){e|=0,t|=0;var n=0;do{n=0|_e(e,t,0,1)}while(2==(0|n));return 0|n}function Me(e,t,n,r,o){e|=0,t|=0,n|=0,r|=0,o|=0;var s,A,l,c,u,h,d,f,p,m,g,v,y,x,b,_,w,S,E=0,T=0,C=0,L=0,R=0;if(S=P,P=P+240|0,x=S+208|0,b=S,_=S+192|0,w=S+176|0,p=S+160|0,m=S+144|0,g=S+128|0,v=S+112|0,y=S+96|0,i[(E=S+224|0)>>2]=t,i[x>>2]=i[e>>2],i[x+4>>2]=i[e+4>>2],i[x+8>>2]=i[e+8>>2],i[x+12>>2]=i[e+12>>2],Se(x,E,b),i[o>>2]=0,(0|(f=r+n+(6==(0|r)&1)|0))<=(0|n))P=S;else{A=n+6|0,l=16928+((s=0|i[E>>2])<<2)|0,c=m+8|0,u=g+8|0,h=v+8|0,d=_+4|0,T=0,C=n,r=-1;e:for(;;){if(e=b+((E=(0|C)%6|0)<<4)|0,i[_>>2]=i[e>>2],i[_+4>>2]=i[e+4>>2],i[_+8>>2]=i[e+8>>2],i[_+12>>2]=i[e+12>>2],e=T,T=0|_e(_,s,0,1),(0|C)>(0|n)&0!=(0|Fe(t))&&(1!=(0|e)&&(0|i[_>>2])!=(0|r))){switch(Z(b+(((E+5|0)%6|0)<<4)+4|0,w),Z(b+(E<<4)+4|0,p),L=+(0|i[l>>2]),a[m>>3]=3*L,a[c>>3]=0,R=-1.5*L,a[g>>3]=R,a[u>>3]=2.598076211353316*L,a[v>>3]=R,a[h>>3]=-2.598076211353316*L,E=0|i[x>>2],0|i[17008+(80*E|0)+(((0|r)==(0|E)?0|i[_>>2]:r)<<2)>>2]){case 1:e=g,r=m;break;case 3:e=v,r=g;break;case 2:e=m,r=v;break;default:e=8;break e}ot(w,p,r,e,y),0|st(w,y)||0|st(p,y)||(ve(y,0|i[x>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2]))}if((0|C)<(0|A)&&(Z(d,w),ve(w,0|i[_>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])),(0|(C=C+1|0))>=(0|f)){e=3;break}r=0|i[_>>2]}3!=(0|e)?8==(0|e)&&M(22557,22521,746,22602):P=S}}function Se(e,t,n){e|=0,t|=0,n|=0;var r,a=0,o=0,s=0,A=0,l=0;r=P,P=P+160|0,o=r,A=20336,l=(s=a=r+80|0)+72|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));A=20416,l=(s=o)+72|0;do{i[s>>2]=i[A>>2],s=s+4|0,A=A+4|0}while((0|s)<(0|l));a=(l=0==(0|Fe(0|i[t>>2])))?a:o,ce(o=e+4|0),ue(o),0|Fe(0|i[t>>2])&&(ie(o),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],J(o,a,t=n+4|0),X(t),i[n+16>>2]=i[e>>2],J(o,a+12|0,t=n+20|0),X(t),i[n+32>>2]=i[e>>2],J(o,a+24|0,t=n+36|0),X(t),i[n+48>>2]=i[e>>2],J(o,a+36|0,t=n+52|0),X(t),i[n+64>>2]=i[e>>2],J(o,a+48|0,t=n+68|0),X(t),i[n+80>>2]=i[e>>2],J(o,a+60|0,n=n+84|0),X(n),P=r}function Ee(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function Te(e,t){return t|=0,+A(+(+a[(e|=0)>>3]-+a[t>>3]))<17453292519943298e-27?0|(t=+A(+(+a[e+8>>3]-+a[t+8>>3]))<17453292519943298e-27):0|(t=0)}function Ce(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+h(.5*(r-n)))*i+(o=+h(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+u(+r)*+u(+n)*o),2*+g(+ +l(+o),+ +l(+(1-o)))*6371.007180918475}function Le(e,t,n){e|=0,n|=0;var r,i,o,s,A=0,c=0,f=0,p=0,v=0,y=0;return y=+a[(t|=0)>>3],o=+a[e>>3],v=+h(.5*(y-o)),f=+a[t+8>>3],i=+a[e+8>>3],p=+h(.5*(f-i)),r=+u(+o),s=+u(+y),p=2*+g(+ +l(+(p=v*v+p*(s*r*p))),+ +l(+(1-p))),v=+a[n>>3],y=+h(.5*(v-y)),A=+a[n+8>>3],f=+h(.5*(A-f)),c=+u(+v),f=2*+g(+ +l(+(f=y*y+f*(s*c*f))),+ +l(+(1-f))),v=+h(.5*(o-v)),A=+h(.5*(i-A)),A=2*+g(+ +l(+(A=v*v+A*(r*c*A))),+ +l(+(1-A))),4*+m(+ +l(+ +d(.5*(c=.5*(p+f+A)))*+d(.5*(c-p))*+d(.5*(c-f))*+d(.5*(c-A))))}function Pe(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),45),w(),127&t|0}function Re(e,t){var n=0,r=0,i=0,a=0,o=0,s=0;if(!(!0&134217728==(-16777216&(t|=0)|0)))return 0|(t=0);if(o=0|Mt(0|(e|=0),0|t,45),w(),(o&=127)>>>0>121)return 0|(t=0);n=0|Mt(0|e,0|t,52),w(),n&=15;do{if(0|n){for(i=1,r=0;;){if(a=0|Mt(0|e,0|t,3*(15-i|0)|0),w(),0!=(0|(a&=7))&(1^r)){if(1==(0|a)&0!=(0|O(o))){s=0,r=13;break}r=1}if(7==(0|a)){s=0,r=13;break}if(!(i>>>0<n>>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Mt(0|e,0|t,3*(14-n|0)|0),w(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function qe(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(e|=i=0|St(0|n,0,52),t=0|w()|-15728641&t,(0|r)>(0|n))do{i=0|St(7,0,3*(14-n|0)|0),n=n+1|0,e|=i,t=0|w()|t}while((0|n)<(0|r))}else t=0,e=0}else t=0,e=0;return _(0|t),0|e}function De(e,t,n,r){n|=0,r|=0;var a,o=0,s=0,A=0,l=0,c=0,u=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(A&=15))<=(0|n)){if((0|A)==(0|n))return i[(n=r)>>2]=e,void(i[n+4>>2]=t);if(a=(0|(c=0|tt(7,n-A|0)))/7|0,l=0|Mt(0|e,0|t,45),w(),0|O(127&l)){e:do{if(A)for(s=1;;){if(o=0|Mt(0|e,0|t,3*(15-s|0)|0),w(),0|(o&=7))break e;if(!(s>>>0<A>>>0)){o=0;break}s=s+1|0}else o=0}while(0);s=0==(0|o)}else s=0;if(u=0|St(A+1|0,0,52),o=0|w()|-15728641&t,De(t=(u|e)&~(t=0|St(7,0,0|(l=3*(14-A|0)|0))),A=o&~(0|w()),n,r),o=r+(a<<3)|0,!s)return De((u=0|St(1,0,0|l))|t,0|w()|A,n,o),u=o+(a<<3)|0,De((c=0|St(2,0,0|l))|t,0|w()|A,n,u),u=u+(a<<3)|0,De((c=0|St(3,0,0|l))|t,0|w()|A,n,u),u=u+(a<<3)|0,De((c=0|St(4,0,0|l))|t,0|w()|A,n,u),u=u+(a<<3)|0,De((c=0|St(5,0,0|l))|t,0|w()|A,n,u),void De((c=0|St(6,0,0|l))|t,0|w()|A,n,u+(a<<3)|0);s=o+(a<<3)|0,(0|c)>6&&(Lt(0|o,0,(u=(s>>>0>(c=o+8|0)>>>0?s:c)+-1+(0-o)|0)+8&-8|0),o=c+(u>>>3<<3)|0),De((u=0|St(2,0,0|l))|t,0|w()|A,n,o),u=o+(a<<3)|0,De((c=0|St(3,0,0|l))|t,0|w()|A,n,u),u=u+(a<<3)|0,De((c=0|St(4,0,0|l))|t,0|w()|A,n,u),u=u+(a<<3)|0,De((c=0|St(5,0,0|l))|t,0|w()|A,n,u),De((c=0|St(6,0,0|l))|t,0|w()|A,n,u+(a<<3)|0)}}function Ie(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),45),w(),!(0|O(127&i)))return 0|(i=0);i=0|Mt(0|e,0|t,52),w(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7))break e;if(!(r>>>0<i>>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function Be(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),w(),0|(n&=7)){r=5;break}if(!(r>>>0<i>>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Oe(e,t){var n=0,r=0,i=0,a=0,o=0,s=0,A=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(A&=15))return A=e,_(0|(s=t)),0|A;for(s=1,n=0;;){r=0|St(7,0,0|(a=3*(15-s|0)|0)),i=0|w(),o=0|Mt(0|e,0|t,0|a),w(),e=(a=0|St(0|Ae(7&o),0,0|a))|e&~r,t=(o=0|w())|t&~i;e:do{if(!n)if(0==(a&r|0)&0==(o&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(o=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),7&o){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(i=0|Mt(0|e,0|t,0|(o=3*(15-n|0)|0)),w(),a=0|St(7,0,0|o),t&=~(0|w()),e=e&~a|(o=0|St(0|Ae(7&i),0,0|o)),t=0|t|w(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<A>>>0))break;s=s+1|0}return _(0|t),0|e}function ke(e,t){var n=0,r=0,i=0,a=0,o=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,_(0|(n=t)),0|r;for(n=1;o=0|Mt(0|e,0|t,0|(a=3*(15-n|0)|0)),w(),i=0|St(7,0,0|a),t&=~(0|w()),e=(a=0|St(0|Ae(7&o),0,0|a))|e&~i,t=0|w()|t,n>>>0<r>>>0;)n=n+1|0;return _(0|t),0|e}function Ne(e,t){var n=0,r=0,i=0,a=0,o=0,s=0,A=0;if(A=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(A&=15))return A=e,_(0|(s=t)),0|A;for(s=1,n=0;;){r=0|St(7,0,0|(a=3*(15-s|0)|0)),i=0|w(),o=0|Mt(0|e,0|t,0|a),w(),e=(a=0|St(0|le(7&o),0,0|a))|e&~r,t=(o=0|w())|t&~i;e:do{if(!n)if(0==(a&r|0)&0==(o&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),w(),r&=15){n=1;t:for(;;){switch(o=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),7&o){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(a=0|St(7,0,0|(i=3*(15-n|0)|0)),o=t&~(0|w()),t=0|Mt(0|e,0|t,0|i),w(),e=e&~a|(t=0|St(0|le(7&t),0,0|i)),t=0|o|w(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<A>>>0))break;s=s+1|0}return _(0|t),0|e}function ze(e,t){var n=0,r=0,i=0,a=0,o=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),!(r&=15))return r=e,_(0|(n=t)),0|r;for(n=1;a=0|St(7,0,0|(o=3*(15-n|0)|0)),i=t&~(0|w()),t=0|Mt(0|e,0|t,0|o),w(),e=(t=0|St(0|le(7&t),0,0|o))|e&~a,t=0|w()|i,n>>>0<r>>>0;)n=n+1|0;return _(0|t),0|e}function Fe(e){return 0|(0|(e|=0))%2}function Ue(e,t){e|=0;var n,r;return r=P,P=P+16|0,n=r,(t|=0)>>>0<=15&&2146435072!=(2146435072&i[e+4>>2]|0)&&2146435072!=(2146435072&i[e+8+4>>2]|0)?(!function(e,t,n){var r,i;r=P,P=P+16|0,ge(e|=0,t|=0,n|=0,i=r),Y(i,n+4|0),P=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,a=0,o=0,s=0,A=0,l=0,c=0,u=0;if(n=P,P=P+64|0,l=n+40|0,a=n+24|0,o=n+12|0,s=n,St(0|(t|=0),0,52),r=134225919|w(),!t)return(0|i[e+4>>2])>2||(0|i[e+8>>2])>2||(0|i[e+12>>2])>2?(l=0,_(0|(A=0)),P=n,0|l):(St(0|N(e),0,45),A=0|w()|r,l=-1,_(0|A),P=n,0|l);if(i[l>>2]=i[e>>2],i[l+4>>2]=i[e+4>>2],i[l+8>>2]=i[e+8>>2],i[l+12>>2]=i[e+12>>2],A=l+4|0,(0|t)>0)for(e=-1;i[a>>2]=i[A>>2],i[a+4>>2]=i[A+4>>2],i[a+8>>2]=i[A+8>>2],1&t?(te(A),i[o>>2]=i[A>>2],i[o+4>>2]=i[A+4>>2],i[o+8>>2]=i[A+8>>2],re(o)):(ne(A),i[o>>2]=i[A>>2],i[o+4>>2]=i[A+4>>2],i[o+8>>2]=i[A+8>>2],ie(o)),K(a,o,s),X(s),c=0|St(7,0,0|(u=3*(15-t|0)|0)),r&=~(0|w()),e=(u=0|St(0|ee(s),0,0|u))|e&~c,r=0|w()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[A>>2])<=2&&(0|i[l+8>>2])<=2&&(0|i[l+12>>2])<=2){if(t=0|St(0|(a=0|N(l)),0,45),t|=e,e=0|w()|-1040385&r,s=0|z(l),!(0|O(a))){if((0|s)<=0)break;for(o=0;;){if(a=0|Mt(0|t,0|e,52),w(),a&=15)for(r=1;l=0|Mt(0|t,0|e,0|(u=3*(15-r|0)|0)),w(),c=0|St(7,0,0|u),e&=~(0|w()),t=t&~c|(u=0|St(0|Ae(7&l),0,0|u)),e=0|e|w(),r>>>0<a>>>0;)r=r+1|0;if((0|(o=o+1|0))==(0|s))break e}}o=0|Mt(0|t,0|e,52),w(),o&=15;t:do{if(o){r=1;n:for(;;){switch(u=0|Mt(0|t,0|e,3*(15-r|0)|0),w(),7&u){case 1:break n;case 0:break;default:break t}if(!(r>>>0<o>>>0))break t;r=r+1|0}if(0|F(a,0|i[l>>2]))for(r=1;c=0|St(7,0,0|(l=3*(15-r|0)|0)),u=e&~(0|w()),e=0|Mt(0|t,0|e,0|l),w(),t=t&~c|(e=0|St(0|le(7&e),0,0|l)),e=0|u|w(),r>>>0<o>>>0;)r=r+1|0;else for(r=1;l=0|Mt(0|t,0|e,0|(u=3*(15-r|0)|0)),w(),c=0|St(7,0,0|u),e&=~(0|w()),t=t&~c|(u=0|St(0|Ae(7&l),0,0|u)),e=0|e|w(),r>>>0<o>>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{t=0|Oe(t,e),e=0|w(),r=r+1|0}while((0|r)!=(0|s))}}else t=0,e=0}while(0);return u=t,_(0|(c=e)),P=n,0|u}(n,t),e=0|w()):(e=0,t=0),_(0|e),P=r,0|t}function He(e,t,n){var r,a=0,o=0,s=0;if(r=(n|=0)+4|0,o=0|Mt(0|(e|=0),0|(t|=0),52),w(),o&=15,s=0|Mt(0|e,0|t,45),w(),a=0==(0|o),0|O(127&s)){if(a)return 0|(s=1);a=1}else{if(a)return 0|(s=0);a=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?re(r):ie(r),s=0|Mt(0|e,0|t,3*(15-n|0)|0),w(),ae(r,7&s),n>>>0<o>>>0;)n=n+1|0;return 0|a}function Ge(e,t,n){n|=0;var r,a,o=0,s=0,A=0,l=0,c=0,u=0;a=P,P=P+16|0,r=a,u=0|Mt(0|(e|=0),0|(t|=0),45),w(),u&=127;e:do{if(0!=(0|O(u))&&(A=0|Mt(0|e,0|t,52),w(),0!=(0|(A&=15)))){o=1;t:for(;;){switch(c=0|Mt(0|e,0|t,3*(15-o|0)|0),w(),7&c){case 5:break t;case 0:break;default:o=t;break e}if(!(o>>>0<A>>>0)){o=t;break e}o=o+1|0}for(s=1,o=t;l=0|St(7,0,0|(t=3*(15-s|0)|0)),c=o&~(0|w()),o=0|Mt(0|e,0|o,0|t),w(),e=e&~l|(o=0|St(0|le(7&o),0,0|t)),o=0|c|w(),s>>>0<A>>>0;)s=s+1|0}else o=t}while(0);if(c=7728+(28*u|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|He(e,o,n)){if(l=n+4|0,i[r>>2]=i[l>>2],i[r+4>>2]=i[l+4>>2],i[r+8>>2]=i[l+8>>2],A=0|Mt(0|e,0|o,52),w(),c=15&A,1&A?(ie(l),A=c+1|0):A=c,0|O(u)){e:do{if(c)for(t=1;;){if(s=0|Mt(0|e,0|o,3*(15-t|0)|0),w(),0|(s&=7)){o=s;break e}if(!(t>>>0<c>>>0)){o=0;break}t=t+1|0}else o=0}while(0);o=4==(0|o)&1}else o=0;if(0|_e(n,A,o,0)){if(0|O(u))do{}while(0!=(0|_e(n,A,0,0)));(0|A)!=(0|c)&&ne(l)}else(0|A)!=(0|c)&&(i[l>>2]=i[r>>2],i[l+4>>2]=i[r+4>>2],i[l+8>>2]=i[r+8>>2]);P=a}else P=a}function je(e,t,n){n|=0;var r,i;r=P,P=P+16|0,Ge(e|=0,t|=0,i=r),t=0|Mt(0|e,0|t,52),w(),ye(i,15&t,n),P=r}function Ve(e,t,n){n|=0;var r,i,a=0,o=0;i=P,P=P+16|0,Ge(e|=0,t|=0,r=i),a=0|Mt(0|e,0|t,45),w(),a=0==(0|O(127&a)),o=0|Mt(0|e,0|t,52),w(),o&=15;e:do{if(!a){if(0|o)for(a=1;;){if(!(0==((0|St(7,0,3*(15-a|0)|0))&e|0)&0==((0|w())&t|0)))break e;if(!(a>>>0<o>>>0))break;a=a+1|0}return xe(r,o,0,5,n),void(P=i)}}while(0);Me(r,o,0,6,n),P=i}function We(e,t){t|=0;var n,r=0,a=0,o=0,s=0,A=0,l=0;if(St(0|(e|=0),0,52),n=134225919|w(),(0|e)<1){a=0,r=0;do{0|O(a)&&(St(0|a,0,45),A=0|n|w(),i[(e=t+(r<<3)|0)>>2]=-1,i[e+4>>2]=A,r=r+1|0),a=a+1|0}while(122!=(0|a))}else{A=0,r=0;do{if(0|O(A)){for(St(0|A,0,45),a=1,o=-1,s=0|n|w();o&=~(l=0|St(7,0,3*(15-a|0)|0)),s&=~(0|w()),(0|a)!=(0|e);)a=a+1|0;i[(l=t+(r<<3)|0)>>2]=o,i[l+4>>2]=s,r=r+1|0}A=A+1|0}while(122!=(0|A))}}function Qe(e,t,n,r){var a,o=0,s=0,A=0,l=0,c=0;if(a=P,P=P+64|0,A=a,(0|(e|=0))==(0|(n|=0))&(0|(t|=0))==(0|(r|=0))|!1|134217728!=(2013265920&t|0)|!1|134217728!=(2013265920&r|0))return P=a,0|(A=0);if(o=0|Mt(0|e,0|t,52),w(),o&=15,s=0|Mt(0|n,0|r,52),w(),(0|o)!=(15&s|0))return P=a,0|(A=0);if(s=o+-1|0,o>>>0>1&&(c=0|qe(e,t,s),l=0|w(),(0|c)==(0|(s=0|qe(n,r,s)))&(0|l)==(0|w()))){if(o=0|Mt(0|e,0|t,0|(s=3*(15^o)|0)),w(),o&=7,s=0|Mt(0|n,0|r,0|s),w(),0==(0|o)|0==(0|(s&=7)))return P=a,0|(c=1);if((0|i[21136+(o<<2)>>2])==(0|s))return P=a,0|(c=1);if((0|i[21168+(o<<2)>>2])==(0|s))return P=a,0|(c=1)}s=(o=A)+56|0;do{i[o>>2]=0,o=o+4|0}while((0|o)<(0|s));return R(e,t,1,A),o=(0|i[(c=A)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=A+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(o=A+48|0)>>2])==(0|n)?(0|i[o+4>>2])==(0|r):0),P=a,0|(c=o)}function Ye(e,t,n){n|=0;var r,a,o,s,A=0;if(o=P,P=P+16|0,a=o,A=0|Mt(0|(e|=0),0|(t|=0),56),w(),-1==(0|(t=0|function(e,t,n){n|=0;var r=0,a=0;if(r=0|Ie(e=e|0,t=t|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(a=0!=(0|r)))return 0|(n=-1);return r=0|function(e,t){var n=0,r=0,a=0,o=0,s=0,A=0,l=0,c=0;if(c=P,P=P+32|0,o=c,Ge(e=e|0,t=t|0,a=c+16|0),s=0|Pe(e,t),l=0|Be(e,t),function(e,t){e=7728+(28*(e|=0)|0)|0,i[(t|=0)>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2]}(s,o),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return-1;do{if((0|i[11152+(216*t|0)>>2])!=(0|e))if((0|i[11152+(216*t|0)+8>>2])!=(0|e))if((0|i[11152+(216*t|0)+16>>2])!=(0|e))if((0|i[11152+(216*t|0)+24>>2])!=(0|e))if((0|i[11152+(216*t|0)+32>>2])!=(0|e))if((0|i[11152+(216*t|0)+40>>2])!=(0|e))if((0|i[11152+(216*t|0)+48>>2])!=(0|e))if((0|i[11152+(216*t|0)+56>>2])!=(0|e))if((0|i[11152+(216*t|0)+64>>2])!=(0|e))if((0|i[11152+(216*t|0)+72>>2])!=(0|e))if((0|i[11152+(216*t|0)+80>>2])!=(0|e))if((0|i[11152+(216*t|0)+88>>2])!=(0|e))if((0|i[11152+(216*t|0)+96>>2])!=(0|e))if((0|i[11152+(216*t|0)+104>>2])!=(0|e))if((0|i[11152+(216*t|0)+112>>2])!=(0|e))if((0|i[11152+(216*t|0)+120>>2])!=(0|e))if((0|i[11152+(216*t|0)+128>>2])!=(0|e)){if((0|i[11152+(216*t|0)+136>>2])!=(0|e)){if((0|i[11152+(216*t|0)+144>>2])==(0|e)){e=0,n=2,r=0;break}if((0|i[11152+(216*t|0)+152>>2])==(0|e)){e=0,n=2,r=1;break}if((0|i[11152+(216*t|0)+160>>2])==(0|e)){e=0,n=2,r=2;break}if((0|i[11152+(216*t|0)+168>>2])==(0|e)){e=1,n=2,r=0;break}if((0|i[11152+(216*t|0)+176>>2])==(0|e)){e=1,n=2,r=1;break}if((0|i[11152+(216*t|0)+184>>2])==(0|e)){e=1,n=2,r=2;break}if((0|i[11152+(216*t|0)+192>>2])==(0|e)){e=2,n=2,r=0;break}if((0|i[11152+(216*t|0)+200>>2])==(0|e)){e=2,n=2,r=1;break}if((0|i[11152+(216*t|0)+208>>2])==(0|e)){e=2,n=2,r=2;break}return-1}e=2,n=1,r=2}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0}while(0);return 0|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2]}(s,0|i[a>>2]),!(0|O(s)))return P=c,0|(l=t);switch(0|s){case 4:e=0,n=14;break;case 14:e=1,n=14;break;case 24:e=2,n=14;break;case 38:e=3,n=14;break;case 49:e=4,n=14;break;case 58:e=5,n=14;break;case 63:e=6,n=14;break;case 72:e=7,n=14;break;case 83:e=8,n=14;break;case 97:e=9,n=14;break;case 107:e=10,n=14;break;case 117:e=11,n=14;break;default:A=0,r=0}14==(0|n)&&(A=0|i[22096+(24*e|0)+8>>2],r=0|i[22096+(24*e|0)+16>>2]);(0|(e=0|i[a>>2]))!=(0|i[o>>2])&&(s=0|k(s))|(0|(e=0|i[a>>2]))==(0|r)&&(t=(t+1|0)%6|0);if(3==(0|l)&(0|e)==(0|r))return P=c,0|(l=(t+5|0)%6|0);if(!(5==(0|l)&(0|e)==(0|A)))return P=c,0|(l=t);return P=c,0|(l=(t+1|0)%6|0)}(e,t),a?0|(n=(5-r+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-r+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&t|0))?e:0,e=s?-2130706433&t|134217728:0,7&A))))return i[n>>2]=0,void(P=o);Ge(r,e,a),A=0|Mt(0|r,0|e,52),w(),A&=15,0|Ie(r,e)?xe(a,A,t,2,n):Me(a,A,t,2,n),P=o}function Xe(e){e|=0;var t,n,r=0;return(t=0|yt(1,12))||M(22691,22646,49,22704),0|(r=0|i[(n=e+4|0)>>2])?(i[(r=r+8|0)>>2]=t,i[n>>2]=t,0|t):(0|i[e>>2]&&M(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Ze(e,t){e|=0,t|=0;var n,r;return(r=0|gt(24))||M(22758,22646,78,22772),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[r+16>>2]=0,0|(n=0|i[(t=e+4|0)>>2])?(i[n+16>>2]=r,i[t>>2]=r,0|r):(0|i[e>>2]&&M(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function Je(e){var t,n,r=0,o=0,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,S=0,E=0,T=0,C=0,L=0,P=0,R=0,q=0,D=0,I=0,B=0,O=0;if(0|i[(l=(e|=0)+8|0)>>2])return 0|(O=1);if(!(s=0|i[e>>2]))return 0|(O=0);r=s,o=0;do{o=o+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(o>>>0<2)return 0|(O=0);(n=0|gt(o<<2))||M(22807,22646,317,22826),(t=0|gt(o<<5))||M(22848,22646,321,22826),i[e>>2]=0,i[(C=e+4|0)>>2]=0,i[l>>2]=0,o=0,I=0,T=0,m=0;e:for(;;){if(p=0|i[s>>2]){c=0,u=p;do{if(d=+a[u+8>>3],r=u,u=0|i[u+16>>2],h=+a[(l=(f=0==(0|u))?p:u)+8>>3],+A(+(d-h))>3.141592653589793){O=14;break}c+=(h-d)*(+a[r>>3]+ +a[l>>3])}while(!f);if(14==(0|O)){O=0,c=0,r=p;do{E=+a[r+8>>3],q=0|i[(D=r+16|0)>>2],S=+a[(q=0==(0|q)?p:q)+8>>3],c+=(+a[r>>3]+ +a[q>>3])*((S<0?S+6.283185307179586:S)-(E<0?E+6.283185307179586:E)),r=0|i[(0==(0|r)?s:D)>>2]}while(0!=(0|r))}c>0?(i[n+(I<<2)>>2]=s,I=I+1|0,l=T,r=m):O=19}else O=19;if(19==(0|O)){O=0;do{if(!o){if(m){l=C,u=m+8|0,r=s,o=e;break}if(0|i[e>>2]){O=27;break e}l=C,u=e,r=s,o=e;break}if(0|i[(r=o+8|0)>>2]){O=21;break e}if(!(o=0|yt(1,12))){O=23;break e}i[r>>2]=o,l=o+4|0,u=o,r=m}while(0);if(i[u>>2]=s,i[l>>2]=s,u=t+(T<<5)|0,f=0|i[s>>2]){for(a[(p=t+(T<<5)+8|0)>>3]=17976931348623157e292,a[(m=t+(T<<5)+24|0)>>3]=17976931348623157e292,a[u>>3]=-17976931348623157e292,a[(g=t+(T<<5)+16|0)>>3]=-17976931348623157e292,_=17976931348623157e292,w=-17976931348623157e292,l=0,v=f,d=17976931348623157e292,x=17976931348623157e292,b=-17976931348623157e292,h=-17976931348623157e292;c=+a[v>>3],E=+a[v+8>>3],v=0|i[v+16>>2],S=+a[((y=0==(0|v))?f:v)+8>>3],c<d&&(a[p>>3]=c,d=c),E<x&&(a[m>>3]=E,x=E),c>b?a[u>>3]=c:c=b,E>h&&(a[g>>3]=E,h=E),_=E>0&E<_?E:_,w=E<0&E>w?E:w,l|=+A(+(E-S))>3.141592653589793,!y;)b=c;l&&(a[g>>3]=w,a[m>>3]=_)}else i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,i[u+12>>2]=0,i[u+16>>2]=0,i[u+20>>2]=0,i[u+24>>2]=0,i[u+28>>2]=0;l=T+1|0}if(s=0|i[(D=s+8|0)>>2],i[D>>2]=0,!s){O=45;break}T=l,m=r}if(21==(0|O))M(22624,22646,35,22658);else if(23==(0|O))M(22678,22646,37,22658);else if(27==(0|O))M(22721,22646,61,22744);else if(45==(0|O)){e:do{if((0|I)>0){for(D=0==(0|l),R=l<<2,q=0==(0|e),P=0,r=0;;){if(L=0|i[n+(P<<2)>>2],D)O=73;else{if(!(T=0|gt(R))){O=50;break}if(!(C=0|gt(R))){O=52;break}t:do{if(q)o=0;else{for(l=0,o=0,u=e;s=t+(l<<5)|0,0|Ke(0|i[u>>2],s,0|i[L>>2])?(i[T+(o<<2)>>2]=u,i[C+(o<<2)>>2]=s,y=o+1|0):y=o,u=0|i[u+8>>2];)l=l+1|0,o=y;if((0|y)>0)if(s=0|i[T>>2],1==(0|y))o=s;else for(g=0,v=-1,o=s,m=s;;){for(f=0|i[m>>2],s=0,u=0;p=(0|(l=0|i[i[T+(u<<2)>>2]>>2]))==(0|f)?s:s+(1&(0|Ke(l,0|i[C+(u<<2)>>2],0|i[f>>2])))|0,(0|(u=u+1|0))!=(0|y);)s=p;if(o=(l=(0|p)>(0|v))?m:o,(0|(s=g+1|0))==(0|y))break t;g=s,v=l?p:v,m=0|i[T+(s<<2)>>2]}else o=0}}while(0);if(vt(T),vt(C),o){if(s=0|i[(l=o+4|0)>>2])o=s+8|0;else if(0|i[o>>2]){O=70;break}i[o>>2]=L,i[l>>2]=L}else O=73}if(73==(0|O)){if(O=0,0|(r=0|i[L>>2]))do{C=r,r=0|i[r+16>>2],vt(C)}while(0!=(0|r));vt(L),r=2}if((0|(P=P+1|0))>=(0|I)){B=r;break e}}50==(0|O)?M(22863,22646,249,22882):52==(0|O)?M(22901,22646,252,22882):70==(0|O)&&M(22721,22646,61,22744)}else B=0}while(0);return vt(n),vt(t),0|(O=B)}return 0}function Ke(e,t,n){e|=0;var r,o=0,s=0,A=0,l=0,c=0,u=0,h=0;if(!(0|j(t|=0,n|=0)))return 0|(e=0);if(t=0|G(t),r=+a[n>>3],o=t&(o=+a[n+8>>3])<0?o+6.283185307179586:o,!(e=0|i[e>>2]))return 0|(e=0);if(t){t=0,n=e;e:for(;;){for(;l=+a[n>>3],u=+a[n+8>>3],h=0|i[(n=n+16|0)>>2],A=+a[(h=0==(0|h)?e:h)>>3],s=+a[h+8>>3],l>A?(c=l,l=u):(c=A,A=l,l=s,s=u),r<A|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(o=(l=l<0?l+6.283185307179586:l)==o|(u=s<0?s+6.283185307179586:s)==o?o+-2220446049250313e-31:o,((u+=(r-A)/(c-A)*(l-u))<0?u+6.283185307179586:u)>o&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}else{t=0,n=e;e:for(;;){for(;l=+a[n>>3],u=+a[n+8>>3],h=0|i[(n=n+16|0)>>2],A=+a[(h=0==(0|h)?e:h)>>3],s=+a[h+8>>3],l>A?(c=l,l=u):(c=A,A=l,l=s,s=u),r<A|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-A)/(c-A)*(l-s)>(o=l==o|s==o?o+-2220446049250313e-31:o)&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}return 0}function $e(e,t,n,a,o){n|=0,a|=0,o|=0;var s,A,l,c,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0;if(c=P,P=P+32|0,x=c+16|0,l=c,u=0|Mt(0|(e|=0),0|(t|=0),52),w(),u&=15,g=0|Mt(0|n,0|a,52),w(),(0|u)!=(15&g|0))return P=c,0|(x=1);if(p=0|Mt(0|e,0|t,45),w(),p&=127,m=0|Mt(0|n,0|a,45),w(),g=(0|p)!=(0|(m&=127))){if(7==(0|(d=0|H(p,m))))return P=c,0|(x=2);7==(0|(f=0|H(m,p)))?M(22925,22949,151,22959):(v=d,h=f)}else v=0,h=0;s=0|O(p),A=0|O(m),i[x>>2]=0,i[x+4>>2]=0,i[x+8>>2]=0,i[x+12>>2]=0;do{if(v){if(d=(0|(m=0|i[4304+(28*p|0)+(v<<2)>>2]))>0,A)if(d){p=0,f=n,d=a;do{f=0|Ne(f,d),d=0|w(),1==(0|(h=0|le(h)))&&(h=0|le(1)),p=p+1|0}while((0|p)!=(0|m));m=h,p=f,f=d}else m=h,p=n,f=a;else if(d){p=0,f=n,d=a;do{f=0|ze(f,d),d=0|w(),h=0|le(h),p=p+1|0}while((0|p)!=(0|m));m=h,p=f,f=d}else m=h,p=n,f=a;if(He(p,f,x),g||M(22972,22949,181,22959),(d=0!=(0|s))&(h=0!=(0|A))&&M(22999,22949,182,22959),d){if(h=0|Be(e,t),0|r[22032+(7*h|0)+v>>0]){u=3;break}p=f=0|i[21200+(28*h|0)+(v<<2)>>2],y=26}else if(h){if(h=0|Be(p,f),0|r[22032+(7*h|0)+m>>0]){u=4;break}p=0,f=0|i[21200+(28*m|0)+(h<<2)>>2],y=26}else h=0;if(26==(0|y))if((0|f)<=-1&&M(23030,22949,212,22959),(0|p)<=-1&&M(23053,22949,213,22959),(0|f)>0){d=x+4|0,h=0;do{se(d),h=h+1|0}while((0|h)!=(0|f));h=p}else h=p;if(i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,ae(l,v),0|u)for(;0|Fe(u)?re(l):ie(l),(0|u)>1;)u=u+-1|0;if((0|h)>0){u=0;do{se(l),u=u+1|0}while((0|u)!=(0|h))}J(y=x+4|0,l,y),X(y),y=50}else if(He(n,a,x),0!=(0|s)&0!=(0|A))if((0|m)!=(0|p)&&M(23077,22949,243,22959),h=0|Be(e,t),u=0|Be(n,a),0|r[22032+(7*h|0)+u>>0])u=5;else if((0|(h=0|i[21200+(28*h|0)+(u<<2)>>2]))>0){d=x+4|0,u=0;do{se(d),u=u+1|0}while((0|u)!=(0|h));y=50}else y=50;else y=50}while(0);return 50==(0|y)&&(u=x+4|0,i[o>>2]=i[u>>2],i[o+4>>2]=i[u+4>>2],i[o+8>>2]=i[u+8>>2],u=0),P=c,0|(x=u)}function et(e,t,n,r){n|=0,r|=0;var a,o,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0;if(o=P,P=P+48|0,l=o+36|0,c=o+24|0,u=o+12|0,h=o,A=0|Mt(0|(e|=0),0|(t|=0),52),w(),A&=15,f=0|Mt(0|e,0|t,45),w(),a=0|O(f&=127),St(0|A,0,52),g=134225919|w(),i[(m=r)>>2]=-1,i[m+4>>2]=g,!A)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|U(f,0|ee(n))))?(P=o,0|(g=1)):(p=0|St(0|s,0,45),m=0|w(),m=-1040385&i[(f=r)+4>>2]|m,i[(g=r)>>2]=i[f>>2]|p,i[g+4>>2]=m,P=o,0|(g=0));for(i[l>>2]=i[n>>2],i[l+4>>2]=i[n+4>>2],i[l+8>>2]=i[n+8>>2];i[c>>2]=i[l>>2],i[c+4>>2]=i[l+4>>2],i[c+8>>2]=i[l+8>>2],0|Fe(A)?(te(l),i[u>>2]=i[l>>2],i[u+4>>2]=i[l+4>>2],i[u+8>>2]=i[l+8>>2],re(u)):(ne(l),i[u>>2]=i[l>>2],i[u+4>>2]=i[l+4>>2],i[u+8>>2]=i[l+8>>2],ie(u)),K(c,u,h),X(h),v=0|i[(m=r)>>2],m=0|i[m+4>>2],n=0|St(7,0,0|(y=3*(15-A|0)|0)),m&=~(0|w()),y=0|St(0|ee(h),0,0|y),m=0|w()|m,i[(g=r)>>2]=y|v&~n,i[g+4>>2]=m,(0|A)>1;)A=A+-1|0;e:do{if((0|i[l>>2])<=1&&(0|i[l+4>>2])<=1&&(0|i[l+8>>2])<=1){h=127==(0|(c=0|U(f,A=0|ee(l))))?0:0|O(c);t:do{if(A){if(a){if(l=21408+(28*(0|Be(e,t))|0)+(A<<2)|0,(0|(l=0|i[l>>2]))>0){n=0;do{A=0|Ae(A),n=n+1|0}while((0|n)!=(0|l))}if(1==(0|A)){s=3;break e}127==(0|(n=0|U(f,A)))&&M(23104,22949,376,23134),0|O(n)?M(23147,22949,377,23134):(p=l,d=A,s=n)}else p=0,d=A,s=c;if((0|(u=0|i[4304+(28*f|0)+(d<<2)>>2]))<=-1&&M(23178,22949,384,23134),!h){if((0|p)<=-1&&M(23030,22949,417,23134),0|p){A=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,A=A+1|0}while((0|A)<(0|p))}if((0|u)<=0){A=54;break}for(A=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];;)if(n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,(0|(A=A+1|0))==(0|u)){A=54;break t}}if(7==(0|(c=0|H(s,f)))&&M(22925,22949,393,23134),n=0|i[(A=r)>>2],A=0|i[A+4>>2],(0|u)>0){l=0;do{n=0|ke(n,A),A=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=A,l=l+1|0}while((0|l)!=(0|u))}if(n=0|Be(n,A),y=0|k(s),(0|(n=0|i[(y?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&M(23030,22949,412,23134),n){A=0,l=0|i[(c=r)>>2],c=0|i[c+4>>2];do{l=0|Oe(l,c),c=0|w(),i[(y=r)>>2]=l,i[y+4>>2]=c,A=A+1|0}while((0|A)<(0|n));A=54}else A=54}else if(0!=(0|a)&0!=(0|h))if(A=21408+(28*(y=0|Be(e,t))|0)+((0|Be(0|i[(A=r)>>2],0|i[A+4>>2]))<<2)|0,(0|(A=0|i[A>>2]))<=-1&&M(23201,22949,433,23134),A){s=0,n=0|i[(l=r)>>2],l=0|i[l+4>>2];do{n=0|ke(n,l),l=0|w(),i[(y=r)>>2]=n,i[y+4>>2]=l,s=s+1|0}while((0|s)<(0|A));s=c,A=54}else s=c,A=55;else s=c,A=54}while(0);if(54==(0|A)&&h&&(A=55),55==(0|A)&&1==(0|Be(0|i[(y=r)>>2],0|i[y+4>>2]))){s=4;break}g=0|i[(y=r)>>2],y=-1040385&i[y+4>>2],v=0|St(0|s,0,45),y=0|y|w(),i[(s=r)>>2]=g|v,i[s+4>>2]=y,s=0}else s=2}while(0);return P=o,0|(y=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|y(0==(1&t|0)?1:n,e),t>>=1,n=0|y(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,o,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0;if(!(0|j(t|=0,n|=0)))return 0|(f=0);if(t=0|G(t),o=+a[n>>3],s=t&(s=+a[n+8>>3])<0?s+6.283185307179586:s,(0|(f=0|i[e>>2]))<=0)return 0|(f=0);if(r=0|i[e+4>>2],t){t=0,n=-1,e=0;e:for(;;){for(d=e;c=+a[r+(d<<4)>>3],h=+a[r+(d<<4)+8>>3],l=+a[r+((e=(n+2|0)%(0|f)|0)<<4)>>3],A=+a[r+(e<<4)+8>>3],c>l?(u=c,c=h):(u=l,l=c,c=A,A=h),o<l|o>u;){if(!((0|(n=d+1|0))<(0|f))){n=22;break e}e=d,d=n,n=e}if(s=(c=c<0?c+6.283185307179586:c)==s|(h=A<0?A+6.283185307179586:A)==s?s+-2220446049250313e-31:s,((h+=(o-l)/(u-l)*(c-h))<0?h+6.283185307179586:h)>s&&(t^=1),(0|(e=d+1|0))>=(0|f)){n=22;break}n=d}if(22==(0|n))return 0|t}else{t=0,n=-1,e=0;e:for(;;){for(d=e;c=+a[r+(d<<4)>>3],h=+a[r+(d<<4)+8>>3],l=+a[r+((e=(n+2|0)%(0|f)|0)<<4)>>3],A=+a[r+(e<<4)+8>>3],c>l?(u=c,c=h):(u=l,l=c,c=A,A=h),o<l|o>u;){if(!((0|(n=d+1|0))<(0|f))){n=22;break e}e=d,d=n,n=e}if(A+(o-l)/(u-l)*(c-A)>(s=c==s|A==s?s+-2220446049250313e-31:s)&&(t^=1),(0|(e=d+1|0))>=(0|f)){n=22;break}n=d}if(22==(0|n))return 0|t}return 0}function rt(e,t){t|=0;var n,r,o,s,l,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0;if(!(r=0|i[(e|=0)>>2]))return i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,void(i[t+28>>2]=0);if(a[(o=t+8|0)>>3]=17976931348623157e292,a[(s=t+24|0)>>3]=17976931348623157e292,a[t>>3]=-17976931348623157e292,a[(l=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],g=17976931348623157e292,v=-17976931348623157e292,y=0,e=-1,d=17976931348623157e292,f=17976931348623157e292,m=-17976931348623157e292,u=-17976931348623157e292,x=0;c=+a[n+(x<<4)>>3],p=+a[n+(x<<4)+8>>3],h=+a[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],c<d&&(a[o>>3]=c,d=c),p<f&&(a[s>>3]=p,f=p),c>m?a[t>>3]=c:c=m,p>u&&(a[l>>3]=p,u=p),g=p>0&p<g?p:g,v=p<0&p>v?p:v,y|=+A(+(p-h))>3.141592653589793,(0|(e=x+1|0))!=(0|r);)b=x,m=c,x=e,e=b;y&&(a[l>>3]=v,a[s>>3]=g)}}function it(e,t){t|=0;var n,r=0,o=0,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,M=0,S=0,E=0;if(v=0|i[(e|=0)>>2]){if(a[(y=t+8|0)>>3]=17976931348623157e292,a[(x=t+24|0)>>3]=17976931348623157e292,a[t>>3]=-17976931348623157e292,a[(b=t+16|0)>>3]=-17976931348623157e292,(0|v)>0){for(s=0|i[e+4>>2],m=17976931348623157e292,g=-17976931348623157e292,o=0,r=-1,h=17976931348623157e292,d=17976931348623157e292,p=-17976931348623157e292,c=-17976931348623157e292,_=0;l=+a[s+(_<<4)>>3],f=+a[s+(_<<4)+8>>3],u=+a[s+(((0|(S=r+2|0))==(0|v)?0:S)<<4)+8>>3],l<h&&(a[y>>3]=l,h=l),f<d&&(a[x>>3]=f,d=f),l>p?a[t>>3]=l:l=p,f>c&&(a[b>>3]=f,c=f),m=f>0&f<m?f:m,g=f<0&f>g?f:g,o|=+A(+(f-u))>3.141592653589793,(0|(r=_+1|0))!=(0|v);)S=_,p=l,_=r,r=S;o&&(a[b>>3]=g,a[x>>3]=m)}}else i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,i[t+28>>2]=0;if(!((0|(r=0|i[(S=e+8|0)>>2]))<=0)){n=e+12|0,M=0;do{if(s=0|i[n>>2],o=M,x=t+((M=M+1|0)<<5)|0,b=0|i[s+(o<<3)>>2]){if(a[(_=t+(M<<5)+8|0)>>3]=17976931348623157e292,a[(e=t+(M<<5)+24|0)>>3]=17976931348623157e292,a[x>>3]=-17976931348623157e292,a[(w=t+(M<<5)+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(v=0|i[s+(o<<3)+4>>2],m=17976931348623157e292,g=-17976931348623157e292,s=0,o=-1,y=0,h=17976931348623157e292,d=17976931348623157e292,f=-17976931348623157e292,c=-17976931348623157e292;l=+a[v+(y<<4)>>3],p=+a[v+(y<<4)+8>>3],u=+a[v+(((0|(o=o+2|0))==(0|b)?0:o)<<4)+8>>3],l<h&&(a[_>>3]=l,h=l),p<d&&(a[e>>3]=p,d=p),l>f?a[x>>3]=l:l=f,p>c&&(a[w>>3]=p,c=p),m=p>0&p<m?p:m,g=p<0&p>g?p:g,s|=+A(+(p-u))>3.141592653589793,(0|(o=y+1|0))!=(0|b);)E=y,y=o,f=l,o=E;s&&(a[w>>3]=g,a[e>>3]=m)}}else i[x>>2]=0,i[x+4>>2]=0,i[x+8>>2]=0,i[x+12>>2]=0,i[x+16>>2]=0,i[x+20>>2]=0,i[x+24>>2]=0,i[x+28>>2]=0,r=0|i[S>>2]}while((0|M)<(0|r))}}function at(e,t,n){var r=0,a=0,o=0;if(!(0|nt(e|=0,t|=0,n|=0)))return 0|(a=0);if((0|i[(a=e+8|0)>>2])<=0)return 0|(a=1);for(r=e+12|0,e=0;;){if(o=e,e=e+1|0,0|nt((0|i[r>>2])+(o<<3)|0,t+(e<<5)|0,n)){e=0,r=6;break}if((0|e)>=(0|i[a>>2])){e=1,r=6;break}}return 6==(0|r)?0|e:0}function ot(e,t,n,r,i){t|=0,n|=0,r|=0,i|=0;var o,s,A,l,c,u,h,d=0;l=+a[(e|=0)>>3],A=+a[t>>3]-l,s=+a[e+8>>3],o=+a[t+8>>3]-s,u=+a[n>>3],d=((d=+a[r>>3]-u)*(s-(h=+a[n+8>>3]))-(l-u)*(c=+a[r+8>>3]-h))/(A*c-o*d),a[i>>3]=l+A*d,a[i+8>>3]=s+o*d}function st(e,t){return t|=0,+a[(e|=0)>>3]!=+a[t>>3]?0|(t=0):0|(t=+a[e+8>>3]==+a[t+8>>3])}function At(e,t){t|=0;var n,r,i;return+((i=+a[(e|=0)>>3]-+a[t>>3])*i+(r=+a[e+8>>3]-+a[t+8>>3])*r+(n=+a[e+16>>3]-+a[t+16>>3])*n)}function lt(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|yt(t,4),i[e>>2]=r,r||M(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ct(e){var t,n,r,o=0,s=0,l=0,u=0;t=(e|=0)+4|0,n=e+12|0,r=e+8|0;e:for(;;){for(s=0|i[t>>2],o=0;;){if((0|o)>=(0|s))break e;if(l=0|i[e>>2],u=0|i[l+(o<<2)>>2])break;o=o+1|0}o=l+(~~(+A(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+a[u>>3]+ +a[u+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[o>>2];t:do{if(0|s){if(l=u+32|0,(0|s)==(0|u))i[o>>2]=i[l>>2];else{if(!(o=0|i[(s=s+32|0)>>2]))break;for(;(0|o)!=(0|u);)if(!(o=0|i[(s=o+32|0)>>2]))break t;i[s>>2]=i[l>>2]}vt(u),i[r>>2]=(0|i[r>>2])-1}}while(0)}vt(0|i[e>>2])}function ut(e){var t,n=0,r=0;for(t=0|i[(e|=0)+4>>2],r=0;;){if((0|r)>=(0|t)){n=0,r=4;break}if(n=0|i[(0|i[e>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function ht(e,t){t|=0;var n=0,r=0,o=0,s=0;if(n=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,n=(0|i[e>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=t+32|0;do{if((0|r)!=(0|t)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(o=n;;){if((0|o)==(0|t)){o=8;break}if(!(n=0|i[o+32>>2])){n=1,o=10;break}r=o,o=n}if(8==(0|o)){i[r+32>>2]=i[s>>2];break}if(10==(0|o))return 0|n}else i[n>>2]=i[s>>2]}while(0);return vt(t),i[(s=e+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function dt(e,t,n){e|=0,t|=0,n|=0;var r,o=0,s=0,l=0;(r=0|gt(40))||M(23283,23253,98,23296),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+A(+ +c(10,+ +(15-(0|i[e+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,s=(0|i[e>>2])+(s<<2)|0,o=0|i[s>>2];do{if(o){for(;!(0|Te(o,t)&&0|Te(o+16|0,n));)if(s=0|i[o+32>>2],!(0|i[(o=0==(0|s)?o:s)+32>>2])){l=10;break}if(10==(0|l)){i[o+32>>2]=r;break}return vt(r),0|(l=o)}i[s>>2]=r}while(0);return i[(l=e+8|0)>>2]=1+(0|i[l>>2]),0|(l=r)}function ft(e,t,n){t|=0,n|=0;var r=0,o=0;if(o=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(o=0|i[(0|i[e>>2])+(o<<2)>>2]))return 0|(n=0);if(!n){for(e=o;;){if(0|Te(e,t)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}if(10==(0|r))return 0|e}for(e=o;;){if(0|Te(e,t)&&0|Te(e+16|0,n)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}return 10==(0|r)?0|e:0}function pt(e,t){t|=0;var n=0;if(n=~~(+A(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(e=0|i[(0|i[e>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|Te(e,t)){t=5;break}if(!(e=0|i[e+32>>2])){e=0,t=5;break}}return 5==(0|t)?0|e:0}function mt(e){return 0|~~+function(e){return+ +Pt(+(e=+e))}(e=+e)}function gt(e){e|=0;var t,n=0,r=0,a=0,o=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0;t=P,P=P+16|0,f=t;do{if(e>>>0<245){if(e=(u=e>>>0<11?16:e+11&-8)>>>3,3&(r=(d=0|i[5829])>>>e)|0)return a=0|i[(r=(e=23356+((n=(1&r^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(o=a+8|0)>>2]))==(0|e)?i[5829]=d&~(1<<n):(i[s+12>>2]=e,i[r>>2]=s),_=n<<3,i[a+4>>2]=3|_,i[(_=a+_+4|0)>>2]=1|i[_>>2],P=t,0|(_=o);if(u>>>0>(h=0|i[5831])>>>0){if(0|r)return n=((n=r<<e&((n=2<<e)|0-n))&0-n)-1|0,s=0|i[(e=(n=23356+((a=((r=(n>>>=l=n>>>12&16)>>>5&8)|l|(s=(n>>>=r)>>>2&4)|(e=(n>>>=s)>>>1&2)|(a=(n>>>=e)>>>1&1))+(n>>>a)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(l=s+8|0)>>2]))==(0|n)?(e=d&~(1<<a),i[5829]=e):(i[r+12>>2]=n,i[e>>2]=r,e=d),A=(_=a<<3)-u|0,i[s+4>>2]=3|u,i[(o=s+u|0)+4>>2]=1|A,i[s+_>>2]=A,0|h&&(a=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,e&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=a,i[n+12>>2]=a,i[a+8>>2]=n,i[a+12>>2]=r),i[5831]=A,i[5834]=o,P=t,0|(_=l);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((a=(r>>>=o=r>>>12&16)>>>5&8)|o|(A=(r>>>=a)>>>2&4)|(l=(r>>>=A)>>>1&2)|(c=(r>>>=l)>>>1&1))+(r>>>c)<<2)>>2],l=c,c=(-8&i[c+4>>2])-u|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,l=(o=(A=(-8&i[e+4>>2])-u|0)>>>0<c>>>0)?e:l,c=o?A:c;if((A=l+u|0)>>>0>l>>>0){o=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(e=l+20|0)>>2])&&!(n=0|i[(e=l+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,e=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,e=a}i[e>>2]=0,r=n}else r=0|i[l+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|o){if(n=0|i[l+28>>2],(0|l)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<<n);break}}else if(i[((0|i[(_=o+16|0)>>2])==(0|l)?_:o+20|0)>>2]=r,!r)break;i[r+24>>2]=o,0|(n=0|i[l+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[l+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(_=c+u|0,i[l+4>>2]=3|_,i[(_=l+_+4|0)>>2]=1|i[_>>2]):(i[l+4>>2]=3|u,i[A+4>>2]=1|c,i[A+c>>2]=c,0|h&&(a=0|i[5834],r=23356+((n=h>>>3)<<1<<2)|0,(n=1<<n)&d?n=0|i[(e=r+8|0)>>2]:(i[5829]=n|d,n=r,e=r+8|0),i[e>>2]=a,i[n+12>>2]=a,i[a+8>>2]=n,i[a+12>>2]=r),i[5831]=c,i[5834]=A),P=t,0|(_=l+8|0)}d=u}else d=u}else d=u}else if(e>>>0<=4294967231)if(u=-8&(e=e+11|0),a=0|i[5830]){o=0-u|0,c=(e>>>=8)?u>>>0>16777215?31:u>>>((c=14-((l=((g=e<<(d=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|d|(c=((g<<=l)+245760|0)>>>16&2))+(g<<c>>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];e:do{if(r)for(e=0,l=u<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((A=(-8&i[r+4>>2])-u|0)>>>0<o>>>0){if(!A){e=r,o=0,g=65;break e}e=r,o=A}if(s=0==(0|(g=0|i[r+20>>2]))|(0|g)==(0|(r=0|i[r+16+(l>>>31<<2)>>2]))?s:g,!r){r=s,g=61;break}l<<=1}else r=0,e=0,g=61}while(0);if(61==(0|g)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<<c)|0-e)&a)){d=u;break}d=(e&0-e)-1|0,e=0,r=0|i[23620+(((s=(d>>>=A=d>>>12&16)>>>5&8)|A|(l=(d>>>=s)>>>2&4)|(c=(d>>>=l)>>>1&2)|(r=(d>>>=c)>>>1&1))+(d>>>r)<<2)>>2]}r?g=65:(l=e,A=o)}if(65==(0|g))for(s=r;;){if(o=(r=(d=(-8&i[s+4>>2])-u|0)>>>0<o>>>0)?d:o,e=r?s:e,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){l=e,A=o;break}s=r}if(0!=(0|l)&&A>>>0<((0|i[5831])-u|0)>>>0&&(h=l+u|0)>>>0>l>>>0){s=0|i[l+24>>2],n=0|i[l+12>>2];do{if((0|n)==(0|l)){if(!(n=0|i[(e=l+20|0)>>2])&&!(n=0|i[(e=l+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,e=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,e=o}i[e>>2]=0}else _=0|i[l+8>>2],i[_+12>>2]=n,i[n+8>>2]=_}while(0);do{if(s){if(e=0|i[l+28>>2],(0|l)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){a&=~(1<<e),i[5830]=a;break}}else if(i[((0|i[(_=s+16|0)>>2])==(0|l)?_:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[l+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[l+20>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);e:do{if(A>>>0<16)_=A+u|0,i[l+4>>2]=3|_,i[(_=l+_+4|0)>>2]=1|i[_>>2];else{if(i[l+4>>2]=3|u,i[h+4>>2]=1|A,i[h+A>>2]=A,n=A>>>3,A>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=h,i[n+12>>2]=h,i[h+8>>2]=n,i[h+12>>2]=r;break}if(n=23620+((r=(n=A>>>8)?A>>>0>16777215?31:A>>>((r=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(r=((_<<=x)+245760|0)>>>16&2))+(_<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[h+28>>2]=r,i[(e=h+16|0)+4>>2]=0,i[e>>2]=0,!(a&(e=1<<r))){i[5830]=a|e,i[n>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break}n=0|i[n>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|A)){for(a=A<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|A)){n=e;break t}a<<=1,n=e}i[r>>2]=h,i[h+24>>2]=n,i[h+12>>2]=h,i[h+8>>2]=h;break e}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=h,i[b>>2]=h,i[h+8>>2]=_,i[h+12>>2]=n,i[h+24>>2]=0}}while(0);return P=t,0|(_=l+8|0)}d=u}else d=u;else d=-1}while(0);if((r=0|i[5831])>>>0>=d>>>0)return n=r-d|0,e=0|i[5834],n>>>0>15?(_=e+d|0,i[5834]=_,i[5831]=n,i[_+4>>2]=1|n,i[e+r>>2]=n,i[e+4>>2]=3|d):(i[5831]=0,i[5834]=0,i[e+4>>2]=3|r,i[(_=e+r+4|0)>>2]=1|i[_>>2]),P=t,0|(_=e+8|0);if((A=0|i[5832])>>>0>d>>>0)return x=A-d|0,i[5832]=x,b=(_=0|i[5835])+d|0,i[5835]=b,i[b+4>>2]=1|x,i[_+4>>2]=3|d,P=t,0|(_=_+8|0);if(0|i[5947]?e=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&f^1431655768,e=4096),l=d+48|0,(u=(s=e+(c=d+47|0)|0)&(o=0-e|0))>>>0<=d>>>0)return P=t,0|(_=0);if(0|(e=0|i[5939])&&(f=(h=0|i[5937])+u|0)>>>0<=h>>>0|f>>>0>e>>>0)return P=t,0|(_=0);e:do{if(4&i[5940])n=0,g=143;else{r=0|i[5835];t:do{if(r){for(a=23764;!((f=0|i[a>>2])>>>0<=r>>>0&&(f+(0|i[a+4>>2])|0)>>>0>r>>>0);){if(!(e=0|i[a+8>>2])){g=128;break t}a=e}if((n=s-A&o)>>>0<2147483647)if((0|(e=0|Rt(0|n)))==((0|i[a>>2])+(0|i[a+4>>2])|0)){if(-1!=(0|e)){A=n,s=e,g=145;break e}}else a=e,g=136;else n=0}else g=128}while(0);do{if(128==(0|g))if(-1!=(0|(r=0|Rt(0)))&&(n=r,m=(n=(0==((m=(p=0|i[5948])+-1|0)&n|0)?0:(m+n&0-p)-n|0)+u|0)+(p=0|i[5937])|0,n>>>0>d>>>0&n>>>0<2147483647)){if(0|(f=0|i[5939])&&m>>>0<=p>>>0|m>>>0>f>>>0){n=0;break}if((0|(e=0|Rt(0|n)))==(0|r)){A=n,s=r,g=145;break e}a=e,g=136}else n=0}while(0);do{if(136==(0|g)){if(r=0-n|0,!(l>>>0>n>>>0&n>>>0<2147483647&-1!=(0|a))){if(-1==(0|a)){n=0;break}A=n,s=a,g=145;break e}if((e=c-n+(e=0|i[5949])&0-e)>>>0>=2147483647){A=n,s=a,g=145;break e}if(-1==(0|Rt(0|e))){Rt(0|r),n=0;break}A=e+n|0,s=a,g=145;break e}}while(0);i[5940]=4|i[5940],g=143}}while(0);if(143==(0|g)&&u>>>0<2147483647&&!(-1==(0|(x=0|Rt(0|u)))|1^(y=(v=(m=0|Rt(0))-x|0)>>>0>(d+40|0)>>>0)|x>>>0<m>>>0&-1!=(0|x)&-1!=(0|m)^1)&&(A=y?v:n,s=x,g=145),145==(0|g)){n=(0|i[5937])+A|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];e:do{if(c){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){g=154;break}if(!(a=0|i[n+8>>2]))break;n=a}if(154==(0|g)&&(b=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&e>>>0<=c>>>0){i[b>>2]=r+A,b=c+(x=0==(7&(x=c+8|0)|0)?0:0-x&7)|0,x=(_=(0|i[5832])+A|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[c+_+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+A|0,n=23764;;){if((0|i[n>>2])==(0|r)){g=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|g)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(h=n+4|0)>>2]=(0|i[h>>2])+A,u=(h=s+(0==(7&(h=s+8|0)|0)?0:0-h&7)|0)+d|0,l=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-h-d|0,i[h+4>>2]=3|d;t:do{if((0|c)==(0|n))_=(0|i[5832])+l|0,i[5832]=_,i[5835]=u,i[u+4>>2]=1|_;else{if((0|i[5834])==(0|n)){_=(0|i[5831])+l|0,i[5831]=_,i[5834]=u,i[u+4>>2]=1|_,i[u+_>>2]=_;break}if(1==(3&(e=0|i[n+4>>2])|0)){A=-8&e,a=e>>>3;n:do{if(e>>>0<256){if(e=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<a);break}i[e+12>>2]=r,i[r+8>>2]=e;break}s=0|i[n+24>>2],e=0|i[n+12>>2];do{if((0|e)==(0|n)){if(e=0|i[(a=(r=n+16|0)+4|0)>>2])r=a;else if(!(e=0|i[r>>2])){e=0;break}for(;;)if(a=0|i[(o=e+20|0)>>2])e=a,r=o;else{if(!(a=0|i[(o=e+16|0)>>2]))break;e=a,r=o}i[r>>2]=0}else _=0|i[n+8>>2],i[_+12>>2]=e,i[e+8>>2]=_}while(0);if(!s)break;a=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[a>>2])==(0|n)){if(i[a>>2]=e,0|e)break;i[5830]=i[5830]&~(1<<r);break n}if(i[((0|i[(_=s+16|0)>>2])==(0|n)?_:s+20|0)>>2]=e,!e)break n}while(0);if(i[e+24>>2]=s,0|(a=0|i[(r=n+16|0)>>2])&&(i[e+16>>2]=a,i[a+24>>2]=e),!(r=0|i[r+4>>2]))break;i[e+20>>2]=r,i[r+24>>2]=e}while(0);n=n+A|0,o=A+l|0}else o=l;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[u+4>>2]=1|o,i[u+o>>2]=o,n=o>>>3,o>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=u,i[n+12>>2]=u,i[u+8>>2]=n,i[u+12>>2]=r;break}n=o>>>8;do{if(n){if(o>>>0>16777215){a=31;break}a=o>>>((a=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(a=((_<<=x)+245760|0)>>>16&2))+(_<<a>>>15)|0)+7|0)&1|a<<1}else a=0}while(0);if(n=23620+(a<<2)|0,i[u+28>>2]=a,i[(e=u+16|0)+4>>2]=0,i[e>>2]=0,!((e=0|i[5830])&(r=1<<a))){i[5830]=e|r,i[n>>2]=u,i[u+24>>2]=n,i[u+12>>2]=u,i[u+8>>2]=u;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|o)){for(a=o<<(31==(0|a)?0:25-(a>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|o)){n=e;break n}a<<=1,n=e}i[r>>2]=u,i[u+24>>2]=n,i[u+12>>2]=u,i[u+8>>2]=u;break t}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=u,i[b>>2]=u,i[u+8>>2]=_,i[u+12>>2]=n,i[u+24>>2]=0}}while(0);return P=t,0|(_=h+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=c>>>0&&(_=e+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(e=(e=(o=_+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=s+(x=0==(7&(x=s+8|0)|0)?0:0-x&7)|0,x=(r=A+-40|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=e+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=A,i[5944]=0,i[5943]=n,n=e+24|0;do{b=n,i[(n=n+4|0)>>2]=7}while((b+8|0)>>>0<_>>>0);if((0|e)!=(0|c)){if(s=e-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[e>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((a=(n=s>>>8)?s>>>0>16777215?31:s>>>((a=14-((x=((_=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(a=((_<<=x)+245760|0)>>>16&2))+(_<<a>>>15)|0)+7|0)&1|a<<1:0)<<2)|0,i[c+28>>2]=a,i[c+20>>2]=0,i[o>>2]=0,!((n=0|i[5830])&(e=1<<a))){i[5830]=n|e,i[r>>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(a=s<<(31==(0|a)?0:25-(a>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|s)){n=e;break t}a<<=1,n=e}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break e}}while(0);_=0|i[(b=n+8|0)>>2],i[_+12>>2]=c,i[b>>2]=c,i[c+8>>2]=_,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(_=0|i[5833]))|s>>>0<_>>>0&&(i[5833]=s),i[5941]=s,i[5942]=A,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,b=s+(x=0==(7&(x=s+8|0)|0)?0:0-x&7)|0,x=(_=A+-40|0)-x|0,i[5835]=b,i[5832]=x,i[b+4>>2]=1|x,i[s+_+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>d>>>0)return x=n-d|0,i[5832]=x,b=(_=0|i[5835])+d|0,i[5835]=b,i[b+4>>2]=1|x,i[_+4>>2]=3|d,P=t,0|(_=_+8|0)}return i[(_=23312)>>2]=12,P=t,0|(_=0)}function vt(e){var t=0,n=0,r=0,a=0,o=0,s=0,A=0,l=0;if(e|=0){n=e+-8|0,a=0|i[5833],l=n+(t=-8&(e=0|i[e+-4>>2]))|0;do{if(1&e)A=n,s=n;else{if(r=0|i[n>>2],!(3&e))return;if(o=r+t|0,(s=n+(0-r)|0)>>>0<a>>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(t=0|i[(e=l+4|0)>>2])|0)){A=s,t=o;break}return i[5831]=o,i[e>>2]=-2&t,i[s+4>>2]=1|o,void(i[s+o>>2]=o)}if(n=r>>>3,r>>>0<256){if(e=0|i[s+8>>2],(0|(t=0|i[s+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<n),A=s,t=o;break}i[e+12>>2]=t,i[t+8>>2]=e,A=s,t=o;break}a=0|i[s+24>>2],e=0|i[s+12>>2];do{if((0|e)==(0|s)){if(e=0|i[(n=(t=s+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){e=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0}else A=0|i[s+8>>2],i[A+12>>2]=e,i[e+8>>2]=A}while(0);if(a){if(t=0|i[s+28>>2],(0|i[(n=23620+(t<<2)|0)>>2])==(0|s)){if(i[n>>2]=e,!e){i[5830]=i[5830]&~(1<<t),A=s,t=o;break}}else if(i[((0|i[(A=a+16|0)>>2])==(0|s)?A:a+20|0)>>2]=e,!e){A=s,t=o;break}i[e+24>>2]=a,0|(n=0|i[(t=s+16|0)>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(t=0|i[t+4>>2])?(i[e+20>>2]=t,i[t+24>>2]=e,A=s,t=o):(A=s,t=o)}else A=s,t=o}}while(0);if(!(s>>>0>=l>>>0)&&1&(r=0|i[(e=l+4|0)>>2])){if(2&r)i[e>>2]=-2&r,i[A+4>>2]=1|t,i[s+t>>2]=t,a=t;else{if((0|i[5835])==(0|l)){if(l=(0|i[5832])+t|0,i[5832]=l,i[5835]=A,i[A+4>>2]=1|l,(0|A)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|l))return l=(0|i[5831])+t|0,i[5831]=l,i[5834]=s,i[A+4>>2]=1|l,void(i[s+l>>2]=l);a=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[l+8>>2],(0|(e=0|i[l+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<n);break}i[t+12>>2]=e,i[e+8>>2]=t;break}o=0|i[l+24>>2],e=0|i[l+12>>2];do{if((0|e)==(0|l)){if(e=0|i[(n=(t=l+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){n=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0,n=e}else n=0|i[l+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|o){if(e=0|i[l+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|l)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<<e);break}}else if(i[((0|i[(r=o+16|0)>>2])==(0|l)?r:o+20|0)>>2]=n,!n)break;i[n+24>>2]=o,0|(t=0|i[(e=l+16|0)>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),0|(e=0|i[e+4>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);if(i[A+4>>2]=1|a,i[s+a>>2]=a,(0|A)==(0|i[5834]))return void(i[5831]=a)}if(e=a>>>3,a>>>0<256)return n=23356+(e<<1<<2)|0,(t=0|i[5829])&(e=1<<e)?e=0|i[(t=n+8|0)>>2]:(i[5829]=t|e,e=n,t=n+8|0),i[t>>2]=A,i[e+12>>2]=A,i[A+8>>2]=e,void(i[A+12>>2]=n);e=23620+((r=(e=a>>>8)?a>>>0>16777215?31:a>>>((r=14-((o=((l=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((l<<=o)+245760|0)>>>16&2))+(l<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[A+28>>2]=r,i[A+20>>2]=0,i[A+16>>2]=0,t=0|i[5830],n=1<<r;e:do{if(t&n){e=0|i[e>>2];t:do{if((-8&i[e+4>>2]|0)!=(0|a)){for(r=a<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(n=e+16+(r>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|a)){e=t;break t}r<<=1,e=t}i[n>>2]=A,i[A+24>>2]=e,i[A+12>>2]=A,i[A+8>>2]=A;break e}}while(0);l=0|i[(s=e+8|0)>>2],i[l+12>>2]=A,i[s>>2]=A,i[A+8>>2]=l,i[A+12>>2]=e,i[A+24>>2]=0}else i[5830]=t|n,i[e>>2]=A,i[A+24>>2]=e,i[A+12>>2]=A,i[A+8>>2]=A}while(0);if(l=(0|i[5837])-1|0,i[5837]=l,!(0|l)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function yt(e,t){t|=0;var n=0;return(e|=0)?(n=0|y(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|gt(n))&&3&i[e+-4>>2]?(Lt(0|e,0,0|n),0|e):0|e}function xt(e,t,n,r){return 0|(_(0|(r=(t|=0)-(r|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0)),e-n>>>0|0)}function bt(e){return 0|((e|=0)?31-(0|b(e^e-1))|0:32)}function _t(e,t,n,r,a){a|=0;var o=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0;if(u=e|=0,s=n|=0,A=d=r|=0,!(c=l=t|=0))return o=0!=(0|a),A?o?(i[a>>2]=0|e,i[a+4>>2]=0&t,a=0,0|(_(0|(d=0)),a)):(a=0,0|(_(0|(d=0)),a)):(o&&(i[a>>2]=(u>>>0)%(s>>>0),i[a+4>>2]=0),a=(u>>>0)/(s>>>0)>>>0,0|(_(0|(d=0)),a));o=0==(0|A);do{if(s){if(!o){if((o=(0|b(0|A))-(0|b(0|c))|0)>>>0<=31){s=h=o+1|0,e=u>>>(h>>>0)&(t=o-31>>31)|c<<(A=31-o|0),t&=c>>>(h>>>0),o=0,A=u<<A;break}return a?(i[a>>2]=0|e,i[a+4>>2]=l|0&t,a=0,0|(_(0|(d=0)),a)):(a=0,0|(_(0|(d=0)),a))}if((o=s-1|0)&s|0){s=A=33+(0|b(0|s))-(0|b(0|c))|0,e=(h=32-A|0)-1>>31&c>>>((f=A-32|0)>>>0)|(c<<h|u>>>(A>>>0))&(t=f>>31),t&=c>>>(A>>>0),o=u<<(p=64-A|0)&(l=h>>31),A=(c<<p|u>>>(f>>>0))&l|u<<h&A-33>>31;break}return 0|a&&(i[a>>2]=o&u,i[a+4>>2]=0),1==(0|s)?(p=0|e,0|(_(0|(f=l|0&t)),p)):(f=c>>>((p=0|bt(0|s))>>>0)|0,p=c<<32-p|u>>>(p>>>0)|0,0|(_(0|f),p))}if(o)return 0|a&&(i[a>>2]=(c>>>0)%(s>>>0),i[a+4>>2]=0),p=(c>>>0)/(s>>>0)>>>0,0|(_(0|(f=0)),p);if(!u)return 0|a&&(i[a>>2]=0,i[a+4>>2]=(c>>>0)%(A>>>0)),p=(c>>>0)/(A>>>0)>>>0,0|(_(0|(f=0)),p);if(!((o=A-1|0)&A))return 0|a&&(i[a>>2]=0|e,i[a+4>>2]=o&c|0&t),f=0,p=c>>>((0|bt(0|A))>>>0),0|(_(0|f),p);if((o=(0|b(0|A))-(0|b(0|c))|0)>>>0<=30){s=t=o+1|0,e=c<<(A=31-o|0)|u>>>(t>>>0),t=c>>>(t>>>0),o=0,A=u<<A;break}return a?(i[a>>2]=0|e,i[a+4>>2]=l|0&t,p=0,0|(_(0|(f=0)),p)):(p=0,0|(_(0|(f=0)),p))}while(0);if(s){c=0|function(e,t,n,r){return 0|(_((t|=0)+(r|=0)+((n=(e|=0)+(n|=0)>>>0)>>>0<e>>>0|0)>>>0|0),0|n)}(0|(h=0|n),0|(u=d|0&r),-1,-1),n=0|w(),l=A,A=0;do{r=l,l=o>>>31|l<<1,o=A|o<<1,xt(0|c,0|n,0|(r=e<<1|r>>>31|0),0|(d=e>>>31|t<<1|0)),A=1&(f=(p=0|w())>>31|((0|p)<0?-1:0)<<1),e=0|xt(0|r,0|d,f&h|0,(((0|p)<0?-1:0)>>31|((0|p)<0?-1:0)<<1)&u|0),t=0|w(),s=s-1|0}while(0!=(0|s));c=l,l=0}else c=A,l=0,A=0;return s=0,0|a&&(i[a>>2]=e,i[a+4>>2]=t),p=-2&(o<<1|0)|A,0|(_(0|(f=(0|o)>>>31|(c|s)<<1|0&(s<<1|o>>>31)|l)),p)}function wt(e,t,n,r){var a,o;return o=P,P=P+16|0,_t(e|=0,t|=0,n|=0,r|=0,a=0|o),P=o,0|(_(0|i[a+4>>2]),0|i[a>>2])}function Mt(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(_(t>>>n|0),e>>>n|(t&(1<<n)-1)<<32-n):(_(0),t>>>n-32|0)}function St(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(_(t<<n|(e&(1<<n)-1<<32-n)>>>32-n|0),e<<n):(_(e<<n-32|0),0)}function Et(e,t){return t=+t,(e=+e)!=e?+t:t!=t?+e:+x(+e,+t)}function Tt(e){return(e=+e)>=0?+s(e+.5):+v(e-.5)}function Ct(e,t,n){e|=0,t|=0;var a,o,s=0;if((0|(n|=0))>=8192)return T(0|e,0|t,0|n),0|e;if(o=0|e,a=e+n|0,(3&e)==(3&t)){for(;3&e;){if(!n)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,n=n-1|0}for(s=(n=-4&a|0)-64|0;(0|e)<=(0|s);)i[e>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2],i[e+16>>2]=i[t+16>>2],i[e+20>>2]=i[t+20>>2],i[e+24>>2]=i[t+24>>2],i[e+28>>2]=i[t+28>>2],i[e+32>>2]=i[t+32>>2],i[e+36>>2]=i[t+36>>2],i[e+40>>2]=i[t+40>>2],i[e+44>>2]=i[t+44>>2],i[e+48>>2]=i[t+48>>2],i[e+52>>2]=i[t+52>>2],i[e+56>>2]=i[t+56>>2],i[e+60>>2]=i[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|n);)i[e>>2]=i[t>>2],e=e+4|0,t=t+4|0}else for(n=a-4|0;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|a);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function Lt(e,t,n){t|=0;var a,o=0,s=0,A=0;if(a=(e|=0)+(n|=0)|0,t&=255,(0|n)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(A=t|t<<8|t<<16|t<<24,s=(o=-4&a|0)-64|0;(0|e)<=(0|s);)i[e>>2]=A,i[e+4>>2]=A,i[e+8>>2]=A,i[e+12>>2]=A,i[e+16>>2]=A,i[e+20>>2]=A,i[e+24>>2]=A,i[e+28>>2]=A,i[e+32>>2]=A,i[e+36>>2]=A,i[e+40>>2]=A,i[e+44>>2]=A,i[e+48>>2]=A,i[e+52>>2]=A,i[e+56>>2]=A,i[e+60>>2]=A,e=e+64|0;for(;(0|e)<(0|o);)i[e>>2]=A,e=e+4|0}for(;(0|e)<(0|a);)r[e>>0]=t,e=e+1|0;return a-n|0}function Pt(e){return(e=+e)>=0?+s(e+.5):+v(e-.5)}function Rt(e){e|=0;var t,n,r;return r=0|E(),(0|e)>0&(0|(t=(n=0|i[o>>2])+e|0))<(0|n)|(0|t)<0?(L(0|t),S(12),-1):(0|t)>(0|r)&&!(0|C(0|t))?(S(12),-1):(i[o>>2]=t,0|n)}return{___uremdi3:wt,_bitshift64Lshr:Mt,_bitshift64Shl:St,_calloc:yt,_cellAreaKm2:function(e,t){var n,r,a,o=0;if(a=P,P=P+192|0,r=a,je(e|=0,t|=0,n=a+168|0),Ve(e,t,r),(0|(t=0|i[r>>2]))>0){if(o=+Le(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{o+=+Le(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else o=0;return P=a,6371.007180918475*o*6371.007180918475},_cellAreaM2:function(e,t){var n,r,a,o=0;if(a=P,P=P+192|0,r=a,je(e|=0,t|=0,n=a+168|0),Ve(e,t,r),(0|(t=0|i[r>>2]))>0){if(o=+Le(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{o+=+Le(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else o=0;return P=a,6371.007180918475*o*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,a,o=0;if(a=P,P=P+192|0,r=a,je(e|=0,t|=0,n=a+168|0),Ve(e,t,r),(0|(t=0|i[r>>2]))<=0)return P=a,+(o=0);if(o=+Le(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return P=a,+o;e=1;do{o+=+Le(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return P=a,+o},_compact:function(e,t,n){t|=0;var r,a=0,o=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,M=0,S=0,E=0;if(!(n|=0))return 0|(S=0);if(a=0|i[(o=e|=0)>>2],!0&0==(15728640&(o=0|i[o+4>>2])|0)){if((0|n)<=0)return 0|(S=0);if(i[(S=t)>>2]=a,i[S+4>>2]=o,1==(0|n))return 0|(S=0);a=1;do{M=0|i[(_=e+(a<<3)|0)+4>>2],i[(S=t+(a<<3)|0)>>2]=i[_>>2],i[S+4>>2]=M,a=a+1|0}while((0|a)!=(0|n));return 0|(a=0)}if(!(M=0|gt(_=n<<3)))return 0|(S=-3);if(Ct(0|M,0|e,0|_),!(r=0|yt(n,8)))return vt(M),0|(S=-3);a=n;e:for(;;){x=0|Mt(0|(h=0|i[(A=M)>>2]),0|(A=0|i[A+4>>2]),52),w(),b=(x&=15)+-1|0,y=(0|a)>0;t:do{if(y){if(v=((0|a)<0)<<31>>31,m=0|St(0|b,0,52),g=0|w(),b>>>0>15)for(o=0,e=h,n=A;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Mt(0|e,0|n,52),w(),l=(0|(s&=15))<(0|b),s=(0|s)==(0|b),n=0|wt(0|(u=l?0:s?e:0),0|(e=l?0:s?n:0),0|a,0|v),w(),0==(0|(c=0|i[(l=s=r+(n<<3)|0)>>2]))&0==(0|(l=0|i[l+4>>2])))n=u;else for(m=0,p=n,f=l,n=u;;){if((0|m)>(0|a)){S=41;break e}if((0|c)==(0|n)&(-117440513&f|0)==(0|e)){u=0|Mt(0|c,0|f,56),w(),d=(u&=7)+1|0,g=0|Mt(0|c,0|f,45),w();n:do{if(0|O(127&g)){if(c=0|Mt(0|c,0|f,52),w(),!(c&=15)){l=6;break}for(l=1;;){if(!(0==((g=0|St(7,0,3*(15-l|0)|0))&n|0)&0==((0|w())&e|0))){l=7;break n}if(!(l>>>0<c>>>0)){l=6;break}l=l+1|0}}else l=7}while(0);if((u+2|0)>>>0>l>>>0){S=51;break e}g=0|St(0|d,0,56),e=0|w()|-117440513&e,i[(l=s)>>2]=0,i[l+4>>2]=0,l=p,n|=g}else l=(p+1|0)%(0|a)|0;if(0==(0|(c=0|i[(f=s=r+(l<<3)|0)>>2]))&0==(0|(f=0|i[f+4>>2])))break;m=m+1|0,p=l}i[(g=s)>>2]=n,i[g+4>>2]=e}if((0|(o=o+1|0))>=(0|a))break t;e=0|i[(n=M+(o<<3)|0)>>2],n=0|i[n+4>>2]}for(o=0,e=h,n=A;;){if(!(0==(0|e)&0==(0|n))){if(l=0|Mt(0|e,0|n,52),w(),(0|(l&=15))>=(0|b)){if((0|l)!=(0|b)&&(e|=m,n=-15728641&n|g,l>>>0>=x>>>0)){s=b;do{p=0|St(7,0,3*(14-s|0)|0),s=s+1|0,e|=p,n=0|w()|n}while(s>>>0<l>>>0)}}else e=0,n=0;if(l=0|wt(0|e,0|n,0|a,0|v),w(),!(0==(0|(u=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(p=0;;){if((0|p)>(0|a)){S=41;break e}if((0|u)==(0|e)&(-117440513&c|0)==(0|n)){d=0|Mt(0|u,0|c,56),w(),f=(d&=7)+1|0,E=0|Mt(0|u,0|c,45),w();n:do{if(0|O(127&E)){if(u=0|Mt(0|u,0|c,52),w(),!(u&=15)){c=6;break}for(c=1;;){if(!(0==((E=0|St(7,0,3*(15-c|0)|0))&e|0)&0==((0|w())&n|0))){c=7;break n}if(!(c>>>0<u>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((d+2|0)>>>0>c>>>0){S=51;break e}E=0|St(0|f,0,56),n=0|w()|-117440513&n,i[(f=s)>>2]=0,i[f+4>>2]=0,e|=E}else l=(l+1|0)%(0|a)|0;if(0==(0|(u=0|i[(c=s=r+(l<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;p=p+1|0}i[(E=s)>>2]=e,i[E+4>>2]=n}if((0|(o=o+1|0))>=(0|a))break t;e=0|i[(n=M+(o<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((a+5|0)>>>0<11){S=99;break}if(!(g=0|yt((0|a)/6|0,8))){S=58;break}t:do{if(y){p=0,f=0;do{if(!(0==(0|(o=0|i[(e=l=r+(p<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){c=0|Mt(0|o,0|e,56),w(),n=(c&=7)+1|0,u=-117440513&e,E=0|Mt(0|o,0|e,45),w();n:do{if(0|O(127&E)){if(d=0|Mt(0|o,0|e,52),w(),0|(d&=15))for(s=1;;){if(!(0==(o&(E=0|St(7,0,3*(15-s|0)|0))|0)&0==(u&(0|w())|0)))break n;if(!(s>>>0<d>>>0))break;s=s+1|0}o|=e=0|St(0|n,0,56),e=0|w()|u,i[(n=l)>>2]=o,i[n+4>>2]=e,n=c+2|0}}while(0);7==(0|n)&&(i[(E=g+(f<<3)|0)>>2]=o,i[E+4>>2]=-117440513&e,f=f+1|0)}p=p+1|0}while((0|p)!=(0|a));if(y){if(m=((0|a)<0)<<31>>31,d=0|St(0|b,0,52),p=0|w(),b>>>0>15)for(e=0,o=0;;){do{if(!(0==(0|h)&0==(0|A))){for(c=0|Mt(0|h,0|A,52),w(),s=(0|(c&=15))<(0|b),c=(0|c)==(0|b),s=0|wt(0|(l=s?0:c?h:0),0|(c=s?0:c?A:0),0|a,0|m),w(),n=0;;){if((0|n)>(0|a)){S=98;break e}if((-117440513&(u=0|i[(E=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[E>>2])==(0|l)){S=70;break}if((0|i[(E=r+((s=(s+1|0)%(0|a)|0)<<3)|0)>>2])==(0|l)&&(0|i[E+4>>2])==(0|c))break;n=n+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;i[(E=t+(o<<3)|0)>>2]=h,i[E+4>>2]=A,o=o+1|0}}while(0);if((0|(e=e+1|0))>=(0|a)){a=f;break t}h=0|i[(A=M+(e<<3)|0)>>2],A=0|i[A+4>>2]}for(e=0,o=0;;){do{if(!(0==(0|h)&0==(0|A))){if(c=0|Mt(0|h,0|A,52),w(),(0|(c&=15))>=(0|b))if((0|c)!=(0|b))if(n=h|d,s=-15728641&A|p,c>>>0<x>>>0)c=s;else{l=b;do{E=0|St(7,0,3*(14-l|0)|0),l=l+1|0,n|=E,s=0|w()|s}while(l>>>0<c>>>0);c=s}else n=h,c=A;else n=0,c=0;for(l=0|wt(0|n,0|c,0|a,0|m),w(),s=0;;){if((0|s)>(0|a)){S=98;break e}if((-117440513&(u=0|i[(E=r+(l<<3)|0)+4>>2])|0)==(0|c)&&(0|i[E>>2])==(0|n)){S=93;break}if((0|i[(E=r+((l=(l+1|0)%(0|a)|0)<<3)|0)>>2])==(0|n)&&(0|i[E+4>>2])==(0|c))break;s=s+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&u|0)))break;i[(E=t+(o<<3)|0)>>2]=h,i[E+4>>2]=A,o=o+1|0}}while(0);if((0|(e=e+1|0))>=(0|a)){a=f;break t}h=0|i[(A=M+(e<<3)|0)>>2],A=0|i[A+4>>2]}}else o=0,a=f}else o=0,a=0}while(0);if(Lt(0|r,0,0|_),Ct(0|M,0|g,a<<3|0),vt(g),!a)break;t=t+(o<<3)|0}return 41==(0|S)?(vt(M),vt(r),0|(E=-1)):51==(0|S)?(vt(M),vt(r),0|(E=-2)):58==(0|S)?(vt(M),vt(r),0|(E=-3)):98==(0|S)?(vt(g),vt(M),vt(r),0|(E=-1)):(99==(0|S)&&Ct(0|t,0|M,a<<3|0),vt(M),vt(r),0|(E=0))},_destroyLinkedPolygon:function(e){var t=0,n=0,r=0,a=0;if(e|=0)for(r=1;;){if(0|(t=0|i[e>>2]))do{if(0|(n=0|i[t>>2]))do{a=n,n=0|i[n+16>>2],vt(a)}while(0!=(0|n));a=t,t=0|i[t+8>>2],vt(a)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||vt(t),!e)break;r=0}},_edgeLengthKm:function(e){return+ +a[20752+((e|=0)<<3)>>3]},_edgeLengthM:function(e){return+ +a[20880+((e|=0)<<3)>>3]},_emscripten_replace_memory:function(e){return r=new Int8Array(e),i=new Int32Array(e),a=new Float64Array(e),n=e,!0},_exactEdgeLengthKm:function(e,t){var n,r,o=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],A=+a[n+16>>3];do{d=s,s=+a[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+a[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+d)*+u(+s)*c),o+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)!=(0|t));return P=r,+(f=6371.007180918475*o)},_exactEdgeLengthM:function(e,t){var n,r,o=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],A=+a[n+16>>3];do{d=s,s=+a[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+a[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+d)*+u(+s)*c),o+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)!=(0|t));return P=r,+(f=6371.007180918475*o*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,o=0,s=0,A=0,c=0,d=0,f=0;if(r=P,P=P+176|0,Ye(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return P=r,+(A=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],A=+a[n+16>>3];do{d=s,s=+a[n+8+((e=e+1|0)<<4)>>3],f=+h(.5*(s-d)),c=A,A=+a[n+8+(e<<4)+8>>3],c=f*f+(c=+h(.5*(A-c)))*(+u(+s)*+u(+d)*c),o+=2*+g(+ +l(+c),+ +l(+(1-c)))}while((0|e)<(0|t));return P=r,+o},_experimentalH3ToLocalIj:function(e,t,n,r,i){var a,o;return i|=0,o=P,P=P+16|0,(e=0|$e(e|=0,t|=0,n|=0,r|=0,a=o))||(de(a,i),e=0),P=o,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,a;return e|=0,t|=0,r|=0,i=P,P=P+16|0,fe(n|=0,a=i),r=0|et(e,t,a,r),P=i,0|r},_free:vt,_geoToH3:Ue,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,a=0;return n=P,P=P+16|0,a=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Mt(0|e,0|t,56),w(),i[a>>2]=0,a=0|I(e,-2130706433&t|134217728,7&r,a),t=0|w(),_(0|t),P=n,0|a):(a=0,_(0|(t=0)),P=n,0|a)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,a,o,s,A=0;o=P,P=P+16|0,r=o,s=!0&268435456==(2013265920&(t|=0)|0),a=-2130706433&t|134217728,i[(A=n|=0)>>2]=s?e:0,i[A+4>>2]=s?a:0,s?(t=0|Mt(0|e,0|t,56),w(),i[r>>2]=0,e=0|I(e,a,7&t,r),t=0|w()):(e=0,t=0),i[(A=n+8|0)>>2]=e,i[A+4>>2]=t,P=o},_getH3UnidirectionalEdge:function(e,t,n,r){var a,o,s=0,A=0,l=0,c=0,u=0;if(o=P,P=P+16|0,a=o,!(0|Qe(e|=0,t|=0,n|=0,r|=0)))return c=0,_(0|(l=0)),P=o,0|c;for(l=-2130706433&t,s=(s=0==(0|Ie(e,t)))?1:2;i[a>>2]=0,A=s+1|0,!((0|(u=0|I(e,t,s,a)))==(0|n)&(0|w())==(0|r));){if(!(A>>>0<7)){s=0,e=0,c=6;break}s=A}return 6==(0|c)?(_(0|s),P=o,0|e):(u=0|St(0|s,0,56),c=0|l|w()|268435456,u|=e,_(0|c),P=o,0|u)},_getH3UnidirectionalEdgeBoundary:Ye,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,a=0;r=0==(0|Ie(e|=0,t|=0)),t&=-2130706433,i[(a=n)>>2]=r?e:0,i[a+4>>2]=r?285212672|t:0,i[(a=n+8|0)>>2]=e,i[a+4>>2]=301989888|t,i[(a=n+16|0)>>2]=e,i[a+4>>2]=318767104|t,i[(a=n+24|0)>>2]=e,i[a+4>>2]=335544320|t,i[(a=n+32|0)>>2]=e,i[a+4>>2]=352321536|t,i[(n=n+40|0)>>2]=e,i[n+4>>2]=369098752|t},_getOriginH3IndexFromUnidirectionalEdge:function(e,t){var n;return e|=0,_(0|((n=!0&268435456==(2013265920&(t|=0)|0))?-2130706433&t|134217728:0)),0|(n?e:0)},_getPentagonIndexes:We,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{St(0|t,0,45),r=134225919|w(),i[(n=e+(t<<3)|0)>>2]=-1,i[n+4>>2]=r,t=t+1|0}while(122!=(0|t))},_h3Distance:function(e,t,n,r){var i,a,o;return n|=0,r|=0,o=P,P=P+32|0,a=o,e=0==(0|$e(e|=0,t|=0,e,t,i=o+12|0))&&0==(0|$e(e,t,n,r,a))?0|he(i,a):-1,P=o,0|e},_h3GetBaseCell:Pe,_h3GetFaces:function e(t,n,r){r|=0;var a,o=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0;a=P,P=P+128|0,h=a+112|0,A=a+96|0,d=a,s=0|Mt(0|(t|=0),0|(n|=0),52),w(),c=15&s,i[h>>2]=c,l=0|Mt(0|t,0|n,45),w(),l&=127;e:do{if(0|O(l)){if(0|c)for(o=1;;){if(!(0==((u=0|St(7,0,3*(15-o|0)|0))&t|0)&0==((0|w())&n|0))){s=0;break e}if(!(o>>>0<c>>>0))break;o=o+1|0}if(!(1&s))return u=0|St(c+1|0,0,52),d=0|w()|-15728641&n,e((u|t)&~(h=0|St(7,0,3*(14-c|0)|0)),d&~(0|w()),r),void(P=a);s=1}else s=0}while(0);Ge(t,n,A),s?(be(A,h,d),u=5):(Se(A,h,d),u=6);e:do{if(0|O(l))if(c)for(o=1;;){if(!(0==((l=0|St(7,0,3*(15-o|0)|0))&t|0)&0==((0|w())&n|0))){o=8;break e}if(!(o>>>0<c>>>0)){o=20;break}o=o+1|0}else o=20;else o=8}while(0);if(Lt(0|r,-1,0|o),s){s=0;do{for(we(A=d+(s<<4)|0,0|i[h>>2]),A=0|i[A>>2],o=0;!(-1==(0|(c=0|i[(l=r+(o<<2)|0)>>2]))|(0|c)==(0|A));)o=o+1|0;i[l>>2]=A,s=s+1|0}while((0|s)!=(0|u))}else{s=0;do{for(_e(A=d+(s<<4)|0,0|i[h>>2],0,1),A=0|i[A>>2],o=0;!(-1==(0|(c=0|i[(l=r+(o<<2)|0)>>2]))|(0|c)==(0|A));)o=o+1|0;i[l>>2]=A,s=s+1|0}while((0|s)!=(0|u))}P=a},_h3GetResolution:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),w(),15&t|0},_h3IndexesAreNeighbors:Qe,_h3IsPentagon:Ie,_h3IsResClassIII:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),w(),1&t|0},_h3IsValid:Re,_h3Line:function(e,t,n,r,a){n|=0,r|=0,a|=0;var o,s=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,w=0,M=0;if(o=P,P=P+48|0,l=o+12|0,w=o,0==(0|$e(e|=0,t|=0,e,t,s=o+24|0))&&0==(0|$e(e,t,n,r,l))){if((0|(_=0|he(s,l)))<0)return P=o,0|(w=_);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,$e(e,t,e,t,s),$e(e,t,n,r,l),pe(s),pe(l),_?(m=+(0|_),b=s,n=d=0|i[s>>2],r=f=0|i[(y=s+4|0)>>2],s=p=0|i[(x=s+8|0)>>2],g=+((0|i[l>>2])-d|0)/m,v=+((0|i[l+4>>2])-f|0)/m,m=+((0|i[l+8>>2])-p|0)/m):(y=r=s+4|0,x=p=s+8|0,b=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[p>>2],g=0,v=0,m=0),i[w>>2]=n,i[(p=w+4|0)>>2]=r,i[(f=w+8|0)>>2]=s,d=0;;){M=g*(u=+(0|d))+ +(0|n),c=v*u+ +(0|i[y>>2]),u=m*u+ +(0|i[x>>2]),r=~~+Tt(+M),l=~~+Tt(+c),n=~~+Tt(+u),M=+A(+(+(0|r)-M)),c=+A(+(+(0|l)-c)),u=+A(+(+(0|n)-u));do{if(!(M>c&M>u)){if(h=0-r|0,c>u){s=h-n|0;break}s=l,n=h-l|0;break}r=0-(l+n)|0,s=l}while(0);if(i[w>>2]=r,i[p>>2]=s,i[f>>2]=n,me(w),et(e,t,w,a+(d<<3)|0),(0|d)==(0|_))break;d=d+1|0,n=0|i[b>>2]}return P=o,0|(w=0)}return P=o,0|(w=-1)},_h3LineSize:function(e,t,n,r){var i,a,o;return n|=0,r|=0,o=P,P=P+32|0,a=o,e=0==(0|$e(e|=0,t|=0,e,t,i=o+12|0))&&0==(0|$e(e,t,n,r,a))?0|he(i,a):-1,P=o,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,a,o,s=0;if(o=P,P=P+32|0,r=o,function(e,t,n){e|=0,n|=0;var r,a,o=0,s=0,A=0,l=0,c=0;if(a=P,P=P+176|0,r=a,(0|(t|=0))<1)return lt(n,0,0),void(P=a);l=0|Mt(0|i[(l=e)>>2],0|i[l+4>>2],52),w(),lt(n,(0|t)>6?t:6,15&l),l=0;do{if(Ve(0|i[(o=e+(l<<3)|0)>>2],0|i[o+4>>2],r),(0|(o=0|i[r>>2]))>0){c=0;do{A=r+8+(c<<4)|0,(s=0|ft(n,o=r+8+(((0|(c=c+1|0))%(0|o)|0)<<4)|0,A))?ht(n,s):dt(n,A,o),o=0|i[r>>2]}while((0|c)<(0|o))}l=l+1|0}while((0|l)!=(0|t));P=a}(e|=0,t|=0,a=o+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(e=0|ut(a)))return Je(n),ct(a),void(P=o);do{t=0|Xe(n);do{Ze(t,e),s=e+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],ht(a,e),e=0|pt(a,r)}while(0!=(0|e));e=0|ut(a)}while(0!=(0|e));Je(n),ct(a),P=o},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|St(0|n,0,52),t=0|w()|-15728641&t,(0|r)<(0|n)))do{i=0|St(7,0,3*(14-r|0)|0),r=r+1|0,e&=~i,t&=~(0|w())}while((0|r)<(0|n))}else t=0,e=0;return _(0|t),0|e},_h3ToChildren:De,_h3ToGeo:je,_h3ToGeoBoundary:Ve,_h3ToParent:qe,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Mt(0|(e|=0),0|t,56),w(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&t|0)&0!=(0|Ie(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|Re(e,n))},_hexAreaKm2:function(e){return+ +a[20496+((e|=0)<<3)>>3]},_hexAreaM2:function(e){return+ +a[20624+((e|=0)<<3)>>3]},_hexRing:function(e,t,n,r){e|=0,t|=0,r|=0;var a,o=0,s=0,A=0,l=0,c=0,u=0,h=0;if(a=P,P=P+16|0,h=a,!(n|=0))return i[(h=r)>>2]=e,i[h+4>>2]=t,P=a,0|(h=0);i[h>>2]=0;e:do{if(0|Ie(e,t))e=1;else{if(s=(0|n)>0){o=0,u=e;do{if(0==(0|(u=0|I(u,t,4,h)))&0==(0|(t=0|w()))){e=2;break e}if(o=o+1|0,0|Ie(u,t)){e=1;break e}}while((0|o)<(0|n));if(i[(c=r)>>2]=u,i[c+4>>2]=t,c=n+-1|0,s){s=0,A=1,o=u,e=t;do{if(0==(0|(o=0|I(o,e,2,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(A<<3)|0)>>2]=o,i[l+4>>2]=e,A=A+1|0,0|Ie(o,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));l=0,s=A;do{if(0==(0|(o=0|I(o,e,3,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(A=r+(s<<3)|0)>>2]=o,i[A+4>>2]=e,s=s+1|0,0|Ie(o,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));A=0;do{if(0==(0|(o=0|I(o,e,1,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=o,i[l+4>>2]=e,s=s+1|0,0|Ie(o,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));A=0;do{if(0==(0|(o=0|I(o,e,5,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=o,i[l+4>>2]=e,s=s+1|0,0|Ie(o,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));A=0;do{if(0==(0|(o=0|I(o,e,4,h)))&0==(0|(e=0|w()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=o,i[l+4>>2]=e,s=s+1|0,0|Ie(o,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));for(A=0;;){if(0==(0|(o=0|I(o,e,6,h)))&0==(0|(e=0|w()))){e=2;break e}if((0|A)!=(0|c)){if(i[(l=r+(s<<3)|0)>>2]=o,i[l+4>>2]=e,0|Ie(o,e)){e=1;break e}s=s+1|0}if((0|(A=A+1|0))>=(0|n)){A=u,s=t;break}}}else A=u,o=u,s=t,e=t}else i[(A=r)>>2]=e,i[A+4>>2]=t,A=e,o=e,s=t,e=t;e=1&((0|A)!=(0|o)|(0|s)!=(0|e))}}while(0);return P=a,0|(h=e)},_i64Subtract:xt,_kRing:R,_kRingDistances:function(e,t,n,r,i){var a;if(0|q(e|=0,t|=0,n|=0,r|=0,i|=0)){if(Lt(0|r,0,(a=1+(0|y(3*n|0,n+1|0))|0)<<3|0),0|i)return Lt(0|i,0,a<<2|0),void D(e,t,n,r,i,a,0);(i=0|yt(a,4))&&(D(e,t,n,r,i,a,0),vt(i))}},_llvm_minnum_f64:Et,_llvm_round_f64:Tt,_malloc:gt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Mt(0|(e|=0),0|(t|=0),45),w(),!(0|O(127&r)))return 0|(r=2);if(r=0|Mt(0|e,0|t,52),w(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|St(7,0,3*(15-n|0)|0))&e|0)&0==((0|w())&t|0))){n=2,e=6;break}if(!(n>>>0<r>>>0)){n=5,e=6;break}n=n+1|0}return 6==(0|e)?0|n:0},_maxH3ToChildrenSize:function(e,t,n){return n|=0,e=0|Mt(0|(e|=0),0|(t|=0),52),w(),(0|n)<16&(0|(e&=15))<=(0|n)?0|(n=0|tt(7,n-e|0)):0|(n=0)},_maxKringSize:function(e){return 1+(0|y(3*(e|=0)|0,e+1|0))|0},_maxPolyfillSize:function(e,t){t|=0;var n,r=0,a=0,o=0,s=0,A=0;if(n=P,P=P+48|0,o=n+8|0,a=n,s=0|i[(A=e|=0)+4>>2],i[(r=a)>>2]=i[A>>2],i[r+4>>2]=s,rt(a,o),o=0|V(o,t),t=0|i[a>>2],(0|(a=0|i[e+8>>2]))<=0)return P=n,0|(A=(A=(s=(0|o)<(0|(A=t)))?A:o)+12|0);r=0|i[e+12>>2],e=0;do{t=(0|i[r+(e<<3)>>2])+t|0,e=e+1|0}while((0|e)<(0|a));return P=n,0|(A=(A=(A=(0|o)<(0|t))?t:o)+12|0)},_maxUncompactSize:function(e,t,n){e|=0,n|=0;var r=0,a=0,o=0,s=0;if((0|(t|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=e+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,a=13;break}if((0|(r=r+1|0))>=(0|t)){r=0,a=13;break}}if(13==(0|a))return 0|r}r=0,s=0;e:for(;;){o=0|i[(a=e+(s<<3)|0)>>2],a=0|i[a+4>>2];do{if(!(0==(0|o)&0==(0|a))){if(a=0|Mt(0|o,0|a,52),w(),(0|(a&=15))>(0|n)){r=-1,a=13;break e}if((0|a)==(0|n)){r=r+1|0;break}r=(0|tt(7,n-a|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|t)){a=13;break}}return 13==(0|a)?0|r:0},_memcpy:Ct,_memset:Lt,_numHexagons:function(e){var t;return e=0|i[(t=21008+((e|=0)<<3)|0)>>2],_(0|i[t+4>>2]),0|e},_pentagonIndexCount:function(){return 12},_pointDistKm:Ce,_pointDistM:function(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+h(.5*(r-n)))*i+(o=+h(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+u(+r)*+u(+n)*o),2*+g(+ +l(+o),+ +l(+(1-o)))*6371.007180918475*1e3},_pointDistRads:function(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+h(.5*(r-n)))*i+(o=+h(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+u(+r)*+u(+n)*o),2*+g(+ +l(+o),+ +l(+(1-o)))},_polyfill:function(e,t,n){var r,a=0,o=0,s=0,A=0,l=0;if(r=P,P=P+48|0,a=r+8|0,o=r,0|function(e,t,n){t|=0,n|=0;var r=0,a=0,o=0,s=0,A=0,l=0,c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0,b=0,_=0,S=0,E=0,T=0,C=0,L=0,R=0,I=0,O=0,k=0,N=0,z=0;z=P,P=P+112|0,I=z+80|0,l=z+72|0,O=z,k=z+56|0,(N=0|gt(32+(i[(c=(e=e|0)+8|0)>>2]<<5)|0))||M(22848,22448,800,22456);if(it(e,N),r=0|i[(o=e)+4>>2],i[(A=l)>>2]=i[o>>2],i[A+4>>2]=r,rt(l,I),A=0|V(I,t),r=0|i[l>>2],(0|(o=0|i[c>>2]))>0){s=0|i[e+12>>2],a=0;do{r=(0|i[s+(a<<3)>>2])+r|0,a=a+1|0}while((0|a)!=(0|o))}if(a=0|yt(R=(A=(0|A)<(0|r)?r:A)+12|0,8),u=0|yt(R,8),i[I>>2]=0,L=0|i[(C=e)+4>>2],i[(r=l)>>2]=i[C>>2],i[r+4>>2]=L,0|(r=0|B(l,R,t,I,a,u)))return vt(a),vt(u),vt(N),P=z,0|(N=r);e:do{if((0|i[c>>2])>0){for(o=e+12|0,r=0;s=0|B((0|i[o>>2])+(r<<3)|0,R,t,I,a,u),r=r+1|0,!(0|s);)if((0|r)>=(0|i[c>>2]))break e;return vt(a),vt(u),vt(N),P=z,0|(N=s)}}while(0);(0|A)>-12&&Lt(0|u,0,((0|R)>1?R:1)<<3|0);e:do{if((0|i[I>>2])>0){L=((0|R)<0)<<31>>31,b=a,_=u,S=a,E=a,T=u,C=a,r=a,g=a,v=u,y=u,x=u,a=u;t:for(;;){for(m=0|i[I>>2],f=0,p=0,o=0;;){A=(s=O)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|A));if(0|q(l=0|i[(t=b+(f<<3)|0)>>2],t=0|i[t+4>>2],1,O,0)){A=(s=O)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|A));0|(s=0|yt(7,4))&&(D(l,t,1,O,s,7,0),vt(s))}d=0;do{u=0|i[(h=O+(d<<3)|0)>>2],h=0|i[h+4>>2];n:do{if(!(0==(0|u)&0==(0|h))){if(l=0|wt(0|u,0|h,0|R,0|L),w(),!(0==(0|(t=0|i[(A=s=n+(l<<3)|0)>>2]))&0==(0|(A=0|i[A+4>>2]))))for(c=0;;){if((0|c)>(0|R))break t;if((0|t)==(0|u)&(0|A)==(0|h))break n;if(0==(0|(t=0|i[(A=s=n+((l=(l+1|0)%(0|R)|0)<<3)|0)>>2]))&0==(0|(A=0|i[A+4>>2])))break;c=c+1|0}0==(0|u)&0==(0|h)||(je(u,h,k),0|at(e,N,k)&&(i[(c=s)>>2]=u,i[c+4>>2]=h,i[(c=_+(o<<3)|0)>>2]=u,i[c+4>>2]=h,o=o+1|0))}}while(0);d=d+1|0}while(d>>>0<7);if((0|(p=p+1|0))>=(0|m))break;f=f+1|0}if((0|m)>0&&Lt(0|S,0,m<<3|0),i[I>>2]=o,!((0|o)>0))break e;u=a,h=x,d=C,f=y,p=v,m=_,a=g,x=r,y=E,v=S,g=u,r=h,C=T,T=d,E=f,S=p,_=b,b=m}return vt(E),vt(T),vt(N),P=z,0|(N=-1)}r=u}while(0);return vt(N),vt(a),vt(r),P=z,0|(N=0)}(e|=0,t|=0,n|=0)){if(s=0|i[(l=e)+4>>2],i[(A=o)>>2]=i[l>>2],i[A+4>>2]=s,rt(o,a),A=0|V(a,t),t=0|i[o>>2],(0|(s=0|i[e+8>>2]))>0){o=0|i[e+12>>2],a=0;do{t=(0|i[o+(a<<3)>>2])+t|0,a=a+1|0}while((0|a)!=(0|s))}(0|(t=(0|A)<(0|t)?t:A))<=-12||Lt(0|n,0,8+(((0|(l=t+11|0))>0?l:0)<<3)|0),P=r}else P=r},_res0IndexCount:function(){return 122},_round:Pt,_sbrk:Rt,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(e,t,n,r,a){e|=0,n|=0,r|=0,a|=0;var o=0,s=0,A=0,l=0,c=0,u=0;if((0|(t|=0))<=0)return 0|(a=0);if((0|a)>=16){for(o=0;;){if(!(0==(0|i[(u=e+(o<<3)|0)>>2])&0==(0|i[u+4>>2]))){o=14;break}if((0|(o=o+1|0))>=(0|t)){s=0,o=16;break}}if(14==(0|o))return 0|((0|r)>0?-2:-1);if(16==(0|o))return 0|s}o=0,u=0;e:for(;;){s=0|i[(A=c=e+(u<<3)|0)>>2],A=0|i[A+4>>2];do{if(!(0==(0|s)&0==(0|A))){if((0|o)>=(0|r)){s=-1,o=16;break e}if(l=0|Mt(0|s,0|A,52),w(),(0|(l&=15))>(0|a)){s=-2,o=16;break e}if((0|l)==(0|a)){i[(c=n+(o<<3)|0)>>2]=s,i[c+4>>2]=A,o=o+1|0;break}if((0|(s=(0|tt(7,a-l|0))+o|0))>(0|r)){s=-1,o=16;break e}De(0|i[c>>2],0|i[c+4>>2],a,n+(o<<3)|0),o=s}}while(0);if((0|(u=u+1|0))>=(0|t)){s=0,o=16;break}}return 16==(0|o)?0|s:0},establishStackSpace:function(e,t){P=e|=0},stackAlloc:function(e){var t;return t=P,P=(P=P+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){P=e|=0},stackSave:function(){return 0|P}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:ve,b:function(e){g=e},c:v,d:function(e,t,n,r){ve("Assertion failed: "+R(e)+", at: "+[t?R(t):"unknown filename",n,r?R(r):"unknown function"])},e:function(e){return n.___errno_location&&(T[n.___errno_location()>>2]=e),e},f:ee,g:function(e,t,n){S.set(S.subarray(t,t+n),e)},h:function(e){var t=ee(),n=16777216,r=2130706432;if(e>r)return!1;for(var i=Math.max(t,16777216);i<e;)i=i<=536870912?q(2*i,n):Math.min(q((3*i+2147483648)/4,n),r);return!!te(i)},i:function(e){ve("OOM")},j:J,k:K,l:te,m:$,n:function(){var e=$();return n.extraStackTrace&&(e+="\n"+n.extraStackTrace()),K(e)},o:24032,p:24016},w);n.___uremdi3=ae.___uremdi3,n._bitshift64Lshr=ae._bitshift64Lshr,n._bitshift64Shl=ae._bitshift64Shl,n._calloc=ae._calloc,n._cellAreaKm2=ae._cellAreaKm2,n._cellAreaM2=ae._cellAreaM2,n._cellAreaRads2=ae._cellAreaRads2,n._compact=ae._compact,n._destroyLinkedPolygon=ae._destroyLinkedPolygon,n._edgeLengthKm=ae._edgeLengthKm,n._edgeLengthM=ae._edgeLengthM;var oe=n._emscripten_replace_memory=ae._emscripten_replace_memory;n._exactEdgeLengthKm=ae._exactEdgeLengthKm,n._exactEdgeLengthM=ae._exactEdgeLengthM,n._exactEdgeLengthRads=ae._exactEdgeLengthRads,n._experimentalH3ToLocalIj=ae._experimentalH3ToLocalIj,n._experimentalLocalIjToH3=ae._experimentalLocalIjToH3,n._free=ae._free,n._geoToH3=ae._geoToH3,n._getDestinationH3IndexFromUnidirectionalEdge=ae._getDestinationH3IndexFromUnidirectionalEdge,n._getH3IndexesFromUnidirectionalEdge=ae._getH3IndexesFromUnidirectionalEdge,n._getH3UnidirectionalEdge=ae._getH3UnidirectionalEdge,n._getH3UnidirectionalEdgeBoundary=ae._getH3UnidirectionalEdgeBoundary,n._getH3UnidirectionalEdgesFromHexagon=ae._getH3UnidirectionalEdgesFromHexagon,n._getOriginH3IndexFromUnidirectionalEdge=ae._getOriginH3IndexFromUnidirectionalEdge,n._getPentagonIndexes=ae._getPentagonIndexes,n._getRes0Indexes=ae._getRes0Indexes,n._h3Distance=ae._h3Distance,n._h3GetBaseCell=ae._h3GetBaseCell,n._h3GetFaces=ae._h3GetFaces,n._h3GetResolution=ae._h3GetResolution,n._h3IndexesAreNeighbors=ae._h3IndexesAreNeighbors,n._h3IsPentagon=ae._h3IsPentagon,n._h3IsResClassIII=ae._h3IsResClassIII,n._h3IsValid=ae._h3IsValid,n._h3Line=ae._h3Line,n._h3LineSize=ae._h3LineSize,n._h3SetToLinkedGeo=ae._h3SetToLinkedGeo,n._h3ToCenterChild=ae._h3ToCenterChild,n._h3ToChildren=ae._h3ToChildren,n._h3ToGeo=ae._h3ToGeo,n._h3ToGeoBoundary=ae._h3ToGeoBoundary,n._h3ToParent=ae._h3ToParent,n._h3UnidirectionalEdgeIsValid=ae._h3UnidirectionalEdgeIsValid,n._hexAreaKm2=ae._hexAreaKm2,n._hexAreaM2=ae._hexAreaM2,n._hexRing=ae._hexRing,n._i64Subtract=ae._i64Subtract,n._kRing=ae._kRing,n._kRingDistances=ae._kRingDistances,n._llvm_minnum_f64=ae._llvm_minnum_f64,n._llvm_round_f64=ae._llvm_round_f64,n._malloc=ae._malloc,n._maxFaceCount=ae._maxFaceCount,n._maxH3ToChildrenSize=ae._maxH3ToChildrenSize,n._maxKringSize=ae._maxKringSize,n._maxPolyfillSize=ae._maxPolyfillSize,n._maxUncompactSize=ae._maxUncompactSize,n._memcpy=ae._memcpy,n._memset=ae._memset,n._numHexagons=ae._numHexagons,n._pentagonIndexCount=ae._pentagonIndexCount,n._pointDistKm=ae._pointDistKm,n._pointDistM=ae._pointDistM,n._pointDistRads=ae._pointDistRads,n._polyfill=ae._polyfill,n._res0IndexCount=ae._res0IndexCount,n._round=ae._round,n._sbrk=ae._sbrk,n._sizeOfCoordIJ=ae._sizeOfCoordIJ,n._sizeOfGeoBoundary=ae._sizeOfGeoBoundary,n._sizeOfGeoCoord=ae._sizeOfGeoCoord,n._sizeOfGeoPolygon=ae._sizeOfGeoPolygon,n._sizeOfGeofence=ae._sizeOfGeofence,n._sizeOfH3Index=ae._sizeOfH3Index,n._sizeOfLinkedGeoPolygon=ae._sizeOfLinkedGeoPolygon,n._uncompact=ae._uncompact,n.establishStackSpace=ae.establishStackSpace;var se,Ae,le=n.stackAlloc=ae.stackAlloc,ce=n.stackRestore=ae.stackRestore,ue=n.stackSave=ae.stackSave;if(n.asm=ae,n.cwrap=function(e,t,n,r){var i=(n=n||[]).every((function(e){return"number"===e}));return"string"!==t&&i&&!r?b(e):function(){return _(e,t,n,arguments)}},n.setValue=function(e,t,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":M[e>>0]=t;break;case"i16":E[e>>1]=t;break;case"i32":T[e>>2]=t;break;case"i64":Q=[t>>>0,(W=t,+F(W)>=1?W>0?(0|G(+H(W/4294967296),4294967295))>>>0:~~+U((W-+(~~W>>>0))/4294967296)>>>0:0)],T[e>>2]=Q[0],T[e+4>>2]=Q[1];break;case"float":C[e>>2]=t;break;case"double":L[e>>3]=t;break;default:ve("invalid type for setValue: "+n)}},n.getValue=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return M[e>>0];case"i16":return E[e>>1];case"i32":case"i64":return T[e>>2];case"float":return C[e>>2];case"double":return L[e>>3];default:ve("invalid type for getValue: "+t)}return null},n.getTempRet0=v,Y)if(Z(Y)||(se=Y,Y=n.locateFile?n.locateFile(se,f):f+se),o||A){var he=u(Y);S.set(he,8)}else{j++,n.monitorRunDependencies&&n.monitorRunDependencies(j);var de=function(e){e.byteLength&&(e=new Uint8Array(e)),S.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(j--,n.monitorRunDependencies&&n.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}()},fe=function(){c(Y,de,(function(){throw"could not load memory initializer "+Y}))},pe=ie(Y);if(pe)de(pe.buffer);else if(n.memoryInitializerRequest){var me=function(){var e=n.memoryInitializerRequest,t=e.response;if(200!==e.status&&0!==e.status){var r=ie(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+e.status+", retrying "+Y),void fe();t=r.buffer}de(t)};n.memoryInitializerRequest.response?setTimeout(me,0):n.memoryInitializerRequest.addEventListener("load",me)}else fe()}function ge(e){function t(){Ae||(Ae=!0,y||(B(k),B(N),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),z.unshift(e);var e;B(z)}()))}j>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),O.unshift(e);var e;B(O)}(),j>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}function ve(e){throw n.onAbort&&n.onAbort(e),p(e+=""),m(e),y=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(V=function e(){Ae||ge(),Ae||(V=e)},n.run=ge,n.abort=ve,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return ge(),e}("object"==typeof Sv?Sv:{}),Ev="number",Tv={};
|
|
6
|
+
/*
|
|
7
|
+
* Copyright 2018-2019 Uber Technologies, Inc.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/[["sizeOfH3Index",Ev],["sizeOfGeoCoord",Ev],["sizeOfGeoBoundary",Ev],["sizeOfGeoPolygon",Ev],["sizeOfGeofence",Ev],["sizeOfLinkedGeoPolygon",Ev],["sizeOfCoordIJ",Ev],["h3IsValid",Ev,[Ev,Ev]],["geoToH3",Ev,[Ev,Ev,Ev]],["h3ToGeo",null,[Ev,Ev,Ev]],["h3ToGeoBoundary",null,[Ev,Ev,Ev]],["maxKringSize",Ev,[Ev]],["kRing",null,[Ev,Ev,Ev,Ev]],["kRingDistances",null,[Ev,Ev,Ev,Ev,Ev]],["hexRing",null,[Ev,Ev,Ev,Ev]],["maxPolyfillSize",Ev,[Ev,Ev]],["polyfill",null,[Ev,Ev,Ev]],["h3SetToLinkedGeo",null,[Ev,Ev,Ev]],["destroyLinkedPolygon",null,[Ev]],["compact",Ev,[Ev,Ev,Ev]],["uncompact",Ev,[Ev,Ev,Ev,Ev,Ev]],["maxUncompactSize",Ev,[Ev,Ev,Ev]],["h3IsPentagon",Ev,[Ev,Ev]],["h3IsResClassIII",Ev,[Ev,Ev]],["h3GetBaseCell",Ev,[Ev,Ev]],["h3GetResolution",Ev,[Ev,Ev]],["maxFaceCount",Ev,[Ev,Ev]],["h3GetFaces",null,[Ev,Ev,Ev]],["h3ToParent",Ev,[Ev,Ev,Ev]],["h3ToChildren",null,[Ev,Ev,Ev,Ev]],["h3ToCenterChild",Ev,[Ev,Ev,Ev]],["maxH3ToChildrenSize",Ev,[Ev,Ev,Ev]],["h3IndexesAreNeighbors",Ev,[Ev,Ev,Ev,Ev]],["getH3UnidirectionalEdge",Ev,[Ev,Ev,Ev,Ev]],["getOriginH3IndexFromUnidirectionalEdge",Ev,[Ev,Ev]],["getDestinationH3IndexFromUnidirectionalEdge",Ev,[Ev,Ev]],["h3UnidirectionalEdgeIsValid",Ev,[Ev,Ev]],["getH3IndexesFromUnidirectionalEdge",null,[Ev,Ev,Ev]],["getH3UnidirectionalEdgesFromHexagon",null,[Ev,Ev,Ev]],["getH3UnidirectionalEdgeBoundary",null,[Ev,Ev,Ev]],["h3Distance",Ev,[Ev,Ev,Ev,Ev]],["h3Line",Ev,[Ev,Ev,Ev,Ev,Ev]],["h3LineSize",Ev,[Ev,Ev,Ev,Ev]],["experimentalH3ToLocalIj",Ev,[Ev,Ev,Ev,Ev,Ev]],["experimentalLocalIjToH3",Ev,[Ev,Ev,Ev,Ev]],["hexAreaM2",Ev,[Ev]],["hexAreaKm2",Ev,[Ev]],["edgeLengthM",Ev,[Ev]],["edgeLengthKm",Ev,[Ev]],["pointDistM",Ev,[Ev,Ev]],["pointDistKm",Ev,[Ev,Ev]],["pointDistRads",Ev,[Ev,Ev]],["cellAreaM2",Ev,[Ev,Ev]],["cellAreaKm2",Ev,[Ev,Ev]],["cellAreaRads2",Ev,[Ev,Ev]],["exactEdgeLengthM",Ev,[Ev,Ev]],["exactEdgeLengthKm",Ev,[Ev,Ev]],["exactEdgeLengthRads",Ev,[Ev,Ev]],["numHexagons",Ev,[Ev]],["getRes0Indexes",null,[Ev]],["res0IndexCount",Ev],["getPentagonIndexes",null,[Ev,Ev]],["pentagonIndexCount",Ev]].forEach((function(e){Tv[e[0]]=Sv.cwrap.apply(Sv,e)}));var Cv=16,Lv=Tv.sizeOfH3Index(),Pv=Tv.sizeOfGeoCoord(),Rv=Tv.sizeOfGeoBoundary(),qv=Tv.sizeOfGeoPolygon(),Dv=Tv.sizeOfGeofence();Tv.sizeOfLinkedGeoPolygon(),Tv.sizeOfCoordIJ();var Iv=/[^0-9a-fA-F]/;function Bv(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!=typeof e||Iv.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),Cv);return[parseInt(e.substring(e.length-8),Cv),t]}function Ov(e){if(e>=0)return e.toString(Cv);var t=Nv(8,(e&=2147483647).toString(Cv));return t=(parseInt(t[0],Cv)+8).toString(Cv)+t.substring(1)}function kv(e,t){return Ov(t)+Nv(8,Ov(e))}function Nv(e,t){for(var n=e-t.length,r="",i=0;i<n;i++)r+="0";return r+=t}function zv(e,t,n){for(var r=e.length,i=Sv._calloc(r,Pv),a=n?1:0,o=n?0:1,s=0;s<2*r;s+=2)Sv.HEAPF64.set([e[s/2][a],e[s/2][o]].map(Xv),i/8+s);return Sv.HEAPU32.set([r,i],t/4),t}function Fv(e){var t=function(e){return[e,Sv.getTempRet0()]}(e),n=t[0],r=t[1];return r?kv(n,r):null}function Uv(e,t){void 0===t&&(t=0);var n=Sv.getValue(e+4*t*2,"i32"),r=Sv.getValue(e+4*(2*t+1),"i32");return r?kv(n,r):null}function Hv(e){return 180*Sv.getValue(e,"double")/Math.PI}function Gv(e){return[Hv(e),Hv(e+8)]}function jv(e){return[Hv(e+8),Hv(e)]}function Vv(e,t,n){var r=Sv._malloc(Pv);Sv.HEAPF64.set([e,t].map(Xv),r/8);var i=Fv(Tv.geoToH3(r,n));return Sv._free(r),i}function Wv(e){var t=Sv._malloc(Pv),n=Bv(e),r=n[0],i=n[1];Tv.h3ToGeo(r,i,t);var a=Gv(t);return Sv._free(t),a}function Qv(e,t){var n=Sv._malloc(Rv),r=Bv(e),i=r[0],a=r[1];Tv.h3ToGeoBoundary(i,a,n);var o=function(e,t,n){for(var r=Sv.getValue(e,"i32"),i=e+8,a=[],o=t?jv:Gv,s=0;s<2*r;s+=2)a.push(o(i+8*s));return n&&a.push(a[0]),a}(n,t,t);return Sv._free(n),o}function Yv(e,t,n){if(function(e){if("number"!=typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}(t),n=Boolean(n),0===e.length||0===e[0].length)return[];"number"==typeof e[0][0]&&(e=[e]);var r=function(e,t){var n,r=e.length-1,i=Sv._calloc(qv),a=0+Dv,o=a+4;if(zv(e[0],i+0,t),r>0){n=Sv._calloc(r,Dv);for(var s=0;s<r;s++)zv(e[s+1],n+Dv*s,t)}return Sv.setValue(i+a,r,"i32"),Sv.setValue(i+o,n,"i32"),i}(e,n),i=Tv.maxPolyfillSize(r,t),a=Sv._calloc(i,Lv);Tv.polyfill(r,t,a);var o=function(e,t){for(var n=[],r=0;r<t;r++){var i=Uv(e,r);null!==i&&n.push(i)}return n}(a,i);return Sv._free(a),function(e){var t=0+Dv,n=t+4;Sv._free(Sv.getValue(e+0+4,"i8*"));var r=Sv.getValue(e+t,"i32");if(r>0){for(var i=Sv.getValue(e+n,"i32"),a=0;a<r;a++)Sv._free(Sv.getValue(i+Dv*a+4,"i8*"));Sv._free(i)}Sv._free(e)}(r),o}function Xv(e){return e*Math.PI/180}const Zv=window.THREE?window.THREE:{Box3:Te,BufferGeometry:ln,Float32BufferAttribute:$t,InstancedBufferGeometry:vA,InstancedInterleavedBuffer:FA,InterleavedBufferAttribute:ka,Sphere:We,Vector3:Me,WireframeGeometry:class extends ln{constructor(e){if(super(),this.type="WireframeGeometry",!0===e.isGeometry)return void console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const t=[],n=new Set,r=new Me,i=new Me;if(null!==e.index){const a=e.attributes.position,o=e.index;let s=e.groups;0===s.length&&(s=[{start:0,count:o.count,materialIndex:0}]);for(let e=0,A=s.length;e<A;++e){const A=s[e],l=A.start;for(let e=l,s=l+A.count;e<s;e+=3)for(let s=0;s<3;s++){const A=o.getX(e+s),l=o.getX(e+(s+1)%3);r.fromBufferAttribute(a,A),i.fromBufferAttribute(a,l),!0===Ts(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,o=a.count/3;e<o;e++)for(let o=0;o<3;o++){const s=3*e+o,A=3*e+(o+1)%3;r.fromBufferAttribute(a,s),i.fromBufferAttribute(a,A),!0===Ts(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new $t(t,3))}}};var Jv=(new Zv.BufferGeometry).setAttribute?"setAttribute":"addAttribute";const Kv=new Zv.Box3,$v=new Zv.Vector3;class ey extends Zv.InstancedBufferGeometry{constructor(){super(),this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this[Jv]("position",new Zv.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this[Jv]("uv",new Zv.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Zv.InstancedInterleavedBuffer(t,6,1);return this[Jv]("instanceStart",new Zv.InterleavedBufferAttribute(n,3,0)),this[Jv]("instanceEnd",new Zv.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Zv.InstancedInterleavedBuffer(t,6,1);return this[Jv]("instanceColorStart",new Zv.InterleavedBufferAttribute(n,3,0)),this[Jv]("instanceColorEnd",new Zv.InterleavedBufferAttribute(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new Zv.WireframeGeometry(e.geometry)),this}romLineSegments(e){const t=e.geometry;if(!t.isGeometry)return t.isBufferGeometry&&this.setPositions(t.attributes.position.array),this;console.error("LineSegmentsGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Zv.Box3);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),Kv.setFromBufferAttribute(t),this.boundingBox.union(Kv))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Zv.Sphere),null===this.boundingBox&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,a=e.count;i<a;i++)$v.fromBufferAttribute(e,i),r=Math.max(r,n.distanceToSquared($v)),$v.fromBufferAttribute(t,i),r=Math.max(r,n.distanceToSquared($v));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}ey.prototype.isLineSegmentsGeometry=!0;const ty=window.THREE?window.THREE:{ShaderLib:Kn,ShaderMaterial:Dn,UniformsLib:Jn,UniformsUtils:qn,Vector2:de};ty.UniformsLib.line={linewidth:{value:1},resolution:{value:new de(1,1)},dashScale:{value:1},dashSize:{value:1},dashOffset:{value:0},gapSize:{value:1},opacity:{value:1}},ty.ShaderLib.line={uniforms:ty.UniformsUtils.merge([ty.UniformsLib.common,ty.UniformsLib.fog,ty.UniformsLib.line]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float dashOffset;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <encodings_fragment>\n\t\t\t#include <fog_fragment>\n\t\t\t#include <premultiplied_alpha_fragment>\n\n\t\t}\n\t\t"};class ny extends ty.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:ty.UniformsUtils.clone(ty.ShaderLib.line.uniforms),vertexShader:ty.ShaderLib.line.vertexShader,fragmentShader:ty.ShaderLib.line.fragmentShader,clipping:!0}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("ALPHA_TO_COVERAGE"in this.defines)},set:function(e){Boolean(e)!==Boolean("ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),e?(this.defines.ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}ny.prototype.isLineMaterial=!0;const ry=window.THREE?window.THREE:{Box3:Te,BufferGeometry:ln,InstancedInterleavedBuffer:FA,InterleavedBufferAttribute:ka,Line3:WA,MathUtils:he,Matrix4:tt,Mesh:Tn,Sphere:We,Vector3:Me,Vector4:xe};var iy=(new ry.BufferGeometry).setAttribute?"setAttribute":"addAttribute";const ay=new ry.Vector3,oy=new ry.Vector3,sy=new ry.Vector4,Ay=new ry.Vector4,ly=new ry.Vector4,cy=new ry.Vector3,uy=new ry.Matrix4,hy=new ry.Line3,dy=new ry.Vector3,fy=new ry.Box3,py=new ry.Sphere,my=new ry.Vector4;class gy extends ry.Mesh{constructor(e=new ey,t=new ny({color:16777215*Math.random()})){super(e,t),this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.count);for(let e=0,i=0,a=t.count;e<a;e++,i+=2)ay.fromBufferAttribute(t,e),oy.fromBufferAttribute(n,e),r[i]=0===i?0:r[i-1],r[i+1]=r[i]+ay.distanceTo(oy);const i=new ry.InstancedInterleavedBuffer(r,2,1);return e[iy]("instanceDistanceStart",new ry.InterleavedBufferAttribute(i,1,0)),e[iy]("instanceDistanceEnd",new ry.InterleavedBufferAttribute(i,1,1)),this}raycast(e,t){null===e.camera&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');const n=void 0!==e.params.Line2&&e.params.Line2.threshold||0,r=e.ray,i=e.camera,a=i.projectionMatrix,o=this.matrixWorld,s=this.geometry,A=this.material,l=A.resolution,c=A.linewidth+n,u=s.attributes.instanceStart,h=s.attributes.instanceEnd,d=-i.near,f=2*Math.max(c/l.width,c/l.height);null===s.boundingSphere&&s.computeBoundingSphere(),py.copy(s.boundingSphere).applyMatrix4(o);const p=Math.max(i.near,py.distanceToPoint(r.origin));my.set(0,0,-p,1).applyMatrix4(i.projectionMatrix),my.multiplyScalar(1/my.w),my.applyMatrix4(i.projectionMatrixInverse);const m=.5*Math.abs(f/my.w);if(py.radius+=m,!1===e.ray.intersectsSphere(py))return;null===s.boundingBox&&s.computeBoundingBox(),fy.copy(s.boundingBox).applyMatrix4(o);const g=Math.max(i.near,fy.distanceToPoint(r.origin));my.set(0,0,-g,1).applyMatrix4(i.projectionMatrix),my.multiplyScalar(1/my.w),my.applyMatrix4(i.projectionMatrixInverse);const v=.5*Math.abs(f/my.w);if(fy.max.x+=v,fy.max.y+=v,fy.max.z+=v,fy.min.x-=v,fy.min.y-=v,fy.min.z-=v,!1!==e.ray.intersectsBox(fy)){r.at(1,ly),ly.w=1,ly.applyMatrix4(i.matrixWorldInverse),ly.applyMatrix4(a),ly.multiplyScalar(1/ly.w),ly.x*=l.x/2,ly.y*=l.y/2,ly.z=0,cy.copy(ly),uy.multiplyMatrices(i.matrixWorldInverse,o);for(let e=0,n=u.count;e<n;e++){if(sy.fromBufferAttribute(u,e),Ay.fromBufferAttribute(h,e),ay.w=1,oy.w=1,sy.applyMatrix4(uy),Ay.applyMatrix4(uy),sy.z>d&&Ay.z>d)continue;if(sy.z>d){const e=sy.z-Ay.z,t=(sy.z-d)/e;sy.lerp(Ay,t)}else if(Ay.z>d){const e=Ay.z-sy.z,t=(Ay.z-d)/e;Ay.lerp(sy,t)}sy.applyMatrix4(a),Ay.applyMatrix4(a),sy.multiplyScalar(1/sy.w),Ay.multiplyScalar(1/Ay.w),sy.x*=l.x/2,sy.y*=l.y/2,Ay.x*=l.x/2,Ay.y*=l.y/2,hy.start.copy(sy),hy.start.z=0,hy.end.copy(Ay),hy.end.z=0;const n=hy.closestPointToPointParameter(cy,!0);hy.at(n,dy);const i=ry.MathUtils.lerp(sy.z,Ay.z,n),s=i>=-1&&i<=1,A=cy.distanceTo(dy)<.5*c;if(s&&A){hy.start.fromBufferAttribute(u,e),hy.end.fromBufferAttribute(h,e),hy.start.applyMatrix4(o),hy.end.applyMatrix4(o);const n=new ry.Vector3,i=new ry.Vector3;r.distanceSqToSegment(hy.start,hy.end,i,n),t.push({point:i,pointOnLine:n,distance:r.origin.distanceTo(i),object:this,face:null,faceIndex:e,uv:null,uv2:null})}}}}}gy.prototype.LineSegments2=!0;class vy extends ey{constructor(){super(),this.type="LineGeometry"}setPositions(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e){for(var t=e.length-3,n=new Float32Array(2*t),r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setColors(n),this}fromLine(e){var t=e.geometry;if(!t.isGeometry)return t.isBufferGeometry&&this.setPositions(t.attributes.position.array),this;console.error("LineGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.")}copy(){return this}}vy.prototype.isLineGeometry=!0;class yy extends gy{constructor(e=new vy,t=new ny({color:16777215*Math.random()})){super(e,t),this.type="Line2"}}function xy(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 by(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xy(Object(n),!0).forEach((function(t){wy(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function My(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&&Ey(e,t)}function Sy(e){return(Sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ey(e,t){return(Ey=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ty(){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 Cy(e,t,n){return(Cy=Ty()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ey(i,n.prototype),i}).apply(null,arguments)}function Ly(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Py(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ry(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Py(e)}function qy(e){var t=Ty();return function(){var n,r=Sy(e);if(t){var i=Sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ry(this,n)}}function Dy(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||By(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 Iy(e){return function(e){if(Array.isArray(e))return Oy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||By(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 By(e,t){if(e){if("string"==typeof e)return Oy(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)?Oy(e,t):void 0}}function Oy(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}yy.prototype.isLine2=!0;var ky=function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())},Ny=function e(t){t.geometry&&t.geometry.dispose(),t.material&&ky(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},zy=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Ny(t)}};function Fy(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,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];var s=r[t].apply(r,a);return s===r?this:s}}}}var Uy=100;function Hy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(90-e)*Math.PI/180,i=(90-t)*Math.PI/180,a=Uy*(1+n);return{x:a*Math.sin(r)*Math.cos(i),y:a*Math.cos(r),z:a*Math.sin(r)*Math.sin(i)}}function Gy(e){var t=e.x,n=e.y,r=e.z,i=Math.sqrt(t*t+n*n+r*r),a=Math.acos(n/i),o=Math.atan2(r,t);return{lat:90-180*a/Math.PI,lng:90-180*o/Math.PI-(o<-Math.PI/2?360:0),altitude:i/Uy-1}}var jy=window.THREE?window.THREE:{BackSide:1,BufferAttribute:Zt,Color:Wt,Mesh:Tn,ShaderMaterial:Dn},Vy={backside:!0,coefficient:.5,color:"gold",size:2,power:1};function Wy(e,t,n){return new jy.ShaderMaterial({depthWrite:!1,fragmentShader:"\nuniform vec3 color;\nuniform float coefficient;\nuniform float power;\nvarying vec3 vVertexNormal;\nvarying vec3 vVertexWorldPosition;\nvoid main() {\n vec3 worldCameraToVertex = vVertexWorldPosition - cameraPosition;\n vec3 viewCameraToVertex\t= (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;\n viewCameraToVertex = normalize(viewCameraToVertex);\n float intensity\t= pow(\n coefficient + dot(vVertexNormal, viewCameraToVertex),\n power\n );\n gl_FragColor = vec4(color, intensity);\n}",transparent:!0,uniforms:{coefficient:{value:e},color:{value:new jy.Color(t)},power:{value:n}},vertexShader:"\nvarying vec3 vVertexWorldPosition;\nvarying vec3 vVertexNormal;\nvoid main() {\n vVertexNormal\t= normalize(normalMatrix * normal);\n vVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n gl_Position\t= projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n"})}function Qy(e,t){for(var n=e.clone(),r=new Float32Array(3*e.attributes.position.count),i=0,a=r.length;i<a;i++){var o=e.attributes.normal.array[i],s=e.attributes.position.array[i];r[i]=s+o*t}return n.setAttribute("position",new jy.BufferAttribute(r,3)),n}var Yy=window.THREE?window.THREE:{Color:Wt,LineBasicMaterial:co,LineSegments:xo,Mesh:Tn,MeshPhongMaterial:Ls,SphereBufferGeometry:Ss,TextureLoader:$s},Xy=rl({props:{globeImageUrl:{},bumpImageUrl:{},showGlobe:{default:!0,onChange:function(e,t){t.globeObj.visible=!!e},triggerUpdate:!1},showGraticules:{default:!1,onChange:function(e,t){t.graticulesObj.visible=!!e},triggerUpdate:!1},showAtmosphere:{default:!0,onChange:function(e,t){t.atmosphereObj&&(t.atmosphereObj.visible=!!e)},triggerUpdate:!1},atmosphereColor:{default:"lightskyblue"},atmosphereAltitude:{default:.15},onReady:{default:function(){},triggerUpdate:!1}},methods:{globeMaterial:function(e,t){return void 0!==t?(e.globeObj.material=t||e.defaultGlobeMaterial,this):e.globeObj.material}},stateInit:function(){var e=new Yy.SphereBufferGeometry(Uy,75,75),t=new Yy.MeshPhongMaterial({color:0,transparent:!0}),n=new Yy.Mesh(e,t);return n.rotation.y=-Math.PI/2,n.__globeObjType="globe",{globeObj:n,graticulesObj:new Yy.LineSegments(new Xu(Ou(),Uy,2),new Yy.LineBasicMaterial({color:"lightgrey",transparent:!0,opacity:.1})),defaultGlobeMaterial:t}},init:function(e,t){zy(e),t.scene=e,t.scene.add(t.globeObj),t.scene.add(t.graticulesObj),t.ready=!1},update:function(e,t){var n=e.globeObj.material;if(t.hasOwnProperty("globeImageUrl")&&(e.globeImageUrl?(new Yy.TextureLoader).load(e.globeImageUrl,(function(t){n.map=t,n.color=null,n.needsUpdate=!0,!e.ready&&(e.ready=!0)&&setTimeout(e.onReady)})):!n.color&&(n.color=new Yy.Color(0))),t.hasOwnProperty("bumpImageUrl")&&(e.bumpImageUrl?e.bumpImageUrl&&(new Yy.TextureLoader).load(e.bumpImageUrl,(function(e){n.bumpMap=e,n.needsUpdate=!0})):(n.bumpMap=null,n.needsUpdate=!0)),(t.hasOwnProperty("atmosphereColor")||t.hasOwnProperty("atmosphereAltitude"))&&(e.atmosphereObj&&(e.scene.remove(e.atmosphereObj),zy(e.atmosphereObj)),e.atmosphereColor&&e.atmosphereAltitude)){var r=e.atmosphereObj=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vy,n=t.backside,r=t.coefficient,i=t.color,a=t.size,o=t.power,s=Qy(e,a),A=Wy(r,i,o);return n&&(A.side=jy.BackSide),new jy.Mesh(s,A)}(e.globeObj.geometry,{backside:!0,color:e.atmosphereColor,size:Uy*e.atmosphereAltitude,power:3.5,coefficient:.1});r.visible=!!e.showAtmosphere,r.__globeObjType="atmosphere",e.scene.add(r)}e.ready||e.globeImageUrl||(e.ready=!0,e.onReady())}}),Zy=function(e){return isNaN(e)?parseInt(rh(e).toHex(),16):e},Jy=function(e){return isNaN(e)?rh(e).getAlpha():1},Ky=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=rh(e).toRgb(),r=["r","g","b"].map((function(e){return n[e]/255}));return t?[].concat(Iy(r),[n.a]):r};function $y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return yh(e,t.children,(function(e){return t.add(e)}),(function(e){t.remove(e),zy(e),e.hasOwnProperty("__data")&&delete e.__data.__currentTargetD}),by({objBindAttr:"__threeObj"},n))}var ex=window.THREE?window.THREE:{BufferAttribute:Zt,BufferGeometry:ln,Color:Wt,CylinderBufferGeometry:Co,Matrix4:tt,Mesh:Tn,MeshBasicMaterial:Qt,MeshLambertMaterial:Ps,Object3D:Et,Vector3:Me},tx=Object.assign({},eh),nx=tx.BufferGeometryUtils||tx,rx=(new ex.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",ix=rl({props:{pointsData:{default:[]},pointLat:{default:"lat"},pointLng:{default:"lng"},pointColor:{default:function(){return"#ffffaa"}},pointAltitude:{default:.1},pointRadius:{default:.25},pointResolution:{default:12,triggerUpdate:!1},pointsMerge:{default:!1},pointsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.pointLat),n=th(e.pointLng),r=th(e.pointAltitude),i=th(e.pointRadius),a=th(e.pointColor),o=new ex.CylinderBufferGeometry(1,1,1,e.pointResolution);o[rx]((new ex.Matrix4).makeRotationX(Math.PI/2)),o[rx]((new ex.Matrix4).makeTranslation(0,0,-.5));var s=2*Math.PI*Uy/360,A={},l=e.pointsMerge?new ex.Object3D:e.scene;if($y(e.pointsData,l,{createObj:function(){var e=new ex.Mesh(o);return e.__globeObjType="point",e},updateObj:function(o,l){var c=function(t){var n=o.__currentTargetD=t,r=n.r,i=n.alt,a=n.lat,A=n.lng;Object.assign(o.position,Hy(a,A));var l=e.pointsMerge?new ex.Vector3(0,0,0):e.scene.localToWorld(new ex.Vector3(0,0,0));o.lookAt(l),o.scale.x=o.scale.y=Math.min(30,r)*s,o.scale.z=Math.max(i*Uy,.1)},u={alt:+r(l),r:+i(l),lat:+t(l),lng:+n(l)},h=o.__currentTargetD||Object.assign({},u,{alt:-.001});Object.keys(u).some((function(e){return h[e]!==u[e]}))&&(e.pointsMerge||!e.pointsTransitionDuration||e.pointsTransitionDuration<0?c(u):new yl.Tween(h).to(u,e.pointsTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(c).start());if(!e.pointsMerge){var d=a(l),f=Jy(d);A.hasOwnProperty(d)||(A[d]=new ex.MeshLambertMaterial({color:Zy(d),transparent:f<1,opacity:f})),o.material=A[d]}}}),e.pointsMerge){var c=e.pointsData.length?nx.mergeBufferGeometries(e.pointsData.map((function(e){var t=e.__threeObj;e.__threeObj=void 0;var n=t.geometry.clone();t.updateMatrix(),n[rx](t.matrix);for(var r=new ex.Color(a(e)),i=n.attributes.position.count,o=new Float32Array(3*i),s=0,A=i;s<A;s++){var l=3*s;o[l]=r.r,o[l+1]=r.g,o[l+2]=r.b}return n.setAttribute("color",new ex.BufferAttribute(o,3)),n}))):new ex.BufferGeometry,u=new ex.Mesh(c,new ex.MeshBasicMaterial({color:16777215,vertexColors:!0}));u.__globeObjType="points",u.__data=e.pointsData,zy(e.scene),e.scene.add(u)}}}),ax=["stroke"],ox=window.THREE?window.THREE:{BufferGeometry:ln,CubicBezierCurve3:Ho,Curve:Lo,Float32BufferAttribute:$t,Group:Ca,Line:go,Mesh:Tn,NormalBlending:1,QuadraticBezierCurve3:Vo,ShaderMaterial:Dn,TubeBufferGeometry:Es,Vector3:Me},sx=(new ox.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Ax={uniforms:{dashOffset:{value:0},dashSize:{value:1},gapSize:{value:0},dashTranslate:{value:0}},vertexShader:"\n uniform float dashTranslate; \n\n attribute vec4 vertexColor;\n varying vec4 vColor;\n \n attribute float vertexRelDistance;\n varying float vRelDistance;\n\n void main() {\n // pass through colors and distances\n vColor = vertexColor;\n vRelDistance = vertexRelDistance + dashTranslate;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform float dashOffset; \n uniform float dashSize;\n uniform float gapSize; \n \n varying vec4 vColor;\n varying float vRelDistance;\n \n void main() {\n // ignore pixels in the gap\n if (vRelDistance < dashOffset) discard;\n if (mod(vRelDistance - dashOffset, dashSize + gapSize) > dashSize) discard;\n \n // set px color: [r, g, b, a], interpolated between vertices \n gl_FragColor = vColor; \n }\n "},lx=rl({props:{arcsData:{default:[]},arcStartLat:{default:"startLat"},arcStartLng:{default:"startLng"},arcEndLat:{default:"endLat"},arcEndLng:{default:"endLng"},arcColor:{default:function(){return"#ffffaa"}},arcAltitude:{},arcAltitudeAutoScale:{default:.5},arcStroke:{},arcCurveResolution:{default:64,triggerUpdate:!1},arcCircularResolution:{default:6,triggerUpdate:!1},arcDashLength:{default:1},arcDashGap:{default:0},arcDashInitialGap:{default:0},arcDashAnimateTime:{default:0},arcsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e,(new bh).onTick.add((function(e,n){t.arcsData.filter((function(e){return e.__threeObj&&e.__threeObj.children.length&&e.__threeObj.children[0].material&&e.__threeObj.children[0].__dashAnimateStep})).forEach((function(e){var t=e.__threeObj.children[0],r=t.__dashAnimateStep*n,i=t.material.uniforms.dashTranslate.value%1e9;t.material.uniforms.dashTranslate.value=i+r}))}))},update:function(e){var t=th(e.arcStartLat),n=th(e.arcStartLng),r=th(e.arcEndLat),i=th(e.arcEndLng),a=th(e.arcAltitude),o=th(e.arcAltitudeAutoScale),s=th(e.arcStroke),A=th(e.arcColor),l=th(e.arcDashLength),c=th(e.arcDashGap),u=th(e.arcDashInitialGap),h=th(e.arcDashAnimateTime),d=new ox.ShaderMaterial(by(by({},Ax),{},{transparent:!0,blending:ox.NormalBlending}));$y(e.arcsData,e.scene,{createObj:function(){var e=new ox.Group;return e.__globeObjType="arc",e},updateObj:function(f,p){var m=s(p),g=null!=m;if(!f.children.length||g!==("Mesh"===f.children[0].type)){zy(f);var v=g?new ox.Mesh:new ox.Line(new ox.BufferGeometry);v.material=d.clone(),f.add(v)}var y=f.children[0];Object.assign(y.material.uniforms,{dashSize:{value:l(p)},gapSize:{value:c(p)},dashOffset:{value:u(p)}});var x=h(p);y.__dashAnimateStep=x>0?1e3/x:0;var b=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=t+1;if(e instanceof Array){var a=Hd().domain(e.map((function(t,n){return n/(e.length-1)}))).range(e);n=function(e){return Ky(a(e))}}else{var o=Ky(e);n=function(){return o}}for(var s=new ox.Float32BufferAttribute(4*i*r,4),A=0,l=i;A<l;A++)for(var c=n(A/(l-1)),u=0;u<r;u++)s.set(c,4*(A*r+u));return s}(A(p),e.arcCurveResolution,g?e.arcCircularResolution+1:1),_=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e+1,i=r*t,a=new ox.Float32BufferAttribute(i,1),o=0,s=r;o<s;o++)for(var A=o/(s-1),l=0;l<t;l++){var c=o*t+l,u=n?i-1-c:c;a.setX(u,A)}return a}(e.arcCurveResolution,g?e.arcCircularResolution+1:1,!0);y.geometry[sx]("vertexColor",b),y.geometry[sx]("vertexRelDistance",_);var w=function(t){var n=p.__currentTargetD=t,r=n.stroke,i=function(e){var t=e.alt,n=e.altAutoScale,r=e.startLat,i=e.startLng,a=e.endLat,o=e.endLng,s=function(e){var t=Dy(e,3),n=t[0],r=Hy(t[1],n,t[2]),i=r.x,a=r.y,o=r.z;return new ox.Vector3(i,a,o)},A=[i,r],l=[o,a],c=t;if(null==c&&(c=Mu(A,l)/2*n),c){var u=ku(A,l),h=Dy([.25,.75].map((function(e){return[].concat(Iy(u(e)),[1.5*c])})),2),d=h[0],f=h[1];return Cy(ox.CubicBezierCurve3,Iy([A,d,f,l].map(s)))}var p=.001;return m.apply(void 0,Iy([[].concat(A,[p]),[].concat(l,[p])].map(s)));function m(e,t){var n=e.angleTo(t),r=function(r){return(new ox.Vector3).addVectors(e.clone().multiplyScalar(Math.sin((1-r)*n)),t.clone().multiplyScalar(Math.sin(r*n))).divideScalar(Math.sin(n))},i=new ox.Curve;return i.getPoint=r,i}}(Ly(n,ax));g?(y.geometry&&y.geometry.dispose(),y.geometry=new ox.TubeBufferGeometry(i,e.arcCurveResolution,r/2,e.arcCircularResolution),y.geometry[sx]("vertexColor",b),y.geometry[sx]("vertexRelDistance",_)):y.geometry.setFromPoints(i.getPoints(e.arcCurveResolution))},M={stroke:m,alt:a(p),altAutoScale:+o(p),startLat:+t(p),startLng:+n(p),endLat:+r(p),endLng:+i(p)},S=p.__currentTargetD||Object.assign({},M,{altAutoScale:-.001});Object.keys(M).some((function(e){return S[e]!==M[e]}))&&(!e.arcsTransitionDuration||e.arcsTransitionDuration<0?w(M):new yl.Tween(S).to(M,e.arcsTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(w).start())}})}}),cx=window.THREE?window.THREE:{BufferAttribute:Zt,BufferGeometry:ln,Color:Wt,DoubleSide:2,Mesh:Tn,MeshBasicMaterial:Qt,MeshLambertMaterial:Ps,Object3D:Et},ux=Object.assign({},eh),hx=ux.BufferGeometryUtils||ux,dx=(new cx.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",fx=rl({props:{hexBinPointsData:{default:[]},hexBinPointLat:{default:"lat"},hexBinPointLng:{default:"lng"},hexBinPointWeight:{default:1},hexBinResolution:{default:4},hexMargin:{default:.2},hexTopCurvatureResolution:{default:5},hexTopColor:{default:function(){return"#ffffaa"}},hexSideColor:{default:function(){return"#ffffaa"}},hexAltitude:{default:function(e){return.01*e.sumWeight}},hexBinMerge:{default:!1},hexTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.hexBinPointLat),n=th(e.hexBinPointLng),r=th(e.hexBinPointWeight),i=th(e.hexAltitude),a=th(e.hexTopColor),o=th(e.hexSideColor),s=th(e.hexMargin),A=ch(e.hexBinPointsData.map((function(r){return by(by({},r),{},{h3Idx:Vv(t(r),n(r),e.hexBinResolution)})})),"h3Idx"),l=Object.entries(A).map((function(e){var t=Dy(e,2),n=t[0],i=t[1];return{h3Idx:n,points:i,sumWeight:i.reduce((function(e,t){return e+ +r(t)}),0)}})),c={};if($y(l,e.hexBinMerge?new cx.Object3D:e.scene,{createObj:function(e){var t=new cx.Mesh;t.__hexCenter=Wv(e.h3Idx),t.__hexGeoJson=Qv(e.h3Idx,!0).reverse();var n=t.__hexCenter[1];return t.__hexGeoJson.forEach((function(e){var t=e[0];Math.abs(n-t)>170&&(e[0]+=n>t?360:-360)})),t.__globeObjType="hexbin",t},updateObj:function(t,n){var r=Math.max(0,Math.min(1,+s(n))),A=Dy(t.__hexCenter,2),l=A[0],u=A[1],h=0===r?t.__hexGeoJson:t.__hexGeoJson.map((function(e){var t=Dy(e,2),n=t[0],i=t[1];return[[n,u],[i,l]].map((function(e){var t=Dy(e,2);return function(e,t,n){return e-(e-t)*n}(t[0],t[1],r)}))})),d=e.hexTopCurvatureResolution;t.geometry=new Mv([h],0,Uy,!1,!0,!0,d);var f={alt:+i(n)},p=function(e){var n=(t.__currentTargetD=e).alt;t.scale.x=t.scale.y=t.scale.z=1+n},m=t.__currentTargetD||Object.assign({},f,{alt:-.001});Object.keys(f).some((function(e){return m[e]!==f[e]}))&&(e.hexBinMerge||!e.hexTransitionDuration||e.hexTransitionDuration<0?p(f):new yl.Tween(m).to(f,e.hexTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(p).start());if(!e.hexBinMerge){var g=o(n),v=a(n);[g,v].forEach((function(e){if(!c.hasOwnProperty(e)){var t=Jy(e);c[e]=new cx.MeshLambertMaterial({color:Zy(e),transparent:t<1,opacity:t,side:cx.DoubleSide})}})),t.material=[g,v].map((function(e){return c[e]}))}},idAccessor:function(e){return e.h3Idx}}),e.hexBinMerge){var u=l.length?hx.mergeBufferGeometries(l.map((function(e){var t=e.__threeObj;e.__threeObj=void 0;var n=t.geometry.toNonIndexed();t.updateMatrix(),n[dx](t.matrix);for(var r=new cx.Color(a(e)),i=new cx.Color(o(e)),s=n.attributes.position.count,A=n.groups[0].count,l=new Float32Array(3*s),c=0,u=s;c<u;c++){var h=3*c,d=c>=A?r:i;l[h]=d.r,l[h+1]=d.g,l[h+2]=d.b}return n.setAttribute("color",new cx.BufferAttribute(l,3)),n}))):new cx.BufferGeometry,h=new cx.Mesh(u,new cx.MeshBasicMaterial({color:16777215,vertexColors:!0,side:cx.DoubleSide}));h.__globeObjType="hexBinPoints",h.__data=l,zy(e.scene),e.scene.add(h)}}}),px=window.THREE?window.THREE:{DoubleSide:2,Group:Ca,Line:go,LineBasicMaterial:co,Mesh:Tn,MeshBasicMaterial:Qt},mx=rl({props:{polygonsData:{default:[]},polygonGeoJsonGeometry:{default:"geometry"},polygonSideColor:{default:function(){return"#ffffaa"}},polygonSideMaterial:{},polygonCapColor:{default:function(){return"#ffffaa"}},polygonCapMaterial:{},polygonStrokeColor:{},polygonAltitude:{default:.01},polygonCapCurvatureResolution:{default:5},polygonsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.polygonGeoJsonGeometry),n=th(e.polygonAltitude),r=th(e.polygonCapCurvatureResolution),i=th(e.polygonCapColor),a=th(e.polygonCapMaterial),o=th(e.polygonSideColor),s=th(e.polygonSideMaterial),A=th(e.polygonStrokeColor),l=[];e.polygonsData.forEach((function(e){var c={data:e,capColor:i(e),capMaterial:a(e),sideColor:o(e),sideMaterial:s(e),strokeColor:A(e),altitude:+n(e),capCurvatureResolution:+r(e)},u=t(e),h=e.__id||"".concat(Math.round(1e9*Math.random()));e.__id=h,"Polygon"===u.type?l.push(by({id:"".concat(h,"_0"),coords:u.coordinates},c)):"MultiPolygon"===u.type?l.push.apply(l,Iy(u.coordinates.map((function(e,t){return by({id:"".concat(h,"_").concat(t),coords:e},c)})))):console.warn("Unsupported GeoJson geometry type: ".concat(u.type,". Skipping geometry..."))})),$y(l,e.scene,{idAccessor:function(e){return e.id},createObj:function(){var e=new px.Group;return e.__defaultSideMaterial=new px.MeshBasicMaterial({side:px.DoubleSide,depthWrite:!0}),e.__defaultCapMaterial=new px.MeshBasicMaterial({side:px.DoubleSide,depthWrite:!0}),e.add(new px.Mesh(void 0,[e.__defaultSideMaterial,e.__defaultCapMaterial])),e.add(new px.Line(void 0,new px.LineBasicMaterial)),e.__globeObjType="polygon",e},updateObj:function(t,n){var r=n.coords,i=n.capColor,a=n.capMaterial,o=n.sideColor,s=n.sideMaterial,A=n.strokeColor,l=n.altitude,c=n.capCurvatureResolution,u=Dy(t.children,2),h=u[0],d=u[1],f=!!A;if(d.visible=f,!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return function(e,t){return e===t}};return Object.entries(t).every((function(t){var r=Dy(t,2),i=r[0],a=r[1];return e.hasOwnProperty(i)&&n(i)(e[i],a)}))}(h.geometry.parameters||{},{polygonGeoJson:r,curvatureResolution:c})&&(h.geometry=new Mv(r,0,Uy,!1,!0,!0,c)),f&&(!d.geometry.parameters||d.geometry.parameters.geoJson.coordinates!==r||d.geometry.parameters.resolution!==c)&&(d.geometry=new Xu({type:"Polygon",coordinates:r},Uy,c)),h.material[0]=s||t.__defaultSideMaterial,h.material[1]=a||t.__defaultCapMaterial,[!s&&o,!a&&i].forEach((function(e,t){if(e){var n=h.material[t],r=Jy(e);n.color.set(Zy(e)),n.transparent=r<1,n.opacity=r}})),f){var p=d.material,m=Jy(A);p.color.set(Zy(A)),p.transparent=m<1,p.opacity=m}var g={alt:l},v=function(e){var n=(t.__currentTargetD=e).alt;h.scale.x=h.scale.y=h.scale.z=1+n,f&&(d.scale.x=d.scale.y=d.scale.z=1+n+1e-4)},y=t.__currentTargetD||Object.assign({},g,{alt:-.001});Object.keys(g).some((function(e){return y[e]!==g[e]}))&&(!e.polygonsTransitionDuration||e.polygonsTransitionDuration<0||y.alt===g.alt?v(g):new yl.Tween(y).to(g,e.polygonsTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(v).start())}})}});var gx=window.THREE?window.THREE:{BufferGeometry:ln,DoubleSide:2,Mesh:Tn,MeshLambertMaterial:Ps},vx=Object.assign({},eh),yx=vx.BufferGeometryUtils||vx,xx=rl({props:{hexPolygonsData:{default:[]},hexPolygonGeoJsonGeometry:{default:"geometry"},hexPolygonColor:{default:function(){return"#ffffaa"}},hexPolygonAltitude:{default:.001},hexPolygonResolution:{default:3},hexPolygonMargin:{default:.2},hexPolygonCurvatureResolution:{default:5},hexPolygonsTransitionDuration:{default:0,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.hexPolygonGeoJsonGeometry),n=th(e.hexPolygonColor),r=th(e.hexPolygonAltitude),i=th(e.hexPolygonResolution),a=th(e.hexPolygonMargin),o=th(e.hexPolygonCurvatureResolution);$y(e.hexPolygonsData,e.scene,{createObj:function(e){var t=new gx.Mesh(void 0,new gx.MeshLambertMaterial({side:gx.DoubleSide}));return t.__globeObjType="hexPolygon",t},updateObj:function(s,A){var l=t(A),c=i(A),u=r(A),h=Math.max(0,Math.min(1,+a(A))),d=o(A),f=n(A),p=Jy(f);s.material.color.set(Zy(f)),s.material.transparent=p<1,s.material.opacity=p;var m=[];"Polygon"===l.type?m.push.apply(m,Iy(Yv(l.coordinates,c,!0))):"MultiPolygon"===l.type?l.coordinates.forEach((function(e){return m.push.apply(m,Iy(Yv(e,c,!0)))})):console.warn("Unsupported GeoJson geometry type: ".concat(l.type,". Skipping geometry..."));var g=m.map((function(e){var t=Wv(e),n=Qv(e,!0).reverse(),r=t[1];return n.forEach((function(e){var t=e[0];Math.abs(r-t)>170&&(e[0]+=r>t?360:-360)})),{h3Idx:e,hexCenter:t,hexGeoJson:n}})),v={alt:u,margin:h,curvatureResolution:d},y=function(e){var t=s.__currentTargetD=e,n=t.alt,r=t.margin,i=t.curvatureResolution;s.geometry=g.length?yx.mergeBufferGeometries(g.map((function(e){var t=Dy(e.hexCenter,2),a=t[0],o=t[1],s=0===r?e.hexGeoJson:e.hexGeoJson.map((function(e){var t=Dy(e,2),n=t[0],i=t[1];return[[n,o],[i,a]].map((function(e){var t=Dy(e,2);return function(e,t,n){return e-(e-t)*n}(t[0],t[1],r)}))}));return new Mv([s],Uy,Uy*(1+n),!1,!0,!1,i)}))):new gx.BufferGeometry},x=s.__currentTargetD||Object.assign({},v,{alt:-.001});Object.keys(v).some((function(e){return x[e]!==v[e]}))&&(!e.hexPolygonsTransitionDuration||e.hexPolygonsTransitionDuration<0?y(v):new yl.Tween(x).to(v,e.hexPolygonsTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(y).start())}})}}),bx=window.THREE?window.THREE:{Vector3:Me};function _x(e,t){var n=Math.max(e.length,t.length),r=od.apply(void 0,Iy([e,t].map((function(e){return e.map((function(e){return[e.x,e.y,e.z]}))})).map((function(e){return function(e,t){var n=e[e.length-1];return[].concat(Iy(e),Iy(Iy(new Array(t-e.length)).map((function(){return n}))))}(e,n)}))));return function(n){return 0===n?e:1===n?t:r(n).map((function(e){var t=Dy(e,3),n=t[0],r=t[1],i=t[2];return new bx.Vector3(n,r,i)}))}}var wx=window.THREE?window.THREE:{BufferGeometry:ln,Color:Wt,Float32BufferAttribute:$t,Group:Ca,Line:go,NoColors:0,NormalBlending:1,ShaderMaterial:Dn,Vector3:Me,VertexColors:2},Mx=(new wx.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Sx={uniforms:{dashOffset:{value:0},dashSize:{value:1},gapSize:{value:0},dashTranslate:{value:0}},vertexShader:"\n uniform float dashTranslate;\n\n attribute vec4 vertexColor;\n varying vec4 vColor;\n\n attribute float vertexRelDistance;\n varying float vRelDistance;\n\n void main() {\n // pass through colors and distances\n vColor = vertexColor;\n vRelDistance = vertexRelDistance + dashTranslate;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n ",fragmentShader:"\n uniform float dashOffset;\n uniform float dashSize;\n uniform float gapSize;\n\n varying vec4 vColor;\n varying float vRelDistance;\n\n void main() {\n // ignore pixels in the gap\n if (vRelDistance < dashOffset) discard;\n if (mod(vRelDistance - dashOffset, dashSize + gapSize) > dashSize) discard;\n\n // set px color: [r, g, b, a], interpolated between vertices\n gl_FragColor = vColor;\n }\n "},Ex=rl({props:{pathsData:{default:[]},pathPoints:{default:function(e){return e}},pathPointLat:{default:function(e){return e[0]}},pathPointLng:{default:function(e){return e[1]}},pathPointAlt:{default:.001},pathResolution:{default:2},pathColor:{default:function(){return"#ffffaa"}},pathStroke:{},pathDashLength:{default:1},pathDashGap:{default:0},pathDashInitialGap:{default:0},pathDashAnimateTime:{default:0},pathTransitionDuration:{default:1e3,triggerUpdate:!1},rendererSize:{}},init:function(e,t){zy(e),t.scene=e,(new bh).onTick.add((function(e,n){t.pathsData.filter((function(e){return e.__threeObj&&e.__threeObj.children.length&&e.__threeObj.children[0].material&&e.__threeObj.children[0].__dashAnimateStep})).forEach((function(e){var t=e.__threeObj.children[0],r=t.__dashAnimateStep*n;if("Line"===t.type){var i=t.material.uniforms.dashTranslate.value%1e9;t.material.uniforms.dashTranslate.value=i+r}else if("Line2"===t.type){for(var a=t.material.dashOffset-r,o=t.material.dashSize+t.material.gapSize;a<=-o;)a+=o;t.material.dashOffset=a}}))}))},update:function(e){var t=th(e.pathPoints),n=th(e.pathPointLat),r=th(e.pathPointLng),i=th(e.pathPointAlt),a=th(e.pathStroke),o=th(e.pathColor),s=th(e.pathDashLength),A=th(e.pathDashGap),l=th(e.pathDashInitialGap),c=th(e.pathDashAnimateTime),u=new wx.ShaderMaterial(by(by({},Sx),{},{transparent:!0,blending:wx.NormalBlending}));function h(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=t+1;if(e instanceof Array){var o=Hd().domain(e.map((function(t,n){return n/(e.length-1)}))).range(e);n=function(e){return Ky(o(e),i)}}else{var s=Ky(e,i);n=function(){return s}}for(var A=i?4:3,l=new wx.Float32BufferAttribute(a*A*r,A),c=0,u=a;c<u;c++)for(var h=n(c/(u-1)),d=0;d<r;d++)l.set(h,(c*r+d)*A);return l}$y(e.pathsData,e.scene,{createObj:function(){var e=new wx.Group;return e.__globeObjType="path",e},updateObj:function(d,f){var p=a(f),m=null!=p;if(!d.children.length||m===("Line"===d.children[0].type)){zy(d);var g=m?new yy(new vy,new ny):new wx.Line(new wx.BufferGeometry,u.clone());d.add(g)}var v,y,x=d.children[0],b=function(e,t,n,r,i){var a=function(e,t,n){for(var r=[],i=1;i<=n;i++)r.push(e+(t-e)*i/(n+1));return r},o=function(e){var t=Dy(e,3),n=Hy(t[0],t[1],t[2]),r=n.x,i=n.y,a=n.z;return new wx.Vector3(r,i,a)};return function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=[],n=null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(r){if(n){for(;Math.abs(n[1]-r[1])>180;)n[1]+=360*(n[1]<r[1]?1:-1);var i=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2));if(i>e)for(var o=Math.floor(i/e),s=a(n[0],r[0],o),A=a(n[1],r[1],o),l=a(n[2],r[2],o),c=0,u=s.length;c<u;c++)t.push([s[c],A[c],l[c]])}t.push(n=r)})),t}(e.map((function(e){return[t(e),n(e),r(e)]})),i).map(o)}(t(f),n,r,i,e.pathResolution),_=c(f);if(x.__dashAnimateStep=_>0?1e3/_:0,m){x.material.resolution=e.rendererSize;var w=s(f),M=A(f),S=l(f);x.material.dashed=M>0,x.material.dashed?x.material.defines.USE_DASH="":delete x.material.defines.USE_DASH,x.material.dashed&&(x.material.dashScale=1/(y=0,b.forEach((function(e){v&&(y+=v.distanceTo(e)),v=e})),y),x.material.dashSize=w,x.material.gapSize=M,x.material.dashOffset=-S);var E=o(f);if(E instanceof Array){var T=h(o(f),b.length-1,1,!1);x.geometry.setColors(T.array),x.material.vertexColors=wx.VertexColors}else{var C=E,L=Jy(C);x.material.color=new wx.Color(Zy(C)),x.material.transparent=L<1,x.material.opacity=L,x.material.vertexColors=wx.NoColors}x.material.needsUpdate=!0}else{Object.assign(x.material.uniforms,{dashSize:{value:s(f)},gapSize:{value:A(f)},dashOffset:{value:l(f)}});var P=h(o(f),b.length),R=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e+1,i=r*t,a=new wx.Float32BufferAttribute(i,1),o=0,s=r;o<s;o++)for(var A=o/(s-1),l=0;l<t;l++){var c=o*t+l,u=n?i-1-c:c;a.setX(u,A)}return a}(b.length,1,!0);x.geometry[Mx]("vertexColor",P),x.geometry[Mx]("vertexRelDistance",R)}var q=_x(f.__currentTargetD&&f.__currentTargetD.points||[b[0]],b),D=function(e){var t,n=f.__currentTargetD=e,r=n.stroke,i=n.interpolK,a=f.__currentTargetD.points=q(i);m?(x.geometry.setPositions((t=[]).concat.apply(t,Iy(a.map((function(e){return[e.x,e.y,e.z]}))))),x.material.linewidth=r,x.material.dashed&&x.computeLineDistances()):(x.geometry.setFromPoints(a),x.geometry.computeBoundingSphere())},I={stroke:p,interpolK:1},B=Object.assign({},f.__currentTargetD||I,{interpolK:0});Object.keys(I).some((function(e){return B[e]!==I[e]}))&&(!e.pathTransitionDuration||e.pathTransitionDuration<0?D(I):new yl.Tween(B).to(I,e.pathTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(D).start())}})}}),Tx=window.THREE?window.THREE:{Euler:ut,Mesh:Tn,MeshLambertMaterial:Ps,SphereBufferGeometry:Ss},Cx=rl({props:{tilesData:{default:[]},tileLat:{default:"lat"},tileLng:{default:"lng"},tileAltitude:{default:.01},tileWidth:{default:1},tileHeight:{default:1},tileUseGlobeProjection:{default:!0},tileMaterial:{default:function(){return new Tx.MeshLambertMaterial({color:"#ffbb88",opacity:.4,transparent:!0})}},tileCurvatureResolution:{default:5},tilesTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.tileLat),n=th(e.tileLng),r=th(e.tileAltitude),i=th(e.tileWidth),a=th(e.tileHeight),o=th(e.tileUseGlobeProjection),s=th(e.tileMaterial),A=th(e.tileCurvatureResolution);$y(e.tilesData,e.scene,{createObj:function(){var e=new Tx.Mesh;return e.__globeObjType="tile",e},updateObj:function(l,c){l.material=s(c);var u=o(c),h=A(c),d=function(e){var t=l.__currentTargetD=e,n=t.lat,r=t.lng,i=t.alt,a=t.width,o=t.height,s=Lx(r),A=Lx(-n);l.geometry=new Tx.SphereBufferGeometry(Uy*(1+i),Math.ceil(a/(h||-1)),Math.ceil(o/(h||-1)),Lx(90-a/2)+(u?s:0),Lx(a),Lx(90-o/2)+(u?A:0),Lx(o)),u||l.setRotationFromEuler(new Tx.Euler(A,s,0,"YXZ"))},f={lat:+t(c),lng:+n(c),alt:+r(c),width:+i(c),height:+a(c)},p=l.__currentTargetD||Object.assign({},f,{width:0,height:0});Object.keys(f).some((function(e){return p[e]!==f[e]}))&&(!e.tilesTransitionDuration||e.tilesTransitionDuration<0?d(f):new yl.Tween(p).to(f,e.tilesTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(d).start())}})}}),Lx=function(e){return e*Math.PI/180},Px={glyphs:{0:{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},1:{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},2:{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},3:{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},4:{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},5:{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},6:{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},7:{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},8:{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},9:{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},"ο":{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},"Τ":{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},"Π":{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},"ΐ":{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"–":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},"Κ":{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},"ƒ":{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},"ό":{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},"ώ":{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"∙":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"ÿ":{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},"µ":{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},"Ι":{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},"Ύ":{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"’":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"Ν":{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},"ς":{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},"Ψ":{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},"ι":{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},"Ά":{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},"ε":{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},"Δ":{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"‰":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"—":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},"ρ":{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"¯":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},"Η":{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"Α":{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"…":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"ν":{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},"Μ":{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},"Ό":{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ή":{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"•":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"¥":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},"γ":{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},"α":{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"Χ":{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"†":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},"Ξ":{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{x_min:0,x_max:0,ha:853},"Ϋ":{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"”":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},"Ί":{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},"Β":{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},"υ":{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},"χ":{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"ί":{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},"Ζ":{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"‹":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"„":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},"δ":{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},"έ":{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},"ω":{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"ϋ":{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},"Ω":{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},"ύ":{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"™":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},"ή":{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},"Θ":{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},"Ε":{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},"σ":{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},"ζ":{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},"θ":{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},"Ο":{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},"Γ":{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},"Έ":{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ώ":{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},"Ϊ":{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},"Ρ":{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"ª":{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"΅":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},"Φ":{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"⁋":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},"Σ":{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"›":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},"λ":{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},"τ":{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},"ξ":{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},"Λ":{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},"ΰ":{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"Υ":{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},"μ":{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"φ":{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"“":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"‘":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},"ϊ":{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},"π":{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},"ά":{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"¤":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},"κ":{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"‡":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},"ψ":{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},"η":{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) Μagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"Μagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:'Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "MgOpen", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "MgOpen" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.',manufacturer_name:"Μagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50},Rx=window.THREE?window.THREE:{CircleBufferGeometry:To,Font:xA,Group:Ca,Mesh:Tn,MeshLambertMaterial:Ps,TextBufferGeometry:class extends _s{constructor(e,t={}){const n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new ln;const r=n.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(r,t),this.type="TextGeometry"}},Vector3:Me},qx=rl({props:{labelsData:{default:[]},labelLat:{default:"lat"},labelLng:{default:"lng"},labelAltitude:{default:0},labelText:{default:"text"},labelSize:{default:.5},labelTypeFace:{default:Px,onChange:function(e,t){t.font=new Rx.Font(e)}},labelColor:{default:function(){return"lightgrey"}},labelRotation:{default:0},labelResolution:{default:3},labelIncludeDot:{default:!0},labelDotRadius:{default:.1},labelDotOrientation:{default:function(){return"bottom"}},labelsTransitionDuration:{default:1e3,triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){var t=th(e.labelLat),n=th(e.labelLng),r=th(e.labelAltitude),i=th(e.labelText),a=th(e.labelSize),o=th(e.labelRotation),s=th(e.labelColor),A=th(e.labelIncludeDot),l=th(e.labelDotRadius),c=th(e.labelDotOrientation),u=new Set(["right","top","bottom"]),h=2*Math.PI*Uy/360,d=new Rx.CircleBufferGeometry(1,16);$y(e.labelsData,e.scene,{createObj:function(){var e=new Rx.MeshLambertMaterial,t=new Rx.Group;return t.add(new Rx.Mesh(d,e)),t.add(new Rx.Mesh(void 0,e)),t.__globeObjType="label",t},updateObj:function(d,f){var p=Dy(d.children,2),m=p[0],g=p[1],v=s(f),y=Jy(v);g.material.color.set(Zy(v)),g.material.transparent=y<1,g.material.opacity=y;var x=A(f),b=c(f);!x||!u.has(b)&&(b="bottom");var _=x?+l(f)*h:1e-12;m.scale.x=m.scale.y=_;var w=+a(f)*h;if(g.geometry=new Rx.TextBufferGeometry(i(f),{font:e.font,size:w,height:0,curveSegments:e.labelResolution}),"right"!==b&&g.geometry.center(),x){var M=_+w/2;"right"===b&&(g.position.x=M),g.position.y={right:-w/2,top:M+w/2,bottom:-M-w/2}[b]}var S=function(t){var n=d.__currentTargetD=t,r=n.lat,i=n.lng,a=n.alt,o=n.rot,s=n.scale;Object.assign(d.position,Hy(r,i,a)),d.lookAt(e.scene.localToWorld(new Rx.Vector3(0,0,0))),d.rotateY(Math.PI),d.rotateZ(-o*Math.PI/180),d.scale.x=d.scale.y=d.scale.z=s},E={lat:+t(f),lng:+n(f),alt:+r(f),rot:+o(f),scale:1},T=d.__currentTargetD||Object.assign({},E,{scale:1e-12});Object.keys(E).some((function(e){return T[e]!==E[e]}))&&(!e.labelsTransitionDuration||e.labelsTransitionDuration<0?S(E):new yl.Tween(T).to(E,e.labelsTransitionDuration).easing(yl.Easing.Quadratic.InOut).onUpdate(S).start())}})}}),Dx=rl({props:{customLayerData:{default:[]},customThreeObject:{},customThreeObjectUpdate:{triggerUpdate:!1}},init:function(e,t){zy(e),t.scene=e},update:function(e){e.customThreeObjectUpdate||zy(e.scene);var t=th(e.customThreeObject),n=th(e.customThreeObjectUpdate);$y(e.customLayerData,e.scene,{createObj:function(n){var r=t(n,Uy);return r&&(e.customThreeObject===r&&(r=r.clone()),r.__globeObjType="custom"),r},updateObj:function(e,t){return n(e,t,Uy)}})}}),Ix=window.THREE?window.THREE:{Group:Ca,Vector2:de,Vector3:Me},Bx=["globeLayer","pointsLayer","arcsLayer","hexBinLayer","polygonsLayer","hexedPolygonsLayer","pathsLayer","tilesLayer","labelsLayer","customLayer"],Ox=Fy("globeLayer",Xy),kx=Object.assign.apply(Object,Iy(["globeImageUrl","bumpImageUrl","showGlobe","showGraticules","showAtmosphere","atmosphereColor","atmosphereAltitude"].map((function(e){return wy({},e,Ox.linkProp(e))})))),Nx=Object.assign.apply(Object,Iy(["globeMaterial"].map((function(e){return wy({},e,Ox.linkMethod(e))})))),zx=Fy("pointsLayer",ix),Fx=Object.assign.apply(Object,Iy(["pointsData","pointLat","pointLng","pointColor","pointAltitude","pointRadius","pointResolution","pointsMerge","pointsTransitionDuration"].map((function(e){return wy({},e,zx.linkProp(e))})))),Ux=Fy("arcsLayer",lx),Hx=Object.assign.apply(Object,Iy(["arcsData","arcStartLat","arcStartLng","arcEndLat","arcEndLng","arcColor","arcAltitude","arcAltitudeAutoScale","arcStroke","arcCurveResolution","arcCircularResolution","arcDashLength","arcDashGap","arcDashInitialGap","arcDashAnimateTime","arcsTransitionDuration"].map((function(e){return wy({},e,Ux.linkProp(e))})))),Gx=Fy("hexBinLayer",fx),jx=Object.assign.apply(Object,Iy(["hexBinPointsData","hexBinPointLat","hexBinPointLng","hexBinPointWeight","hexBinResolution","hexMargin","hexTopCurvatureResolution","hexTopColor","hexSideColor","hexAltitude","hexBinMerge","hexTransitionDuration"].map((function(e){return wy({},e,Gx.linkProp(e))})))),Vx=Fy("hexedPolygonsLayer",xx),Wx=Object.assign.apply(Object,Iy(["hexPolygonsData","hexPolygonGeoJsonGeometry","hexPolygonColor","hexPolygonAltitude","hexPolygonResolution","hexPolygonMargin","hexPolygonCurvatureResolution","hexPolygonsTransitionDuration"].map((function(e){return wy({},e,Vx.linkProp(e))})))),Qx=Fy("polygonsLayer",mx),Yx=Object.assign.apply(Object,Iy(["polygonsData","polygonGeoJsonGeometry","polygonCapColor","polygonCapMaterial","polygonSideColor","polygonSideMaterial","polygonStrokeColor","polygonAltitude","polygonCapCurvatureResolution","polygonsTransitionDuration"].map((function(e){return wy({},e,Qx.linkProp(e))})))),Xx=Fy("pathsLayer",Ex),Zx=Object.assign.apply(Object,Iy(["pathsData","pathPoints","pathPointLat","pathPointLng","pathPointAlt","pathResolution","pathColor","pathStroke","pathDashLength","pathDashGap","pathDashInitialGap","pathDashAnimateTime","pathTransitionDuration"].map((function(e){return wy({},e,Xx.linkProp(e))})))),Jx=Fy("tilesLayer",Cx),Kx=Object.assign.apply(Object,Iy(["tilesData","tileLat","tileLng","tileAltitude","tileWidth","tileHeight","tileUseGlobeProjection","tileMaterial","tileCurvatureResolution","tilesTransitionDuration"].map((function(e){return wy({},e,Jx.linkProp(e))})))),$x=Fy("labelsLayer",qx),eb=Object.assign.apply(Object,Iy(["labelsData","labelLat","labelLng","labelAltitude","labelRotation","labelText","labelSize","labelTypeFace","labelColor","labelResolution","labelIncludeDot","labelDotRadius","labelDotOrientation","labelsTransitionDuration"].map((function(e){return wy({},e,$x.linkProp(e))})))),tb=Fy("customLayer",Dx),nb=Object.assign.apply(Object,Iy(["customLayerData","customThreeObject","customThreeObjectUpdate"].map((function(e){return wy({},e,tb.linkProp(e))}))));var rb=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){My(i,t);var r=qy(i);function i(){var t;_y(this,i);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(t=r.call.apply(r,[this].concat(o))).__kapsuleInstance=e.apply(void 0,o).apply(void 0,[].concat(Iy(n?[Py(t)]:[]),o)),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}(rl({props:by(by(by(by(by(by(by(by(by(by({onGlobeReady:{triggerUpdate:!1},rendererSize:{default:new Ix.Vector2(window.innerWidth,window.innerHeight),onChange:function(e,t){t.pathsLayer.rendererSize(e)},triggerUpdate:!1}},kx),Fx),Hx),jx),Yx),Wx),Zx),Kx),eb),nb),methods:by({getCoords: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 Hy.apply(void 0,n)},toGeoCoords: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 Gy.apply(void 0,n)}},Nx),stateInit:function(){return{globeLayer:Xy(),pointsLayer:ix(),arcsLayer:lx(),hexBinLayer:fx(),polygonsLayer:mx(),hexedPolygonsLayer:xx(),pathsLayer:Ex(),tilesLayer:Cx(),labelsLayer:qx(),customLayer:Dx()}},init:function(e,t,n){var r=n.animateIn,i=void 0===r||r,a=n.waitForGlobeReady,o=void 0===a||a;zy(e),e.add(t.scene=new Ix.Group),t.scene.visible=!1,Bx.forEach((function(e){var n=new Ix.Group;t.scene.add(n),t[e](n)}));var s=function(){if(i){t.scene.scale.set(1e-6,1e-6,1e-6),new yl.Tween({k:1e-6}).to({k:1},600).easing(yl.Easing.Quadratic.Out).onUpdate((function(e){var n=e.k;return t.scene.scale.set(n,n,n)})).start();var e=new Ix.Vector3(0,1,0);new yl.Tween({rot:2*Math.PI}).to({rot:0},1200).easing(yl.Easing.Quintic.Out).onUpdate((function(n){var r=n.rot;return t.scene.setRotationFromAxisAngle(e,r)})).start()}t.scene.visible=!0,t.onGlobeReady&&t.onGlobeReady()};o?t.globeLayer.onReady(s):s(),function e(){requestAnimationFrame(e),yl.update()}()},update:function(e){}}),(window.THREE?window.THREE:{Group:Ca}).Group,!0);const ib={type:"change"},ab={type:"start"},ob={type:"end"};class sb extends te{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,a=1,o=2,s=3,A=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:p.ROTATE,MIDDLE:p.DOLLY,RIGHT:p.PAN},this.target=new Me;const l=1e-6,c=new Me;let u=1,h=r,d=r,f=0,m=0,g=0;const v=new Me,y=new de,x=new de,b=new Me,_=new de,w=new de,M=new de,S=new de,E=[],T={};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 C=function(){const e=new de;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),L=function(){const e=new de;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 P(e){!1!==n.enabled&&(0===E.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",R),n.domElement.addEventListener("pointerup",q)),function(e){E.push(e)}(e),"touch"===e.pointerType?function(e){switch(z(e),E.length){case 1:h=s,x.copy(L(E[0].pageX,E[0].pageY)),y.copy(x);break;default:h=A;const e=E[0].pageX-E[1].pageX,t=E[0].pageY-E[1].pageY;m=f=Math.sqrt(e*e+t*t);const n=(E[0].pageX+E[1].pageX)/2,r=(E[0].pageY+E[1].pageY)/2;M.copy(C(n,r)),S.copy(M)}n.dispatchEvent(ab)}(e):function(e){if(h===r)switch(e.button){case n.mouseButtons.LEFT:h=i;break;case n.mouseButtons.MIDDLE:h=a;break;case n.mouseButtons.RIGHT:h=o;break;default:h=r}const t=d!==r?d:h;t!==i||n.noRotate?t!==a||n.noZoom?t!==o||n.noPan||(M.copy(C(e.pageX,e.pageY)),S.copy(M)):(_.copy(C(e.pageX,e.pageY)),w.copy(_)):(x.copy(L(e.pageX,e.pageY)),y.copy(x));n.dispatchEvent(ab)}(e))}function R(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(z(e),E.length){case 1:y.copy(x),x.copy(L(e.pageX,e.pageY));break;default:const t=function(e){const t=e.pointerId===E[0].pointerId?E[1]:E[0];return T[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;m=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,a=(e.pageY+t.y)/2;S.copy(C(i,a))}}(e):function(e){const t=d!==r?d:h;t!==i||n.noRotate?t!==a||n.noZoom?t!==o||n.noPan||S.copy(C(e.pageX,e.pageY)):w.copy(C(e.pageX,e.pageY)):(y.copy(x),x.copy(L(e.pageX,e.pageY)))}(e))}function q(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(E.length){case 0:h=r;break;case 1:h=s,x.copy(L(e.pageX,e.pageY)),y.copy(x);break;case 2:h=A,x.copy(L(e.pageX-y.pageX,e.pageY-y.pageY)),y.copy(x)}n.dispatchEvent(ob)}(e):(h=r,n.dispatchEvent(ob)),N(e),0===E.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",R),n.domElement.removeEventListener("pointerup",q)))}function D(e){N(e)}function I(e){!1!==n.enabled&&(window.removeEventListener("keydown",I),d===r&&(e.code!==n.keys[i]||n.noRotate?e.code!==n.keys[a]||n.noZoom?e.code!==n.keys[o]||n.noPan||(d=o):d=a:d=i))}function B(){!1!==n.enabled&&(d=r,window.addEventListener("keydown",I))}function O(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:_.y-=.025*e.deltaY;break;case 1:_.y-=.01*e.deltaY;break;default:_.y-=25e-5*e.deltaY}n.dispatchEvent(ab),n.dispatchEvent(ob)}}function k(e){!1!==n.enabled&&e.preventDefault()}function N(e){delete T[e.pointerId];for(let t=0;t<E.length;t++)if(E[t].pointerId==e.pointerId)return void E.splice(t,1)}function z(e){let t=T[e.pointerId];void 0===t&&(t=new de,T[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new Me,t=new we,r=new Me,i=new Me,a=new Me,o=new Me;return function(){o.set(x.x-y.x,x.y-y.y,0);let s=o.length();s?(v.copy(n.object.position).sub(n.target),r.copy(v).normalize(),i.copy(n.object.up).normalize(),a.crossVectors(i,r).normalize(),i.setLength(x.y-y.y),a.setLength(x.x-y.x),o.copy(i.add(a)),e.crossVectors(o,v).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),v.applyQuaternion(t),n.object.up.applyQuaternion(t),b.copy(e),g=s):!n.staticMoving&&g&&(g*=Math.sqrt(1-n.dynamicDampingFactor),v.copy(n.object.position).sub(n.target),t.setFromAxisAngle(b,g),v.applyQuaternion(t),n.object.up.applyQuaternion(t)),y.copy(x)}}(),this.zoomCamera=function(){let e;h===A?(e=f/m,f=m,n.object.isPerspectiveCamera?v.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom*=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(w.y-_.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?v.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?_.copy(w):_.y+=(w.y-_.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new de,t=new Me,r=new Me;return function(){if(e.copy(S).sub(M),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(v.length()*n.panSpeed),r.copy(v).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?M.copy(S):M.add(e.subVectors(S,M).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(v.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,v.setLength(n.maxDistance)),_.copy(w)),v.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,v.setLength(n.minDistance)),_.copy(w)))},this.update=function(){v.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,v),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),c.distanceToSquared(n.object.position)>l&&(n.dispatchEvent(ib),c.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(c.distanceToSquared(n.object.position)>l||u!==n.object.zoom)&&(n.dispatchEvent(ib),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(),v.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(ib),c.copy(n.object.position),u=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",k),n.domElement.removeEventListener("pointerdown",P),n.domElement.removeEventListener("pointercancel",D),n.domElement.removeEventListener("wheel",O),n.domElement.removeEventListener("pointermove",R),n.domElement.removeEventListener("pointerup",q),window.removeEventListener("keydown",I),window.removeEventListener("keyup",B)},this.domElement.addEventListener("contextmenu",k),this.domElement.addEventListener("pointerdown",P),this.domElement.addEventListener("pointercancel",D),this.domElement.addEventListener("wheel",O,{passive:!1}),window.addEventListener("keydown",I),window.addEventListener("keyup",B),this.handleResize(),this.update()}}const Ab={type:"change"},lb={type:"start"},cb={type:"end"};class ub extends te{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 Me,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:p.ROTATE,MIDDLE:p.DOLLY,RIGHT:p.PAN},this.touches={ONE:m,TWO:v},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",Y),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(Ab),n.update(),i=r.NONE},this.update=function(){const t=new Me,u=(new we).setFromUnitVectors(e.up,new Me(0,1,0)),h=u.clone().invert(),d=new Me,f=new we,p=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(u),o.setFromVector3(t),n.autoRotate&&i===r.NONE&&C(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(o.theta+=s.theta*n.dampingFactor,o.phi+=s.phi*n.dampingFactor):(o.theta+=s.theta,o.phi+=s.phi);let m=n.minAzimuthAngle,g=n.maxAzimuthAngle;return isFinite(m)&&isFinite(g)&&(m<-Math.PI?m+=p:m>Math.PI&&(m-=p),g<-Math.PI?g+=p:g>Math.PI&&(g-=p),o.theta=m<=g?Math.max(m,Math.min(g,o.theta)):o.theta>(m+g)/2?Math.max(m,o.theta):Math.min(g,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),o.radius*=A,o.radius=Math.max(n.minDistance,Math.min(n.maxDistance,o.radius)),!0===n.enableDamping?n.target.addScaledVector(l,n.dampingFactor):n.target.add(l),t.setFromSpherical(o),t.applyQuaternion(h),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,l.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),l.set(0,0,0)),A=1,!!(c||d.distanceToSquared(n.object.position)>a||8*(1-f.dot(n.object.quaternion))>a)&&(n.dispatchEvent(Ab),d.copy(n.object.position),f.copy(n.object.quaternion),c=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",X),n.domElement.removeEventListener("pointerdown",G),n.domElement.removeEventListener("pointercancel",W),n.domElement.removeEventListener("wheel",Q),n.domElement.removeEventListener("pointermove",j),n.domElement.removeEventListener("pointerup",V),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",Y)};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 a=1e-6,o=new GA,s=new GA;let A=1;const l=new Me;let c=!1;const u=new de,h=new de,d=new de,f=new de,x=new de,b=new de,_=new de,w=new de,M=new de,S=[],E={};function T(){return Math.pow(.95,n.zoomSpeed)}function C(e){s.theta-=e}function L(e){s.phi-=e}const P=function(){const e=new Me;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),l.add(e)}}(),R=function(){const e=new Me;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),l.add(e)}}(),q=function(){const e=new Me;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),P(2*t*o/i.clientHeight,n.object.matrix),R(2*r*o/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(P(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),R(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 D(e){n.object.isPerspectiveCamera?A/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),c=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function I(e){n.object.isPerspectiveCamera?A*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),c=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function B(e){u.set(e.clientX,e.clientY)}function O(e){f.set(e.clientX,e.clientY)}function k(){if(1===S.length)u.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);u.set(e,t)}}function N(){if(1===S.length)f.set(S[0].pageX,S[0].pageY);else{const e=.5*(S[0].pageX+S[1].pageX),t=.5*(S[0].pageY+S[1].pageY);f.set(e,t)}}function z(){const e=S[0].pageX-S[1].pageX,t=S[0].pageY-S[1].pageY,n=Math.sqrt(e*e+t*t);_.set(0,n)}function F(e){if(1==S.length)h.set(e.pageX,e.pageY);else{const t=K(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);h.set(n,r)}d.subVectors(h,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;C(2*Math.PI*d.x/t.clientHeight),L(2*Math.PI*d.y/t.clientHeight),u.copy(h)}function U(e){if(1===S.length)x.set(e.pageX,e.pageY);else{const t=K(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);x.set(n,r)}b.subVectors(x,f).multiplyScalar(n.panSpeed),q(b.x,b.y),f.copy(x)}function H(e){const t=K(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);w.set(0,a),M.set(0,Math.pow(w.y/_.y,n.zoomSpeed)),D(M.y),_.copy(w)}function G(e){!1!==n.enabled&&(0===S.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",j),n.domElement.addEventListener("pointerup",V)),function(e){S.push(e)}(e),"touch"===e.pointerType?function(e){switch(J(e),S.length){case 1:switch(n.touches.ONE){case m:if(!1===n.enableRotate)return;k(),i=r.TOUCH_ROTATE;break;case g:if(!1===n.enablePan)return;N(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case v:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&z(),n.enablePan&&N(),i=r.TOUCH_DOLLY_PAN;break;case y:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&z(),n.enableRotate&&k(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(lb)}(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 p.DOLLY:if(!1===n.enableZoom)return;!function(e){_.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case p.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;O(e),i=r.PAN}else{if(!1===n.enableRotate)return;B(e),i=r.ROTATE}break;case p.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;B(e),i=r.ROTATE}else{if(!1===n.enablePan)return;O(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(lb)}(e))}function j(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(J(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;F(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;U(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&H(e),n.enablePan&&U(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&H(e),n.enableRotate&&F(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){h.set(e.clientX,e.clientY),d.subVectors(h,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;C(2*Math.PI*d.x/t.clientHeight),L(2*Math.PI*d.y/t.clientHeight),u.copy(h),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){w.set(e.clientX,e.clientY),M.subVectors(w,_),M.y>0?D(T()):M.y<0&&I(T()),_.copy(w),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){x.set(e.clientX,e.clientY),b.subVectors(x,f).multiplyScalar(n.panSpeed),q(b.x,b.y),f.copy(x),n.update()}(e)}}(e))}function V(e){!1!==n.enabled&&(e.pointerType,n.dispatchEvent(cb),i=r.NONE,Z(e),0===S.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",j),n.domElement.removeEventListener("pointerup",V)))}function W(e){Z(e)}function Q(e){!1===n.enabled||!1===n.enableZoom||i!==r.NONE&&i!==r.ROTATE||(e.preventDefault(),n.dispatchEvent(lb),function(e){e.deltaY<0?I(T()):e.deltaY>0&&D(T()),n.update()}(e),n.dispatchEvent(cb))}function Y(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:q(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:q(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:q(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:q(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function X(e){!1!==n.enabled&&e.preventDefault()}function Z(e){delete E[e.pointerId];for(let t=0;t<S.length;t++)if(S[t].pointerId==e.pointerId)return void S.splice(t,1)}function J(e){let t=E[e.pointerId];void 0===t&&(t=new de,E[e.pointerId]=t),t.set(e.pageX,e.pageY)}function K(e){const t=e.pointerId===S[0].pointerId?S[1]:S[0];return E[t.pointerId]}n.domElement.addEventListener("contextmenu",X),n.domElement.addEventListener("pointerdown",G),n.domElement.addEventListener("pointercancel",W),n.domElement.addEventListener("wheel",Q,{passive:!1}),this.update()}}const hb={type:"change"};class db extends te{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=1e-6,i=new we,a=new Me;this.tmpQuaternion=new we,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 Me(0,0,0),this.rotationVector=new Me(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),(a.distanceToSquared(n.object.position)>r||8*(1-i.dot(n.object.quaternion))>r)&&(n.dispatchEvent(hb),i.copy(n.object.quaternion),a.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",fb),this.domElement.removeEventListener("mousedown",s),this.domElement.removeEventListener("mousemove",o),this.domElement.removeEventListener("mouseup",A),window.removeEventListener("keydown",l),window.removeEventListener("keyup",c)};const o=this.mousemove.bind(this),s=this.mousedown.bind(this),A=this.mouseup.bind(this),l=this.keydown.bind(this),c=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",fb),this.domElement.addEventListener("mousemove",o),this.domElement.addEventListener("mousedown",s),this.domElement.addEventListener("mouseup",A),window.addEventListener("keydown",l),window.addEventListener("keyup",c),this.updateMovementVector(),this.updateRotationVector()}}function fb(e){e.preventDefault()}var pb={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 mb{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 gb=new ar(-1,1,1,-1,0,1),vb=new ln;vb.setAttribute("position",new $t([-1,3,0,-1,-1,0,3,-1,0],3)),vb.setAttribute("uv",new $t([0,2,0,0,2,0],2));class yb{constructor(e){this._mesh=new Tn(vb,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,gb)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class xb extends mb{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof Dn?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=qn.clone(e.uniforms),this.material=new Dn({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new yb(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 bb extends mb{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 a,o;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(a=0,o=1):(a=1,o=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,a,4294967295),i.buffers.stencil.setClear(o),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 _b extends mb{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class wb{constructor(e,t){if(this.renderer=e,void 0===t){const n={minFilter:C,magFilter:C,format:k},r=e.getSize(new de);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new be(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===pb&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===xb&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new xb(pb),this.clock=new SA}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 t=0,r=this.passes.length;t<r;t++){const r=this.passes[t];if(!1!==r.enabled){if(r.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(t),r.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),r.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!==bb&&(r instanceof bb?n=!0:r instanceof _b&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new de);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 e=0;e<this.passes.length;e++)this.passes[e].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}new ar(-1,1,1,-1,0,1);const Mb=new ln;Mb.setAttribute("position",new $t([-1,3,0,-1,-1,0,3,-1,0],3)),Mb.setAttribute("uv",new $t([0,2,0,0,2,0],2));class Sb extends mb{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 Wt}render(e,t,n){const r=e.autoClear;let i,a;e.autoClear=!1,void 0!==this.overrideMaterial&&(a=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=a),e.autoClear=r}}function Eb(){return(Eb=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 Tb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cb(e,t){return(Cb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lb(e){return(Lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pb(){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 Rb(e,t,n){return(Rb=Pb()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Cb(i,n.prototype),i}).apply(null,arguments)}function qb(e){var t="function"==typeof Map?new Map:void 0;return(qb=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(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Rb(e,arguments,Lb(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Cb(r,e)})(e)}var Db={1:"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",2:"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",3:"Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",4:"Couldn't generate valid rgb string from %s, it returned %s.\n\n",5:"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",6:"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",7:"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",8:"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",9:"Please provide a number of steps to the modularScale helper.\n\n",10:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",11:'Invalid value passed as base to modularScale, expected number or em string but got "%s"\n\n',12:'Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.\n\n',13:'Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.\n\n',14:'Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',15:'Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.\n\n',16:"You must provide a template to this method.\n\n",17:"You passed an unsupported selector state to this method.\n\n",18:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",19:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",20:"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:"fontFace expects a name of a font-family.\n\n",24:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",25:"fontFace expects localFonts to be an array.\n\n",26:"fontFace expects fileFormats to be an array.\n\n",27:"radialGradient requries at least 2 color-stops to properly render.\n\n",28:"Please supply a filename to retinaImage() as the first argument.\n\n",29:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",32:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",33:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",34:"borderRadius expects a radius value as a string or number as the second argument.\n\n",35:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',36:"Property must be a string value.\n\n",37:"Syntax Error at %s.\n\n",38:"Formula contains a function that needs parentheses at %s.\n\n",39:"Formula is missing closing parenthesis at %s.\n\n",40:"Formula has too many closing parentheses at %s.\n\n",41:"All values in a formula must have the same unit or be unitless.\n\n",42:"Please provide a number of steps to the modularScale helper.\n\n",43:"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",44:"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",45:"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",46:"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",47:"minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",48:"fromSize and toSize must be provided as stringified numbers with the same units.\n\n",49:"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",50:"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",51:"Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",52:"fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",53:"fontFace expects localFonts to be an array.\n\n",54:"fontFace expects fileFormats to be an array.\n\n",55:"fontFace expects a name of a font-family.\n\n",56:"linearGradient requries at least 2 color-stops to properly render.\n\n",57:"radialGradient requries at least 2 color-stops to properly render.\n\n",58:"Please supply a filename to retinaImage() as the first argument.\n\n",59:"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:"Property must be a string value.\n\n",62:"borderRadius expects a radius value as a string or number as the second argument.\n\n",63:'borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.\n\n',64:"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",65:"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",66:"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",67:"You must provide a template to this method.\n\n",68:"You passed an unsupported selector state to this method.\n\n",69:'Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.\n\n',70:'Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.\n\n',71:'Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.\n\n',72:'Passed invalid base value %s to %s(), please pass a value like "12px" or 12.\n\n',73:"Please provide a valid CSS variable.\n\n",74:"CSS variable not found and no default was provided.\n\n",75:"important requires a valid style object, got a %s instead.\n\n",76:"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",77:'remToPx expects a value in "rem" but you provided it in "%s".\n\n',78:'base must be set in "px" or "%" but you set it in "%s".\n'};function Ib(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0],a=[];for(r=1;r<t.length;r+=1)a.push(t[r]);return a.forEach((function(e){i=i.replace(/%[a-z]/,e)})),i}var Bb=function(e){var t,n;function r(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Tb(e.call(this,Ib.apply(void 0,[Db[t]].concat(r)))||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Cb(t,n),r}(qb(Error));function Ob(e){return Math.round(255*e)}function kb(e,t,n){return Ob(e)+","+Ob(t)+","+Ob(n)}function Nb(e,t,n,r){if(void 0===r&&(r=kb),0===t)return r(n,n,n);var i=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*t,o=a*(1-Math.abs(i%2-1)),s=0,A=0,l=0;i>=0&&i<1?(s=a,A=o):i>=1&&i<2?(s=o,A=a):i>=2&&i<3?(A=a,l=o):i>=3&&i<4?(A=o,l=a):i>=4&&i<5?(s=o,l=a):i>=5&&i<6&&(s=a,l=o);var c=n-a/2;return r(s+c,A+c,l+c)}var zb={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 Fb=/^#[a-fA-F0-9]{6}$/,Ub=/^#[a-fA-F0-9]{8}$/,Hb=/^#[a-fA-F0-9]{3}$/,Gb=/^#[a-fA-F0-9]{4}$/,jb=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,Vb=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Wb=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Qb=/^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 Yb(e){if("string"!=typeof e)throw new Bb(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return zb[t]?"#"+zb[t]:e}(e);if(t.match(Fb))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(Ub)){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(Hb))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(Gb)){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=jb.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var a=Vb.exec(t.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var o=Wb.exec(t);if(o){var s="rgb("+Nb(parseInt(""+o[1],10),parseInt(""+o[2],10)/100,parseInt(""+o[3],10)/100)+")",A=jb.exec(s);if(!A)throw new Bb(4,t,s);return{red:parseInt(""+A[1],10),green:parseInt(""+A[2],10),blue:parseInt(""+A[3],10)}}var l=Qb.exec(t.substring(0,50));if(l){var c="rgb("+Nb(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",u=jb.exec(c);if(!u)throw new Bb(4,t,c);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10),alpha:parseFloat(""+l[4])}}throw new Bb(5)}var Xb=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 Zb(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Jb(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Xb("#"+Zb(e)+Zb(t)+Zb(n));if("object"==typeof e&&void 0===t&&void 0===n)return Xb("#"+Zb(e.red)+Zb(e.green)+Zb(e.blue));throw new Bb(6)}function Kb(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):Kb(e,t,r)}}function $b(e){return Kb(e,e.length,[])}function e_(e,t){if("transparent"===t)return t;var n,r,i,a=Yb(t),o="number"==typeof a.alpha?a.alpha:1;return function(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=Yb(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?Jb(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?Jb(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Bb(7)}(Eb({},a,{alpha:(n=0,r=1,i=(100*o+100*parseFloat(e))/100,Math.max(n,Math.min(r,i)))}))}var t_=$b(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 r_(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,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(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 i_(e){return function(e){if(Array.isArray(e))return o_(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 o_(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)?o_(e,t):void 0}}function o_(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 s_=window.THREE?window.THREE:{WebGLRenderer:Da,Scene:Ia,PerspectiveCamera:Bn,Raycaster:class{constructor(e,t,n=0,r=1/0){this.ray=new et(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new ht,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 HA(e,this,n,t),n.sort(UA),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)HA(e[r],this,n,t);return n.sort(UA),n}},TextureLoader:$s,Vector2:de,Vector3:Me,Box3:Te,Color:Wt,Mesh:Tn,SphereGeometry:Ss,MeshBasicMaterial:Qt,BackSide:1,EventDispatcher:te,MOUSE:p,Quaternion:we,Spherical:GA,Clock:SA},A_=rl({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&&th(e.tooltipContent)(t)||"",e.hoverObj=t)}yl.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 a=t,o=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),A=u();new yl.Tween(s).to(a,r).easing(yl.Easing.Quadratic.Out).onUpdate(l).start(),new yl.Tween(A).to(o,r/3).easing(yl.Easing.Quadratic.Out).onUpdate(c).start()}else l(a),c(o);return this}return Object.assign({},i.position,{lookAt:u()});function l(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 c(t){e.controls.target=new s_.Vector3(t.x,t.y,t.z)}function u(){return Object.assign(new s_.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),a=3;a<r;a++)i[a-3]=arguments[a];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 a=new s_.Vector3(0,0,0),o=2*Math.max.apply(Math,i_(Object.entries(t).map((function(e){var t=r_(e,2),n=t[0],r=t[1];return Math.max.apply(Math,i_(r.map((function(e){return Math.abs(a[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,A=o/Math.atan(s*Math.PI/180),l=A/i.aspect,c=Math.max(A,l);if(c>0){var u=a.clone().sub(i.position).normalize().multiplyScalar(-c);this.cameraPosition(u,a,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new s_.Box3(new s_.Vector3(0,0,0),new s_.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,i_(["x","y","z"].map((function(e){return n_({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new s_.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 s_.Vector2(t/e.width*2-1,-n/e.height*2+1),a=new s_.Raycaster;return a.setFromCamera(i,e.camera),Object.assign({},a.ray.at(r,new s_.Vector3))},intersectingObjects:function(e,t,n){var r=new s_.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new s_.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 s_.Scene,camera:new s_.PerspectiveCamera,clock:new s_.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,a=n.rendererConfig,o=void 0===a?{}:a,s=n.extraRenderers,A=void 0===s?[]:s,l=n.waitForLoadComplete,c=void 0===l||l;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 s_.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=(i=t.container,a=i.getBoundingClientRect(),o=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:a.top+s,left:a.left+o});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)")}var i,a,o,s}),{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 s_.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},o)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=A,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 wb(t.renderer),t.postProcessingComposer.addPass(new Sb(t.scene,t.camera)),t.controls=new{trackball:sb,orbit:ub,fly:db}[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(i_(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 s_.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!c,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(i_(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 s_.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=Yb(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new s_.Color(t_(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new s_.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new s_.MeshBasicMaterial({map:t,side:s_.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 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_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d_(e){return function(e){if(Array.isArray(e))return f_(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 f_(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 f_(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 f_(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 p_(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,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];var s=r[t].apply(r,a);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))}}(".scene-container .clickable {\n cursor: pointer;\n}");var m_=["rendererConfig","waitForGlobeReady"],g_=window.THREE?window.THREE:{AmbientLight:pA,DirectionalLight:fA,Vector2:de},v_=p_("globe",rb),y_=Object.assign.apply(Object,d_(["globeImageUrl","bumpImageUrl","showGlobe","showGraticules","showAtmosphere","atmosphereColor","atmosphereAltitude","globeMaterial","onGlobeReady","pointsData","pointLat","pointLng","pointColor","pointAltitude","pointRadius","pointResolution","pointsMerge","pointsTransitionDuration","arcsData","arcStartLat","arcStartLng","arcEndLat","arcEndLng","arcColor","arcAltitude","arcAltitudeAutoScale","arcStroke","arcCurveResolution","arcCircularResolution","arcDashLength","arcDashGap","arcDashInitialGap","arcDashAnimateTime","arcsTransitionDuration","polygonsData","polygonGeoJsonGeometry","polygonCapColor","polygonCapMaterial","polygonSideColor","polygonSideMaterial","polygonStrokeColor","polygonAltitude","polygonCapCurvatureResolution","polygonsTransitionDuration","pathsData","pathPoints","pathPointLat","pathPointLng","pathPointAlt","pathResolution","pathColor","pathStroke","pathDashLength","pathDashGap","pathDashInitialGap","pathDashAnimateTime","pathTransitionDuration","hexBinPointsData","hexBinPointLat","hexBinPointLng","hexBinPointWeight","hexBinResolution","hexMargin","hexTopCurvatureResolution","hexTopColor","hexSideColor","hexAltitude","hexBinMerge","hexTransitionDuration","hexPolygonsData","hexPolygonGeoJsonGeometry","hexPolygonColor","hexPolygonAltitude","hexPolygonResolution","hexPolygonMargin","hexPolygonCurvatureResolution","hexPolygonsTransitionDuration","tilesData","tileLat","tileLng","tileAltitude","tileWidth","tileHeight","tileUseGlobeProjection","tileMaterial","tileCurvatureResolution","tilesTransitionDuration","labelsData","labelLat","labelLng","labelAltitude","labelRotation","labelText","labelSize","labelTypeFace","labelColor","labelResolution","labelIncludeDot","labelDotRadius","labelDotOrientation","labelsTransitionDuration","customLayerData","customThreeObject","customThreeObjectUpdate"].map((function(e){return u_({},e,v_.linkProp(e))})))),x_=Object.assign.apply(Object,d_(["getCoords","toGeoCoords"].map((function(e){return u_({},e,v_.linkMethod(e))})))),b_=p_("renderObjs",A_),__=Object.assign.apply(Object,d_(["width","height","backgroundColor","backgroundImageUrl","enablePointerInteraction"].map((function(e){return u_({},e,b_.linkProp(e))})))),w_=Object.assign.apply(Object,d_(["postProcessingComposer"].map((function(e){return u_({},e,b_.linkMethod(e))})))),M_=rl({props:c_(c_({onZoom:{triggerUpdate:!1},onGlobeClick:{triggerUpdate:!1},onGlobeRightClick:{triggerUpdate:!1},pointLabel:{default:"name",triggerUpdate:!1},onPointClick:{triggerUpdate:!1},onPointRightClick:{triggerUpdate:!1},onPointHover:{triggerUpdate:!1},arcLabel:{default:"name",triggerUpdate:!1},onArcClick:{triggerUpdate:!1},onArcRightClick:{triggerUpdate:!1},onArcHover:{triggerUpdate:!1},polygonLabel:{default:"name",triggerUpdate:!1},onPolygonClick:{triggerUpdate:!1},onPolygonRightClick:{triggerUpdate:!1},onPolygonHover:{triggerUpdate:!1},pathLabel:{default:"name",triggerUpdate:!1},onPathClick:{triggerUpdate:!1},onPathRightClick:{triggerUpdate:!1},onPathHover:{triggerUpdate:!1},hexLabel:{triggerUpdate:!1},onHexClick:{triggerUpdate:!1},onHexRightClick:{triggerUpdate:!1},onHexHover:{triggerUpdate:!1},hexPolygonLabel:{triggerUpdate:!1},onHexPolygonClick:{triggerUpdate:!1},onHexPolygonRightClick:{triggerUpdate:!1},onHexPolygonHover:{triggerUpdate:!1},tileLabel:{default:"name",triggerUpdate:!1},onTileClick:{triggerUpdate:!1},onTileRightClick:{triggerUpdate:!1},onTileHover:{triggerUpdate:!1},labelLabel:{triggerUpdate:!1},onLabelClick:{triggerUpdate:!1},onLabelRightClick:{triggerUpdate:!1},onLabelHover:{triggerUpdate:!1},customLayerLabel:{default:"name",triggerUpdate:!1},onCustomLayerClick:{triggerUpdate:!1},onCustomLayerRightClick:{triggerUpdate:!1},onCustomLayerHover:{triggerUpdate:!1},pointerEventsFilter:{default:function(){return!0},triggerUpdate:!1,onChange:function(e,t){return t.renderObjs.hoverFilter((function(t){return e(t,t.__data)}))}},lineHoverPrecision:{default:.2,triggerUpdate:!1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)}}},y_),__),methods:c_(c_({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.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},pointOfView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=a();if(void 0===t.lat&&void 0===t.lng&&void 0===t.altitude)return r;var i=Object.assign({},r,t);if(["lat","lng","altitude"].forEach((function(e){return i[e]=+i[e]})),n){for(;r.lng-i.lng>180;)r.lng-=360;for(;r.lng-i.lng<-180;)r.lng+=360;new yl.Tween(r).to(i,n).easing(yl.Easing.Cubic.InOut).onUpdate(o).start()}else o(i);return this;function a(){return e.globe.toGeoCoords(e.renderObjs.cameraPosition())}function o(t){var n=t.lat,r=t.lng,i=t.altitude;e.renderObjs.cameraPosition(e.globe.getCoords(n,r,i))}},getScreenCoords:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=(t=e.globe).getCoords.apply(t,r);return e.renderObjs.getScreenCoords(a.x,a.y,a.z)},toGlobeCoords:function(e,t,n){var r=e.renderObjs.intersectingObjects(t,n).find((function(e){return"globe"===e.object.__globeObjType}));if(!r)return null;var i=e.globe.toGeoCoords(r.point);return{lat:i.lat,lng:i.lng}},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()},_destructor:function(){this.pauseAnimation(),this.pointsData([]),this.arcsData([]),this.polygonsData([]),this.pathsData([]),this.hexBinPointsData([]),this.hexPolygonsData([]),this.tilesData([]),this.labelsData([]),this.customLayerData([])}},x_),w_),stateInit:function(e){var t=e.rendererConfig,n=e.waitForGlobeReady,r=void 0===n||n,i=h_(e,m_);return{globe:new rb(c_({waitForGlobeReady:r},i)),renderObjs:A_({controlType:"orbit",rendererConfig:t,waitForLoadComplete:r}).skyRadius(5e4).showNavInfo(!1)}},init:function(e,t){var n=this;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var r=document.createElement("div");t.container.appendChild(r),t.renderObjs(r),t.globe.rendererSize(t.renderObjs.renderer().getSize(new g_.Vector2)),this.pointOfView({altitude:2.5});var i=t.renderObjs.controls();i.minDistance=101,setTimeout((function(){return i.maxDistance=1e4})),i.enablePan=!1,i.enableDamping=!0,i.dampingFactor=.1,i.rotateSpeed=.3,i.zoomSpeed=.3,i.addEventListener("change",(function(){var e=n.pointOfView();i.rotateSpeed=.2*e.altitude,i.zoomSpeed=.1*(e.altitude+1),t.onZoom&&t.onZoom(e)}));var a=function(e){for(var t=e;t&&!t.hasOwnProperty("__globeObjType");)t=t.parent;return t},o={point:function(e){return e},arc:function(e){return e},polygon:function(e){return e.data},path:function(e){return e},hexbin:function(e){return e},hexPolygon:function(e){return e},tile:function(e){return e},label:function(e){return e},custom:function(e){return e}};t.renderObjs.objects([new g_.AmbientLight(12303291),new g_.DirectionalLight(16777215,.6),t.globe]).hoverOrderComparator((function(e,t){var n=a(e),r=a(t),i=function(e){return!e};return i(n)-i(r)})).tooltipContent((function(e){var n={point:t.pointLabel,arc:t.arcLabel,polygon:t.polygonLabel,path:t.pathLabel,hexbin:t.hexLabel,hexPolygon:t.hexPolygonLabel,tile:t.tileLabel,label:t.labelLabel,custom:t.customLayerLabel},r=a(e),i=r&&r.__globeObjType;return r&&i&&n.hasOwnProperty(i)&&o.hasOwnProperty(i)&&th(n[i])(o[i](r.__data))||""})).onHover((function(e){var n={point:t.onPointHover,arc:t.onArcHover,polygon:t.onPolygonHover,path:t.onPathHover,hexbin:t.onHexHover,hexPolygon:t.onHexPolygonHover,tile:t.onTileHover,label:t.onLabelHover,custom:t.onCustomLayerHover},r={globe:t.onGlobeClick,point:t.onPointClick,arc:t.onArcClick,polygon:t.onPolygonClick,path:t.onPathClick,hexbin:t.onHexClick,hexPolygon:t.onHexPolygonClick,tile:t.onTileClick,label:t.onLabelClick,custom:t.onCustomLayerClick},i=a(e);if(i&&!n.hasOwnProperty(i.__globeObjType)&&(i=null),i!==t.hoverObj){var s=t.hoverObj?t.hoverObj.__globeObjType:null,A=t.hoverObj?o[s](t.hoverObj.__data):null,l=i?i.__globeObjType:null,c=i?o[l](i.__data):null;s&&s!==l&&n[s]&&n[s](null,A),l&&n[l]&&n[l](c,s===l?A:null),t.renderObjs.renderer().domElement.classList[l&&r[l]?"add":"remove"]("clickable"),t.hoverObj=i}})).onClick((function(e,r,i){if(e){var s={globe:t.onGlobeClick,point:t.onPointClick,arc:t.onArcClick,polygon:t.onPolygonClick,path:t.onPathClick,hexbin:t.onHexClick,hexPolygon:t.onHexPolygonClick,tile:t.onTileClick,label:t.onLabelClick,custom:t.onCustomLayerClick},A=a(e),l=A.__globeObjType;if(A&&s.hasOwnProperty(l)&&s[l]){var c=[r];if("globe"===l){var u=n.toGeoCoords(i),h=u.lat,d=u.lng;c.unshift({lat:h,lng:d})}o.hasOwnProperty(l)&&c.unshift(o[l](A.__data)),s[l].apply(s,c)}}})).onRightClick((function(e,r,i){if(e){var s={globe:t.onGlobeRightClick,point:t.onPointRightClick,arc:t.onArcRightClick,polygon:t.onPolygonRightClick,path:t.onPathRightClick,hexbin:t.onHexRightClick,hexPolygon:t.onHexPolygonRightClick,tile:t.onTileRightClick,label:t.onLabelRightClick,custom:t.onCustomLayerRightClick},A=a(e),l=A.__globeObjType;if(A&&s.hasOwnProperty(l)&&s[l]){var c=[r];if("globe"===l){var u=n.toGeoCoords(i),h=u.lat,d=u.lng;c.unshift({lat:h,lng:d})}o.hasOwnProperty(l)&&c.unshift(o[l](A.__data)),s[l].apply(s,c)}}})),this._animationCycle()}}),S_={exports:{}},E_={exports:{}},T_={};!function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,A=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var p=e.type;switch(p){case A:case l:case r:case a:case i:case u:return p;default:var m=p&&p.$$typeof;switch(m){case s:case c:case f:case d:case o:return m;default:return h}}case n:return h}}}var x=A,b=l,_=s,w=o,M=t,S=c,E=r,T=f,C=d,L=n,P=a,R=i,q=u,D=!1;function I(e){return y(e)===l}T_.AsyncMode=x,T_.ConcurrentMode=b,T_.ContextConsumer=_,T_.ContextProvider=w,T_.Element=M,T_.ForwardRef=S,T_.Fragment=E,T_.Lazy=T,T_.Memo=C,T_.Portal=L,T_.Profiler=P,T_.StrictMode=R,T_.Suspense=q,T_.isAsyncMode=function(e){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(e)||y(e)===A},T_.isConcurrentMode=I,T_.isContextConsumer=function(e){return y(e)===s},T_.isContextProvider=function(e){return y(e)===o},T_.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},T_.isForwardRef=function(e){return y(e)===c},T_.isFragment=function(e){return y(e)===r},T_.isLazy=function(e){return y(e)===f},T_.isMemo=function(e){return y(e)===d},T_.isPortal=function(e){return y(e)===n},T_.isProfiler=function(e){return y(e)===a},T_.isStrictMode=function(e){return y(e)===i},T_.isSuspense=function(e){return y(e)===u},T_.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===l||e===a||e===i||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===o||e.$$typeof===s||e.$$typeof===c||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===p)},T_.typeOf=y}(),E_.exports=T_;var C_=Object.getOwnPropertySymbols,L_=Object.prototype.hasOwnProperty,P_=Object.prototype.propertyIsEnumerable;function R_(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var q_,D_=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(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=R_(e),a=1;a<arguments.length;a++){for(var o in n=Object(arguments[a]))L_.call(n,o)&&(i[o]=n[o]);if(C_){r=C_(n);for(var s=0;s<r.length;s++)P_.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},I_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",B_={},O_=Function.call.bind(Object.prototype.hasOwnProperty);function k_(e,t,n,r,i){for(var a in e)if(O_(e,a)){var o;try{if("function"!=typeof e[a]){var s=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw s.name="Invariant Violation",s}o=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}if(!o||o instanceof Error||q_((r||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof o+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),o instanceof Error&&!(o.message in B_)){B_[o.message]=!0;var A=i?i():"";q_("Failed "+n+" type: "+o.message+(null!=A?A:""))}}}q_=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},k_.resetWarningCache=function(){B_={}};var N_,z_=k_,F_=E_.exports,U_=D_,H_=I_,G_=z_,j_=Function.call.bind(Object.prototype.hasOwnProperty);function V_(){return null}N_=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var W_=E_.exports;S_.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",i={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:s(V_),arrayOf:function(e){return s((function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new o("Invalid "+i+" `"+a+"` of type `"+c(s)+"` supplied to `"+r+"`, expected an array.");for(var A=0;A<s.length;A++){var l=e(s,A,r,i,a+"["+A+"]",H_);if(l instanceof Error)return l}return null}))},element:s((function(t,n,r,i,a){var s=t[n];return e(s)?null:new o("Invalid "+i+" `"+a+"` of type `"+c(s)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:s((function(e,t,n,r,i){var a=e[t];return F_.isValidElementType(a)?null:new o("Invalid "+r+" `"+i+"` of type `"+c(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(t,n,i,a,s){if(!(t[n]instanceof e)){var A=e.name||r;return new o("Invalid "+a+" `"+s+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:r)+"` supplied to `"+i+"`, expected instance of `"+A+"`.")}var l;return null}))},node:s((function(e,t,n,r,i){return l(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],A=c(s);if("object"!==A)return new o("Invalid "+i+" `"+a+"` of type `"+A+"` supplied to `"+r+"`, expected an object.");for(var l in s)if(j_(s,l)){var u=e(s,l,r,i,a+"."+l,H_);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return N_(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),V_;function t(t,n,r,i,s){for(var A=t[n],l=0;l<e.length;l++)if(a(A,e[l]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===u(t)?String(t):t}));return new o("Invalid "+i+" `"+s+"` of value `"+String(A)+"` supplied to `"+r+"`, expected one of "+c+".")}return s(t)},oneOfType:function(e){if(!Array.isArray(e))return N_("Invalid argument supplied to oneOfType, expected an instance of array."),V_;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return N_("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+h(n)+" at index "+t+"."),V_}return s((function(t,n,r,i,a){for(var s=0;s<e.length;s++)if(null==(0,e[s])(t,n,r,i,a,H_))return null;return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return s((function(t,n,r,i,a){var s=t[n],A=c(s);if("object"!==A)return new o("Invalid "+i+" `"+a+"` of type `"+A+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var u=e[l];if(u){var h=u(s,l,r,i,a+"."+l,H_);if(h)return h}}return null}))},exact:function(e){return s((function(t,n,r,i,a){var s=t[n],A=c(s);if("object"!==A)return new o("Invalid "+i+" `"+a+"` of type `"+A+"` supplied to `"+r+"`, expected `object`.");var l=U_({},t[n],e);for(var u in l){var h=e[u];if(!h)return new o("Invalid "+i+" `"+a+"` key `"+u+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=h(s,u,r,i,a+"."+u,H_);if(d)return d}return null}))}};function a(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e){this.message=e,this.stack=""}function s(e){var n={},i=0;function a(a,s,A,l,c,u,h){if(l=l||r,u=u||A,h!==H_){if(t){var d=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 d.name="Invariant Violation",d}if("undefined"!=typeof console){var f=l+":"+A;!n[f]&&i<3&&(N_("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[f]=!0,i++)}}return null==s[A]?a?null===s[A]?new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `null`."):new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,A,l,c,u)}var s=a.bind(null,!1);return s.isRequired=a.bind(null,!0),s}function A(e){return s((function(t,n,r,i,a,s){var A=t[n];return c(A)!==e?new o("Invalid "+i+" `"+a+"` of type `"+u(A)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function l(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(l);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,a=r.call(t);if(r!==t.entries){for(;!(i=a.next()).done;)if(!l(i.value))return!1}else for(;!(i=a.next()).done;){var o=i.value;if(o&&!l(o[1]))return!1}return!0;default:return!1}}function c(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function u(e){if(null==e)return""+e;var t=c(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function h(e){var t=u(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,i.checkPropTypes=G_,i.resetWarningCache=G_.resetWarningCache,i.PropTypes=i,i}(W_.isElement,!0);var Q_=S_.exports,Y_={width:Q_.number,height:Q_.number,backgroundColor:Q_.string,backgroundImageUrl:Q_.string,globeImageUrl:Q_.string,bumpImageUrl:Q_.string,showGlobe:Q_.bool,showGraticules:Q_.bool,showAtmosphere:Q_.bool,atmosphereColor:Q_.string,atmosphereAltitude:Q_.number,globeMaterial:Q_.object,onGlobeReady:Q_.func,onGlobeClick:Q_.func,onGlobeRightClick:Q_.func,pointsData:Q_.arrayOf(Q_.object),pointLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pointLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pointColor:Q_.oneOfType([Q_.string,Q_.func]),pointAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pointRadius:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pointResolution:Q_.number,pointsMerge:Q_.bool,pointsTransitionDuration:Q_.number,pointLabel:Q_.oneOfType([Q_.string,Q_.func]),onPointClick:Q_.func,onPointRightClick:Q_.func,onPointHover:Q_.func,arcsData:Q_.arrayOf(Q_.object),arcStartLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcStartLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcEndLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcEndLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcColor:Q_.oneOfType([Q_.string,Q_.arrayOf(Q_.string),Q_.func]),arcAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcAltitudeAutoScale:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcStroke:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcCurveResolution:Q_.number,arcCircularResolution:Q_.number,arcDashLength:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcDashGap:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcDashInitialGap:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcDashAnimateTime:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),arcsTransitionDuration:Q_.number,arcLabel:Q_.oneOfType([Q_.string,Q_.func]),onArcClick:Q_.func,onArcRightClick:Q_.func,onArcHover:Q_.func,polygonsData:Q_.arrayOf(Q_.object),polygonGeoJsonGeometry:Q_.oneOfType([Q_.string,Q_.func]),polygonCapColor:Q_.oneOfType([Q_.string,Q_.func]),polygonCapMaterial:Q_.oneOfType([Q_.object,Q_.string,Q_.func]),polygonSideColor:Q_.oneOfType([Q_.string,Q_.func]),polygonSideMaterial:Q_.oneOfType([Q_.object,Q_.string,Q_.func]),polygonStrokeColor:Q_.oneOfType([Q_.string,Q_.func]),polygonAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),polygonCapCurvatureResolution:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),polygonsTransitionDuration:Q_.number,polygonLabel:Q_.oneOfType([Q_.string,Q_.func]),onPolygonClick:Q_.func,onPolygonRightClick:Q_.func,onPolygonHover:Q_.func,pathsData:Q_.array,pathPoints:Q_.oneOfType([Q_.array,Q_.string,Q_.func]),pathPointLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathPointLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathPointAlt:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathResolution:Q_.number,pathColor:Q_.oneOfType([Q_.string,Q_.arrayOf(Q_.string),Q_.func]),pathStroke:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathDashLength:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathDashGap:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathDashInitialGap:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathDashAnimateTime:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),pathTransitionDuration:Q_.number,pathLabel:Q_.oneOfType([Q_.string,Q_.func]),onPathClick:Q_.func,onPathRightClick:Q_.func,onPathHover:Q_.func,hexBinPointsData:Q_.arrayOf(Q_.object),hexBinPointLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexBinPointLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexBinPointWeight:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexBinResolution:Q_.number,hexMargin:Q_.oneOfType([Q_.number,Q_.func]),hexTopColor:Q_.func,hexSideColor:Q_.func,hexAltitude:Q_.oneOfType([Q_.number,Q_.func]),hexTopCurvatureResolution:Q_.number,hexBinMerge:Q_.bool,hexTransitionDuration:Q_.number,hexLabel:Q_.oneOfType([Q_.string,Q_.func]),onHexClick:Q_.func,onHexRightClick:Q_.func,onHexHover:Q_.func,hexPolygonsData:Q_.arrayOf(Q_.object),hexPolygonGeoJsonGeometry:Q_.oneOfType([Q_.string,Q_.func]),hexPolygonColor:Q_.oneOfType([Q_.string,Q_.func]),hexPolygonAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexPolygonResolution:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexPolygonMargin:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexPolygonCurvatureResolution:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),hexPolygonsTransitionDuration:Q_.number,hexPolygonLabel:Q_.oneOfType([Q_.string,Q_.func]),onHexPolygonClick:Q_.func,onHexPolygonRightClick:Q_.func,onHexPolygonHover:Q_.func,tilesData:Q_.arrayOf(Q_.object),tileLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tileLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tileAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tileWidth:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tileHeight:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tileUseGlobeProjection:Q_.oneOfType([Q_.bool,Q_.string,Q_.func]),tileMaterial:Q_.oneOfType([Q_.object,Q_.string,Q_.func]),tileCurvatureResolution:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),tilesTransitionDuration:Q_.number,tileLabel:Q_.oneOfType([Q_.string,Q_.func]),onTileClick:Q_.func,onTileRightClick:Q_.func,onTileHover:Q_.func,labelsData:Q_.arrayOf(Q_.object),labelLat:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelLng:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelAltitude:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelRotation:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelText:Q_.oneOfType([Q_.string,Q_.func]),labelSize:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelTypeFace:Q_.object,labelColor:Q_.oneOfType([Q_.string,Q_.func]),labelResolution:Q_.number,labelIncludeDot:Q_.oneOfType([Q_.bool,Q_.string,Q_.func]),labelDotRadius:Q_.oneOfType([Q_.number,Q_.string,Q_.func]),labelDotOrientation:Q_.oneOfType([Q_.string,Q_.func]),labelsTransitionDuration:Q_.number,labelLabel:Q_.oneOfType([Q_.string,Q_.func]),onLabelClick:Q_.func,onLabelRightClick:Q_.func,onLabelHover:Q_.func,customLayerData:Q_.arrayOf(Q_.object),customThreeObject:Q_.oneOfType([Q_.object,Q_.string,Q_.func]),customThreeObjectUpdate:Q_.oneOfType([Q_.string,Q_.func]),customLayerLabel:Q_.oneOfType([Q_.string,Q_.func]),onCustomLayerClick:Q_.func,onCustomLayerRightClick:Q_.func,onCustomLayerHover:Q_.func,enablePointerInteraction:Q_.bool,pointerEventsFilter:Q_.func,lineHoverPrecision:Q_.number,onZoom:Q_.func},X_=function(t,r){var i="object"===c(r)?r:{wrapperElementType:r,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},a=i.wrapperElementType,o=void 0===a?"div":a,A=i.nodeMapper,d=void 0===A?function(e){return e}:A,f=i.methodNames,p=void 0===f?[]:f,m=i.initPropNames,g=void 0===m?[]:m;return e.forwardRef((function(r,i){var a=e.useRef(),A=u(e.useState({}),2),c=A[0],f=A[1];e.useEffect((function(){return f(r)}));var m=e.useMemo((function(){var e=l(g.filter((function(e){return r.hasOwnProperty(e)})).map((function(e){return[e,r[e]]})));return t(e)}),[]);e.useLayoutEffect((function(){m(d(a.current))}),[]),e.useEffect((function(){return m._destructor instanceof Function?m._destructor:void 0}),[]);var v=e.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 m[e]instanceof Function?m[e].apply(m,n):void 0}),[m]),y=s(r,[].concat(h(p),h(g)));return Object.keys(y).filter((function(e){return c[e]!==r[e]})).forEach((function(e){return v(e,r[e])})),e.useImperativeHandle(i,(function(){return l(p.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 v.apply(void 0,[e].concat(n))}]})))})),n.default.createElement(o,{ref:a})}))}(M_,{methodNames:["pauseAnimation","resumeAnimation","pointOfView","scene","camera","renderer","postProcessingComposer","controls","getCoords","getScreenCoords","toGeoCoords","toGlobeCoords"],initPropNames:["animateIn","waitForGlobeReady","rendererConfig"]});return X_.displayName="Globe",X_.propTypes=Y_,X_}));
|