(function(l,fa){"object"===typeof exports&&"undefined"!==typeof module?fa(exports):"function"===typeof define&&define.amd?define(["exports"],fa):(l=l||self,fa(l.THREE={}))})(this,function(l){function fa(){}function fb(e,h){if(!(e instanceof h))throw new TypeError("Cannot call a class as a function");}function Oh(e,h){for(var a=0;a<h.length;a++){var b=h[a];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(e,b.key,b)}}function Ve(e,h,a){h&&Oh(e.prototype,h);a&&Oh(e,a);return e}function Wb(e,h){if("function"!==typeof h&&null!==h)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(h&&h.prototype,{constructor:{value:e,writable:!0,configurable:!0}});h&&mg(e,h)}function sb(e){sb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)};return sb(e)}function mg(e,h){mg=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return mg(e,h)}function tb(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xb(e,h){return!h||"object"!==typeof h&&"function"!==typeof h?tb(e):h}function ng(e){if(Array.isArray(e)){var h=0;for(var a=Array(e.length);h<e.length;h++)a[h]=e[h];h=a}else h=void 0;h||(h=Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)?Array.from(e):void 0);if(!(e=h))throw new TypeError("Invalid attempt to spread non-iterable instance");return e}function Ph(e,h){"parentNode"in e||Object.defineProperty(e,"parentNode",{enumerable:!0,get:0===h?function(){return null}:1===h?function(){return V.documentElement}:function(){return V.body}});"parentElement"in e||Object.defineProperty(e,"parentElement",{enumerable:!0,get:0===h?function(){return null}:1===h?function(){return V.documentElement}:function(){return V.body}})}function Nj(e){"clientLeft"in e||(e.clientLeft=0,e.clientTop=0);"clientWidth"in e||(e.clientWidth=Kc,e.clientHeight=Lc);"getBoundingClientRect"in e||(e.getBoundingClientRect=function(){var e={x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight};e.right=e.width;e.bottom=e.height;return e})}function Qh(e){var h=function(){};e.classList=[];e.classList.add=h;e.classList.remove=h;e.classList.contains=h;e.classList.toggle=h}function og(e,h){var a=!0,b=!1,c=void 0;try{for(var d=Object.getOwnPropertyNames(h)[Symbol.iterator](),f;!(a=(f=d.next()).done);a=!0){var g=f.value;if("constructor"!==g&&"prototype"!==g&&"name"!==g){var k=Object.getOwnPropertyDescriptor(h,g);Object.defineProperty(e,g,k)}}}catch(m){b=!0,c=m}finally{try{if(!a&&null!=d["return"])d["return"]()}finally{if(b)throw c;}}}function Rh(){var e=ra;if(!e)throw Error("please register a canvas");e=e.createImage();"tagName"in e||(e.tagName="IMG");Ph(e);Qh(e);return e}function Sh(e){return function(){V.visibilityState=e?"visible":"hidden";var h=!e;V.hidden!==h&&(V.hidden=h,h=new pg("visibilitychange"),h.target=V,h.timeStamp=Date.now(),V.dispatchEvent(h))}}function Yb(e){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};h.target=h.target||this;"function"===typeof this["on".concat(e)]&&this["on".concat(e)].call(this,h)}function We(e){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.readyState=e;h.readyState=e;Yb.call(this,"readystatechange",h)}function Th(e,h){V.addEventListener(e,h)}function Uh(e,h){V.removeEventListener(e,h)}function Ra(){}function z(e,h){this.x=e||0;this.y=h||0}function ya(e,h,a,b){this._x=e||0;this._y=h||0;this._z=a||0;this._w=void 0!==b?b:1}function q(e,h,a){this.x=e||0;this.y=h||0;this.z=a||0}function ka(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("")}function S(e,h,a,b,c,d,f,g,k,m){Object.defineProperty(this,"id",{value:Oj++});this.uuid=N.generateUUID();this.name="";this.image=void 0!==e?e:S.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==h?h:S.DEFAULT_MAPPING;this.wrapS=void 0!==a?a:1001;this.wrapT=void 0!==b?b:1001;this.magFilter=void 0!==c?c:1006;this.minFilter=void 0!==d?d:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==f?f:1023;this.type=void 0!==g?g:1009;this.offset=new z(0,0);this.repeat=new z(1,1);this.center=new z(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new ka;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ca(e,h,a,b){this.x=e||0;this.y=h||0;this.z=a||0;this.w=void 0!==b?b:1}function sa(e,h,a){this.width=e;this.height=h;this.scissor=new ca(0,0,e,h);this.scissorTest=!1;this.viewport=new ca(0,0,e,h);a=a||{};this.texture=new S(void 0,void 0,a.wrapS,a.wrapT,a.magFilter,a.minFilter,a.format,a.type,a.anisotropy,a.encoding);this.texture.image={};this.texture.image.width=e;this.texture.image.height=h;this.texture.generateMipmaps=void 0!==a.generateMipmaps?a.generateMipmaps:!1;this.texture.minFilter=void 0!==a.minFilter?a.minFilter:1006;this.depthBuffer=void 0!==a.depthBuffer?a.depthBuffer:!0;this.stencilBuffer=void 0!==a.stencilBuffer?a.stencilBuffer:!0;this.depthTexture=void 0!==a.depthTexture?a.depthTexture:null}function qg(e,h,a){sa.call(this,e,h,a);this.samples=4}function I(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("")}function Zb(e,h,a,b){this._x=e||0;this._y=h||0;this._z=a||0;this._order=b||Zb.DefaultOrder}function rg(){this.mask=1}function E(){Object.defineProperty(this,"id",{value:Pj++});this.uuid=N.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=E.DefaultUp.clone();var e=new q,h=new Zb,a=new ya,b=new q(1,1,1);h._onChange(function(){a.setFromEuler(h,!1)});a._onChange(function(){h.setFromQuaternion(a,void 0,!1)});Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:h},quaternion:{configurable:!0,enumerable:!0,value:a},scale:{configurable:!0,enumerable:!0,value:b},modelViewMatrix:{value:new I},normalMatrix:{value:new ka}});this.matrix=new I;this.matrixWorld=new I;this.matrixAutoUpdate=E.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new rg;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={}}function Kd(){E.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0;"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function gb(e,h){this.min=void 0!==e?e:new q(Infinity,Infinity,Infinity);this.max=void 0!==h?h:new q(-Infinity,-Infinity,-Infinity)}function sg(e,h,a,b,c){var d;var f=0;for(d=e.length-3;f<=d;f+=3){$b.fromArray(e,f);var g=c.x*Math.abs($b.x)+c.y*Math.abs($b.y)+c.z*Math.abs($b.z),k=h.dot($b),m=a.dot($b),n=b.dot($b);if(Math.max(-Math.max(k,m,n),Math.min(k,m,n))>g)return!1}return!0}function ub(e,h){this.center=void 0!==e?e:new q;this.radius=void 0!==h?h:0}function ac(e,h){this.origin=void 0!==e?e:new q;this.direction=void 0!==h?h:new q}function Sa(e,h){this.normal=void 0!==e?e:new q(1,0,0);this.constant=void 0!==h?h:0}function va(e,h,a){this.a=void 0!==e?e:new q;this.b=void 0!==h?h:new q;this.c=void 0!==a?a:new q}function D(e,h,a){return void 0===h&&void 0===a?this.set(e):this.setRGB(e,h,a)}function tg(e,h,a){0>a&&(a+=1);1<a&&--a;return a<1/6?e+6*(h-e)*a:.5>a?h:a<2/3?e+6*(h-e)*(2/3-a):e}function ug(e){return.04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function vg(e){return.0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}function Mc(e,h,a,b,c,d){this.a=e;this.b=h;this.c=a;this.normal=b&&b.isVector3?b:new q;this.vertexNormals=Array.isArray(b)?b:[];this.color=c&&c.isColor?c:new D;this.vertexColors=Array.isArray(c)?c:[];this.materialIndex=void 0!==d?d:0}function R(){Object.defineProperty(this,"id",{value:Qj++});this.uuid=N.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.ve